Wed 24 May 2006 11:41:37 AM UTC, original submission:
Hello,
We have a resource compiler as part of our product which makes use of FreeType 2.1.4.
I’ve rebuilt this compiler with FreeType 2.2.1 and I have run into some problems which I would like to bring to your attention.
I’ve attached the font in question.
There are 349 glyphs in this font. The glyph_indices ranges from 1 to 349 yet if I try to call FT_Load_Glyph() it fails on the last glyph, index 349 with Error code 6 (FT_Err_Invalid_Argument).
I checked out the latest FreeType2 source from CVS and it also has a similar problem. The following changes make our resource compiler work with the latest version of FreeType2 (at least with PFR fonts):
Index: autofit/afglobal.c
===================================================================
RCS file: /cvsroot/freetype/freetype2/src/autofit/afglobal.c,v
retrieving revision 1.9
diff -r1.9 afglobal.c
227c227,229
<
---
> if ( gindex > 0 )
> gindex--;
>
Index: base/ftobjs.c
===================================================================
RCS file: /cvsroot/freetype/freetype2/src/base/ftobjs.c,v
retrieving revision 1.253
diff -r1.253 ftobjs.c
544c544
< if ( glyph_index >= (FT_UInt)face->num_glyphs )
---
> if ( glyph_index > (FT_UInt)face->num_glyphs )
I don’t know if other Fonts use glyph indices that range from 0 to num_glyphs-1 but there is some confusion in the FreeType2 code as to what the glyph_index range is.
I think the glyph_index range needs documenting in the freetype.h header file and then let the individual drivers convert this to a range that makes sense for their internal representations.
Regards,
David
--
David Bustin
Software Engineer
Cabot Communications Ltd.
Verona House, Filwood Road,
Bristol BS16 3RY
UK
Email: david.bustin AT cabot.co.uk
http://www.cabot.co.uk
Interactive Digital TV Technology Solutions
- Complete the Digital Picture *
|