[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Freetype
From: |
David Turner |
Subject: |
Re: [Freetype] Freetype |
Date: |
Mon, 26 Mar 2001 17:50:15 +0200 |
Hello Manfred,
Manfred Kubica a écrit :
>
> Hi,
>
> i have some problem with your very nice library freetype 2.0.1:
>
> My font has 237 glyphs. If I will load the glyph via FT_Get_Char_Index
> I becomes only 197 glyphs.
>
That's perfectly normal. A font's charmap doesn't necessarily map all
character codes to all the glyphs in the font. Some "extra" glyphs might
be placed in the font for several reasons:
- they're accessible through a different charmap
- they're application-specific symbols (i.e. you need to know
their glyph index to access them)
- they're only used for advanced typographic operations (e.g.
ligature substitutions) and are generally only referenced
through advanced internal font tables (e.g. OpenType Layout
tables)
> for (const UInt8* ptrC = g_request.chars; *ptrC; ptrC++)
> {
> int idx = FT_Get_Char_Index(face, *ptrC);
> if (idx != 0)
> iCnt++;
> }
>
The result of 'iCnt' in this code is very dependent on the content
of your "g_request.chars" array, not the content of the font..
Are you sure this is the code you're using ??
> And now the problem. If I load the glyphs via FT_Load_Glyph(face, *ptr,
> FT_LOAD_DEFAULT);
> all is correct. I also see with your tool "ftview" all glyphs.
>
>
> Is there a problem with FT_Get_Char_Index? I have seen the same problem with
> the library GUT which use your library too.
>
I don't think it's a problem with FT_Get_Char_Index or with FreeType,
but it'd be interesting to know what font you're using, and what
"characters" you're missing. Could you give us:
- the font name
- the font file's name
- the format, the origin, etc..
Hope we'll be able to help you then,
Regards,
- David