diff options
Diffstat (limited to 'freetype/src/pfr')
-rw-r--r-- | freetype/src/pfr/pfrcmap.c | 10 | ||||
-rw-r--r-- | freetype/src/pfr/pfrload.c | 3 | ||||
-rw-r--r-- | freetype/src/pfr/pfrobjs.c | 5 |
3 files changed, 11 insertions, 7 deletions
diff --git a/freetype/src/pfr/pfrcmap.c b/freetype/src/pfr/pfrcmap.c index 740c433d6..1f05640cc 100644 --- a/freetype/src/pfr/pfrcmap.c +++ b/freetype/src/pfr/pfrcmap.c @@ -67,14 +67,16 @@ pfr_cmap_char_index( PFR_CMap cmap, FT_UInt32 char_code ) { - FT_UInt min = 0; - FT_UInt max = cmap->num_chars; - FT_UInt mid; - PFR_Char gchar; + FT_UInt min = 0; + FT_UInt max = cmap->num_chars; while ( min < max ) { + PFR_Char gchar; + FT_UInt mid; + + mid = min + ( max - min ) / 2; gchar = cmap->chars + mid; diff --git a/freetype/src/pfr/pfrload.c b/freetype/src/pfr/pfrload.c index 58a1506fa..f91fb077b 100644 --- a/freetype/src/pfr/pfrload.c +++ b/freetype/src/pfr/pfrload.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR loader (body). */ /* */ -/* Copyright 2002-2005, 2007, 2009, 2010, 2013 by */ +/* Copyright 2002-2005, 2007, 2009, 2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -813,7 +813,6 @@ phy_font->ascent = PFR_NEXT_SHORT( q ); phy_font->descent = PFR_NEXT_SHORT( q ); phy_font->leading = PFR_NEXT_SHORT( q ); - q += 16; break; case 3: diff --git a/freetype/src/pfr/pfrobjs.c b/freetype/src/pfr/pfrobjs.c index bfa4a3af2..80e4b7e71 100644 --- a/freetype/src/pfr/pfrobjs.c +++ b/freetype/src/pfr/pfrobjs.c @@ -137,7 +137,8 @@ pfrface->face_index = face_index; pfrface->num_glyphs = phy_font->num_chars + 1; - pfrface->face_flags = FT_FACE_FLAG_SCALABLE; + + pfrface->face_flags |= FT_FACE_FLAG_SCALABLE; /* if all characters point to the same gps_offset 0, we */ /* assume that the font only contains bitmaps */ @@ -324,6 +325,8 @@ FT_ULong gps_offset; + FT_TRACE1(( "pfr_slot_load: glyph index %d\n", gindex )); + if ( gindex > 0 ) gindex--; |