diff --git a/ChangeLog b/ChangeLog index fe0f79507..74dc50f1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-06-13 Werner Lemberg + + * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding. + + FreeType only sets a default active encoding for Unicode. + 2017-06-13 Werner Lemberg [cff, truetype] Integer overflows. diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index bd7f6a3fb..bb59d0901 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -575,7 +575,8 @@ FT_BEGIN_HEADER /* */ /* When a new face is created (either through @FT_New_Face or */ /* @FT_Open_Face), the library looks for a Unicode charmap within */ - /* the list and automatically activates it. */ + /* the list and automatically activates it. If there is no Unicode */ + /* charmap, FreeType doesn't set an `active' charmap. */ /* */ /* */ /* See @FT_CharMapRec for the publicly accessible fields of a given */ diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c index c7b9b4111..09cb489d2 100644 --- a/src/bdf/bdfdrivr.c +++ b/src/bdf/bdfdrivr.c @@ -658,12 +658,6 @@ THE SOFTWARE. } error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL ); - -#if 0 - /* Select default charmap */ - if ( bdfface->num_charmaps ) - bdfface->charmap = bdfface->charmaps[0]; -#endif } goto Exit; diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c index 505309416..169f75e95 100644 --- a/src/pcf/pcfdrivr.c +++ b/src/pcf/pcfdrivr.c @@ -413,12 +413,6 @@ THE SOFTWARE. } error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL ); - -#if 0 - /* Select default charmap */ - if ( pcfface->num_charmaps ) - pcfface->charmap = pcfface->charmaps[0]; -#endif } } diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c index 4b1703f51..514af8050 100644 --- a/src/pfr/pfrobjs.c +++ b/src/pfr/pfrobjs.c @@ -264,12 +264,6 @@ charmap.encoding = FT_ENCODING_UNICODE; error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL ); - -#if 0 - /* select default charmap */ - if ( pfrface->num_charmaps ) - pfrface->charmap = pfrface->charmaps[0]; -#endif } /* check whether we have loaded any kerning pairs */ diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index ac2e620e5..3f54d5d5c 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -1482,15 +1482,6 @@ charmap->encoding = sfnt_find_encoding( charmap->platform_id, charmap->encoding_id ); - -#if 0 - if ( !root->charmap && - charmap->encoding == FT_ENCODING_UNICODE ) - { - /* set 'root->charmap' to the first Unicode encoding we find */ - root->charmap = charmap; - } -#endif } } diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c index 97c16b0fd..5ac1292ae 100644 --- a/src/type1/t1objs.c +++ b/src/type1/t1objs.c @@ -555,12 +555,6 @@ if ( clazz ) error = FT_CMap_New( clazz, NULL, &charmap, NULL ); - -#if 0 - /* Select default charmap */ - if (root->num_charmaps) - root->charmap = root->charmaps[0]; -#endif } } diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index 87e5206b7..1c4ebd768 100644 --- a/src/type42/t42objs.c +++ b/src/type42/t42objs.c @@ -394,12 +394,6 @@ if ( clazz ) error = FT_CMap_New( clazz, NULL, &charmap, NULL ); - -#if 0 - /* Select default charmap */ - if ( root->num_charmaps ) - root->charmap = root->charmaps[0]; -#endif } } Exit: diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index 9811fbb05..5cdb85a36 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -859,10 +859,6 @@ NULL ); if ( error ) goto Fail; - - /* Select default charmap */ - if ( root->num_charmaps ) - root->charmap = root->charmaps[0]; } /* set up remaining flags */