diff --git a/ChangeLog b/ChangeLog index d4c149d9d..f04b4881e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-12-18 Werner Lemberg + + [autofit] s/glyph_scripts/glyph_styles/. + + This is the first commit of a series to create a new top-level + structure (a `style') for handling scripts, writing_systems, and + soon-to-be-added coverages. + 2013-12-17 Werner Lemberg [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate. diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index c2151af43..bb3cd122a 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -83,13 +83,13 @@ FT_Error error; FT_Face face = globals->face; FT_CharMap old_charmap = face->charmap; - FT_Byte* gscripts = globals->glyph_scripts; + FT_Byte* gscripts = globals->glyph_styles; FT_UInt ss; FT_UInt i; /* the value AF_SCRIPT_UNASSIGNED means `uncovered glyph' */ - FT_MEM_SET( globals->glyph_scripts, + FT_MEM_SET( globals->glyph_styles, AF_SCRIPT_UNASSIGNED, globals->glyph_count ); @@ -198,10 +198,10 @@ face->num_glyphs * sizeof ( FT_Byte ) ) ) goto Exit; - globals->face = face; - globals->glyph_count = face->num_glyphs; - globals->glyph_scripts = (FT_Byte*)( globals + 1 ); - globals->module = module; + globals->face = face; + globals->glyph_count = face->num_glyphs; + globals->glyph_styles = (FT_Byte*)( globals + 1 ); + globals->module = module; error = af_face_globals_compute_script_coverage( globals ); if ( error ) @@ -244,9 +244,9 @@ } } - globals->glyph_count = 0; - globals->glyph_scripts = NULL; /* no need to free this one! */ - globals->face = NULL; + globals->glyph_count = 0; + globals->glyph_styles = NULL; /* no need to free this one! */ + globals->face = NULL; FT_FREE( globals ); } @@ -275,10 +275,10 @@ } /* if we have a forced script (via `options'), use it, */ - /* otherwise look into `glyph_scripts' array */ + /* otherwise look into `glyph_styles' array */ if ( script == AF_SCRIPT_NONE || script + 1 >= AF_SCRIPT_MAX ) - script = (AF_Script)( globals->glyph_scripts[gindex] & - AF_SCRIPT_UNASSIGNED ); + script = (AF_Script)( globals->glyph_styles[gindex] & + AF_SCRIPT_UNASSIGNED ); script_class = AF_SCRIPT_CLASSES_GET[script]; writing_system_class = AF_WRITING_SYSTEM_CLASSES_GET @@ -326,7 +326,7 @@ FT_UInt gindex ) { if ( gindex < (FT_ULong)globals->glyph_count ) - return (FT_Bool)( globals->glyph_scripts[gindex] & AF_DIGIT ); + return (FT_Bool)( globals->glyph_styles[gindex] & AF_DIGIT ); return (FT_Bool)0; } diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h index c01b47414..a36e47b8f 100644 --- a/src/autofit/afglobal.h +++ b/src/autofit/afglobal.h @@ -70,7 +70,7 @@ FT_BEGIN_HEADER /* - * Note that glyph_scripts[] maps each glyph to an index into the + * Note that glyph_styles[] maps each glyph to an index into the * `af_script_classes' array. * */ @@ -78,7 +78,7 @@ FT_BEGIN_HEADER { FT_Face face; FT_Long glyph_count; /* same as face->num_glyphs */ - FT_Byte* glyph_scripts; + FT_Byte* glyph_styles; /* per-face auto-hinter properties */ FT_UInt increase_x_height; diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c index b1bb5ee0e..0389a4e2c 100644 --- a/src/autofit/afmodule.c +++ b/src/autofit/afmodule.c @@ -134,7 +134,7 @@ error = af_property_get_face_globals( prop->face, &globals, module ); if ( !error ) - prop->map = globals->glyph_scripts; + prop->map = globals->glyph_styles; return error; }