diff options
Diffstat (limited to 'graphics/freetype2/patches/patch-af')
-rw-r--r-- | graphics/freetype2/patches/patch-af | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/graphics/freetype2/patches/patch-af b/graphics/freetype2/patches/patch-af new file mode 100644 index 00000000000..a3aacdf82f2 --- /dev/null +++ b/graphics/freetype2/patches/patch-af @@ -0,0 +1,36 @@ +$NetBSD: patch-af,v 1.1.2.1 2006/06/06 07:51:29 snj Exp $ + +--- src/cff/cffgload.c.orig 2005-04-18 06:53:05.000000000 +0200 ++++ src/cff/cffgload.c 2006-06-05 23:23:48.000000000 +0200 +@@ -2284,7 +2284,7 @@ + FT_LOCAL_DEF( FT_Error ) + cff_slot_load( CFF_GlyphSlot glyph, + CFF_Size size, +- FT_Int glyph_index, ++ FT_UInt glyph_index, + FT_Int32 load_flags ) + { + FT_Error error; +@@ -2330,7 +2330,7 @@ + + error = sfnt->load_sbit_image( face, + (FT_ULong)size->strike_index, +- (FT_UInt)glyph_index, ++ glyph_index, + (FT_Int)load_flags, + stream, + &glyph->root.bitmap, +@@ -2393,7 +2393,13 @@ + /* subsetted font, glyph_indices and CIDs are identical, though */ + if ( cff->top_font.font_dict.cid_registry != 0xFFFFU && + cff->charset.cids ) ++ { ++ if ( glyph_index < cff->charset.max_cid ) + glyph_index = cff->charset.cids[glyph_index]; ++ else ++ glyph_index = 0; ++ } ++ + + cff_decoder_init( &decoder, face, size, glyph, hinting, + FT_LOAD_TARGET_MODE( load_flags ) ); |