From 34fcd0b409ddba4ff7ecbf84d46093491b53e6c4 Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 5 Jan 2007 15:55:59 +0000 Subject: [PATCH] * src/pfr/pfrobjs.c (pfr_face_init): detect non-scalable fonts correctly. fixes bug #17876 --- ChangeLog | 3 +++ src/pfr/pfrobjs.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2358cbd73..f6d20cd30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-01-04 David Turner + * 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 diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c index f891cf595..976ab4af4 100644 --- a/src/pfr/pfrobjs.c +++ b/src/pfr/pfrobjs.c @@ -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;