[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Difference between Get_Class and Get new class
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] Difference between Get_Class and Get new class |
Date: |
Wed, 09 Jun 2004 15:49:03 +0200 (CEST) |
> In ftxgdef.c, what is the difference between the call to function
> Get_Class and Get new class? I have done a little bit of debugging
> and Get_class always returns a 0 for simple or mark glyph type. And
> it is then Get new class func that (always) returns simple i.e. 1.
> Can you help?
>From apirefx.txt:
TT_GDEF_Get_Glyph_Property:
[...] Some fonts need GDEF-like data even if no GDEF table is
provided (for example, the Arabic script needs information which
glyphs are base glyphs and which are mark glyphs). In such
cases, you should use TT_GDEF_Build_ClassDefinition() to build
the necessary structures so that TT_GDEF_Get_Property() returns
meaningful values. [...]
TT_GDEF_Build_ClassDefinition:
Fills a `gdef' structure with data to make
TT_GDEF_Get_Property() work in case no GDEF table is available.
`num_glyphs' is the number of glyphs in the font. [...]
See `arabic.c' for an example.
Get_Class() is for real GDEF tables, while Get_New_Class() handles
constructed ones. Older Arabic OpenType fonts expect some extra logic
within the operating system (Windows 95 or so) which today's font
should normally have built-in.
Werner