[varLib.interpolate_layout] Tests for GPOS ‘size’ feature and LookupType 3, 4, 5, 6 and 8

This commit is contained in:
Miguel Sousa 2017-03-09 03:16:27 -08:00
parent 4e9806a443
commit 3caeb3dab0
12 changed files with 1194 additions and 0 deletions

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
<Coverage Format="1">
<Glyph value="a"/>
</Coverage>
<!-- EntryExitCount=1 -->
<EntryExitRecord index="0">
<EntryAnchor Format="1">
<XCoordinate value="49"/>
<YCoordinate value="28"/>
</EntryAnchor>
<ExitAnchor Format="1">
<XCoordinate value="444"/>
<YCoordinate value="294"/>
</ExitAnchor>
</EntryExitRecord>
</CursivePos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
<Coverage Format="1">
<Glyph value="a"/>
</Coverage>
<!-- EntryExitCount=1 -->
<EntryExitRecord index="0">
<EntryAnchor Format="1">
<XCoordinate value="60"/>
<YCoordinate value="15"/>
</EntryAnchor>
<ExitAnchor Format="1">
<XCoordinate value="405"/>
<YCoordinate value="310"/>
</ExitAnchor>
</EntryExitRecord>
</CursivePos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
<MarkCoverage Format="1">
<Glyph value="uni0303"/>
</MarkCoverage>
<BaseCoverage Format="1">
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
<MarkArray>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="510"/>
</MarkAnchor>
</MarkRecord>
</MarkArray>
<BaseArray>
<!-- BaseCount=1 -->
<BaseRecord index="0">
<BaseAnchor index="0" Format="1">
<XCoordinate value="272"/>
<YCoordinate value="510"/>
</BaseAnchor>
</BaseRecord>
</BaseArray>
</MarkBasePos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
<MarkCoverage Format="1">
<Glyph value="uni0303"/>
</MarkCoverage>
<BaseCoverage Format="1">
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
<MarkArray>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="500"/>
</MarkAnchor>
</MarkRecord>
</MarkArray>
<BaseArray>
<!-- BaseCount=1 -->
<BaseRecord index="0">
<BaseAnchor index="0" Format="1">
<XCoordinate value="260"/>
<YCoordinate value="500"/>
</BaseAnchor>
</BaseRecord>
</BaseArray>
</MarkBasePos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="5"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkLigPos index="0" Format="1">
<MarkCoverage Format="1">
<Glyph value="uni0330"/>
</MarkCoverage>
<LigatureCoverage Format="1">
<Glyph value="f_t"/>
</LigatureCoverage>
<!-- ClassCount=1 -->
<MarkArray>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="-35"/>
</MarkAnchor>
</MarkRecord>
</MarkArray>
<LigatureArray>
<!-- LigatureCount=1 -->
<LigatureAttach index="0">
<!-- ComponentCount=2 -->
<ComponentRecord index="0">
<LigatureAnchor index="0" Format="1">
<XCoordinate value="144"/>
<YCoordinate value="-35"/>
</LigatureAnchor>
</ComponentRecord>
<ComponentRecord index="1">
<LigatureAnchor index="0" Format="1">
<XCoordinate value="504"/>
<YCoordinate value="-35"/>
</LigatureAnchor>
</ComponentRecord>
</LigatureAttach>
</LigatureArray>
</MarkLigPos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="5"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkLigPos index="0" Format="1">
<MarkCoverage Format="1">
<Glyph value="uni0330"/>
</MarkCoverage>
<LigatureCoverage Format="1">
<Glyph value="f_t"/>
</LigatureCoverage>
<!-- ClassCount=1 -->
<MarkArray>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="-50"/>
</MarkAnchor>
</MarkRecord>
</MarkArray>
<LigatureArray>
<!-- LigatureCount=1 -->
<LigatureAttach index="0">
<!-- ComponentCount=2 -->
<ComponentRecord index="0">
<LigatureAnchor index="0" Format="1">
<XCoordinate value="115"/>
<YCoordinate value="-50"/>
</LigatureAnchor>
</ComponentRecord>
<ComponentRecord index="1">
<LigatureAnchor index="0" Format="1">
<XCoordinate value="430"/>
<YCoordinate value="-50"/>
</LigatureAnchor>
</ComponentRecord>
</LigatureAttach>
</LigatureArray>
</MarkLigPos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="6"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkMarkPos index="0" Format="1">
<Mark1Coverage Format="1">
<Glyph value="uni0303"/>
</Mark1Coverage>
<Mark2Coverage Format="1">
<Glyph value="uni0308"/>
</Mark2Coverage>
<!-- ClassCount=1 -->
<Mark1Array>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="510"/>
</MarkAnchor>
</MarkRecord>
</Mark1Array>
<Mark2Array>
<!-- Mark2Count=1 -->
<Mark2Record index="0">
<Mark2Anchor index="0" Format="1">
<XCoordinate value="0"/>
<YCoordinate value="702"/>
</Mark2Anchor>
</Mark2Record>
</Mark2Array>
</MarkMarkPos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="0"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=1 -->
<Lookup index="0">
<LookupType value="6"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkMarkPos index="0" Format="1">
<Mark1Coverage Format="1">
<Glyph value="uni0303"/>
</Mark1Coverage>
<Mark2Coverage Format="1">
<Glyph value="uni0308"/>
</Mark2Coverage>
<!-- ClassCount=1 -->
<Mark1Array>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="500"/>
</MarkAnchor>
</MarkRecord>
</Mark1Array>
<Mark2Array>
<!-- Mark2Count=1 -->
<Mark2Record index="0">
<Mark2Anchor index="0" Format="1">
<XCoordinate value="0"/>
<YCoordinate value="675"/>
</Mark2Anchor>
</Mark2Record>
</Mark2Array>
</MarkMarkPos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="2"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=3 -->
<Lookup index="0">
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
<Coverage Format="1">
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
<!-- PairSetCount=1 -->
<PairSet index="0">
<!-- PairValueCount=1 -->
<PairValueRecord index="0">
<SecondGlyph value="a"/>
<Value1 XAdvance="17"/>
</PairValueRecord>
</PairSet>
</PairPos>
</Lookup>
<Lookup index="1">
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
<MarkCoverage Format="1">
<Glyph value="uni0303"/>
</MarkCoverage>
<BaseCoverage Format="1">
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
<MarkArray>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="510"/>
</MarkAnchor>
</MarkRecord>
</MarkArray>
<BaseArray>
<!-- BaseCount=1 -->
<BaseRecord index="0">
<BaseAnchor index="0" Format="1">
<XCoordinate value="272"/>
<YCoordinate value="510"/>
</BaseAnchor>
</BaseRecord>
</BaseArray>
</MarkBasePos>
</Lookup>
<Lookup index="2">
<LookupType value="8"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=0 -->
<!-- InputGlyphCount=3 -->
<InputCoverage index="0" Format="1">
<Glyph value="A"/>
</InputCoverage>
<InputCoverage index="1" Format="1">
<Glyph value="a"/>
</InputCoverage>
<InputCoverage index="2" Format="1">
<Glyph value="uni0303"/>
</InputCoverage>
<!-- LookAheadGlyphCount=0 -->
<!-- PosCount=2 -->
<PosLookupRecord index="0">
<SequenceIndex value="0"/>
<LookupListIndex value="0"/>
</PosLookupRecord>
<PosLookupRecord index="1">
<SequenceIndex value="2"/>
<LookupListIndex value="1"/>
</PosLookupRecord>
</ChainContextPos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="xxxx"/>
<Feature>
<!-- LookupCount=1 -->
<LookupListIndex index="0" value="2"/>
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=3 -->
<Lookup index="0">
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
<Coverage Format="1">
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
<!-- PairSetCount=1 -->
<PairSet index="0">
<!-- PairValueCount=1 -->
<PairValueRecord index="0">
<SecondGlyph value="a"/>
<Value1 XAdvance="-23"/>
</PairValueRecord>
</PairSet>
</PairPos>
</Lookup>
<Lookup index="1">
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
<MarkCoverage Format="1">
<Glyph value="uni0303"/>
</MarkCoverage>
<BaseCoverage Format="1">
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
<MarkArray>
<!-- MarkCount=1 -->
<MarkRecord index="0">
<Class value="0"/>
<MarkAnchor Format="1">
<XCoordinate value="0"/>
<YCoordinate value="500"/>
</MarkAnchor>
</MarkRecord>
</MarkArray>
<BaseArray>
<!-- BaseCount=1 -->
<BaseRecord index="0">
<BaseAnchor index="0" Format="1">
<XCoordinate value="260"/>
<YCoordinate value="500"/>
</BaseAnchor>
</BaseRecord>
</BaseArray>
</MarkBasePos>
</Lookup>
<Lookup index="2">
<LookupType value="8"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=0 -->
<!-- InputGlyphCount=3 -->
<InputCoverage index="0" Format="1">
<Glyph value="A"/>
</InputCoverage>
<InputCoverage index="1" Format="1">
<Glyph value="a"/>
</InputCoverage>
<InputCoverage index="2" Format="1">
<Glyph value="uni0303"/>
</InputCoverage>
<!-- LookAheadGlyphCount=0 -->
<!-- PosCount=2 -->
<PosLookupRecord index="0">
<SequenceIndex value="0"/>
<LookupListIndex value="0"/>
</PosLookupRecord>
<PosLookupRecord index="1">
<SequenceIndex value="2"/>
<LookupListIndex value="1"/>
</PosLookupRecord>
</ChainContextPos>
</Lookup>
</LookupList>
</GPOS>
</ttFont>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="3.8">
<GPOS>
<Version value="0x00010000"/>
<ScriptList>
<!-- ScriptCount=1 -->
<ScriptRecord index="0">
<ScriptTag value="DFLT"/>
<Script>
<DefaultLangSys>
<ReqFeatureIndex value="65535"/>
<!-- FeatureCount=1 -->
<FeatureIndex index="0" value="0"/>
</DefaultLangSys>
<!-- LangSysCount=0 -->
</Script>
</ScriptRecord>
</ScriptList>
<FeatureList>
<!-- FeatureCount=1 -->
<FeatureRecord index="0">
<FeatureTag value="size"/>
<Feature>
<FeatureParamsSize>
<DesignSize value="10.0"/>
<SubfamilyID value="0"/>
<SubfamilyNameID value="0"/> <!-- missing from name table -->
<RangeStart value="0.0"/>
<RangeEnd value="0.0"/>
</FeatureParamsSize>
<!-- LookupCount=0 -->
</Feature>
</FeatureRecord>
</FeatureList>
<LookupList>
<!-- LookupCount=0 -->
</LookupList>
</GPOS>
</ttFont>

View File

@ -176,6 +176,35 @@ class InterpolateLayoutTest(unittest.TestCase):
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_size_feat_same_val_ttf(self):
"""Only GPOS; 'size' feature; same values in all masters.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str = """
feature size {
parameters 10.0 0;
} size;
"""
features = [fea_str] * 2
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_size_feat_same.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_1_same_val_ttf(self):
"""Only GPOS; LookupType 1; same values in all masters.
"""
@ -372,6 +401,360 @@ class InterpolateLayoutTest(unittest.TestCase):
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_3_same_val_ttf(self):
"""Only GPOS; LookupType 3; same values in all masters.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str = """
feature xxxx {
pos cursive a <anchor 60 15> <anchor 405 310>;
} xxxx;
"""
features = [fea_str] * 2
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_3_same.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_3_diff_val_ttf(self):
"""Only GPOS; LookupType 3; different values in each master.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str_0 = """
feature xxxx {
pos cursive a <anchor 60 15> <anchor 405 310>;
} xxxx;
"""
fea_str_1 = """
feature xxxx {
pos cursive a <anchor 38 42> <anchor 483 279>;
} xxxx;
"""
features = [fea_str_0, fea_str_1]
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_3_diff.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_4_same_val_ttf(self):
"""Only GPOS; LookupType 4; same values in all masters.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str = """
markClass uni0303 <anchor 0 500> @MARKS_ABOVE;
feature xxxx {
pos base a <anchor 260 500> mark @MARKS_ABOVE;
} xxxx;
"""
features = [fea_str] * 2
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_4_same.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_4_diff_val_ttf(self):
"""Only GPOS; LookupType 4; different values in each master.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str_0 = """
markClass uni0303 <anchor 0 500> @MARKS_ABOVE;
feature xxxx {
pos base a <anchor 260 500> mark @MARKS_ABOVE;
} xxxx;
"""
fea_str_1 = """
markClass uni0303 <anchor 0 520> @MARKS_ABOVE;
feature xxxx {
pos base a <anchor 285 520> mark @MARKS_ABOVE;
} xxxx;
"""
features = [fea_str_0, fea_str_1]
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_4_diff.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_5_same_val_ttf(self):
"""Only GPOS; LookupType 5; same values in all masters.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str = """
markClass uni0330 <anchor 0 -50> @MARKS_BELOW;
feature xxxx {
pos ligature f_t <anchor 115 -50> mark @MARKS_BELOW
ligComponent <anchor 430 -50> mark @MARKS_BELOW;
} xxxx;
"""
features = [fea_str] * 2
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_5_same.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_5_diff_val_ttf(self):
"""Only GPOS; LookupType 5; different values in each master.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str_0 = """
markClass uni0330 <anchor 0 -50> @MARKS_BELOW;
feature xxxx {
pos ligature f_t <anchor 115 -50> mark @MARKS_BELOW
ligComponent <anchor 430 -50> mark @MARKS_BELOW;
} xxxx;
"""
fea_str_1 = """
markClass uni0330 <anchor 0 -20> @MARKS_BELOW;
feature xxxx {
pos ligature f_t <anchor 173 -20> mark @MARKS_BELOW
ligComponent <anchor 577 -20> mark @MARKS_BELOW;
} xxxx;
"""
features = [fea_str_0, fea_str_1]
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_5_diff.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_6_same_val_ttf(self):
"""Only GPOS; LookupType 6; same values in all masters.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str = """
markClass uni0303 <anchor 0 500> @MARKS_ABOVE;
feature xxxx {
pos mark uni0308 <anchor 0 675> mark @MARKS_ABOVE;
} xxxx;
"""
features = [fea_str] * 2
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_6_same.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_6_diff_val_ttf(self):
"""Only GPOS; LookupType 6; different values in each master.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str_0 = """
markClass uni0303 <anchor 0 500> @MARKS_ABOVE;
feature xxxx {
pos mark uni0308 <anchor 0 675> mark @MARKS_ABOVE;
} xxxx;
"""
fea_str_1 = """
markClass uni0303 <anchor 0 520> @MARKS_ABOVE;
feature xxxx {
pos mark uni0308 <anchor 0 730> mark @MARKS_ABOVE;
} xxxx;
"""
features = [fea_str_0, fea_str_1]
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_6_diff.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_8_same_val_ttf(self):
"""Only GPOS; LookupType 8; same values in all masters.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str = """
markClass uni0303 <anchor 0 500> @MARKS_ABOVE;
lookup CNTXT_PAIR_POS {
pos A a -23;
} CNTXT_PAIR_POS;
lookup CNTXT_MARK_TO_BASE {
pos base a <anchor 260 500> mark @MARKS_ABOVE;
} CNTXT_MARK_TO_BASE;
feature xxxx {
pos A' lookup CNTXT_PAIR_POS a' @MARKS_ABOVE' lookup CNTXT_MARK_TO_BASE;
} xxxx;
"""
features = [fea_str] * 2
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_8_same.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_GPOS_only_LookupType_8_diff_val_ttf(self):
"""Only GPOS; LookupType 8; different values in each master.
"""
suffix = '.ttf'
ds_path = self.get_test_input('InterpolateLayout.designspace')
ufo_dir = self.get_test_input('master_ufo')
ttx_dir = self.get_test_input('master_ttx_interpolatable_ttf')
fea_str_0 = """
markClass uni0303 <anchor 0 500> @MARKS_ABOVE;
lookup CNTXT_PAIR_POS {
pos A a -23;
} CNTXT_PAIR_POS;
lookup CNTXT_MARK_TO_BASE {
pos base a <anchor 260 500> mark @MARKS_ABOVE;
} CNTXT_MARK_TO_BASE;
feature xxxx {
pos A' lookup CNTXT_PAIR_POS a' @MARKS_ABOVE' lookup CNTXT_MARK_TO_BASE;
} xxxx;
"""
fea_str_1 = """
markClass uni0303 <anchor 0 520> @MARKS_ABOVE;
lookup CNTXT_PAIR_POS {
pos A a 57;
} CNTXT_PAIR_POS;
lookup CNTXT_MARK_TO_BASE {
pos base a <anchor 285 520> mark @MARKS_ABOVE;
} CNTXT_MARK_TO_BASE;
feature xxxx {
pos A' lookup CNTXT_PAIR_POS a' @MARKS_ABOVE' lookup CNTXT_MARK_TO_BASE;
} xxxx;
"""
features = [fea_str_0, fea_str_1]
self.temp_dir()
ttx_paths = self.get_file_list(ttx_dir, '.ttx', 'TestFamily2-')
for i, path in enumerate(ttx_paths):
self.compile_font(path, suffix, self.tempdir, features[i])
finder = lambda s: s.replace(ufo_dir, self.tempdir).replace('.ufo', suffix)
instfont = interpolate_layout(ds_path, {'weight': 500}, finder)
tables = ['GPOS']
expected_ttx_path = self.get_test_output('InterpolateLayoutGPOS_8_diff.ttx')
self.expect_ttx(instfont, expected_ttx_path, tables)
self.check_ttx_dump(instfont, expected_ttx_path, tables, suffix)
def test_varlib_interpolate_layout_main_ttf(self):
"""Mostly for testing varLib.interpolate_layout.main()
"""