[HarfBuzz] Helvetica.dfont & BitStream Vera Sans Mono problems
Sebastien Metrot
meeloo at meeloo.net
Mon Jul 4 03:05:06 PDT 2011
Hi,
I'm seeing strange bugs in my toolkit after converting my font layout engine to harfbuzz-ng shaping. While most fonts work alright, some have wrong X axis density as you can see on this (rather big) screenshot: http://meeloo.net/~meeloo/nui_harfbuzz.png
At least two fonts have problems: Helvetica.dfont (from Mac OSX Snow Leopard), Meiryo.ttf (from OSX too) and the the open source Vera Sans Mono from bitstream.
As you can see on the screenshot, all sizes of Vera Sans Mono don't show the same problem, as the 8pt version looks alright.
My toolkit uses harfbuzz + freetype2 with the harfbuzz provided freetype glue code. The unicode callbacks are implemented via a mix of custom code (for script detection) and ucdata (for code point features).
You can have a look at the code here https://github.com/meeloo/nui3/tree/utf8/src/Font . I call harfbuzz only in one function: https://github.com/meeloo/nui3/blob/utf8/src/Font/nuiFontBase.cpp#L2114
Before using harfbuzz I was using a very naive algorithm (that is just using glyph advances) but I was not having these problems (but I couldn't handle complex scripts either ;-) ).
I would like to know if this is a bug on my part (most likely) or a problem in the shaping algorithm.
Thank you very much if you've read this far.
--
Sébastien Métrot
libnui author
http://libnui.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20110704/b57d8215/attachment.html>
More information about the HarfBuzz
mailing list