Hi Hans and other interested parties,

On Thu, Jul  9, 2026 at 09:31 (+0200), Hans Hagen via ntg-context wrote:

> On 7/9/2026 3:05 AM, Jim Diamond via ntg-context wrote:

>> 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 ...

That is an interesting comment.  My "file" program calls it a PNG, but more
on that below.

> 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)

I would have guessed it was just a "me" problem with my archaic AR, but the
unnamed person running Windows has (I presume) an up-to-date,
as-good-as-it-gets version.  So I'm not sure (older) applies here.

> viewers with mixing rendering models: texts, graphics, transparency,
> color spaces, etc and text rendering is influenced when acrobat kicks in
> another piece of rendering.

This turned out to be very helpful, thanks.

> Sometimes adding 'groups' solved it, other times it made things worse.

That's annoying.  Having said that, the bad effect I reported is limited to
the page containing the guilty PDF/PNG, so it would be nice to think that
some grouping would limit the effect to just the area of the image file.
(But, lots of things would be "nice to think".)

> (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.)

Maybe here: https://winworldpc.com/product/acrobat-reader/1

> 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.

The few times I bothered doing a comparison, AR rendered thin lines better
than anything I put it up against.  Another reason for me to keep using
this archaic program.

> Engines occasionally 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.

It is good for lots of people to be happy.  If they saw the Pagella on my
screen on the page with that PDF/PNG, the net happiness of the world would
decrease.  And it is probably already a bit too low.

> 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.

My screen is about 141 DPI.  Not super high-res, but a whole lot better
than those "crimes against humanity" 96 DPI screens.

> Of course, we can try to accomodate but I don't have that png.

I will attach that PNG to this message, in case any people reading this are
curious.

> Maybe make sure that it doesn't have an alpha channel.

Bingo!  (PARTIAL SOLUTION!) For whatever reason that PNG has an alpha
channel.  I used imagemagick to write out a new PNG, and when I use that
instead the SPR problem goes away.

I have attached the new and improved PNG as well.

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

In the most ideal world, ConTeXt would somehow trap evil images inside
their own little sandbox, and not let their bad parts corrupt the rest of
the document.  However, in the world we live in, that may not be possible.
So I have no reason to think ConTeXt is misbehaving.

Since I now can work around the issue I was having, I think all is good.

Thanks for the incisive comment about the alpha channel!

                                Jim
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to