From 4fccc214f922803e1ab575efefe11030f37b5c1b Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 18 Dec 2013 12:53:01 +0100 Subject: [PATCH] [autofit] s/script_{metrics,hints}/style_{metrics,hints}/ --- ChangeLog | 4 ++++ src/autofit/afglobal.c | 16 ++++++++-------- src/autofit/afloader.c | 18 +++++++++--------- src/autofit/aftypes.h | 26 +++++++++++++------------- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c667a8b7..584d41e23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-18 Werner Lemberg + + [autofit] s/script_{metrics,hints}/style_{metrics,hints}/ + 2013-12-18 Werner Lemberg [autofit] s/gscripts/gstyles/. diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index 673571197..66674eb22 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -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; diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c index 400b01e19..9cf3a68e9 100644 --- a/src/autofit/afloader.c +++ b/src/autofit/afloader.c @@ -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; } diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h index 024ecbcb8..921067791 100644 --- a/src/autofit/aftypes.h +++ b/src/autofit/aftypes.h @@ -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; \ }