[Okular-devel] [PATCH] Fix rendering of DVI documents
Benoit Jacob
jacob.benoit.1 at gmail.com
Fri Oct 2 02:41:07 CEST 2009
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=directlink
* fixed : http://picasaweb.google.ca/lh/photo/OjQIZ7Of6wP74k7fKUwXTw?feat=directlink
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?
Benoit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: okular-dvi-disable-hinting.diff
Type: text/x-patch
Size: 506 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/okular-devel/attachments/20091001/615f40d4/attachment.diff
More information about the Okular-devel
mailing list