Merge pull request #2101 from simoncozens/alternate-contextual-representations
[otlLib] Build format 1 and format 2 contextual lookups
This commit is contained in:
commit
3e964ad8da
@ -2,10 +2,16 @@ from collections import namedtuple, OrderedDict
|
||||
from fontTools.misc.fixedTools import fixedToFloat
|
||||
from fontTools import ttLib
|
||||
from fontTools.ttLib.tables import otTables as ot
|
||||
from fontTools.ttLib.tables.otBase import ValueRecord, valueRecordFormatDict
|
||||
from fontTools.ttLib.tables.otBase import (
|
||||
ValueRecord,
|
||||
valueRecordFormatDict,
|
||||
OTTableWriter,
|
||||
CountReference,
|
||||
)
|
||||
from fontTools.ttLib.tables import otBase
|
||||
from fontTools.otlLib.error import OpenTypeLibError
|
||||
import logging
|
||||
import copy
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -330,6 +336,19 @@ class ChainContextualBuilder(LookupBuilder):
|
||||
# Squish any empty subtables
|
||||
return [x for x in ruleset if len(x.rules) > 0]
|
||||
|
||||
def getCompiledSize_(self, subtables):
|
||||
size = 0
|
||||
for st in subtables:
|
||||
w = OTTableWriter()
|
||||
w["LookupType"] = CountReference(
|
||||
{"LookupType": st.LookupType}, "LookupType"
|
||||
)
|
||||
# We need to make a copy here because compiling
|
||||
# modifies the subtable (finalizing formats etc.)
|
||||
copy.deepcopy(st).compile(w, self.font)
|
||||
size += len(w.getAllData())
|
||||
return size
|
||||
|
||||
def build(self):
|
||||
"""Build the lookup.
|
||||
|
||||
@ -342,12 +361,153 @@ class ChainContextualBuilder(LookupBuilder):
|
||||
rulesets = self.rulesets()
|
||||
chaining = any(ruleset.hasPrefixOrSuffix for ruleset in rulesets)
|
||||
for ruleset in rulesets:
|
||||
# Determine format strategy. We try to build formats 1, 2 and 3
|
||||
# subtables and then work out which is best. candidates list holds
|
||||
# the subtables in each format for this ruleset (including a dummy
|
||||
# "format 0" to make the addressing match the format numbers).
|
||||
|
||||
# We can always build a format 3 lookup by accumulating each of
|
||||
# the rules into a list, so start with that.
|
||||
candidates = [None, None, None, []]
|
||||
for rule in ruleset.rules:
|
||||
subtables.append(self.buildFormat3Subtable(rule, chaining))
|
||||
candidates[3].append(self.buildFormat3Subtable(rule, chaining))
|
||||
|
||||
# Can we express the whole ruleset as a format 2 subtable?
|
||||
classdefs = ruleset.format2ClassDefs()
|
||||
if classdefs:
|
||||
candidates[2] = [
|
||||
self.buildFormat2Subtable(ruleset, classdefs, chaining)
|
||||
]
|
||||
|
||||
if not ruleset.hasAnyGlyphClasses:
|
||||
candidates[1] = [self.buildFormat1Subtable(ruleset, chaining)]
|
||||
|
||||
candidates = [x for x in candidates if x is not None]
|
||||
winner = min(candidates, key=self.getCompiledSize_)
|
||||
subtables.extend(winner)
|
||||
|
||||
# If we are not chaining, lookup type will be automatically fixed by
|
||||
# buildLookup_
|
||||
return self.buildLookup_(subtables)
|
||||
|
||||
def buildFormat1Subtable(self, ruleset, chaining=True):
|
||||
st = self.newSubtable_(chaining=chaining)
|
||||
st.Format = 1
|
||||
st.populateDefaults()
|
||||
coverage = set()
|
||||
rulesetsByFirstGlyph = {}
|
||||
ruleAttr = self.ruleAttr_(format=1, chaining=chaining)
|
||||
|
||||
for rule in ruleset.rules:
|
||||
ruleAsSubtable = self.newRule_(format=1, chaining=chaining)
|
||||
|
||||
if chaining:
|
||||
ruleAsSubtable.BacktrackGlyphCount = len(rule.prefix)
|
||||
ruleAsSubtable.LookAheadGlyphCount = len(rule.suffix)
|
||||
ruleAsSubtable.Backtrack = [list(x)[0] for x in reversed(rule.prefix)]
|
||||
ruleAsSubtable.LookAhead = [list(x)[0] for x in rule.suffix]
|
||||
|
||||
ruleAsSubtable.InputGlyphCount = len(rule.glyphs)
|
||||
else:
|
||||
ruleAsSubtable.GlyphCount = len(rule.glyphs)
|
||||
|
||||
ruleAsSubtable.Input = [list(x)[0] for x in rule.glyphs[1:]]
|
||||
|
||||
self.buildLookupList(rule, ruleAsSubtable)
|
||||
|
||||
firstGlyph = list(rule.glyphs[0])[0]
|
||||
if firstGlyph not in rulesetsByFirstGlyph:
|
||||
coverage.add(firstGlyph)
|
||||
rulesetsByFirstGlyph[firstGlyph] = []
|
||||
rulesetsByFirstGlyph[firstGlyph].append(ruleAsSubtable)
|
||||
|
||||
st.Coverage = buildCoverage(coverage, self.glyphMap)
|
||||
ruleSets = []
|
||||
for g in st.Coverage.glyphs:
|
||||
ruleSet = self.newRuleSet_(format=1, chaining=chaining)
|
||||
setattr(ruleSet, ruleAttr, rulesetsByFirstGlyph[g])
|
||||
setattr(ruleSet, f"{ruleAttr}Count", len(rulesetsByFirstGlyph[g]))
|
||||
ruleSets.append(ruleSet)
|
||||
|
||||
setattr(st, self.ruleSetAttr_(format=1, chaining=chaining), ruleSets)
|
||||
setattr(
|
||||
st, self.ruleSetAttr_(format=1, chaining=chaining) + "Count", len(ruleSets)
|
||||
)
|
||||
|
||||
return st
|
||||
|
||||
def buildFormat2Subtable(self, ruleset, classdefs, chaining=True):
|
||||
st = self.newSubtable_(chaining=chaining)
|
||||
st.Format = 2
|
||||
st.populateDefaults()
|
||||
|
||||
if chaining:
|
||||
(
|
||||
st.BacktrackClassDef,
|
||||
st.InputClassDef,
|
||||
st.LookAheadClassDef,
|
||||
) = [c.build() for c in classdefs]
|
||||
else:
|
||||
st.ClassDef = classdefs[1].build()
|
||||
|
||||
inClasses = classdefs[1].classes()
|
||||
|
||||
classSets = []
|
||||
for _ in inClasses:
|
||||
classSet = self.newRuleSet_(format=2, chaining=chaining)
|
||||
classSets.append(classSet)
|
||||
|
||||
coverage = set()
|
||||
classRuleAttr = self.ruleAttr_(format=2, chaining=chaining)
|
||||
|
||||
for rule in ruleset.rules:
|
||||
ruleAsSubtable = self.newRule_(format=2, chaining=chaining)
|
||||
if chaining:
|
||||
ruleAsSubtable.BacktrackGlyphCount = len(rule.prefix)
|
||||
ruleAsSubtable.LookAheadGlyphCount = len(rule.suffix)
|
||||
# The glyphs in the rule may be list, tuple, odict_keys...
|
||||
# Order is not important anyway because they are guaranteed
|
||||
# to be members of the same class.
|
||||
ruleAsSubtable.Backtrack = [
|
||||
st.BacktrackClassDef.classDefs[list(x)[0]]
|
||||
for x in reversed(rule.prefix)
|
||||
]
|
||||
ruleAsSubtable.LookAhead = [
|
||||
st.LookAheadClassDef.classDefs[list(x)[0]] for x in rule.suffix
|
||||
]
|
||||
|
||||
ruleAsSubtable.InputGlyphCount = len(rule.glyphs)
|
||||
ruleAsSubtable.Input = [
|
||||
st.InputClassDef.classDefs[list(x)[0]] for x in rule.glyphs[1:]
|
||||
]
|
||||
setForThisRule = classSets[
|
||||
st.InputClassDef.classDefs[list(rule.glyphs[0])[0]]
|
||||
]
|
||||
else:
|
||||
ruleAsSubtable.GlyphCount = len(rule.glyphs)
|
||||
ruleAsSubtable.Class = [ # The spec calls this InputSequence
|
||||
st.ClassDef.classDefs[list(x)[0]] for x in rule.glyphs[1:]
|
||||
]
|
||||
setForThisRule = classSets[
|
||||
st.ClassDef.classDefs[list(rule.glyphs[0])[0]]
|
||||
]
|
||||
|
||||
self.buildLookupList(rule, ruleAsSubtable)
|
||||
coverage |= set(rule.glyphs[0])
|
||||
|
||||
getattr(setForThisRule, classRuleAttr).append(ruleAsSubtable)
|
||||
setattr(
|
||||
setForThisRule,
|
||||
f"{classRuleAttr}Count",
|
||||
getattr(setForThisRule, f"{classRuleAttr}Count") + 1,
|
||||
)
|
||||
setattr(st, self.ruleSetAttr_(format=2, chaining=chaining), classSets)
|
||||
setattr(
|
||||
st, self.ruleSetAttr_(format=2, chaining=chaining) + "Count", len(classSets)
|
||||
)
|
||||
st.Coverage = buildCoverage(coverage, self.glyphMap)
|
||||
return st
|
||||
|
||||
def buildFormat3Subtable(self, rule, chaining=True):
|
||||
st = self.newSubtable_(chaining=chaining)
|
||||
st.Format = 3
|
||||
@ -357,7 +517,10 @@ class ChainContextualBuilder(LookupBuilder):
|
||||
self.setInputCoverage_(rule.glyphs, st)
|
||||
else:
|
||||
self.setCoverage_(rule.glyphs, st)
|
||||
self.buildLookupList(rule, st)
|
||||
return st
|
||||
|
||||
def buildLookupList(self, rule, st):
|
||||
for sequenceIndex, lookupList in enumerate(rule.lookups):
|
||||
if lookupList is not None:
|
||||
if not isinstance(lookupList, list):
|
||||
@ -377,7 +540,6 @@ class ChainContextualBuilder(LookupBuilder):
|
||||
rec = self.newLookupRecord_(st)
|
||||
rec.SequenceIndex = sequenceIndex
|
||||
rec.LookupListIndex = l.lookup_index
|
||||
return st
|
||||
|
||||
def add_subtable_break(self, location):
|
||||
self.rules.append(
|
||||
@ -398,6 +560,54 @@ class ChainContextualBuilder(LookupBuilder):
|
||||
setattr(st, f"{self.subtable_type}LookupRecord", [])
|
||||
return st
|
||||
|
||||
# Format 1 and format 2 GSUB5/GSUB6/GPOS7/GPOS8 rulesets and rules form a family:
|
||||
#
|
||||
# format 1 ruleset format 1 rule format 2 ruleset format 2 rule
|
||||
# GSUB5 SubRuleSet SubRule SubClassSet SubClassRule
|
||||
# GSUB6 ChainSubRuleSet ChainSubRule ChainSubClassSet ChainSubClassRule
|
||||
# GPOS7 PosRuleSet PosRule PosClassSet PosClassRule
|
||||
# GPOS8 ChainPosRuleSet ChainPosRule ChainPosClassSet ChainPosClassRule
|
||||
#
|
||||
# The following functions generate the attribute names and subtables according
|
||||
# to this naming convention.
|
||||
def ruleSetAttr_(self, format=1, chaining=True):
|
||||
if format == 1:
|
||||
formatType = "Rule"
|
||||
elif format == 2:
|
||||
formatType = "Class"
|
||||
else:
|
||||
raise AssertionError(formatType)
|
||||
subtablename = f"{self.subtable_type[0:3]}{formatType}Set" # Sub, not Subst.
|
||||
if chaining:
|
||||
subtablename = "Chain" + subtablename
|
||||
return subtablename
|
||||
|
||||
def ruleAttr_(self, format=1, chaining=True):
|
||||
if format == 1:
|
||||
formatType = ""
|
||||
elif format == 2:
|
||||
formatType = "Class"
|
||||
else:
|
||||
raise AssertionError(formatType)
|
||||
subtablename = f"{self.subtable_type[0:3]}{formatType}Rule" # Sub, not Subst.
|
||||
if chaining:
|
||||
subtablename = "Chain" + subtablename
|
||||
return subtablename
|
||||
|
||||
def newRuleSet_(self, format=1, chaining=True):
|
||||
st = getattr(
|
||||
ot, self.ruleSetAttr_(format, chaining)
|
||||
)() # ot.ChainPosRuleSet()/ot.SubRuleSet()/etc.
|
||||
st.populateDefaults()
|
||||
return st
|
||||
|
||||
def newRule_(self, format=1, chaining=True):
|
||||
st = getattr(
|
||||
ot, self.ruleAttr_(format, chaining)
|
||||
)() # ot.ChainPosClassRule()/ot.SubClassRule()/etc.
|
||||
st.populateDefaults()
|
||||
return st
|
||||
|
||||
def attachSubtableWithCount_(
|
||||
self, st, subtable_name, count_name, existing=None, index=None, chaining=False
|
||||
):
|
||||
|
@ -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):
|
||||
|
@ -67,24 +67,26 @@
|
||||
<LookupListIndex value="1"/>
|
||||
</PosLookupRecord>
|
||||
</ChainContextPos>
|
||||
<ChainContextPos index="1" Format="3">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="X"/>
|
||||
</BacktrackCoverage>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<InputCoverage index="0">
|
||||
<ChainContextPos index="1" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="A"/>
|
||||
</InputCoverage>
|
||||
</Coverage>
|
||||
<!-- ChainPosRuleSetCount=1 -->
|
||||
<ChainPosRuleSet index="0">
|
||||
<!-- ChainPosRuleCount=1 -->
|
||||
<ChainPosRule index="0">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<Backtrack index="0" value="X"/>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<!-- LookAheadGlyphCount=1 -->
|
||||
<LookAheadCoverage index="0">
|
||||
<Glyph value="Y"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAhead index="0" value="Y"/>
|
||||
<!-- PosCount=1 -->
|
||||
<PosLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="2"/>
|
||||
</PosLookupRecord>
|
||||
</ChainPosRule>
|
||||
</ChainPosRuleSet>
|
||||
</ChainContextPos>
|
||||
<ChainContextPos index="2" Format="3">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
|
@ -34,24 +34,20 @@
|
||||
<LookupType value="8"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextPos index="0" Format="3">
|
||||
<ChainContextPos index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="one"/>
|
||||
</Coverage>
|
||||
<!-- ChainPosRuleSetCount=1 -->
|
||||
<ChainPosRuleSet index="0">
|
||||
<!-- ChainPosRuleCount=1 -->
|
||||
<ChainPosRule index="0">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="A"/>
|
||||
</BacktrackCoverage>
|
||||
<Backtrack index="0" value="A"/>
|
||||
<!-- InputGlyphCount=4 -->
|
||||
<InputCoverage index="0">
|
||||
<Glyph value="one"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="1">
|
||||
<Glyph value="two"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="2">
|
||||
<Glyph value="one"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="3">
|
||||
<Glyph value="two"/>
|
||||
</InputCoverage>
|
||||
<Input index="0" value="two"/>
|
||||
<Input index="1" value="one"/>
|
||||
<Input index="2" value="two"/>
|
||||
<!-- LookAheadGlyphCount=0 -->
|
||||
<!-- PosCount=4 -->
|
||||
<PosLookupRecord index="0">
|
||||
@ -70,6 +66,8 @@
|
||||
<SequenceIndex value="3"/>
|
||||
<LookupListIndex value="2"/>
|
||||
</PosLookupRecord>
|
||||
</ChainPosRule>
|
||||
</ChainPosRuleSet>
|
||||
</ChainContextPos>
|
||||
</Lookup>
|
||||
<Lookup index="1">
|
||||
|
20
Tests/feaLib/data/GSUB_5_formats.fea
Normal file
20
Tests/feaLib/data/GSUB_5_formats.fea
Normal file
@ -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;
|
197
Tests/feaLib/data/GSUB_5_formats.ttx
Normal file
197
Tests/feaLib/data/GSUB_5_formats.ttx
Normal file
@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ttFont>
|
||||
|
||||
<GSUB>
|
||||
<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="test"/>
|
||||
<Feature>
|
||||
<!-- LookupCount=3 -->
|
||||
<LookupListIndex index="0" value="0"/>
|
||||
<LookupListIndex index="1" value="1"/>
|
||||
<LookupListIndex index="2" value="2"/>
|
||||
</Feature>
|
||||
</FeatureRecord>
|
||||
</FeatureList>
|
||||
<LookupList>
|
||||
<!-- LookupCount=3 -->
|
||||
<Lookup index="0">
|
||||
<LookupType value="5"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ContextSubst index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="three"/>
|
||||
<Glyph value="four"/>
|
||||
</Coverage>
|
||||
<!-- SubRuleSetCount=2 -->
|
||||
<SubRuleSet index="0">
|
||||
<!-- SubRuleCount=1 -->
|
||||
<SubRule index="0">
|
||||
<!-- GlyphCount=2 -->
|
||||
<!-- SubstCount=0 -->
|
||||
<Input index="0" value="four"/>
|
||||
</SubRule>
|
||||
</SubRuleSet>
|
||||
<SubRuleSet index="1">
|
||||
<!-- SubRuleCount=1 -->
|
||||
<SubRule index="0">
|
||||
<!-- GlyphCount=2 -->
|
||||
<!-- SubstCount=0 -->
|
||||
<Input index="0" value="five"/>
|
||||
</SubRule>
|
||||
</SubRuleSet>
|
||||
</ContextSubst>
|
||||
</Lookup>
|
||||
<Lookup index="1">
|
||||
<LookupType value="5"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ContextSubst index="0" Format="2">
|
||||
<Coverage>
|
||||
<Glyph value="a"/>
|
||||
<Glyph value="b"/>
|
||||
<Glyph value="c"/>
|
||||
<Glyph value="d"/>
|
||||
<Glyph value="e"/>
|
||||
<Glyph value="f"/>
|
||||
<Glyph value="g"/>
|
||||
<Glyph value="h"/>
|
||||
<Glyph value="i"/>
|
||||
<Glyph value="j"/>
|
||||
<Glyph value="k"/>
|
||||
<Glyph value="l"/>
|
||||
<Glyph value="m"/>
|
||||
<Glyph value="n"/>
|
||||
<Glyph value="o"/>
|
||||
<Glyph value="p"/>
|
||||
<Glyph value="q"/>
|
||||
<Glyph value="r"/>
|
||||
<Glyph value="s"/>
|
||||
<Glyph value="t"/>
|
||||
<Glyph value="u"/>
|
||||
<Glyph value="v"/>
|
||||
<Glyph value="w"/>
|
||||
<Glyph value="x"/>
|
||||
<Glyph value="y"/>
|
||||
<Glyph value="z"/>
|
||||
</Coverage>
|
||||
<ClassDef>
|
||||
<ClassDef glyph="A" class="3"/>
|
||||
<ClassDef glyph="B" class="3"/>
|
||||
<ClassDef glyph="C" class="3"/>
|
||||
<ClassDef glyph="D" class="3"/>
|
||||
<ClassDef glyph="E" class="3"/>
|
||||
<ClassDef glyph="F" class="3"/>
|
||||
<ClassDef glyph="G" class="3"/>
|
||||
<ClassDef glyph="H" class="3"/>
|
||||
<ClassDef glyph="I" class="2"/>
|
||||
<ClassDef glyph="J" class="2"/>
|
||||
<ClassDef glyph="K" class="2"/>
|
||||
<ClassDef glyph="L" class="2"/>
|
||||
<ClassDef glyph="M" class="2"/>
|
||||
<ClassDef glyph="N" class="2"/>
|
||||
<ClassDef glyph="O" class="2"/>
|
||||
<ClassDef glyph="P" class="2"/>
|
||||
<ClassDef glyph="Q" class="2"/>
|
||||
<ClassDef glyph="R" class="2"/>
|
||||
<ClassDef glyph="S" class="2"/>
|
||||
<ClassDef glyph="T" class="2"/>
|
||||
<ClassDef glyph="U" class="2"/>
|
||||
<ClassDef glyph="V" class="2"/>
|
||||
<ClassDef glyph="W" class="2"/>
|
||||
<ClassDef glyph="X" class="2"/>
|
||||
<ClassDef glyph="Y" class="2"/>
|
||||
<ClassDef glyph="Z" class="2"/>
|
||||
<ClassDef glyph="a" class="1"/>
|
||||
<ClassDef glyph="b" class="1"/>
|
||||
<ClassDef glyph="c" class="1"/>
|
||||
<ClassDef glyph="d" class="1"/>
|
||||
<ClassDef glyph="e" class="1"/>
|
||||
<ClassDef glyph="f" class="1"/>
|
||||
<ClassDef glyph="g" class="1"/>
|
||||
<ClassDef glyph="h" class="1"/>
|
||||
<ClassDef glyph="i" class="1"/>
|
||||
<ClassDef glyph="j" class="1"/>
|
||||
<ClassDef glyph="k" class="1"/>
|
||||
<ClassDef glyph="l" class="1"/>
|
||||
<ClassDef glyph="m" class="1"/>
|
||||
<ClassDef glyph="n" class="1"/>
|
||||
<ClassDef glyph="o" class="1"/>
|
||||
<ClassDef glyph="p" class="1"/>
|
||||
<ClassDef glyph="q" class="1"/>
|
||||
<ClassDef glyph="r" class="1"/>
|
||||
<ClassDef glyph="s" class="1"/>
|
||||
<ClassDef glyph="t" class="1"/>
|
||||
<ClassDef glyph="u" class="1"/>
|
||||
<ClassDef glyph="v" class="1"/>
|
||||
<ClassDef glyph="w" class="1"/>
|
||||
<ClassDef glyph="x" class="1"/>
|
||||
<ClassDef glyph="y" class="1"/>
|
||||
<ClassDef glyph="z" class="1"/>
|
||||
</ClassDef>
|
||||
<!-- SubClassSetCount=4 -->
|
||||
<SubClassSet index="0">
|
||||
<!-- SubClassRuleCount=0 -->
|
||||
</SubClassSet>
|
||||
<SubClassSet index="1">
|
||||
<!-- SubClassRuleCount=3 -->
|
||||
<SubClassRule index="0">
|
||||
<!-- GlyphCount=3 -->
|
||||
<!-- SubstCount=0 -->
|
||||
<Class index="0" value="3"/>
|
||||
<Class index="1" value="2"/>
|
||||
</SubClassRule>
|
||||
<SubClassRule index="1">
|
||||
<!-- GlyphCount=3 -->
|
||||
<!-- SubstCount=0 -->
|
||||
<Class index="0" value="3"/>
|
||||
<Class index="1" value="2"/>
|
||||
</SubClassRule>
|
||||
<SubClassRule index="2">
|
||||
<!-- GlyphCount=3 -->
|
||||
<!-- SubstCount=0 -->
|
||||
<Class index="0" value="2"/>
|
||||
<Class index="1" value="3"/>
|
||||
</SubClassRule>
|
||||
</SubClassSet>
|
||||
<SubClassSet index="2">
|
||||
<!-- SubClassRuleCount=0 -->
|
||||
</SubClassSet>
|
||||
<SubClassSet index="3">
|
||||
<!-- SubClassRuleCount=0 -->
|
||||
</SubClassSet>
|
||||
</ContextSubst>
|
||||
</Lookup>
|
||||
<Lookup index="2">
|
||||
<LookupType value="5"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ContextSubst index="0" Format="3">
|
||||
<!-- GlyphCount=1 -->
|
||||
<!-- SubstCount=0 -->
|
||||
<Coverage index="0">
|
||||
<Glyph value="e"/>
|
||||
</Coverage>
|
||||
</ContextSubst>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
</GSUB>
|
||||
|
||||
</ttFont>
|
@ -229,36 +229,30 @@
|
||||
<LookupType value="6"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextSubst index="0" Format="3">
|
||||
<!-- BacktrackGlyphCount=3 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="E"/>
|
||||
</BacktrackCoverage>
|
||||
<BacktrackCoverage index="1">
|
||||
<Glyph value="D"/>
|
||||
</BacktrackCoverage>
|
||||
<BacktrackCoverage index="2">
|
||||
<Glyph value="A"/>
|
||||
</BacktrackCoverage>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<InputCoverage index="0">
|
||||
<ChainContextSubst index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="c_t"/>
|
||||
</InputCoverage>
|
||||
</Coverage>
|
||||
<!-- ChainSubRuleSetCount=1 -->
|
||||
<ChainSubRuleSet index="0">
|
||||
<!-- ChainSubRuleCount=1 -->
|
||||
<ChainSubRule index="0">
|
||||
<!-- BacktrackGlyphCount=3 -->
|
||||
<Backtrack index="0" value="E"/>
|
||||
<Backtrack index="1" value="D"/>
|
||||
<Backtrack index="2" value="A"/>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<!-- LookAheadGlyphCount=3 -->
|
||||
<LookAheadCoverage index="0">
|
||||
<Glyph value="V"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAheadCoverage index="1">
|
||||
<Glyph value="W"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAheadCoverage index="2">
|
||||
<Glyph value="X"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAhead index="0" value="V"/>
|
||||
<LookAhead index="1" value="W"/>
|
||||
<LookAhead index="2" value="X"/>
|
||||
<!-- SubstCount=1 -->
|
||||
<SubstLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="2"/>
|
||||
</SubstLookupRecord>
|
||||
</ChainSubRule>
|
||||
</ChainSubRuleSet>
|
||||
</ChainContextSubst>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
|
20
Tests/feaLib/data/GSUB_6_formats.fea
Normal file
20
Tests/feaLib/data/GSUB_6_formats.fea
Normal file
@ -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;
|
256
Tests/feaLib/data/GSUB_6_formats.ttx
Normal file
256
Tests/feaLib/data/GSUB_6_formats.ttx
Normal file
@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ttFont>
|
||||
|
||||
<GSUB>
|
||||
<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="test"/>
|
||||
<Feature>
|
||||
<!-- LookupCount=3 -->
|
||||
<LookupListIndex index="0" value="0"/>
|
||||
<LookupListIndex index="1" value="1"/>
|
||||
<LookupListIndex index="2" value="2"/>
|
||||
</Feature>
|
||||
</FeatureRecord>
|
||||
</FeatureList>
|
||||
<LookupList>
|
||||
<!-- LookupCount=3 -->
|
||||
<Lookup index="0">
|
||||
<LookupType value="6"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextSubst index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="three"/>
|
||||
</Coverage>
|
||||
<!-- ChainSubRuleSetCount=1 -->
|
||||
<ChainSubRuleSet index="0">
|
||||
<!-- ChainSubRuleCount=2 -->
|
||||
<ChainSubRule index="0">
|
||||
<!-- BacktrackGlyphCount=2 -->
|
||||
<Backtrack index="0" value="two"/>
|
||||
<Backtrack index="1" value="one"/>
|
||||
<!-- InputGlyphCount=2 -->
|
||||
<Input index="0" value="four"/>
|
||||
<!-- LookAheadGlyphCount=3 -->
|
||||
<LookAhead index="0" value="five"/>
|
||||
<LookAhead index="1" value="six"/>
|
||||
<LookAhead index="2" value="seven"/>
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainSubRule>
|
||||
<ChainSubRule index="1">
|
||||
<!-- BacktrackGlyphCount=2 -->
|
||||
<Backtrack index="0" value="one"/>
|
||||
<Backtrack index="1" value="two"/>
|
||||
<!-- InputGlyphCount=2 -->
|
||||
<Input index="0" value="four"/>
|
||||
<!-- LookAheadGlyphCount=3 -->
|
||||
<LookAhead index="0" value="six"/>
|
||||
<LookAhead index="1" value="five"/>
|
||||
<LookAhead index="2" value="seven"/>
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainSubRule>
|
||||
</ChainSubRuleSet>
|
||||
</ChainContextSubst>
|
||||
</Lookup>
|
||||
<Lookup index="1">
|
||||
<LookupType value="6"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextSubst index="0" Format="2">
|
||||
<Coverage>
|
||||
<Glyph value="a"/>
|
||||
<Glyph value="b"/>
|
||||
<Glyph value="c"/>
|
||||
<Glyph value="d"/>
|
||||
<Glyph value="e"/>
|
||||
<Glyph value="f"/>
|
||||
<Glyph value="g"/>
|
||||
<Glyph value="h"/>
|
||||
<Glyph value="i"/>
|
||||
<Glyph value="j"/>
|
||||
<Glyph value="k"/>
|
||||
<Glyph value="l"/>
|
||||
<Glyph value="m"/>
|
||||
<Glyph value="n"/>
|
||||
<Glyph value="o"/>
|
||||
<Glyph value="p"/>
|
||||
<Glyph value="q"/>
|
||||
<Glyph value="r"/>
|
||||
<Glyph value="s"/>
|
||||
<Glyph value="t"/>
|
||||
<Glyph value="u"/>
|
||||
<Glyph value="v"/>
|
||||
<Glyph value="w"/>
|
||||
<Glyph value="x"/>
|
||||
<Glyph value="y"/>
|
||||
<Glyph value="z"/>
|
||||
</Coverage>
|
||||
<BacktrackClassDef>
|
||||
<ClassDef glyph="A" class="2"/>
|
||||
<ClassDef glyph="B" class="2"/>
|
||||
<ClassDef glyph="C" class="2"/>
|
||||
<ClassDef glyph="D" class="2"/>
|
||||
<ClassDef glyph="E" class="2"/>
|
||||
<ClassDef glyph="F" class="2"/>
|
||||
<ClassDef glyph="G" class="2"/>
|
||||
<ClassDef glyph="H" class="2"/>
|
||||
<ClassDef glyph="I" class="1"/>
|
||||
<ClassDef glyph="J" class="1"/>
|
||||
<ClassDef glyph="K" class="1"/>
|
||||
<ClassDef glyph="L" class="1"/>
|
||||
<ClassDef glyph="M" class="1"/>
|
||||
<ClassDef glyph="N" class="1"/>
|
||||
<ClassDef glyph="O" class="1"/>
|
||||
<ClassDef glyph="P" class="1"/>
|
||||
<ClassDef glyph="Q" class="1"/>
|
||||
<ClassDef glyph="R" class="1"/>
|
||||
<ClassDef glyph="S" class="1"/>
|
||||
<ClassDef glyph="T" class="1"/>
|
||||
<ClassDef glyph="U" class="1"/>
|
||||
<ClassDef glyph="V" class="1"/>
|
||||
<ClassDef glyph="W" class="1"/>
|
||||
<ClassDef glyph="X" class="1"/>
|
||||
<ClassDef glyph="Y" class="1"/>
|
||||
<ClassDef glyph="Z" class="1"/>
|
||||
</BacktrackClassDef>
|
||||
<InputClassDef>
|
||||
<ClassDef glyph="A" class="3"/>
|
||||
<ClassDef glyph="B" class="3"/>
|
||||
<ClassDef glyph="C" class="3"/>
|
||||
<ClassDef glyph="D" class="3"/>
|
||||
<ClassDef glyph="E" class="3"/>
|
||||
<ClassDef glyph="F" class="3"/>
|
||||
<ClassDef glyph="G" class="3"/>
|
||||
<ClassDef glyph="H" class="3"/>
|
||||
<ClassDef glyph="I" class="2"/>
|
||||
<ClassDef glyph="J" class="2"/>
|
||||
<ClassDef glyph="K" class="2"/>
|
||||
<ClassDef glyph="L" class="2"/>
|
||||
<ClassDef glyph="M" class="2"/>
|
||||
<ClassDef glyph="N" class="2"/>
|
||||
<ClassDef glyph="O" class="2"/>
|
||||
<ClassDef glyph="P" class="2"/>
|
||||
<ClassDef glyph="Q" class="2"/>
|
||||
<ClassDef glyph="R" class="2"/>
|
||||
<ClassDef glyph="S" class="2"/>
|
||||
<ClassDef glyph="T" class="2"/>
|
||||
<ClassDef glyph="U" class="2"/>
|
||||
<ClassDef glyph="V" class="2"/>
|
||||
<ClassDef glyph="W" class="2"/>
|
||||
<ClassDef glyph="X" class="2"/>
|
||||
<ClassDef glyph="Y" class="2"/>
|
||||
<ClassDef glyph="Z" class="2"/>
|
||||
<ClassDef glyph="a" class="1"/>
|
||||
<ClassDef glyph="b" class="1"/>
|
||||
<ClassDef glyph="c" class="1"/>
|
||||
<ClassDef glyph="d" class="1"/>
|
||||
<ClassDef glyph="e" class="1"/>
|
||||
<ClassDef glyph="f" class="1"/>
|
||||
<ClassDef glyph="g" class="1"/>
|
||||
<ClassDef glyph="h" class="1"/>
|
||||
<ClassDef glyph="i" class="1"/>
|
||||
<ClassDef glyph="j" class="1"/>
|
||||
<ClassDef glyph="k" class="1"/>
|
||||
<ClassDef glyph="l" class="1"/>
|
||||
<ClassDef glyph="m" class="1"/>
|
||||
<ClassDef glyph="n" class="1"/>
|
||||
<ClassDef glyph="o" class="1"/>
|
||||
<ClassDef glyph="p" class="1"/>
|
||||
<ClassDef glyph="q" class="1"/>
|
||||
<ClassDef glyph="r" class="1"/>
|
||||
<ClassDef glyph="s" class="1"/>
|
||||
<ClassDef glyph="t" class="1"/>
|
||||
<ClassDef glyph="u" class="1"/>
|
||||
<ClassDef glyph="v" class="1"/>
|
||||
<ClassDef glyph="w" class="1"/>
|
||||
<ClassDef glyph="x" class="1"/>
|
||||
<ClassDef glyph="y" class="1"/>
|
||||
<ClassDef glyph="z" class="1"/>
|
||||
</InputClassDef>
|
||||
<LookAheadClassDef>
|
||||
</LookAheadClassDef>
|
||||
<!-- ChainSubClassSetCount=4 -->
|
||||
<ChainSubClassSet index="0">
|
||||
<!-- ChainSubClassRuleCount=0 -->
|
||||
</ChainSubClassSet>
|
||||
<ChainSubClassSet index="1">
|
||||
<!-- ChainSubClassRuleCount=3 -->
|
||||
<ChainSubClassRule index="0">
|
||||
<!-- BacktrackGlyphCount=2 -->
|
||||
<Backtrack index="0" value="1"/>
|
||||
<Backtrack index="1" value="2"/>
|
||||
<!-- InputGlyphCount=3 -->
|
||||
<Input index="0" value="3"/>
|
||||
<Input index="1" value="2"/>
|
||||
<!-- LookAheadGlyphCount=0 -->
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainSubClassRule>
|
||||
<ChainSubClassRule index="1">
|
||||
<!-- BacktrackGlyphCount=2 -->
|
||||
<Backtrack index="0" value="2"/>
|
||||
<Backtrack index="1" value="1"/>
|
||||
<!-- InputGlyphCount=3 -->
|
||||
<Input index="0" value="3"/>
|
||||
<Input index="1" value="2"/>
|
||||
<!-- LookAheadGlyphCount=0 -->
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainSubClassRule>
|
||||
<ChainSubClassRule index="2">
|
||||
<!-- BacktrackGlyphCount=2 -->
|
||||
<Backtrack index="0" value="1"/>
|
||||
<Backtrack index="1" value="2"/>
|
||||
<!-- InputGlyphCount=3 -->
|
||||
<Input index="0" value="2"/>
|
||||
<Input index="1" value="3"/>
|
||||
<!-- LookAheadGlyphCount=0 -->
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainSubClassRule>
|
||||
</ChainSubClassSet>
|
||||
<ChainSubClassSet index="2">
|
||||
<!-- ChainSubClassRuleCount=0 -->
|
||||
</ChainSubClassSet>
|
||||
<ChainSubClassSet index="3">
|
||||
<!-- ChainSubClassRuleCount=0 -->
|
||||
</ChainSubClassSet>
|
||||
</ChainContextSubst>
|
||||
</Lookup>
|
||||
<Lookup index="2">
|
||||
<LookupType value="6"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextSubst index="0" Format="3">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="space"/>
|
||||
<Glyph value="semicolon"/>
|
||||
<Glyph value="comma"/>
|
||||
</BacktrackCoverage>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<InputCoverage index="0">
|
||||
<Glyph value="e"/>
|
||||
</InputCoverage>
|
||||
<!-- LookAheadGlyphCount=0 -->
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainContextSubst>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
</GSUB>
|
||||
|
||||
</ttFont>
|
@ -32,44 +32,39 @@
|
||||
<Lookup index="0">
|
||||
<LookupType value="8"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=2 -->
|
||||
<ChainContextPos index="0" Format="3">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="A"/>
|
||||
</BacktrackCoverage>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<InputCoverage index="0">
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextPos index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="G"/>
|
||||
</InputCoverage>
|
||||
</Coverage>
|
||||
<!-- ChainPosRuleSetCount=1 -->
|
||||
<ChainPosRuleSet index="0">
|
||||
<!-- ChainPosRuleCount=2 -->
|
||||
<ChainPosRule index="0">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<Backtrack index="0" value="A"/>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<!-- LookAheadGlyphCount=1 -->
|
||||
<LookAheadCoverage index="0">
|
||||
<Glyph value="A"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAhead index="0" value="A"/>
|
||||
<!-- PosCount=1 -->
|
||||
<PosLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</PosLookupRecord>
|
||||
</ChainContextPos>
|
||||
<ChainContextPos index="1" Format="3">
|
||||
</ChainPosRule>
|
||||
<ChainPosRule index="1">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="B"/>
|
||||
</BacktrackCoverage>
|
||||
<Backtrack index="0" value="B"/>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<InputCoverage index="0">
|
||||
<Glyph value="G"/>
|
||||
</InputCoverage>
|
||||
<!-- LookAheadGlyphCount=1 -->
|
||||
<LookAheadCoverage index="0">
|
||||
<Glyph value="B"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAhead index="0" value="B"/>
|
||||
<!-- PosCount=1 -->
|
||||
<PosLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</PosLookupRecord>
|
||||
</ChainPosRule>
|
||||
</ChainPosRuleSet>
|
||||
</ChainContextPos>
|
||||
</Lookup>
|
||||
<Lookup index="1">
|
||||
|
@ -32,44 +32,39 @@
|
||||
<Lookup index="0">
|
||||
<LookupType value="8"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=2 -->
|
||||
<ChainContextPos index="0" Format="3">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="A"/>
|
||||
</BacktrackCoverage>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<InputCoverage index="0">
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextPos index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="G"/>
|
||||
</InputCoverage>
|
||||
</Coverage>
|
||||
<!-- ChainPosRuleSetCount=1 -->
|
||||
<ChainPosRuleSet index="0">
|
||||
<!-- ChainPosRuleCount=2 -->
|
||||
<ChainPosRule index="0">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<Backtrack index="0" value="A"/>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<!-- LookAheadGlyphCount=1 -->
|
||||
<LookAheadCoverage index="0">
|
||||
<Glyph value="A"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAhead index="0" value="A"/>
|
||||
<!-- PosCount=1 -->
|
||||
<PosLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</PosLookupRecord>
|
||||
</ChainContextPos>
|
||||
<ChainContextPos index="1" Format="3">
|
||||
</ChainPosRule>
|
||||
<ChainPosRule index="1">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="B"/>
|
||||
</BacktrackCoverage>
|
||||
<Backtrack index="0" value="B"/>
|
||||
<!-- InputGlyphCount=1 -->
|
||||
<InputCoverage index="0">
|
||||
<Glyph value="G"/>
|
||||
</InputCoverage>
|
||||
<!-- LookAheadGlyphCount=1 -->
|
||||
<LookAheadCoverage index="0">
|
||||
<Glyph value="B"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAhead index="0" value="B"/>
|
||||
<!-- PosCount=1 -->
|
||||
<PosLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</PosLookupRecord>
|
||||
</ChainPosRule>
|
||||
</ChainPosRuleSet>
|
||||
</ChainContextPos>
|
||||
</Lookup>
|
||||
<Lookup index="1">
|
||||
|
@ -32,50 +32,51 @@
|
||||
<Lookup index="0">
|
||||
<LookupType value="5"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=4 -->
|
||||
<ContextSubst index="0" Format="3">
|
||||
<!-- SubTableCount=1 -->
|
||||
<ContextSubst index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="G"/>
|
||||
<Glyph value="H"/>
|
||||
</Coverage>
|
||||
<!-- SubRuleSetCount=2 -->
|
||||
<SubRuleSet index="0">
|
||||
<!-- SubRuleCount=2 -->
|
||||
<SubRule index="0">
|
||||
<!-- GlyphCount=1 -->
|
||||
<!-- SubstCount=1 -->
|
||||
<Coverage index="0">
|
||||
<Glyph value="G"/>
|
||||
</Coverage>
|
||||
<SubstLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</SubstLookupRecord>
|
||||
</ContextSubst>
|
||||
<ContextSubst index="1" Format="3">
|
||||
</SubRule>
|
||||
<SubRule index="1">
|
||||
<!-- GlyphCount=1 -->
|
||||
<!-- SubstCount=1 -->
|
||||
<SubstLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="2"/>
|
||||
</SubstLookupRecord>
|
||||
</SubRule>
|
||||
</SubRuleSet>
|
||||
<SubRuleSet index="1">
|
||||
<!-- SubRuleCount=2 -->
|
||||
<SubRule index="0">
|
||||
<!-- GlyphCount=1 -->
|
||||
<!-- SubstCount=1 -->
|
||||
<Coverage index="0">
|
||||
<Glyph value="H"/>
|
||||
</Coverage>
|
||||
<SubstLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</SubstLookupRecord>
|
||||
</ContextSubst>
|
||||
<ContextSubst index="2" Format="3">
|
||||
</SubRule>
|
||||
<SubRule index="1">
|
||||
<!-- GlyphCount=1 -->
|
||||
<!-- SubstCount=1 -->
|
||||
<Coverage index="0">
|
||||
<Glyph value="G"/>
|
||||
</Coverage>
|
||||
<SubstLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="2"/>
|
||||
</SubstLookupRecord>
|
||||
</ContextSubst>
|
||||
<ContextSubst index="3" Format="3">
|
||||
<!-- GlyphCount=1 -->
|
||||
<!-- SubstCount=1 -->
|
||||
<Coverage index="0">
|
||||
<Glyph value="H"/>
|
||||
</Coverage>
|
||||
<SubstLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="2"/>
|
||||
</SubstLookupRecord>
|
||||
</SubRule>
|
||||
</SubRuleSet>
|
||||
</ContextSubst>
|
||||
</Lookup>
|
||||
<Lookup index="1">
|
||||
|
@ -32,111 +32,115 @@
|
||||
<Lookup index="0">
|
||||
<LookupType value="6"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=3 -->
|
||||
<ChainContextSubst index="0" Format="3">
|
||||
<!-- SubTableCount=1 -->
|
||||
<ChainContextSubst index="0" Format="2">
|
||||
<Coverage>
|
||||
<Glyph value="a"/>
|
||||
</Coverage>
|
||||
<BacktrackClassDef>
|
||||
<ClassDef glyph="a" class="1"/>
|
||||
<ClassDef glyph="b" class="1"/>
|
||||
<ClassDef glyph="c" class="1"/>
|
||||
<ClassDef glyph="d" class="1"/>
|
||||
<ClassDef glyph="e" class="1"/>
|
||||
<ClassDef glyph="f" class="1"/>
|
||||
<ClassDef glyph="g" class="1"/>
|
||||
<ClassDef glyph="h" class="1"/>
|
||||
<ClassDef glyph="i" class="1"/>
|
||||
<ClassDef glyph="j" class="1"/>
|
||||
<ClassDef glyph="k" class="1"/>
|
||||
<ClassDef glyph="l" class="1"/>
|
||||
<ClassDef glyph="m" class="1"/>
|
||||
<ClassDef glyph="n" class="1"/>
|
||||
<ClassDef glyph="o" class="1"/>
|
||||
<ClassDef glyph="p" class="1"/>
|
||||
<ClassDef glyph="q" class="1"/>
|
||||
<ClassDef glyph="r" class="1"/>
|
||||
<ClassDef glyph="s" class="1"/>
|
||||
<ClassDef glyph="t" class="1"/>
|
||||
<ClassDef glyph="u" class="1"/>
|
||||
<ClassDef glyph="v" class="1"/>
|
||||
<ClassDef glyph="w" class="1"/>
|
||||
<ClassDef glyph="x" class="1"/>
|
||||
<ClassDef glyph="y" class="1"/>
|
||||
<ClassDef glyph="z" class="1"/>
|
||||
</BacktrackClassDef>
|
||||
<InputClassDef>
|
||||
<ClassDef glyph="a" class="3"/>
|
||||
<ClassDef glyph="d" class="2"/>
|
||||
<ClassDef glyph="n" class="1"/>
|
||||
</InputClassDef>
|
||||
<LookAheadClassDef>
|
||||
<ClassDef glyph="a" class="1"/>
|
||||
<ClassDef glyph="b" class="1"/>
|
||||
<ClassDef glyph="c" class="1"/>
|
||||
<ClassDef glyph="d" class="1"/>
|
||||
<ClassDef glyph="e" class="1"/>
|
||||
<ClassDef glyph="f" class="1"/>
|
||||
<ClassDef glyph="g" class="1"/>
|
||||
<ClassDef glyph="h" class="1"/>
|
||||
<ClassDef glyph="i" class="1"/>
|
||||
<ClassDef glyph="j" class="1"/>
|
||||
<ClassDef glyph="k" class="1"/>
|
||||
<ClassDef glyph="l" class="1"/>
|
||||
<ClassDef glyph="m" class="1"/>
|
||||
<ClassDef glyph="n" class="1"/>
|
||||
<ClassDef glyph="o" class="1"/>
|
||||
<ClassDef glyph="p" class="1"/>
|
||||
<ClassDef glyph="q" class="1"/>
|
||||
<ClassDef glyph="r" class="1"/>
|
||||
<ClassDef glyph="s" class="1"/>
|
||||
<ClassDef glyph="t" class="1"/>
|
||||
<ClassDef glyph="u" class="1"/>
|
||||
<ClassDef glyph="v" class="1"/>
|
||||
<ClassDef glyph="w" class="1"/>
|
||||
<ClassDef glyph="x" class="1"/>
|
||||
<ClassDef glyph="y" class="1"/>
|
||||
<ClassDef glyph="z" class="1"/>
|
||||
</LookAheadClassDef>
|
||||
<!-- ChainSubClassSetCount=4 -->
|
||||
<ChainSubClassSet index="0">
|
||||
<!-- ChainSubClassRuleCount=0 -->
|
||||
</ChainSubClassSet>
|
||||
<ChainSubClassSet index="1">
|
||||
<!-- ChainSubClassRuleCount=0 -->
|
||||
</ChainSubClassSet>
|
||||
<ChainSubClassSet index="2">
|
||||
<!-- ChainSubClassRuleCount=0 -->
|
||||
</ChainSubClassSet>
|
||||
<ChainSubClassSet index="3">
|
||||
<!-- ChainSubClassRuleCount=3 -->
|
||||
<ChainSubClassRule index="0">
|
||||
<!-- BacktrackGlyphCount=1 -->
|
||||
<BacktrackCoverage index="0">
|
||||
<Glyph value="a"/>
|
||||
<Glyph value="b"/>
|
||||
<Glyph value="c"/>
|
||||
<Glyph value="d"/>
|
||||
<Glyph value="e"/>
|
||||
<Glyph value="f"/>
|
||||
<Glyph value="g"/>
|
||||
<Glyph value="h"/>
|
||||
<Glyph value="i"/>
|
||||
<Glyph value="j"/>
|
||||
<Glyph value="k"/>
|
||||
<Glyph value="l"/>
|
||||
<Glyph value="m"/>
|
||||
<Glyph value="n"/>
|
||||
<Glyph value="o"/>
|
||||
<Glyph value="p"/>
|
||||
<Glyph value="q"/>
|
||||
<Glyph value="r"/>
|
||||
<Glyph value="s"/>
|
||||
<Glyph value="t"/>
|
||||
<Glyph value="u"/>
|
||||
<Glyph value="v"/>
|
||||
<Glyph value="w"/>
|
||||
<Glyph value="x"/>
|
||||
<Glyph value="y"/>
|
||||
<Glyph value="z"/>
|
||||
</BacktrackCoverage>
|
||||
<Backtrack index="0" value="1"/>
|
||||
<!-- InputGlyphCount=3 -->
|
||||
<InputCoverage index="0">
|
||||
<Glyph value="a"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="1">
|
||||
<Glyph value="n"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="2">
|
||||
<Glyph value="d"/>
|
||||
</InputCoverage>
|
||||
<Input index="0" value="1"/>
|
||||
<Input index="1" value="2"/>
|
||||
<!-- LookAheadGlyphCount=0 -->
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainContextSubst>
|
||||
<ChainContextSubst index="1" Format="3">
|
||||
</ChainSubClassRule>
|
||||
<ChainSubClassRule index="1">
|
||||
<!-- BacktrackGlyphCount=0 -->
|
||||
<!-- InputGlyphCount=3 -->
|
||||
<InputCoverage index="0">
|
||||
<Glyph value="a"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="1">
|
||||
<Glyph value="n"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="2">
|
||||
<Glyph value="d"/>
|
||||
</InputCoverage>
|
||||
<Input index="0" value="1"/>
|
||||
<Input index="1" value="2"/>
|
||||
<!-- LookAheadGlyphCount=1 -->
|
||||
<LookAheadCoverage index="0">
|
||||
<Glyph value="a"/>
|
||||
<Glyph value="b"/>
|
||||
<Glyph value="c"/>
|
||||
<Glyph value="d"/>
|
||||
<Glyph value="e"/>
|
||||
<Glyph value="f"/>
|
||||
<Glyph value="g"/>
|
||||
<Glyph value="h"/>
|
||||
<Glyph value="i"/>
|
||||
<Glyph value="j"/>
|
||||
<Glyph value="k"/>
|
||||
<Glyph value="l"/>
|
||||
<Glyph value="m"/>
|
||||
<Glyph value="n"/>
|
||||
<Glyph value="o"/>
|
||||
<Glyph value="p"/>
|
||||
<Glyph value="q"/>
|
||||
<Glyph value="r"/>
|
||||
<Glyph value="s"/>
|
||||
<Glyph value="t"/>
|
||||
<Glyph value="u"/>
|
||||
<Glyph value="v"/>
|
||||
<Glyph value="w"/>
|
||||
<Glyph value="x"/>
|
||||
<Glyph value="y"/>
|
||||
<Glyph value="z"/>
|
||||
</LookAheadCoverage>
|
||||
<LookAhead index="0" value="1"/>
|
||||
<!-- SubstCount=0 -->
|
||||
</ChainContextSubst>
|
||||
<ChainContextSubst index="2" Format="3">
|
||||
</ChainSubClassRule>
|
||||
<ChainSubClassRule index="2">
|
||||
<!-- BacktrackGlyphCount=0 -->
|
||||
<!-- InputGlyphCount=3 -->
|
||||
<InputCoverage index="0">
|
||||
<Glyph value="a"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="1">
|
||||
<Glyph value="n"/>
|
||||
</InputCoverage>
|
||||
<InputCoverage index="2">
|
||||
<Glyph value="d"/>
|
||||
</InputCoverage>
|
||||
<Input index="0" value="1"/>
|
||||
<Input index="1" value="2"/>
|
||||
<!-- LookAheadGlyphCount=0 -->
|
||||
<!-- SubstCount=1 -->
|
||||
<SubstLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</SubstLookupRecord>
|
||||
</ChainSubClassRule>
|
||||
</ChainSubClassSet>
|
||||
</ChainContextSubst>
|
||||
</Lookup>
|
||||
<Lookup index="1">
|
||||
|
@ -86,18 +86,18 @@
|
||||
<LookupType value="7"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ContextPos index="0" Format="3">
|
||||
<!-- GlyphCount=3 -->
|
||||
<!-- PosCount=2 -->
|
||||
<Coverage index="0" Format="1">
|
||||
<ContextPos index="0" Format="1">
|
||||
<Coverage Format="1">
|
||||
<Glyph value="A"/>
|
||||
</Coverage>
|
||||
<Coverage index="1" Format="1">
|
||||
<Glyph value="a"/>
|
||||
</Coverage>
|
||||
<Coverage index="2" Format="1">
|
||||
<Glyph value="uni0303"/>
|
||||
</Coverage>
|
||||
<!-- PosRuleSetCount=1 -->
|
||||
<PosRuleSet index="0">
|
||||
<!-- PosRuleCount=1 -->
|
||||
<PosRule index="0">
|
||||
<!-- GlyphCount=3 -->
|
||||
<!-- PosCount=2 -->
|
||||
<Input index="0" value="a"/>
|
||||
<Input index="1" value="uni0303"/>
|
||||
<PosLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="0"/>
|
||||
@ -106,6 +106,8 @@
|
||||
<SequenceIndex value="2"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</PosLookupRecord>
|
||||
</PosRule>
|
||||
</PosRuleSet>
|
||||
</ContextPos>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
|
@ -86,18 +86,18 @@
|
||||
<LookupType value="7"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<ContextPos index="0" Format="3">
|
||||
<!-- GlyphCount=3 -->
|
||||
<!-- PosCount=2 -->
|
||||
<Coverage index="0" Format="1">
|
||||
<ContextPos index="0" Format="1">
|
||||
<Coverage Format="1">
|
||||
<Glyph value="A"/>
|
||||
</Coverage>
|
||||
<Coverage index="1" Format="1">
|
||||
<Glyph value="a"/>
|
||||
</Coverage>
|
||||
<Coverage index="2" Format="1">
|
||||
<Glyph value="uni0303"/>
|
||||
</Coverage>
|
||||
<!-- PosRuleSetCount=1 -->
|
||||
<PosRuleSet index="0">
|
||||
<!-- PosRuleCount=1 -->
|
||||
<PosRule index="0">
|
||||
<!-- GlyphCount=3 -->
|
||||
<!-- PosCount=2 -->
|
||||
<Input index="0" value="a"/>
|
||||
<Input index="1" value="uni0303"/>
|
||||
<PosLookupRecord index="0">
|
||||
<SequenceIndex value="0"/>
|
||||
<LookupListIndex value="0"/>
|
||||
@ -106,6 +106,8 @@
|
||||
<SequenceIndex value="2"/>
|
||||
<LookupListIndex value="1"/>
|
||||
</PosLookupRecord>
|
||||
</PosRule>
|
||||
</PosRuleSet>
|
||||
</ContextPos>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
|
Loading…
x
Reference in New Issue
Block a user