freetype-devel
[Top][All Lists]
Advanced

[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: Fri, 11 Jun 2004 13:30:50 +0200 (CEST)

> 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
>       3-46
>       824-824
>       826-835
>       846-861
> Now 836 is not in any of the range, Get class returns an
> error_not_covered message with index =2.

In case of error, the `index' value is meaningless.

> At this point Get_New_class(...) is called.

This means that somewhere in code before the application has created
and installed a user-defined class table.  IMHO this is strange, since
the idea is that a constructed GDEF table is installed only if the
font doesn't provide a GDEF table itself.

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

You are talking about `return values'.  Normally, these are error
codes.  I assume that you talk about the values assigned to the
`class' variable in the function TT_GDEF_Get_Glyph_Property, right?

You have to find out where the function TT_GDEF_Build_ClassDefinition
is called, and why it is called even for fonts which have a GDEF
table.


    Werner



reply via email to

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