diff --git a/ChangeLog b/ChangeLog index 0269a9236..1b18a002f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,12 @@ * src/sfnt/ttload.c (tt_face_load_metrics): Ignore excess number of metrics instead of aborting. Patch suggested by Derek Noonburg. + * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c + (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Scale + the glyph properly if no hinter is available. + + * docs/CHANGES: Mention scaling bug. + 2005-11-18 susuzki toshiya * include/freetype/ftgxval.h, src/base/ftgxval.c diff --git a/docs/CHANGES b/docs/CHANGES index 6295ec2f3..3e4b77209 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -9,6 +9,9 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10 - CFF OpenType fonts didn't return correct vertical metrics for glyphs with outlines. + - If FreeType was compiled without hinters, all font formats based + on PS outlines weren't scaled correctly. + II. IMPORTANT CHANGES - A new API `FT_TrueTypeGX_Validate' (in FT_GX_VALIDATE_H) has diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index d4ea07b36..7ac2fcd04 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -2667,7 +2667,7 @@ /* First of all, scale the points */ - if ( !hinting ) + if ( !hinting || !decoder.builder.hints_funcs ) for ( n = cur->n_points; n > 0; n--, vec++ ) { vec->x = FT_MulFix( vec->x, x_scale ); diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c index 20cc35c64..d61d9593a 100644 --- a/src/cid/cidgload.c +++ b/src/cid/cidgload.c @@ -252,22 +252,6 @@ #endif /* 0 */ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /********** *********/ - /********** *********/ - /********** UNHINTED GLYPH LOADER *********/ - /********** *********/ - /********** The following code is in charge of loading a *********/ - /********** single outline. It completely ignores hinting *********/ - /********** and is used when FT_LOAD_NO_HINTING is set. *********/ - /********** *********/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - FT_LOCAL_DEF( FT_Error ) cid_slot_load_glyph( FT_GlyphSlot cidglyph, /* CID_GlyphSlot */ FT_Size cidsize, /* CID_Size */ @@ -394,7 +378,7 @@ /* First of all, scale the points */ - if ( !hinting ) + if ( !hinting || !decoder.builder.hints_funcs ) for ( n = cur->n_points; n > 0; n--, vec++ ) { vec->x = FT_MulFix( vec->x, x_scale ); diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c index b1869f509..54c9b683e 100644 --- a/src/type1/t1gload.c +++ b/src/type1/t1gload.c @@ -195,23 +195,6 @@ } - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /********** *********/ - /********** UNHINTED GLYPH LOADER *********/ - /********** *********/ - /********** The following code is in charge of loading a *********/ - /********** single outline. It completely ignores hinting *********/ - /********** and is used when FT_LOAD_NO_HINTING is set. *********/ - /********** *********/ - /********** The Type 1 hinter is located in `t1hint.c' *********/ - /********** *********/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - FT_LOCAL_DEF( FT_Error ) T1_Load_Glyph( T1_GlyphSlot glyph, T1_Size size, @@ -352,7 +335,7 @@ /* First of all, scale the points, if we are not hinting */ - if ( !hinting ) + if ( !hinting || ! decoder.builder.hints_funcs ) for ( n = cur->n_points; n > 0; n--, vec++ ) { vec->x = FT_MulFix( vec->x, x_scale );