diff options
author | Werner Lemberg <wl@gnu.org> | 2012-10-24 12:26:20 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2012-10-24 12:26:20 +0200 |
commit | 118c6025b7dddb86f8027f64b00f8bc3c46a3e0a (patch) | |
tree | 393d8d6fce2b2e0416a6c4e65ce7e350cc2f70b6 | |
parent | 8e82a961e7f5c9c7e91022e3ed45d1e56429ef2a (diff) | |
download | freetype2-118c6025b7dddb86f8027f64b00f8bc3c46a3e0a.tar.gz |
[autofit] Only use Unicode CMap.
* src/autofit/aflatin.c (af_latin_metrics_init): Implement it, to be
in sync with `af_face_globals_compute_script_coverage)'.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/autofit/aflatin.c | 22 |
2 files changed, 8 insertions, 21 deletions
@@ -1,3 +1,10 @@ +2012-10-24 Werner Lemberg <wl@gnu.org> + + [autofit] Only use Unicode CMap. + + * src/autofit/aflatin.c (af_latin_metrics_init): Implement it, to be + in sync with `af_face_globals_compute_script_coverage)'. + 2012-10-21 Werner Lemberg <wl@gnu.org> [psaux] Improve parsing of invalid numbers. diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index a5c1e7d4f..001d8fb07 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -523,32 +523,12 @@ af_latin_metrics_init( AF_LatinMetrics metrics, FT_Face face ) { - FT_Error error = AF_Err_Ok; FT_CharMap oldmap = face->charmap; - FT_UInt ee; - - static const FT_Encoding latin_encodings[] = - { - FT_ENCODING_UNICODE, - FT_ENCODING_APPLE_ROMAN, - FT_ENCODING_ADOBE_STANDARD, - FT_ENCODING_ADOBE_LATIN_1, - - FT_ENCODING_NONE /* end of list */ - }; metrics->units_per_em = face->units_per_EM; - /* do we have a latin charmap in there? */ - for ( ee = 0; latin_encodings[ee] != FT_ENCODING_NONE; ee++ ) - { - error = FT_Select_Charmap( face, latin_encodings[ee] ); - if ( !error ) - break; - } - - if ( !error ) + if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) ) { /* For now, compute the standard width and height from the `o'. */ af_latin_metrics_init_widths( metrics, face, 'o' ); |