Mon 25 Sep 2006 01:14:30 PM UTC, original submission:
Hello, I’ve just found and fixed a bug in pfrobjs.c with pfr_face_get_kerning()
Another font library returned 1030 kerning pairs but FT 2.2.1 only returned 379 pairs on the same font for a specific set of glyphs.
I found the bug was because the adjustment byte(s) were not skipped preventing a proper search of the kerning data.
The diffs are as follows:
Index: pfrobjs.c
===================================================================
RCS file: /cvsroot/freetype/freetype2/src/pfr/pfrobjs.c,v
retrieving revision 1.35
diff -r1.35 pfrobjs.c
485a486
> FT_Bool twobyte_adjustment = FT_BOOL( item->flags & 2 );
502a504,508
> {
> if ( twobyte_adjustment )
> p += 2;
> else
> p++;
503a510
> }
536c543
< if ( item->flags & 2 )
---
> if ( twobyte_adjustment )
Regards,
David Bustin
Software Engineer
Cabot Communications Ltd.
Verona House, Filwood Road,
Bristol BS16 3RY
UK
Email: david DOT bustin AT cabot DOT co DOT uk
http://www.cabot.co.uk
Interactive Digital TV Technology Solutions
- Complete the Digital Picture *
|