[autofit] s/script_{metrics,hints}/style_{metrics,hints}/

This commit is contained in:
Werner Lemberg 2013-12-18 12:53:01 +01:00
parent f4df4079fb
commit 4fccc214f9
4 changed files with 34 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2013-12-18 Werner Lemberg <wl@gnu.org>
[autofit] s/script_{metrics,hints}/style_{metrics,hints}/
2013-12-18 Werner Lemberg <wl@gnu.org>
[autofit] s/gscripts/gstyles/.

View File

@ -237,8 +237,8 @@
AF_WRITING_SYSTEM_CLASSES_GET[script_class->writing_system];
if ( writing_system_class->script_metrics_done )
writing_system_class->script_metrics_done( globals->metrics[nn] );
if ( writing_system_class->style_metrics_done )
writing_system_class->style_metrics_done( globals->metrics[nn] );
FT_FREE( globals->metrics[nn] );
}
@ -291,20 +291,20 @@
FT_Memory memory = globals->face->memory;
if ( FT_ALLOC( metrics, writing_system_class->script_metrics_size ) )
if ( FT_ALLOC( metrics, writing_system_class->style_metrics_size ) )
goto Exit;
metrics->script_class = script_class;
metrics->globals = globals;
if ( writing_system_class->script_metrics_init )
if ( writing_system_class->style_metrics_init )
{
error = writing_system_class->script_metrics_init( metrics,
globals->face );
error = writing_system_class->style_metrics_init( metrics,
globals->face );
if ( error )
{
if ( writing_system_class->script_metrics_done )
writing_system_class->script_metrics_done( metrics );
if ( writing_system_class->style_metrics_done )
writing_system_class->style_metrics_done( metrics );
FT_FREE( metrics );
goto Exit;

View File

@ -190,10 +190,10 @@
[metrics->script_class->writing_system];
if ( writing_system_class->script_hints_apply )
writing_system_class->script_hints_apply( hints,
&gloader->current.outline,
metrics );
if ( writing_system_class->style_hints_apply )
writing_system_class->style_hints_apply( hints,
&gloader->current.outline,
metrics );
}
/* we now need to adjust the metrics according to the change in */
@ -553,18 +553,18 @@
loader->metrics = metrics;
if ( writing_system_class->script_metrics_scale )
writing_system_class->script_metrics_scale( metrics, &scaler );
if ( writing_system_class->style_metrics_scale )
writing_system_class->style_metrics_scale( metrics, &scaler );
else
metrics->scaler = scaler;
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
load_flags &= ~FT_LOAD_RENDER;
if ( writing_system_class->script_hints_init )
if ( writing_system_class->style_hints_init )
{
error = writing_system_class->script_hints_init( &loader->hints,
metrics );
error = writing_system_class->style_hints_init( &loader->hints,
metrics );
if ( error )
goto Exit;
}

View File

@ -297,13 +297,13 @@ extern void* _af_debug_hints;
{
AF_WritingSystem writing_system;
FT_Offset script_metrics_size;
AF_WritingSystem_InitMetricsFunc script_metrics_init;
AF_WritingSystem_ScaleMetricsFunc script_metrics_scale;
AF_WritingSystem_DoneMetricsFunc script_metrics_done;
FT_Offset style_metrics_size;
AF_WritingSystem_InitMetricsFunc style_metrics_init;
AF_WritingSystem_ScaleMetricsFunc style_metrics_scale;
AF_WritingSystem_DoneMetricsFunc style_metrics_done;
AF_WritingSystem_InitHintsFunc script_hints_init;
AF_WritingSystem_ApplyHintsFunc script_hints_apply;
AF_WritingSystem_InitHintsFunc style_hints_init;
AF_WritingSystem_ApplyHintsFunc style_hints_apply;
} AF_WritingSystemClassRec;
@ -434,16 +434,16 @@ extern void* _af_debug_hints;
FT_LOCAL_DEF( void ) \
FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac ) \
{ \
ac->writing_system = system; \
ac->writing_system = system; \
\
ac->script_metrics_size = m_size; \
ac->style_metrics_size = m_size; \
\
ac->script_metrics_init = m_init; \
ac->script_metrics_scale = m_scale; \
ac->script_metrics_done = m_done; \
ac->style_metrics_init = m_init; \
ac->style_metrics_scale = m_scale; \
ac->style_metrics_done = m_done; \
\
ac->script_hints_init = h_init; \
ac->script_hints_apply = h_apply; \
ac->style_hints_init = h_init; \
ac->style_hints_apply = h_apply; \
}