mirror of https://github.com/freetype/freetype
[autofit] Variable renaming.
* src/autofit/aftypes.h (AF_ScriptMetricsRec): s/clazz/script_class/. Update all users.
This commit is contained in:
parent
cc34efca99
commit
5d6a360542
|
@ -1,3 +1,11 @@
|
|||
2013-07-30 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Variable renaming.
|
||||
|
||||
* src/autofit/aftypes.h (AF_ScriptMetricsRec):
|
||||
s/clazz/script_class/.
|
||||
Update all users.
|
||||
|
||||
2013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
Ignore libpng-config under cross-building configuration,
|
||||
|
|
|
@ -86,8 +86,9 @@
|
|||
AF_Scaler scaler = &dummy->root.scaler;
|
||||
|
||||
|
||||
glyph_index = FT_Get_Char_Index( face,
|
||||
metrics->root.clazz->standard_char );
|
||||
glyph_index = FT_Get_Char_Index(
|
||||
face,
|
||||
metrics->root.script_class->standard_char );
|
||||
if ( glyph_index == 0 )
|
||||
goto Exit;
|
||||
|
||||
|
|
|
@ -82,18 +82,20 @@
|
|||
/* scan each script in a Unicode charmap */
|
||||
for ( ss = 0; AF_SCRIPT_CLASSES_GET[ss]; ss++ )
|
||||
{
|
||||
AF_ScriptClass clazz = AF_SCRIPT_CLASSES_GET[ss];
|
||||
AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET[ss];
|
||||
AF_Script_UniRange range;
|
||||
|
||||
|
||||
if ( clazz->script_uni_ranges == NULL )
|
||||
if ( script_class->script_uni_ranges == NULL )
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Scan all Unicode points in the range and set the corresponding
|
||||
* glyph script index.
|
||||
*/
|
||||
for ( range = clazz->script_uni_ranges; range->first != 0; range++ )
|
||||
for ( range = script_class->script_uni_ranges;
|
||||
range->first != 0;
|
||||
range++ )
|
||||
{
|
||||
FT_ULong charcode = range->first;
|
||||
FT_UInt gindex;
|
||||
|
@ -204,13 +206,13 @@
|
|||
{
|
||||
if ( globals->metrics[nn] )
|
||||
{
|
||||
AF_ScriptClass clazz = AF_SCRIPT_CLASSES_GET[nn];
|
||||
AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET[nn];
|
||||
|
||||
|
||||
FT_ASSERT( globals->metrics[nn]->clazz == clazz );
|
||||
FT_ASSERT( globals->metrics[nn]->script_class == script_class );
|
||||
|
||||
if ( clazz->script_metrics_done )
|
||||
clazz->script_metrics_done( globals->metrics[nn] );
|
||||
if ( script_class->script_metrics_done )
|
||||
script_class->script_metrics_done( globals->metrics[nn] );
|
||||
|
||||
FT_FREE( globals->metrics[nn] );
|
||||
}
|
||||
|
@ -233,7 +235,7 @@
|
|||
{
|
||||
AF_ScriptMetrics metrics = NULL;
|
||||
FT_UInt gidx;
|
||||
AF_ScriptClass clazz;
|
||||
AF_ScriptClass script_class;
|
||||
FT_UInt script = options & 15;
|
||||
const FT_Offset script_max = sizeof ( AF_SCRIPT_CLASSES_GET ) /
|
||||
sizeof ( AF_SCRIPT_CLASSES_GET[0] );
|
||||
|
@ -250,37 +252,37 @@
|
|||
if ( gidx == 0 || gidx + 1 >= script_max )
|
||||
gidx = globals->glyph_scripts[gindex] & AF_SCRIPT_NONE;
|
||||
|
||||
clazz = AF_SCRIPT_CLASSES_GET[gidx];
|
||||
script_class = AF_SCRIPT_CLASSES_GET[gidx];
|
||||
if ( script == 0 )
|
||||
script = clazz->script;
|
||||
script = script_class->script;
|
||||
|
||||
metrics = globals->metrics[clazz->script];
|
||||
metrics = globals->metrics[script_class->script];
|
||||
if ( metrics == NULL )
|
||||
{
|
||||
/* create the global metrics object if necessary */
|
||||
FT_Memory memory = globals->face->memory;
|
||||
|
||||
|
||||
if ( FT_ALLOC( metrics, clazz->script_metrics_size ) )
|
||||
if ( FT_ALLOC( metrics, script_class->script_metrics_size ) )
|
||||
goto Exit;
|
||||
|
||||
metrics->clazz = clazz;
|
||||
metrics->globals = globals;
|
||||
metrics->script_class = script_class;
|
||||
metrics->globals = globals;
|
||||
|
||||
if ( clazz->script_metrics_init )
|
||||
if ( script_class->script_metrics_init )
|
||||
{
|
||||
error = clazz->script_metrics_init( metrics, globals->face );
|
||||
error = script_class->script_metrics_init( metrics, globals->face );
|
||||
if ( error )
|
||||
{
|
||||
if ( clazz->script_metrics_done )
|
||||
clazz->script_metrics_done( metrics );
|
||||
if ( script_class->script_metrics_done )
|
||||
script_class->script_metrics_done( metrics );
|
||||
|
||||
FT_FREE( metrics );
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
globals->metrics[clazz->script] = metrics;
|
||||
globals->metrics[script_class->script] = metrics;
|
||||
}
|
||||
|
||||
Exit:
|
||||
|
|
|
@ -76,13 +76,14 @@
|
|||
AF_Scaler scaler = &dummy->root.scaler;
|
||||
|
||||
|
||||
glyph_index = FT_Get_Char_Index( face,
|
||||
metrics->root.clazz->standard_char );
|
||||
glyph_index = FT_Get_Char_Index(
|
||||
face,
|
||||
metrics->root.script_class->standard_char );
|
||||
if ( glyph_index == 0 )
|
||||
goto Exit;
|
||||
|
||||
FT_TRACE5(( "standard character: 0x%X (glyph index %d)\n",
|
||||
metrics->root.clazz->standard_char, glyph_index ));
|
||||
metrics->root.script_class->standard_char, glyph_index ));
|
||||
|
||||
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
|
||||
if ( error || face->glyph->outline.n_points <= 0 )
|
||||
|
|
|
@ -76,8 +76,9 @@
|
|||
AF_Scaler scaler = &dummy->root.scaler;
|
||||
|
||||
|
||||
glyph_index = FT_Get_Char_Index( face,
|
||||
metrics->root.clazz->standard_char );
|
||||
glyph_index = FT_Get_Char_Index(
|
||||
face,
|
||||
metrics->root.script_class->standard_char );
|
||||
if ( glyph_index == 0 )
|
||||
goto Exit;
|
||||
|
||||
|
|
|
@ -180,10 +180,10 @@
|
|||
|
||||
/* now load the slot image into the auto-outline and run the */
|
||||
/* automatic hinting process */
|
||||
if ( metrics->clazz->script_hints_apply )
|
||||
metrics->clazz->script_hints_apply( hints,
|
||||
&gloader->current.outline,
|
||||
metrics );
|
||||
if ( metrics->script_class->script_hints_apply )
|
||||
metrics->script_class->script_hints_apply( hints,
|
||||
&gloader->current.outline,
|
||||
metrics );
|
||||
|
||||
/* we now need to adjust the metrics according to the change in */
|
||||
/* width/positioning that occurred during the hinting process */
|
||||
|
@ -534,18 +534,18 @@
|
|||
{
|
||||
loader->metrics = metrics;
|
||||
|
||||
if ( metrics->clazz->script_metrics_scale )
|
||||
metrics->clazz->script_metrics_scale( metrics, &scaler );
|
||||
if ( metrics->script_class->script_metrics_scale )
|
||||
metrics->script_class->script_metrics_scale( metrics, &scaler );
|
||||
else
|
||||
metrics->scaler = scaler;
|
||||
|
||||
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
|
||||
load_flags &= ~FT_LOAD_RENDER;
|
||||
|
||||
if ( metrics->clazz->script_hints_init )
|
||||
if ( metrics->script_class->script_hints_init )
|
||||
{
|
||||
error = metrics->clazz->script_hints_init( &loader->hints,
|
||||
metrics );
|
||||
error = metrics->script_class->script_hints_init( &loader->hints,
|
||||
metrics );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ extern void* _af_debug_hints;
|
|||
|
||||
typedef struct AF_ScriptMetricsRec_
|
||||
{
|
||||
AF_ScriptClass clazz;
|
||||
AF_ScriptClass script_class;
|
||||
AF_ScalerRec scaler;
|
||||
FT_Bool digits_have_same_width;
|
||||
|
||||
|
|
Loading…
Reference in New Issue