From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Sat Aug 03 2002 - 06:46:29 EDT
As suggested earlier, I have changed the gr_CharWidth class so
that non-existent characters are indicated by GR_CW_UNKNOWN,
rather than by 0 as in the past. This makes it possible to distinguish
between genuinely 0-width characters and characters non present
in the font. The change also required changes to
GR_Graphics::remampGlyph().
This may or may not require some changes to platform-specific
gr_*Graphics::measureUnRemappedChar() and any platform-
specific code that evaluates the return value. The bottom line is that
characters for which measureUnRemappedChar() returns 0 will no
longer be remapped; so if you want to use the AW remapping
mechanism then you need to make sure that the function returns
GR_CW_UNKNOWN for absent glyphs.
Please note that on some operating systems (e.g. win32) the font
renderer has a build-in remaping for absent glyphs, which is
probably preferable to the AW one, so use it. On the other hand as
far as I recall, the gtk functions used to return 0 width for absent
glyphs; I do not know if this is still the case with gtk2, but if so, then
someone needs to make sure that the 0 is translated to
GR_CW_UNKNOWN.
GR_CW_UNKNOWN is defined in gr_CharWidths.h as
(UT_sint32)0x80808080.
Tomas
This archive was generated by hypermail 2.1.4 : Sat Aug 03 2002 - 06:55:51 EDT