|
|
|
@ -633,10 +633,11 @@ |
|
|
|
|
/* Initialize global metrics. */ |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
af_cjk_metrics_init( AF_CJKMetrics metrics, |
|
|
|
|
FT_Face face ) |
|
|
|
|
af_cjk_metrics_init( AF_StyleMetrics metrics_, /* AF_CJKMetrics */ |
|
|
|
|
FT_Face face ) |
|
|
|
|
{ |
|
|
|
|
FT_CharMap oldmap = face->charmap; |
|
|
|
|
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_; |
|
|
|
|
FT_CharMap oldmap = face->charmap; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
metrics->units_per_em = face->units_per_EM; |
|
|
|
@ -754,9 +755,12 @@ |
|
|
|
|
/* Scale global values in both directions. */ |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( void ) |
|
|
|
|
af_cjk_metrics_scale( AF_CJKMetrics metrics, |
|
|
|
|
AF_Scaler scaler ) |
|
|
|
|
af_cjk_metrics_scale( AF_StyleMetrics metrics_, /* AF_CJKMetrics */ |
|
|
|
|
AF_Scaler scaler ) |
|
|
|
|
{ |
|
|
|
|
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* we copy the whole structure since the x and y scaling values */ |
|
|
|
|
/* are not modified, contrary to e.g. the `latin' auto-hinter */ |
|
|
|
|
metrics->root.scaler = *scaler; |
|
|
|
@ -770,10 +774,13 @@ |
|
|
|
|
/* metrics class. */ |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( void ) |
|
|
|
|
af_cjk_get_standard_widths( AF_CJKMetrics metrics, |
|
|
|
|
FT_Pos* stdHW, |
|
|
|
|
FT_Pos* stdVW ) |
|
|
|
|
af_cjk_get_standard_widths( AF_StyleMetrics metrics_, /* AF_CJKMetrics */ |
|
|
|
|
FT_Pos* stdHW, |
|
|
|
|
FT_Pos* stdVW ) |
|
|
|
|
{ |
|
|
|
|
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( stdHW ) |
|
|
|
|
*stdHW = metrics->axis[AF_DIMENSION_VERT].standard_width; |
|
|
|
|
|
|
|
|
@ -1374,9 +1381,10 @@ |
|
|
|
|
/* Initalize hinting engine. */ |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
af_cjk_hints_init( AF_GlyphHints hints, |
|
|
|
|
AF_CJKMetrics metrics ) |
|
|
|
|
af_cjk_hints_init( AF_GlyphHints hints, |
|
|
|
|
AF_StyleMetrics metrics_ ) /* AF_CJKMetrics */ |
|
|
|
|
{ |
|
|
|
|
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_; |
|
|
|
|
FT_Render_Mode mode; |
|
|
|
|
FT_UInt32 scaler_flags, other_flags; |
|
|
|
|
|
|
|
|
@ -2266,11 +2274,13 @@ |
|
|
|
|
/* Apply the complete hinting algorithm to a CJK glyph. */ |
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
af_cjk_hints_apply( FT_UInt glyph_index, |
|
|
|
|
AF_GlyphHints hints, |
|
|
|
|
FT_Outline* outline, |
|
|
|
|
AF_CJKMetrics metrics ) |
|
|
|
|
af_cjk_hints_apply( FT_UInt glyph_index, |
|
|
|
|
AF_GlyphHints hints, |
|
|
|
|
FT_Outline* outline, |
|
|
|
|
AF_StyleMetrics metrics_ ) /* AF_CJKMetrics */ |
|
|
|
|
{ |
|
|
|
|
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_; |
|
|
|
|
|
|
|
|
|
FT_Error error; |
|
|
|
|
int dim; |
|
|
|
|
|
|
|
|
|