[Top][All Lists]

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

[Devel] Difference between Get_Class and Get new class: More info

From: 786
Subject: [Devel] Difference between Get_Class and Get new class: More info
Date: Sat, 12 Jun 2004 08:43:43 +0500

Hello again

Thanks for the info but this did not really help. Let me explain this with a
small example.

Lets say I want to know the type of glyph# 836.

First the TT_GDEF_Get_Property() calls Get_class(...)
In get_class we have
            new_max = cdf2->ClassRangeCount - 1; lets say this is 4 and
ranges defined are
Now 836 is not in any of the range, Get class returns an error_not_covered
message with index =2.

At this point Get_New_class(...) is called. It some how finds the glyph 836,
can you explain how, and after calculating bits/byte it returns 1. But guess
what, 836 is a mark and it 'should' return 3. ??? If I could understand the
logic behind the ngc (for new glyph class) then maybe I could figure a way
out. I am doing all this using pango and gedit.

I am really stuck, please help.



-----Original Message-----
From: Werner LEMBERG [mailto:address@hidden 
Sent: Wednesday, June 09, 2004 6:49 PM
To: address@hidden; 786
Subject: Re: [Devel] Difference between Get_Class and Get new class

> 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:


      [...]  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.  [...]

      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.


Devel mailing list

reply via email to

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