diff --git a/ChangeLog b/ChangeLog index 278675433..90f08d766 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-09-30 Werner Lemberg + + [autofit] Replace `no-base' with `non-base'. + + * src/autofit/*: Do it. + 2015-09-30 Werner Lemberg [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078). diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index c1cc2765f..b071cc76f 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -47,7 +47,7 @@ af_ ## s ## _script_class, \ AF_SCRIPT_ ## S, \ af_ ## s ## _uniranges, \ - af_ ## s ## _nobase_uniranges, \ + af_ ## s ## _nonbase_uniranges, \ sc1, sc2, sc3 ) #include "afscript.h" @@ -208,8 +208,8 @@ } } - /* do the same for the script's no-base characters */ - for ( range = script_class->script_uni_nobase_ranges; + /* do the same for the script's non-base characters */ + for ( range = script_class->script_uni_nonbase_ranges; range->first != 0; range++ ) { @@ -222,7 +222,7 @@ if ( gindex != 0 && gindex < (FT_ULong)globals->glyph_count && ( gstyles[gindex] & AF_STYLE_MASK ) == (FT_UShort)ss ) - gstyles[gindex] |= AF_NOBASE; + gstyles[gindex] |= AF_NONBASE; for (;;) { @@ -233,7 +233,7 @@ if ( gindex < (FT_ULong)globals->glyph_count && ( gstyles[gindex] & AF_STYLE_MASK ) == (FT_UShort)ss ) - gstyles[gindex] |= AF_NOBASE; + gstyles[gindex] |= AF_NONBASE; } } } diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h index 8189f4832..ffb2f8606 100644 --- a/src/autofit/afglobal.h +++ b/src/autofit/afglobal.h @@ -73,15 +73,15 @@ FT_BEGIN_HEADER /* default script for OpenType; ignored if HarfBuzz isn't used */ #define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN - /* a bit mask for AF_DIGIT and AF_NOBASE */ + /* a bit mask for AF_DIGIT and AF_NONBASE */ #define AF_STYLE_MASK 0x3FFF /* an uncovered glyph */ #define AF_STYLE_UNASSIGNED AF_STYLE_MASK /* if this flag is set, we have an ASCII digit */ #define AF_DIGIT 0x8000U - /* if this flag is set, we have a no-base character */ -#define AF_NOBASE 0x4000U + /* if this flag is set, we have a non-base character */ +#define AF_NONBASE 0x4000U /* `increase-x-height' property */ #define AF_PROP_INCREASE_X_HEIGHT_MIN 6 diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 5ccd3131e..363f72114 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -2883,7 +2883,7 @@ goto Exit; /* apply blue zones to base characters only */ - if ( !( metrics->root.globals->glyph_styles[glyph_index] & AF_NOBASE ) ) + if ( !( metrics->root.globals->glyph_styles[glyph_index] & AF_NONBASE ) ) af_latin_hints_compute_blue_edges( hints, metrics ); } diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c index 1470ed59a..b5e18b7e5 100644 --- a/src/autofit/afranges.c +++ b/src/autofit/afranges.c @@ -48,12 +48,12 @@ /* Right now, they are quickly derived by visual inspection. */ /* I can imagine that fine-tuning is necessary. */ - /* for the auto-hinter, a `no-base character' is something that should */ - /* not be affected by blue zones, regardless of whether this is a */ - /* spacing or no-spacing glyph */ + /* for the auto-hinter, a `non-base character' is something that should */ + /* not be affected by blue zones, regardless of whether this is a */ + /* spacing or no-spacing glyph */ - /* the `ta_xxxx_nobase_uniranges' ranges must be strict subsets */ - /* of the corresponding `ta_xxxx_uniranges' ranges */ + /* the `ta_xxxx_nonbase_uniranges' ranges must be strict subsets */ + /* of the corresponding `ta_xxxx_uniranges' ranges */ const AF_Script_UniRangeRec af_arab_uniranges[] = @@ -67,7 +67,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_arab_nobase_uniranges[] = + const AF_Script_UniRangeRec af_arab_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0600UL, 0x0605UL ), AF_UNIRANGE_REC( 0x0610UL, 0x061AUL ), @@ -100,7 +100,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_cyrl_nobase_uniranges[] = + const AF_Script_UniRangeRec af_cyrl_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0483UL, 0x0489UL ), AF_UNIRANGE_REC( 0x2DE0UL, 0x2DFFUL ), @@ -128,7 +128,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_deva_nobase_uniranges[] = + const AF_Script_UniRangeRec af_deva_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0900UL, 0x0902UL ), AF_UNIRANGE_REC( 0x093AUL, 0x093AUL ), @@ -149,7 +149,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_grek_nobase_uniranges[] = + const AF_Script_UniRangeRec af_grek_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x037AUL, 0x037AUL ), AF_UNIRANGE_REC( 0x0384UL, 0x0385UL ), @@ -169,7 +169,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_hebr_nobase_uniranges[] = + const AF_Script_UniRangeRec af_hebr_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0591UL, 0x05BFUL ), AF_UNIRANGE_REC( 0x05C1UL, 0x05C2UL ), @@ -186,7 +186,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_lao_nobase_uniranges[] = + const AF_Script_UniRangeRec af_lao_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0EB1UL, 0x0EB1UL ), AF_UNIRANGE_REC( 0x0EB4UL, 0x0EBCUL ), @@ -232,7 +232,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_latn_nobase_uniranges[] = + const AF_Script_UniRangeRec af_latn_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x005EUL, 0x0060UL ), AF_UNIRANGE_REC( 0x007EUL, 0x007EUL ), @@ -262,7 +262,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_latb_nobase_uniranges[] = + const AF_Script_UniRangeRec af_latb_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0UL, 0UL ) }; @@ -286,7 +286,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_latp_nobase_uniranges[] = + const AF_Script_UniRangeRec af_latp_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0UL, 0UL ) }; @@ -297,7 +297,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_none_nobase_uniranges[] = + const AF_Script_UniRangeRec af_none_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0UL, 0UL ) }; @@ -309,7 +309,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_telu_nobase_uniranges[] = + const AF_Script_UniRangeRec af_telu_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0C00UL, 0x0C00UL ), AF_UNIRANGE_REC( 0x0C3EUL, 0x0C40UL ), @@ -325,7 +325,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_thai_nobase_uniranges[] = + const AF_Script_UniRangeRec af_thai_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0E31UL, 0x0E31UL ), AF_UNIRANGE_REC( 0x0E34UL, 0x0E3AUL ), @@ -342,7 +342,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_beng_nobase_uniranges[] = + const AF_Script_UniRangeRec af_beng_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0981UL, 0x0981UL ), AF_UNIRANGE_REC( 0x09BCUL, 0x09BCUL ), @@ -359,7 +359,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_gujr_nobase_uniranges[] = + const AF_Script_UniRangeRec af_gujr_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0A81UL, 0x0A82UL ), AF_UNIRANGE_REC( 0x0ABCUL, 0x0ABCUL ), @@ -376,7 +376,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_guru_nobase_uniranges[] = + const AF_Script_UniRangeRec af_guru_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0A01UL, 0x0A02UL ), AF_UNIRANGE_REC( 0x0A3CUL, 0x0A3EUL ), @@ -393,7 +393,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_knda_nobase_uniranges[] = + const AF_Script_UniRangeRec af_knda_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0C81UL, 0x0C81UL ), AF_UNIRANGE_REC( 0x0CBCUL, 0x0CBCUL ), @@ -411,7 +411,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_limb_nobase_uniranges[] = + const AF_Script_UniRangeRec af_limb_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x1920UL, 0x1922UL ), AF_UNIRANGE_REC( 0x1927UL, 0x1934UL ), @@ -426,7 +426,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_mlym_nobase_uniranges[] = + const AF_Script_UniRangeRec af_mlym_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0D01UL, 0x0D01UL ), AF_UNIRANGE_REC( 0x0D4DUL, 0x0D4EUL ), @@ -441,7 +441,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_orya_nobase_uniranges[] = + const AF_Script_UniRangeRec af_orya_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0B01UL, 0x0B02UL ), AF_UNIRANGE_REC( 0x0B3CUL, 0x0B3CUL ), @@ -459,7 +459,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_sinh_nobase_uniranges[] = + const AF_Script_UniRangeRec af_sinh_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0DCAUL, 0x0DCAUL ), AF_UNIRANGE_REC( 0x0DD2UL, 0x0DD6UL ), @@ -474,7 +474,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_sund_nobase_uniranges[] = + const AF_Script_UniRangeRec af_sund_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x1B80UL, 0x1B82UL ), AF_UNIRANGE_REC( 0x1BA1UL, 0x1BADUL ), @@ -488,7 +488,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_sylo_nobase_uniranges[] = + const AF_Script_UniRangeRec af_sylo_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0xA802UL, 0xA802UL ), AF_UNIRANGE_REC( 0xA806UL, 0xA806UL ), @@ -504,7 +504,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_taml_nobase_uniranges[] = + const AF_Script_UniRangeRec af_taml_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0B82UL, 0x0B82UL ), AF_UNIRANGE_REC( 0x0BC0UL, 0x0BC2UL ), @@ -519,7 +519,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_tibt_nobase_uniranges[] = + const AF_Script_UniRangeRec af_tibt_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0F18UL, 0x0F19UL ), AF_UNIRANGE_REC( 0x0F35UL, 0x0F35UL ), @@ -574,7 +574,7 @@ AF_UNIRANGE_REC( 0UL, 0UL ) }; - const AF_Script_UniRangeRec af_hani_nobase_uniranges[] = + const AF_Script_UniRangeRec af_hani_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x302AUL, 0x302FUL ), AF_UNIRANGE_REC( 0x3190UL, 0x319FUL ), diff --git a/src/autofit/afranges.h b/src/autofit/afranges.h index 38e40cdf9..b080873e7 100644 --- a/src/autofit/afranges.h +++ b/src/autofit/afranges.h @@ -32,8 +32,8 @@ FT_BEGIN_HEADER #include "afscript.h" #undef SCRIPT -#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ - extern const AF_Script_UniRangeRec af_ ## s ## _nobase_uniranges[]; +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ + extern const AF_Script_UniRangeRec af_ ## s ## _nonbase_uniranges[]; #include "afscript.h" diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h index 54fa37f2b..43b38006c 100644 --- a/src/autofit/aftypes.h +++ b/src/autofit/aftypes.h @@ -295,8 +295,8 @@ extern void* _af_debug_hints; /* * Each script is associated with two sets of Unicode ranges to test - * whether the font face supports the script, and which no-base characters - * the script contains. + * whether the font face supports the script, and which non-base + * characters the script contains. * * We use four-letter script tags from the OpenType specification, * extended by `NONE', which indicates `no script'. @@ -335,7 +335,7 @@ extern void* _af_debug_hints; /* last element in the ranges must be { 0, 0 } */ AF_Script_UniRange script_uni_ranges; - AF_Script_UniRange script_uni_nobase_ranges; + AF_Script_UniRange script_uni_nonbase_ranges; FT_UInt32 standard_char1; /* for default width and height */ FT_UInt32 standard_char2; /* ditto */ @@ -515,7 +515,7 @@ extern void* _af_debug_hints; script_class, \ script, \ ranges, \ - nobase_ranges, \ + nonbase_ranges, \ std_char1, \ std_char2, \ std_char3 ) \ @@ -524,7 +524,7 @@ extern void* _af_debug_hints; { \ script, \ ranges, \ - nobase_ranges, \ + nonbase_ranges, \ std_char1, \ std_char2, \ std_char3 \ @@ -591,19 +591,19 @@ extern void* _af_debug_hints; script_class, \ script_, \ ranges, \ - nobase_ranges, \ + nonbase_ranges, \ std_char1, \ std_char2, \ std_char3 ) \ FT_LOCAL_DEF( void ) \ FT_Init_Class_ ## script_class( AF_ScriptClassRec* ac ) \ { \ - ac->script = script_; \ - ac->script_uni_ranges = ranges; \ - ac->script_uni_nobase_ranges = nobase_ranges; \ - ac->standard_char1 = std_char1; \ - ac->standard_char2 = std_char2; \ - ac->standard_char3 = std_char3; \ + ac->script = script_; \ + ac->script_uni_ranges = ranges; \ + ac->script_uni_nonbase_ranges = nonbase_ranges; \ + ac->standard_char1 = std_char1; \ + ac->standard_char2 = std_char2; \ + ac->standard_char3 = std_char3; \ }