From a99bd4296a8c44bff7b320d7c062a2fffeaafd1a Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Tue, 17 Nov 2020 15:17:02 +0000 Subject: [PATCH] Tests for GSUB5/GSUB6 formats 1, 2 and 3 --- Tests/feaLib/builder_test.py | 3 +- Tests/feaLib/data/GSUB_5_formats.fea | 20 +++ Tests/feaLib/data/GSUB_5_formats.ttx | 197 +++++++++++++++++++++ Tests/feaLib/data/GSUB_6_formats.fea | 20 +++ Tests/feaLib/data/GSUB_6_formats.ttx | 256 +++++++++++++++++++++++++++ 5 files changed, 495 insertions(+), 1 deletion(-) create mode 100644 Tests/feaLib/data/GSUB_5_formats.fea create mode 100644 Tests/feaLib/data/GSUB_5_formats.ttx create mode 100644 Tests/feaLib/data/GSUB_6_formats.fea create mode 100644 Tests/feaLib/data/GSUB_6_formats.ttx diff --git a/Tests/feaLib/builder_test.py b/Tests/feaLib/builder_test.py index 5a8c562d6..ce8c39ff9 100644 --- a/Tests/feaLib/builder_test.py +++ b/Tests/feaLib/builder_test.py @@ -72,7 +72,8 @@ class BuilderTest(unittest.TestCase): PairPosSubtable ChainSubstSubtable SubstSubtable ChainPosSubtable LigatureSubtable AlternateSubtable MultipleSubstSubtable SingleSubstSubtable aalt_chain_contextual_subst AlternateChained - MultipleLookupsPerGlyph MultipleLookupsPerGlyph2 + MultipleLookupsPerGlyph MultipleLookupsPerGlyph2 GSUB_6_formats + GSUB_5_formats """.split() def __init__(self, methodName): diff --git a/Tests/feaLib/data/GSUB_5_formats.fea b/Tests/feaLib/data/GSUB_5_formats.fea new file mode 100644 index 000000000..3acb7edf1 --- /dev/null +++ b/Tests/feaLib/data/GSUB_5_formats.fea @@ -0,0 +1,20 @@ +lookup GSUB5f1 { + ignore sub three four; + ignore sub four five; +} GSUB5f1; + +lookup GSUB5f2 { + ignore sub [a - z] [A - H] [I - Z]; + ignore sub [a - z] [A - H] [I - Z]; + ignore sub [a - z] [I - Z] [A - H]; +} GSUB5f2; + +lookup GSUB5f3 { + ignore sub e; +} GSUB5f3; + +feature test { + lookup GSUB5f1; + lookup GSUB5f2; + lookup GSUB5f3; +} test; diff --git a/Tests/feaLib/data/GSUB_5_formats.ttx b/Tests/feaLib/data/GSUB_5_formats.ttx new file mode 100644 index 000000000..80196aaa4 --- /dev/null +++ b/Tests/feaLib/data/GSUB_5_formats.ttx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/feaLib/data/GSUB_6_formats.fea b/Tests/feaLib/data/GSUB_6_formats.fea new file mode 100644 index 000000000..44135d243 --- /dev/null +++ b/Tests/feaLib/data/GSUB_6_formats.fea @@ -0,0 +1,20 @@ +lookup GSUB6f1 { + ignore sub one two three' four' five six seven; + ignore sub two one three' four' six five seven; +} GSUB6f1; + +lookup GSUB6f2 { + ignore sub [A - H] [I - Z] [a - z]' [A - H]' [I - Z]'; + ignore sub [I - Z] [A - H] [a - z]' [A - H]' [I - Z]'; + ignore sub [A - H] [I - Z] [a - z]' [I - Z]' [A - H]'; +} GSUB6f2; + +lookup GSUB6f3 { + ignore sub [space comma semicolon] e'; +} GSUB6f3; + +feature test { + lookup GSUB6f1; + lookup GSUB6f2; + lookup GSUB6f3; +} test; diff --git a/Tests/feaLib/data/GSUB_6_formats.ttx b/Tests/feaLib/data/GSUB_6_formats.ttx new file mode 100644 index 000000000..ad2a1c5e5 --- /dev/null +++ b/Tests/feaLib/data/GSUB_6_formats.ttx @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +