From: "Matsumoto, Masakazu" <[EMAIL PROTECTED]>
> Minimal Japanese character set consists of about 3500 letters and they
> are mapped in 8000 character contiguous range ( in case of Shift JIS
> encoding ).
What about the other CJK encodings?
Here's one suggestion for how to do a mapping table.
typedef struct {
UInt16 firstGlyphNumber;
UInt16 lastGlyphNumber;
UInt16 mappingResourceNumber; // for now, we can require this to be 0
UInt16 offsetOfMappingTableInResource;
} ContiguousRangeInfo;
HEADER:
UInt16 fontMapVersionNumber;
UInt16 numContiguousRanges;
UInt16 numMappingResources; // for now, we can require this to be 1
UInt16 reserved[ 3 ];
ContiguousRangeInfo ranges[ numContiguousRanges ];
This is followed by a number of mapping tables, even-aligned, each of which
is a sequence of UInt16s, each UInt16 giving a glyph index number
corresponding to a glyph number.
The whole thing goes into a FMap resource, numbered 0000 (later we can allow
more than one FMap resource if needed). All fonts in a font package share
the same mapping.
The table generator is optimized to minimize the number of contiguous
ranges. Functions are added to grayfont.c that check for a mapping
resource, and if it is found, search through ContiguousRangeInfo records to
see where the character in question fits, and then look up a glyph index
based on the mapping table.
I don't have time to make the requisite changes to grayfont.c and the
palmfontconv project. But I would be happy to review patches.
Once done, the method can also be used to implement unicode grayscale fonts.
Alex
_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev