diff --git a/Lib/fontTools/feaLib/builder_test.py b/Lib/fontTools/feaLib/builder_test.py index 1ee725b9e..a08bbc171 100644 --- a/Lib/fontTools/feaLib/builder_test.py +++ b/Lib/fontTools/feaLib/builder_test.py @@ -36,7 +36,7 @@ def makeTTFont(): Q.swash R.swash S.swash T.swash U.swash V.swash W.swash X.swash Y.swash Z.swash f_l c_h c_k c_s c_t f_f f_f_i f_f_l f_i o_f_f_i s_t f_i.begin - a_n_d T_h T_h.swash ydieresis yacute breve + a_n_d T_h T_h.swash germandbls ydieresis yacute breve grave acute dieresis macron circumflex cedilla umlaut ogonek caron damma hamza sukun kasratan lam_meem_jeem noon.final noon.initial """.split() @@ -53,7 +53,7 @@ class BuilderTest(unittest.TestCase): lookup lookupflag feature_aalt ignore_pos GPOS_1 GPOS_1_zero GPOS_2 GPOS_2b GPOS_3 GPOS_4 GPOS_5 GPOS_6 GPOS_8 GSUB_2 GSUB_3 GSUB_6 GSUB_8 - spec4h1 spec5d1 spec5d2 spec5fi1 spec5fi2 spec5fi3 spec5fi4 + spec4h1 spec4h2 spec5d1 spec5d2 spec5fi1 spec5fi2 spec5fi3 spec5fi4 spec5f_ii_1 spec5f_ii_2 spec5f_ii_3 spec5f_ii_4 spec5h1 spec6b_ii spec6d2 spec6e spec6f spec6h_ii spec6h_iii_1 spec6h_iii_3d spec8a spec8b spec8c diff --git a/Lib/fontTools/feaLib/testdata/spec4h2.fea b/Lib/fontTools/feaLib/testdata/spec4h2.fea new file mode 100644 index 000000000..038480486 --- /dev/null +++ b/Lib/fontTools/feaLib/testdata/spec4h2.fea @@ -0,0 +1,40 @@ +# OpenType Feature File specification, section 4.h, example 2. +# http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html + +languagesystem DFLT dflt; +languagesystem latn dflt; +languagesystem latn DEU; +languagesystem cyrl dflt; +languagesystem cyrl SRB; +languagesystem grek dflt; + +feature liga { + # start of default rules that are applied under all language systems. + lookup HAS_I { + sub f f i by f_f_i; + sub f i by f_i; + } HAS_I; + + lookup NO_I { + sub f f l by f_f_l; + sub f f by f_f; + } NO_I; + + # end of default rules that are applied under all language systems. + + script latn; + language dflt; + # default lookup for latn included under all languages for the latn script + sub f l by f_l; + + language DEU; + # default lookups included under the DEU language + sub s s by germandbls; # This is also included. + + language TRK exclude_dflt; # default lookups are excluded. + lookup NO_I; # Only this lookup is included under the TRK language + + script cyrl; + language SRB; + sub c t by c_t; # this rule will apply only under script cyrl language SRB. +} liga; diff --git a/Lib/fontTools/feaLib/testdata/spec4h2.ttx b/Lib/fontTools/feaLib/testdata/spec4h2.ttx new file mode 100644 index 000000000..c8b0f66fb --- /dev/null +++ b/Lib/fontTools/feaLib/testdata/spec4h2.ttx @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +