From aaf21968deb85b635cb6aa6544df233ea5981346 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 13 Feb 2013 09:48:21 +0100 Subject: Update to following packages: openssl-1.0.1e freetype-2.4.11 --- freetype/src/autofit/afcjk.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'freetype/src/autofit/afcjk.c') diff --git a/freetype/src/autofit/afcjk.c b/freetype/src/autofit/afcjk.c index 8e407c86c..38325f6d0 100644 --- a/freetype/src/autofit/afcjk.c +++ b/freetype/src/autofit/afcjk.c @@ -67,8 +67,7 @@ FT_LOCAL_DEF( void ) af_cjk_metrics_init_widths( AF_CJKMetrics metrics, - FT_Face face, - FT_ULong charcode ) + FT_Face face ) { /* scan the array of segments in each direction */ AF_GlyphHintsRec hints[1]; @@ -87,7 +86,8 @@ AF_Scaler scaler = &dummy->root.scaler; - glyph_index = FT_Get_Char_Index( face, charcode ); + glyph_index = FT_Get_Char_Index( face, + metrics->root.clazz->standard_char ); if ( glyph_index == 0 ) goto Exit; @@ -150,7 +150,10 @@ } } - af_sort_widths( num_widths, axis->widths ); + /* this also replaces multiple almost identical stem widths */ + /* with a single one (the value 100 is heuristic) */ + af_sort_and_quantize_widths( &num_widths, axis->widths, + dummy->units_per_em / 100 ); axis->width_count = num_widths; } @@ -556,7 +559,7 @@ face->charmap = NULL; else { - af_cjk_metrics_init_widths( metrics, face, 0x7530 ); + af_cjk_metrics_init_widths( metrics, face ); af_cjk_metrics_init_blues( metrics, face, af_cjk_hani_blue_chars ); af_cjk_metrics_check_digits( metrics, face ); } @@ -2190,6 +2193,7 @@ static const AF_Script_UniRangeRec af_cjk_uniranges[] = { + AF_UNIRANGE_REC( 0x1100UL, 0x11FFUL ), /* Hangul Jamo */ AF_UNIRANGE_REC( 0x2E80UL, 0x2EFFUL ), /* CJK Radicals Supplement */ AF_UNIRANGE_REC( 0x2F00UL, 0x2FDFUL ), /* Kangxi Radicals */ AF_UNIRANGE_REC( 0x2FF0UL, 0x2FFFUL ), /* Ideographic Description Characters */ @@ -2228,6 +2232,7 @@ AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class, AF_SCRIPT_CJK, af_cjk_uniranges, + 0x7530, /* 田 */ sizeof ( AF_CJKMetricsRec ), @@ -2250,6 +2255,7 @@ AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class, AF_SCRIPT_CJK, af_cjk_uniranges, + 0, sizeof ( AF_CJKMetricsRec ), -- cgit v1.2.3