On Mon, 2007-10-08 at 07:46, Werner LEMBERG wrote: > I've skimmed the specs but didn't look more closely. Do you > volunteer? It seems that we need a special interface for that, right? It needs a special interface. The most obvious reason is that it requires two codepoints (base codepoint + variant selector) to specify a glyph. Also because the format=14 subtable is not stand-alone, it requires lookups into a unicode charmap. In other words it could not be passed to FT_Set_Charmap.
As the spec currently stands there can only be one format 14 charmap (with platform=0, specific=5) so there is no need to select among several. So I see no need for an equivalent to FT_Set_Charmap FT_Select_Charmap These should return an error on a format 14 charmap. I propose that FT_Get_Char_Index should return 0 (or 0xffffffff?) if called on a format 14 charmap (which shouldn't be possible in the first place). Instead a new routine FT_Get_Char_Variant_Index(FT_Face face, FT_ULong charcode, FT_ULong variantSelector) Similarly FT_Get_First_Char FT_Get_Next_Char will never be called on a format 14 charmap. I'm not sure what best reflects the spirit of these routines. Should there be routines which return all codePoints for a given variationSelector, or routines which return all variationSelectors for a given codePoint, or perhaps just a list of all variantSelectors? or all three? I assume all of them FT_Get_First_Char_Of_Variant(FT_Face face, FT_ULong variationSelector, FT_UInt *agindex) (returns the first codePoint, for that variationSelector and sets the GID) FT_Get_Next_Char_Of_Variant(FT_Face face, FT_ULong variantSelector, FT_ULong codePoint, FT_UInt *agindex) (returns the next codepoint for the variationSelector) FT_Get_First_Variant_For_Char(FT_Face face, FT_ULong codePoint, FT_UInt *agindex) (returns the first variation selector for that codePoint, and sets the GID) FT_Get_Next_Variant_For_Char(FT_Face face, FT_ULong codePoint, FT_ULong variantSelector, FT_UInt *agindex) (returns the next variation selector for the codePoint) FT_Get_First_Variant_Selector(FT_Face face) (returns the first variationSelector) FT_Get_Next_Variant_Selector(FT_Face face, FT_ULong variantSelector) (returns the next variationSelector) General questions: How should it behave if the current cmap is not a unicode cmap? Should it look for a unicode cmap in the list, or just return error? Should I extend the CMap class with these additional functions, or just make direct calls? _______________________________________________ Freetype-devel mailing list Freetype-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-devel