Using Uniscribe in Pango/Win32



Can anybody think of a good reason *not* to use Uniscribe
(http://www.microsoft.com/typography/developers/uniscribe/default.htm)
in Pango on Win32? 

Uniscribe, in the form of usp10.dll, isn't necessarily present on all
Win32 machines, but the old "stupid" code can be left in as a
fallback.

I have added code to the basic-win32 shaper (which isn't so basic
after that...) to use Uniscribe, and it seems to work OK. At least for
Arabic and Hindi the results look correct to me, identical to what
WordPad on Win2k produces. The Uniscribe APIs used are
ScriptItemize(), ScriptShape() and ScriptPlace().

Nothing committed to CVS yet, I still have some smallish bugs to work
out, for instance in the conversion of Uniscribe-style logcluster
arrays to Pango style.

(Uniscribe: an array with one item per original char indicating the
index of the first glyph in the cluster that char contributed
to. Except that if RTL, the array entry indicates the index of the
last glyph in the cluster the char contributed to. Pango: an array
with one item per glyph indicating the first char that contributed to
the cluster the glyph is part of. Hope I got that right...)
 
While at it, I'll also add kerning. Relatively trivial if one only
uses the 'kern' table in a TrueType font. OpenType script-dependent
kerning would be quite a bit harder, I think, as there seems to be
much more complex data structures to parse in the font.

--tml





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]