freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Enumerating font encoding


From: George Williams
Subject: Re: [Devel] Enumerating font encoding
Date: Fri, 01 Feb 2002 16:00:47 -0800

I don't quite understand the format 2 TrueType charmap -- the code
seems to index subHeaderKeys using both high and low bytes of the
character.  Can this really be right?  It seems to restrict the mapping
pretty severely; 16-bit fonts don't seem able to support any glyphs in
page 0.
Remember that format 2 is for CJK encodings like SJIS & Wansung where you have latin (and katakana) characters encoded in a single byte and Kanji or Hangul encoded with double bytes.

As such page 0 is never accessed.

If you have a stream of characters map the first character with the subHeaderKey array => If the result is 0 then this is a one byte character and you use this same character to map into the subHeader[0] struct to figure out
                the glyph index.
=> If the result is not-0 then this is a two-byte character and you use
                the next character to map into subHeader[ch1].

So yes, it does not support a two byte character with a 0 byte in the first character. But that case doesn't arise in the CJK maps.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]