[Okular-devel] [PATCH] Fix rendering of DVI documents

Albert Astals Cid aacid at kde.org
Fri Oct 2 23:54:01 CEST 2009


A Divendres, 2 d'octubre de 2009, Benoit Jacob va escriure:
> 2009/10/2 Albert Astals Cid <aacid at kde.org>:
> > A Divendres, 2 d'octubre de 2009, Elvis Stansvik va escriure:
> >> 2009/10/2 Albert Astals Cid <aacid at kde.org>:
> >> > A Divendres, 2 d'octubre de 2009, Benoit Jacob va escriure:
> >> >> Hi List,
> >> >>
> >> >> I noticed that the rendering of DVI documents was broken exactly in
> >> >> the same way as what I observed with PDF documents, namely, it used
> >> >> auto-hinting which looks especially bad with TeX fonts.
> >> >>
> >> >> Attached is a 1-line patch that changes it. I need your permission to
> >> >>  commit.
> >> >>
> >> >> Screenshots:
> >> >> * original :
> >> >>  http://picasaweb.google.ca/lh/photo/fry54ANy23UesNpFhbWanA?feat=dire
> >> >>ctl ink * fixed :
> >> >>  http://picasaweb.google.ca/lh/photo/OjQIZ7Of6wP74k7fKUwXTw?feat=dire
> >> >>ctl ink
> >> >>
> >> >> Here are some comments before one objects that disabling hinting is
> >> >> just a matter of taste, etc.
> >> >>
> >> >> First, it's obvious that the "original" screenshot linked above is
> >> >> horrible and that the "fixed" is the one that looks good.
> >> >>
> >> >> Second, it is a consensus on the Poppler/PDF side that one should use
> >> >> no hinting, and then, there's no reason why DVI should be any
> >> >> different. To summarize the situation on the PDF side:
> >> >> * poppler/cairo (hence Evince) 's code completely disables hinting
> >> >> * poppler/splash (hence Okular) 's code _meant_ to completely disable
> >> >> hinting (actually only auto-hinting, but in the context of DVI that's
> >> >> really the same because almost all DVI files use Type 1 fonts, and
> >> >> bytecode only exists in TrueType fonts). It was a clear bug in the
> >> >> code, where it was clear that the code didn't do what it intended,
> >> >> that resulted in hinted fonts being used.
> >> >>
> >> >> Third, the old KDVI used to not do any hinting, I'm completely sure
> >> >> of that because I've spent hundreds of hours looking at documents in
> >> >> it. I remember distinctly the (imho beautiful) slightly fuzzy look of
> >> >> the TeX fonts in it, that is characteristic of non-hinted text,
> >> >> although at that time I didn't know about hinting. That said, I used
> >> >> "svn annotate" to see who enabled hinting in the C++ code, and it
> >> >> turns out to be Stefan Kebekus himself in an old revision
> >> >> (240000-something). I am puzzled about that, but I still maintain
> >> >> that KDVI didn't use hinting on all the Linux systems that I tried.
> >> >> My best guess is that Stefan Kebekus _thought_ that he had enabled
> >> >> hinting but for some reason it wasn't used. I haven't investigated
> >> >> further as this is quite intricate, and of course I only have
> >> >> Okular's code at hand, I haven't looked at the actual KDVI code.
> >> >>
> >> >> OK to commit?
> >> >
> >> > No, actually what it is clear that *you* don't like hinting, and you
> >> > have a certain amount of followers, the problem is that typically
> >> > people that is happy with a setting is not much active defending it
> >> > because they are happy in their sofas.
> >> >
> >> > My suggestion is adding a configuration option that lets the user
> >> > choose between "No Hinting", "Hinting" and "Hinting as set in KDE
> >> > settings". For KDE 4.3.x we can add it, it set in "Hinting" and the
> >> > only configuration option will be thought non GUI as we can't add
> >> > translatable texts. For KDE 4.4.x we can default to "No Hinting" if
> >> > others here (basically Pino, Brad, Tokoe) agree.
> >>
> >> I'm not one of those three, but I'll just chime in anyway and say that
> >> I agree with Benoit that, at least in the example he gave, it's very
> >> obvious that the non-hinted version looks much better. I'm not trying
> >> to troll here, but come on, in some places the hinted one is hardly
> >> readable, the characters are all jumpy; e.g. the 'T' in the very first
> >> word. I don't know if this is a bug in the hinting or just the way
> >> it's supposed to look.
> >>
> >> Anyway, this doesn't make me a "follower" of Benoit; I'm just calling
> >> it like I see it ;)
> >
> > That's one PDF in one hundred, and i've already felt too many times
> > people hating me becuase I changed something I considered mintor but was
> > critical for them, so for me it's a setting all the way.
> 
> You miss the point, it's not a PDF, it's a DVI, and that makes all the
> difference, because as I explained in my previous email, 95% of DVI
> files use the same TeX font, so if I show you a bad screenshot with
> this font, it's to be taken seriously.
> 
> Albert, seriously. I've fixed one of the top bugs in Okular, that
> makes it useless to half of people as far as PDF is concerned, and to
> everybody as far as DVI is concerned, and you don't even acknowledge
> the bug. 

Man, you are starting to repeat yourself

> Let alone say thank you. Instead, you answer like I'm just an
> angry user who wants to steer Okular his own way. The bug wasn't hard
> to fix, you just need to acknowledge that while hinting can
> *sometimes* increase the crispness, it *always* degrades the fidelity
> of the rendering, and, regardless of "sometimes" versus "always", in
> the PARTICULAR setting of a PDF/DVI viewer, it should be OBVIOUS that
> fidelity is more important than crispness.

You want a thanks?

THANKS
 THANKS
  THANKS

Here you have three, please try to be constructive.

We have reached the situation in which it seems hinting is the culprit for 
some bad font rendering. Trust me in the fact that i know some people like 
hinting, if you can't trust me, bad luck, but i'm the core developer here.

I even gave you the default value, but you want to win so much that you don't 
even want the option to exist? I don't really see what your problem is.

Albert

> 
> Benoit
> _______________________________________________
> Okular-devel mailing list
> Okular-devel at kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel
> 



More information about the Okular-devel mailing list