diff --git a/Tests/feaLib/builder_test.py b/Tests/feaLib/builder_test.py index bb4015b10..0b6bebe30 100644 --- a/Tests/feaLib/builder_test.py +++ b/Tests/feaLib/builder_test.py @@ -67,6 +67,7 @@ class BuilderTest(unittest.TestCase): name size size2 multiple_feature_blocks omitted_GlyphClassDef ZeroValue_SinglePos ZeroValue_PairPos_horizontal ZeroValue_PairPos_vertical + ZeroValue_ChainSinglePos_horizontal ZeroValue_ChainSinglePos_vertical """.split() def __init__(self, methodName): diff --git a/Tests/feaLib/data/ZeroValue_ChainSinglePos_horizontal.fea b/Tests/feaLib/data/ZeroValue_ChainSinglePos_horizontal.fea new file mode 100644 index 000000000..480fc76d0 --- /dev/null +++ b/Tests/feaLib/data/ZeroValue_ChainSinglePos_horizontal.fea @@ -0,0 +1,9 @@ +# For contextual positioning statements with in-line single positioning rules, +# zeroes should get compiled to ValueRecord format 0. +# https://github.com/fonttools/fonttools/issues/633 + +# Zero value in a horizontal context. +feature kern { + pos A G' 0 A; # value format A + pos B G' <0 0 0 0> B; # value format B +} kern; diff --git a/Tests/feaLib/data/ZeroValue_ChainSinglePos_horizontal.ttx b/Tests/feaLib/data/ZeroValue_ChainSinglePos_horizontal.ttx new file mode 100644 index 000000000..ce76370e1 --- /dev/null +++ b/Tests/feaLib/data/ZeroValue_ChainSinglePos_horizontal.ttx @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/feaLib/data/ZeroValue_ChainSinglePos_vertical.fea b/Tests/feaLib/data/ZeroValue_ChainSinglePos_vertical.fea new file mode 100644 index 000000000..a9fb7d1df --- /dev/null +++ b/Tests/feaLib/data/ZeroValue_ChainSinglePos_vertical.fea @@ -0,0 +1,9 @@ +# For contextual positioning statements with in-line single positioning rules, +# zeroes should get compiled to ValueRecord format 0. +# https://github.com/fonttools/fonttools/issues/633 + +# Zero value in a vertical context. +feature vkrn { + pos A G' 0 A; # value format A + pos B G' <0 0 0 0> B; # value format B +} vkrn; diff --git a/Tests/feaLib/data/ZeroValue_ChainSinglePos_vertical.ttx b/Tests/feaLib/data/ZeroValue_ChainSinglePos_vertical.ttx new file mode 100644 index 000000000..e1cb5d613 --- /dev/null +++ b/Tests/feaLib/data/ZeroValue_ChainSinglePos_vertical.ttx @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +