Re: PNG vs. sub-pixel rendering

Hans Hagen via ntg-context <[email protected]> Thu, 9 Jul 2026 09:31:30 +0200
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
On 7/9/2026 3:05 AM, Jim Diamond via ntg-context wrote:
> Hi all,
> 
> One day I was wondering why a typeface looked so bad (when reading on my
> laptop screen using Adobe reader), and I realized that sub-pixel rendering
> was not working.  At first I thought it was the typeface itself.
> 
> But I eventually realized that certain types of included graphics do
> something which causes AR to not do SPR.  (Those of you who don't use AR
> won't see what I am talking about, I don't think.  If you use some other
> PDF viewer which does do SPR, I would be interested in knowing if the same
> thing happens in that viewer.)
> 
> Attached is a sample ConTeXt file which has two \externalfigure commands
> and two PDFs, one in which the PNG file (greyscale) is included, and one in
> which the PDF file (colour) in included.
> 
> I don't have AR for windows, but someone (who may wish to remain unnamed :-)
> told me SPR didn't work for him there.  I use an ancient AR on Linux, and
> the problem is very evident there.  (LM looks a bit worse, but Pagella
> looks atrocious in *my* AR when SPR is turned off.)
> 
> 
> And finally, my question: does anyone know why including the PNG has this
> effect?  And, if so, is there any way to work around the problem?
> 
> Does any PDF wizard know if, when a PNG is included, there is/are some
> machination(s) which affect(s) the entire page, instead of just the place
> where the PNG is included?

the attached files has no png in it but an inscape pdf blob ... the only 
think that comes to mind (i have browse a few decades pdf issues in my 
mind now) is that there have always been issues in these (older) viewers 
with mixing rendering models: texts, graphics, transparency, color 
spaces, etc and text rendering is influenced when acrobat kicks in 
another piece of rendering. Sometimes adding 'groups' solved it, other 
times it made things worse. (I haven't launched acrobat in ages but at 
the time the msdos version was actually quite ok; I wonder if that one 
is still around soemwhere.)

Comparable issues are with how rules are rendered, lines with a certain 
thickness, or filled rectangles .. something that for instance had / has 
consequences for the rules that make up a radical. Engines occasionalaly 
adapted by choosing one or the other approach of switch between them 
depending on some criterium (size).

Or take type 3 fonts (bitmap tex fonts), that was always a gamble but 
with high res screens that problem went mostly away (if we forget about 
Preview).

The "good news" is that the majority of tex users seems to be happy with 
what they gat (or see) because when we talk accuracy there are more 
possible issues. Around the last tl code freeze i noticed that in some 
engine with some fonts and some macro package using some new feature 
text could drift in a way that makes right margins go bad but when no 
one notices i keep silent. Maybe you should just be happy that all just 
renders and gamble on a high res display.

Of course, we can try to accomodate but I don't have that png. Maybe 
make sure that it doesn't have an alpha channel.

Anyway, let me know if you think context is behaving bad here,

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________