freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Distinguish real missing character from real character with g


From: Dimitrios . Papadopoulos
Subject: [ft-devel] Distinguish real missing character from real character with glyph index 0
Date: Tue, 17 Mar 2015 12:59:56 +0100

Hi Freetypers,

I have opened in a wrong place a wish request, the conversation is at the end of the mail.
I have some observations to the last answer.

At the notes of the  FT_Get_Char_Index it says clearly that freetype modifies the font.
The request is  to give to the user the original information of the font.

If i am asking from a Type1 font the glyph index for glyph name "foobar" and it doesn't exist to return the information that i doesn't exist and not returning the glyph index for the .notdef character.
Also if there isn't .notdef character also i would like to know that.

Summarize the above example, it could be nice to distinguish what does it mean glyph index 0.
Is it the real map of the charcode|glyph name  to the glyph index or it is fallback mechanisms to get the notdef glyph?


Best Regards,
Dimitrios Papadopoulos




Such a question belongs to the FreeType user mailing list, not to the bug tracker... 

You are misunderstanding the interface. 

If you try to access a font by character code with FT_Get_Char_Index, return value 0 means that there is no glyph in the font for this character code. 

If you try to access a font by glyph index with FT_Load_Glyph, a value larger than the number of glyphs makes this function return an error. 

Finally, if you try to access a font by glyph name with FT_Get_Name_Index, return value 0 means that there is no glyph in the font with this name. 

In case you still have questions please discuss this on the mailing list. 

Werner LEMBERG <wl>
Mon 16 Mar 2015 01:09:14 PM GMT, original submission:

I would like to know if a character exists on the font or not. 
With the current implementation we can not know if it is really missing character or it is real character with glyph index 0. 

Can we define something like FT_INDEX_NOT_FOUND 0xFFFFFFFFU and return it in case of real missing character? Or something that inform us that the character doesn't exist on the font. 

A new function is also welcome. 



reply via email to

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