* src/autofit/afcjk.c (af_cjk_metrics_init): Fix a stupid bug...

* src/autofit/aflatin.c (af_latin_metrics_init_widths): Use
AF_LatinMetricsRec as the dummy metrics because we cast the metrics to
it later in `af_latin_hints_link_segments'.
This commit is contained in:
Wu, Chia-I (吳佳一) 2006-02-11 13:22:37 +00:00
parent f9a69132a7
commit 4c507ffa80
3 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2006-02-11 Chia-I Wu <b90201047@ntu.edu.tw>
* src/autofit/afcjk.c (af_cjk_metrics_init): Fix a stupid bug...
* src/autofit/aflatin.c (af_latin_metrics_init_widths): Use
AF_LatinMetricsRec as the dummy metrics because we cast the metrics to
it later in `af_latin_hints_link_segments'.
2006-02-11 Chia-I Wu <b90201047@ntu.edu.tw>
* include/freetype/config/ftoption.h (AF_CONFIG_OPTION_CJK): #define

View File

@ -52,7 +52,7 @@
/* TODO are there blues? */
if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
face->charmap = NULL;
/* latin's version would suffice */

View File

@ -51,8 +51,8 @@
FT_Error error;
FT_UInt glyph_index;
int dim;
AF_ScriptMetricsRec dummy[1];
AF_Scaler scaler = &dummy->scaler;
AF_LatinMetricsRec dummy[1];
AF_Scaler scaler = &dummy->root.scaler;
glyph_index = FT_Get_Char_Index( face, charcode );
@ -65,13 +65,14 @@
FT_ZERO( dummy );
dummy->units_per_em = metrics->units_per_em;
scaler->x_scale = scaler->y_scale = 0x10000L;
scaler->x_delta = scaler->y_delta = 0;
scaler->face = face;
scaler->render_mode = FT_RENDER_MODE_NORMAL;
scaler->flags = 0;
af_glyph_hints_rescale( hints, dummy );
af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )