forked from minhngoc25a/freetype2
* src/pfr/pfrobjs.c (pfr_face_init): detect non-scalable fonts
correctly. fixes bug #17876
This commit is contained in:
parent
384be23418
commit
34fcd0b409
|
@ -1,5 +1,8 @@
|
|||
2007-01-04 David Turner <david@freetype.org>
|
||||
|
||||
* src/pfr/pfrobjs.c (pfr_face_init): detect non-scalable fonts
|
||||
correctly. fixes bug #17876
|
||||
|
||||
* src/truetype/ttobjs.h, src/truetype/ttobjs.c,
|
||||
src/truetype/ttgload.c: do not allocate interpreter-specific
|
||||
tables in memory if we're not going to load glyphs with it
|
||||
|
|
|
@ -131,6 +131,19 @@
|
|||
pfrface->num_glyphs = phy_font->num_chars + 1;
|
||||
pfrface->face_flags = FT_FACE_FLAG_SCALABLE;
|
||||
|
||||
/* if all characters point to the same gps_offset 0, we */
|
||||
/* assume the font only contains bitmaps */
|
||||
{
|
||||
FT_UInt nn;
|
||||
|
||||
for ( nn = 0; nn < phy_font->num_chars; nn++ )
|
||||
if ( phy_font->chars[nn].gps_offset != 0 )
|
||||
break;
|
||||
|
||||
if ( nn == phy_font->num_chars )
|
||||
pfrface->face_flags = 0; /* not SCALABLE !! */
|
||||
}
|
||||
|
||||
if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )
|
||||
pfrface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
|
||||
|
||||
|
|
Loading…
Reference in New Issue