diff options
Diffstat (limited to 'src/type1/t1gload.c')
-rw-r--r-- | src/type1/t1gload.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c index 2d8644fe8..c8d1db79f 100644 --- a/src/type1/t1gload.c +++ b/src/type1/t1gload.c @@ -121,7 +121,7 @@ FT_UInt glyph_index ) { FT_Data glyph_data; - FT_Error error = T1_Parse_Glyph_And_Get_Char_String( + FT_Error error = T1_Parse_Glyph_And_Get_Char_String( decoder, glyph_index, &glyph_data ); @@ -187,7 +187,7 @@ error = T1_Parse_Glyph( &decoder, glyph_index ); if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance ) *max_advance = decoder.builder.advance.x; - + /* ignore the error if one occurred - skip to next glyph */ } @@ -374,11 +374,11 @@ if ( hinting ) { - metrics->horiAdvance = ( metrics->horiAdvance + 32 ) & -64; - metrics->vertAdvance = ( metrics->vertAdvance + 32 ) & -64; + metrics->horiAdvance = FT_PIX_ROUND( metrics->horiAdvance ); + metrics->vertAdvance = FT_PIX_ROUND( metrics->vertAdvance ); - metrics->vertBearingX = ( metrics->vertBearingX + 32 ) & -64; - metrics->vertBearingY = ( metrics->vertBearingY + 32 ) & -64; + metrics->vertBearingX = FT_PIX_ROUND( metrics->vertBearingX ); + metrics->vertBearingY = FT_PIX_ROUND( metrics->vertBearingY ); } } @@ -388,10 +388,10 @@ /* grid fit the bounding box if necessary */ if ( hinting ) { - cbox.xMin &= -64; - cbox.yMin &= -64; - cbox.xMax = ( cbox.xMax+63 ) & -64; - cbox.yMax = ( cbox.yMax+63 ) & -64; + cbox.xMin = FT_PIX_FLOOR( cbox.xMin ); + cbox.yMin = FT_PIX_FLOOR( cbox.yMin ); + cbox.xMax = FT_PIX_CEIL( cbox.xMax ); + cbox.yMax = FT_PIX_CEIL( cbox.yMax ); } metrics->width = cbox.xMax - cbox.xMin; |