Upgrade fonttools to 4.22.0 am: 6cf80b8fa7 am: d11d71b940 am: 78e33b8121
Original change: https://android-review.googlesource.com/c/platform/external/fonttools/+/1662591
Change-Id: I320f739007bc6b73cfd2bba0f4f6c69f3510d0fd
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 837fb8c..89d668d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,9 +2,9 @@
on:
push:
- branches: [master]
+ branches: [main]
pull_request:
- branches: [master]
+ branches: [main]
jobs:
lint:
diff --git a/Doc/source/ttx.rst b/Doc/source/ttx.rst
index d672bfc..b6e43f5 100644
--- a/Doc/source/ttx.rst
+++ b/Doc/source/ttx.rst
@@ -35,14 +35,14 @@
The following tables are currently supported::
- BASE, CBDT, CBLC, CFF, CFF2, COLR, CPAL, DSIG, EBDT, EBLC, FFTM,
- Feat, GDEF, GMAP, GPKG, GPOS, GSUB, Glat, Gloc, HVAR, JSTF, LTSH,
- MATH, META, MVAR, OS/2, SING, STAT, SVG, Silf, Sill, TSI0, TSI1,
- TSI2, TSI3, TSI5, TSIB, TSIC, TSID, TSIJ, TSIP, TSIS, TSIV, TTFA,
- VDMX, VORG, VVAR, ankr, avar, bsln, cidg, cmap, cvar, cvt, feat,
- fpgm, fvar, gasp, gcid, glyf, gvar, hdmx, head, hhea, hmtx, kern,
- lcar, loca, ltag, maxp, meta, mort, morx, name, opbd, post, prep,
- prop, sbix, trak, vhea and vmtx
+ BASE, CBDT, CBLC, CFF, CFF2, COLR, CPAL, DSIG, Debg, EBDT, EBLC,
+ FFTM, Feat, GDEF, GMAP, GPKG, GPOS, GSUB, Glat, Gloc, HVAR, JSTF,
+ LTSH, MATH, META, MVAR, OS/2, SING, STAT, SVG, Silf, Sill, TSI0,
+ TSI1, TSI2, TSI3, TSI5, TSIB, TSIC, TSID, TSIJ, TSIP, TSIS, TSIV,
+ TTFA, VDMX, VORG, VVAR, ankr, avar, bsln, cidg, cmap, cvar, cvt,
+ feat, fpgm, fvar, gasp, gcid, glyf, gvar, hdmx, head, hhea, hmtx,
+ kern, lcar, loca, ltag, maxp, meta, mort, morx, name, opbd, post,
+ prep, prop, sbix, trak, vhea and vmtx
.. end table list
diff --git a/Doc/source/varLib/index.rst b/Doc/source/varLib/index.rst
index 5394d62..7b22496 100644
--- a/Doc/source/varLib/index.rst
+++ b/Doc/source/varLib/index.rst
@@ -1,6 +1,94 @@
-######
-varLib
-######
+##################################
+varLib: OpenType Variation Support
+##################################
+
+The ``fontTools.varLib`` package contains a number of classes and routines
+for handling, building and interpolating variable font data. These routines
+rely on a common set of concepts, many of which are equivalent to concepts
+in the OpenType Specification, but some of which are unique to ``varLib``.
+
+Terminology
+-----------
+
+axis
+ "A designer-determined variable in a font face design that can be used to
+ derive multiple, variant designs within a family." (OpenType Specification)
+ An axis has a minimum value, a maximum value and a default value.
+
+designspace
+ The n-dimensional space formed by the font's axes. (OpenType Specification
+ calls this the "design-variation space")
+
+scalar
+ A value which is able to be varied at different points in the designspace:
+ for example, the horizontal advance width of the glyph "a" is a scalar.
+ However, see also *support scalar* below.
+
+default location
+ A point in the designspace whose coordinates are the default value of
+ all axes.
+
+location
+ A point in the designspace, specified as a set of coordinates on one or
+ more axes. In the context of ``varLib``, a location is a dictionary with
+ the keys being the axis tags and the values being the coordinates on the
+ respective axis. A ``varLib`` location dictionary may be "sparse", in the
+ sense that axes defined in the font may be omitted from the location's
+ coordinates, in which case the default value of the axis is assumed.
+ For example, given a font having a ``wght`` axis ranging from 200-1000
+ with default 400, and a ``wdth`` axis ranging 100-300 with default 150,
+ the location ``{"wdth": 200}`` represents the point ``wght=400,wdth=200``.
+
+master
+ The value of a scalar at a given location. **Note that this is a
+ considerably more general concept than the usual type design sense of
+ the term "master".**
+
+normalized location
+ While the range of an axis is determined by its minimum and maximum values
+ as set by the designer, locations are specified internally to the font binary
+ in the range -1 to 1, with 0 being the default, -1 being the minimum and
+ 1 being the maximum. A normalized location is one which is scaled to the
+ range (-1,1) on all of its axes. Note that as the range from minimum to
+ default and from default to maximum on a given axis may differ (for
+ example, given ``wght min=200 default=500 max=1000``, the difference
+ between a normalized location -1 of a normalized location of 0 represents a
+ difference of 300 units while the difference between a normalized location
+ of 0 and a normalized location of 1 represents a difference of 700 units),
+ a location is scaled by a different factor depending on whether it is above
+ or below the axis' default value.
+
+support
+ While designers tend to think in terms of masters - that is, a precise
+ location having a particular value - OpenType Variations specifies the
+ variation of scalars in terms of deltas which are themselves composed of
+ the combined contributions of a set of triangular regions, each having
+ a contribution value of 0 at its minimum value, rising linearly to its
+ full contribution at the *peak* and falling linearly to zero from the
+ peak to the maximum value. The OpenType Specification calls these "regions",
+ while ``varLib`` calls them "supports" (a mathematical term used in real
+ analysis) and expresses them as a dictionary mapping each axis tag to a
+ tuple ``(min, peak, max)``.
+
+box
+ ``varLib`` uses the term "box" to denote the minimum and maximum "corners" of
+ a support, ignoring its peak value.
+
+delta
+ The term "delta" is used in OpenType Variations in two senses. In the
+ more general sense, a delta is the difference between a scalar at a
+ given location and its value at the default location. Additionally, inside
+ the font, variation data is stored as a mapping between supports and deltas.
+ The delta (in the first sense) is computed by summing the product of the
+ delta of each support by a factor representing the support's contribution
+ at this location (see "support scalar" below).
+
+support scalar
+ When interpolating a set of variation data, the support scalar represents
+ the scalar multiplier of the support's contribution at this location. For
+ example, the support scalar will be 1 at the support's peak location, and
+ 0 below its minimum or above its maximum.
+
.. toctree::
:maxdepth: 2
diff --git a/Lib/fontTools/__init__.py b/Lib/fontTools/__init__.py
index 19040e4..82da9b7 100644
--- a/Lib/fontTools/__init__.py
+++ b/Lib/fontTools/__init__.py
@@ -1,9 +1,8 @@
-from fontTools.misc.py23 import *
import logging
from fontTools.misc.loggingTools import configLogger
log = logging.getLogger(__name__)
-version = __version__ = "4.20.0"
+version = __version__ = "4.22.0"
__all__ = ["version", "log", "configLogger"]
diff --git a/Lib/fontTools/afmLib.py b/Lib/fontTools/afmLib.py
index 67f145f..49d9951 100644
--- a/Lib/fontTools/afmLib.py
+++ b/Lib/fontTools/afmLib.py
@@ -46,7 +46,6 @@
"""
-from fontTools.misc.py23 import *
import re
# every single line starts with a "word"
diff --git a/Lib/fontTools/agl.py b/Lib/fontTools/agl.py
index b7d0bfa..4f7ff92 100644
--- a/Lib/fontTools/agl.py
+++ b/Lib/fontTools/agl.py
@@ -26,7 +26,7 @@
doesn't include any (e.g. format 3.0 post tables).
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tostr
import re
@@ -5140,7 +5140,7 @@
# to the corresponding character in that list.
uchars = LEGACY_AGL2UV.get(component)
if uchars:
- return "".join(map(unichr, uchars))
+ return "".join(map(chr, uchars))
# Otherwise, if the component is of the form "uni" (U+0075,
# U+006E, and U+0069) followed by a sequence of uppercase
@@ -5210,7 +5210,7 @@
if any(c >= 0xD800 and c <= 0xDFFF for c in chars):
# The AGL specification explicitly excluded surrogate pairs.
return None
- return ''.join([unichr(c) for c in chars])
+ return ''.join([chr(c) for c in chars])
_re_u = re.compile("^u([0-9A-F]{4,6})$")
@@ -5228,5 +5228,5 @@
return None
if ((value >= 0x0000 and value <= 0xD7FF) or
(value >= 0xE000 and value <= 0x10FFFF)):
- return unichr(value)
+ return chr(value)
return None
diff --git a/Lib/fontTools/cffLib/__init__.py b/Lib/fontTools/cffLib/__init__.py
index e97b750..d4cd7a1 100644
--- a/Lib/fontTools/cffLib/__init__.py
+++ b/Lib/fontTools/cffLib/__init__.py
@@ -11,7 +11,7 @@
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin, tobytes, tostr
from fontTools.misc import sstruct
from fontTools.misc import psCharStrings
from fontTools.misc.arrayTools import unionRect, intRect
@@ -20,6 +20,7 @@
from fontTools.ttLib.tables.otBase import OTTableWriter
from fontTools.ttLib.tables.otBase import OTTableReader
from fontTools.ttLib.tables import otTables as ot
+from io import BytesIO
import struct
import logging
import re
@@ -118,7 +119,7 @@
"""
if hasattr(nameOrIndex, "__index__"):
index = nameOrIndex.__index__()
- elif isinstance(nameOrIndex, basestring):
+ elif isinstance(nameOrIndex, str):
name = nameOrIndex
try:
index = self.fontNames.index(name)
@@ -261,7 +262,7 @@
self.topDictIndex = TopDictIndex(None, cff2GetGlyphOrder, None)
self.topDictIndex.append(topDict)
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
topDict.fromXML(name, attrs, content)
@@ -277,7 +278,7 @@
if not hasattr(self, "GlobalSubrs"):
self.GlobalSubrs = GlobalSubrsIndex()
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
subr = subrCharStringClass()
@@ -879,7 +880,7 @@
return
fontDict = FontDict()
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
fontDict.fromXML(name, attrs, content)
@@ -1106,7 +1107,7 @@
def fromXML(self, name, attrs, content):
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
if name != "CharString":
@@ -1245,7 +1246,7 @@
return tobytes(value, encoding='ascii')
def xmlWrite(self, xmlWriter, name, value):
- xmlWriter.simpletag(name, value=tounicode(value, encoding="ascii"))
+ xmlWriter.simpletag(name, value=tostr(value, encoding="ascii"))
xmlWriter.newline()
def xmlRead(self, name, attrs, content, parent):
@@ -1261,7 +1262,7 @@
return tobytes(value, encoding='latin1')
def xmlWrite(self, xmlWriter, name, value):
- value = tounicode(value, encoding="latin1")
+ value = tostr(value, encoding="latin1")
if name in ['Notice', 'Copyright']:
value = re.sub(r"[\r\n]\s+", " ", value)
xmlWriter.simpletag(name, value=value)
@@ -1282,7 +1283,7 @@
def parseBlendList(s):
valueList = []
for element in s:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
blendList = attrs["value"].split()
@@ -1358,7 +1359,7 @@
def xmlRead(self, name, attrs, content, parent):
ob = self.getClass()()
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
ob.fromXML(name, attrs, content)
@@ -1650,7 +1651,7 @@
class EncodingCompiler(object):
def __init__(self, strings, encoding, parent):
- assert not isinstance(encoding, basestring)
+ assert not isinstance(encoding, str)
data0 = packEncoding0(parent.dictObj.charset, encoding, parent.strings)
data1 = packEncoding1(parent.dictObj.charset, encoding, parent.strings)
if len(data0) < len(data1):
@@ -1721,7 +1722,7 @@
return attrs["name"]
encoding = [".notdef"] * 256
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
code = safeEval(attrs["code"])
@@ -1833,7 +1834,7 @@
def xmlRead(self, name, attrs, content, parent):
fdArray = FDArrayIndex()
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
fdArray.fromXML(name, attrs, content)
@@ -2105,6 +2106,8 @@
(11, 'StdVW', 'number', None, None),
((12, 12), 'StemSnapH', 'delta', None, None),
((12, 13), 'StemSnapV', 'delta', None, None),
+ ((12, 17), 'LanguageGroup', 'number', 0, None),
+ ((12, 18), 'ExpansionFactor', 'number', 0.06, None),
(19, 'Subrs', 'number', None, SubrsConverter()),
]
@@ -2332,7 +2335,7 @@
self.rawDict["charset"] = charsetCode
if hasattr(self.dictObj, "Encoding") and self.dictObj.Encoding:
encoding = self.dictObj.Encoding
- if not isinstance(encoding, basestring):
+ if not isinstance(encoding, str):
children.append(EncodingCompiler(strings, encoding, self))
else:
if hasattr(self.dictObj, "VarStore"):
diff --git a/Lib/fontTools/cffLib/specializer.py b/Lib/fontTools/cffLib/specializer.py
index 1d2f4b7..fbfefa9 100644
--- a/Lib/fontTools/cffLib/specializer.py
+++ b/Lib/fontTools/cffLib/specializer.py
@@ -13,12 +13,11 @@
"""
-from fontTools.misc.py23 import *
from fontTools.cffLib import maxStackLimit
def stringToProgram(string):
- if isinstance(string, basestring):
+ if isinstance(string, str):
string = string.split()
program = []
for token in string:
@@ -70,7 +69,7 @@
it = iter(program)
for token in it:
- if not isinstance(token, basestring):
+ if not isinstance(token, str):
stack.append(token)
continue
diff --git a/Lib/fontTools/cffLib/width.py b/Lib/fontTools/cffLib/width.py
index edce446..00b859b 100644
--- a/Lib/fontTools/cffLib/width.py
+++ b/Lib/fontTools/cffLib/width.py
@@ -7,11 +7,10 @@
This module determines the optimum ``defaultWidthX`` and ``nominalWidthX``
values for a font, when provided with a list of glyph widths."""
-from fontTools.misc.py23 import *
-from fontTools.ttLib import TTFont, getTableClass
+from fontTools.ttLib import TTFont
from collections import defaultdict
from operator import add
-from functools import partial, reduce
+from functools import reduce
class missingdict(dict):
diff --git a/Lib/fontTools/colorLib/geometry.py b/Lib/fontTools/colorLib/geometry.py
index ec64753..e62aead 100644
--- a/Lib/fontTools/colorLib/geometry.py
+++ b/Lib/fontTools/colorLib/geometry.py
@@ -1,7 +1,7 @@
"""Helpers for manipulating 2D points and vectors in COLR table."""
from math import copysign, cos, hypot, pi
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import otRound
def _vector_between(origin, target):
diff --git a/Lib/fontTools/colorLib/table_builder.py b/Lib/fontTools/colorLib/table_builder.py
index 18e2de1..6fba6b0 100644
--- a/Lib/fontTools/colorLib/table_builder.py
+++ b/Lib/fontTools/colorLib/table_builder.py
@@ -22,7 +22,7 @@
IntValue,
FloatValue,
)
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import otRound
class BuildCallback(enum.Enum):
diff --git a/Lib/fontTools/designspaceLib/__init__.py b/Lib/fontTools/designspaceLib/__init__.py
index f69c930..9ea22fe 100644
--- a/Lib/fontTools/designspaceLib/__init__.py
+++ b/Lib/fontTools/designspaceLib/__init__.py
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes, tostr
from fontTools.misc.loggingTools import LogMixin
import collections
+from io import BytesIO, StringIO
import os
import posixpath
from fontTools.misc import etree as ET
@@ -290,25 +291,25 @@
filename = posixpath_property("_filename")
def setStyleName(self, styleName, languageCode="en"):
- self.localisedStyleName[languageCode] = tounicode(styleName)
+ self.localisedStyleName[languageCode] = tostr(styleName)
def getStyleName(self, languageCode="en"):
return self.localisedStyleName.get(languageCode)
def setFamilyName(self, familyName, languageCode="en"):
- self.localisedFamilyName[languageCode] = tounicode(familyName)
+ self.localisedFamilyName[languageCode] = tostr(familyName)
def getFamilyName(self, languageCode="en"):
return self.localisedFamilyName.get(languageCode)
def setStyleMapStyleName(self, styleMapStyleName, languageCode="en"):
- self.localisedStyleMapStyleName[languageCode] = tounicode(styleMapStyleName)
+ self.localisedStyleMapStyleName[languageCode] = tostr(styleMapStyleName)
def getStyleMapStyleName(self, languageCode="en"):
return self.localisedStyleMapStyleName.get(languageCode)
def setStyleMapFamilyName(self, styleMapFamilyName, languageCode="en"):
- self.localisedStyleMapFamilyName[languageCode] = tounicode(styleMapFamilyName)
+ self.localisedStyleMapFamilyName[languageCode] = tostr(styleMapFamilyName)
def getStyleMapFamilyName(self, languageCode="en"):
return self.localisedStyleMapFamilyName.get(languageCode)
@@ -823,7 +824,7 @@
# '{http://www.w3.org/XML/1998/namespace}lang'
for key, lang in labelNameElement.items():
if key == XML_LANG:
- axisObject.labelNames[lang] = tounicode(labelNameElement.text)
+ axisObject.labelNames[lang] = tostr(labelNameElement.text)
self.documentObject.axes.append(axisObject)
self.axisDefaults[axisObject.name] = axisObject.default
@@ -1099,10 +1100,10 @@
return self
def tostring(self, encoding=None):
- if encoding is unicode or (
+ if encoding is str or (
encoding is not None and encoding.lower() == "unicode"
):
- f = UnicodeIO()
+ f = StringIO()
xml_declaration = False
elif encoding is None or encoding == "utf-8":
f = BytesIO()
diff --git a/Lib/fontTools/encodings/MacRoman.py b/Lib/fontTools/encodings/MacRoman.py
index 9e8f244..25232d3 100644
--- a/Lib/fontTools/encodings/MacRoman.py
+++ b/Lib/fontTools/encodings/MacRoman.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
MacRoman = [
'NUL', 'Eth', 'eth', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Yacute',
'yacute', 'HT', 'LF', 'Thorn', 'thorn', 'CR', 'Zcaron', 'zcaron', 'DLE', 'DC1',
diff --git a/Lib/fontTools/encodings/StandardEncoding.py b/Lib/fontTools/encodings/StandardEncoding.py
index 60b5873..810b2a0 100644
--- a/Lib/fontTools/encodings/StandardEncoding.py
+++ b/Lib/fontTools/encodings/StandardEncoding.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
StandardEncoding = [
'.notdef', '.notdef', '.notdef', '.notdef', '.notdef',
'.notdef', '.notdef', '.notdef', '.notdef', '.notdef',
diff --git a/Lib/fontTools/encodings/__init__.py b/Lib/fontTools/encodings/__init__.py
index b176031..156cb23 100644
--- a/Lib/fontTools/encodings/__init__.py
+++ b/Lib/fontTools/encodings/__init__.py
@@ -1,3 +1 @@
"""Empty __init__.py file to signal Python this directory is a package."""
-
-from fontTools.misc.py23 import *
diff --git a/Lib/fontTools/encodings/codecs.py b/Lib/fontTools/encodings/codecs.py
index c2288a7..3b1a825 100644
--- a/Lib/fontTools/encodings/codecs.py
+++ b/Lib/fontTools/encodings/codecs.py
@@ -1,7 +1,6 @@
"""Extend the Python codecs module with a few encodings that are used in OpenType (name table)
but missing from Python. See https://github.com/fonttools/fonttools/issues/236 for details."""
-from fontTools.misc.py23 import *
import codecs
import encodings
@@ -57,35 +56,35 @@
_extended_encodings = {
"x_mac_japanese_ttx": ("shift_jis", {
- b"\xFC": unichr(0x007C),
- b"\x7E": unichr(0x007E),
- b"\x80": unichr(0x005C),
- b"\xA0": unichr(0x00A0),
- b"\xFD": unichr(0x00A9),
- b"\xFE": unichr(0x2122),
- b"\xFF": unichr(0x2026),
+ b"\xFC": chr(0x007C),
+ b"\x7E": chr(0x007E),
+ b"\x80": chr(0x005C),
+ b"\xA0": chr(0x00A0),
+ b"\xFD": chr(0x00A9),
+ b"\xFE": chr(0x2122),
+ b"\xFF": chr(0x2026),
}),
"x_mac_trad_chinese_ttx": ("big5", {
- b"\x80": unichr(0x005C),
- b"\xA0": unichr(0x00A0),
- b"\xFD": unichr(0x00A9),
- b"\xFE": unichr(0x2122),
- b"\xFF": unichr(0x2026),
+ b"\x80": chr(0x005C),
+ b"\xA0": chr(0x00A0),
+ b"\xFD": chr(0x00A9),
+ b"\xFE": chr(0x2122),
+ b"\xFF": chr(0x2026),
}),
"x_mac_korean_ttx": ("euc_kr", {
- b"\x80": unichr(0x00A0),
- b"\x81": unichr(0x20A9),
- b"\x82": unichr(0x2014),
- b"\x83": unichr(0x00A9),
- b"\xFE": unichr(0x2122),
- b"\xFF": unichr(0x2026),
+ b"\x80": chr(0x00A0),
+ b"\x81": chr(0x20A9),
+ b"\x82": chr(0x2014),
+ b"\x83": chr(0x00A9),
+ b"\xFE": chr(0x2122),
+ b"\xFF": chr(0x2026),
}),
"x_mac_simp_chinese_ttx": ("gb2312", {
- b"\x80": unichr(0x00FC),
- b"\xA0": unichr(0x00A0),
- b"\xFD": unichr(0x00A9),
- b"\xFE": unichr(0x2122),
- b"\xFF": unichr(0x2026),
+ b"\x80": chr(0x00FC),
+ b"\xA0": chr(0x00A0),
+ b"\xFD": chr(0x00A9),
+ b"\xFE": chr(0x2122),
+ b"\xFF": chr(0x2026),
}),
}
diff --git a/Lib/fontTools/feaLib/__main__.py b/Lib/fontTools/feaLib/__main__.py
index 348cf0a..99c6423 100644
--- a/Lib/fontTools/feaLib/__main__.py
+++ b/Lib/fontTools/feaLib/__main__.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.feaLib.builder import addOpenTypeFeatures, Builder
from fontTools.feaLib.error import FeatureLibError
diff --git a/Lib/fontTools/feaLib/ast.py b/Lib/fontTools/feaLib/ast.py
index 6c2bfce..763d0d2 100644
--- a/Lib/fontTools/feaLib/ast.py
+++ b/Lib/fontTools/feaLib/ast.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import byteord, tobytes
from fontTools.feaLib.error import FeatureLibError
from fontTools.feaLib.location import FeatureLibLocation
from fontTools.misc.encodingTools import getEncoding
@@ -28,12 +28,15 @@
"Anchor",
"AnchorDefinition",
"AttachStatement",
+ "AxisValueLocationStatement",
"BaseAxis",
"CVParametersNameStatement",
"ChainContextPosStatement",
"ChainContextSubstStatement",
"CharacterStatement",
"CursivePosStatement",
+ "ElidedFallbackName",
+ "ElidedFallbackNameID",
"Expression",
"FeatureNameStatement",
"FeatureReferenceStatement",
@@ -62,6 +65,9 @@
"SingleSubstStatement",
"SizeParameters",
"Statement",
+ "STATAxisValueStatement",
+ "STATDesignAxisStatement",
+ "STATNameStatement",
"SubtableStatement",
"TableBlock",
"ValueRecord",
@@ -252,7 +258,7 @@
def add_range(self, start, end, glyphs):
"""Add a range (e.g. ``A-Z``) to the class. ``start`` and ``end``
- are either :class:`GlyphName` objects or strings representing the
+ are either :class:`GlyphName` objects or strings representing the
start and end glyphs in the class, and ``glyphs`` is the full list of
:class:`GlyphName` objects in the range."""
if self.curr < len(self.glyphs):
@@ -547,7 +553,7 @@
class MarkClassDefinition(Statement):
- """A single ``markClass`` statement. The ``markClass`` should be a
+ """A single ``markClass`` statement. The ``markClass`` should be a
:class:`MarkClass` object, the ``anchor`` an :class:`Anchor` object,
and the ``glyphs`` parameter should be a `glyph-containing object`_ .
@@ -849,7 +855,7 @@
"""An ``ignore pos`` statement, containing `one or more` contexts to ignore.
``chainContexts`` should be a list of ``(prefix, glyphs, suffix)`` tuples,
- with each of ``prefix``, ``glyphs`` and ``suffix`` being
+ with each of ``prefix``, ``glyphs`` and ``suffix`` being
`glyph-containing objects`_ ."""
def __init__(self, chainContexts, location=None):
@@ -1146,7 +1152,7 @@
def asFea(self, indent=""):
res = "pos base {}".format(self.base.asFea())
for a, m in self.marks:
- res += " {} mark @{}".format(a.asFea(), m.name)
+ res += "\n" + indent + SHIFT + "{} mark @{}".format(a.asFea(), m.name)
res += ";"
return res
@@ -1165,7 +1171,7 @@
# ... add definitions to mark classes...
glyph = GlyphName("lam_meem_jeem")
- marks = [
+ marks = [
[ (Anchor(625,1800), m1) ], # Attachments on 1st component (lam)
[ (Anchor(376,-378), m2) ], # Attachments on 2nd component (meem)
[ ] # No attachments on the jeem
@@ -1192,10 +1198,15 @@
for l in self.marks:
temp = ""
if l is None or not len(l):
- temp = " <anchor NULL>"
+ temp = "\n" + indent + SHIFT * 2 + "<anchor NULL>"
else:
for a, m in l:
- temp += " {} mark @{}".format(a.asFea(), m.name)
+ temp += (
+ "\n"
+ + indent
+ + SHIFT * 2
+ + "{} mark @{}".format(a.asFea(), m.name)
+ )
ligs.append(temp)
res += ("\n" + indent + SHIFT + "ligComponent").join(ligs)
res += ";"
@@ -1218,7 +1229,7 @@
def asFea(self, indent=""):
res = "pos mark {}".format(self.baseMarks.asFea())
for a, m in self.marks:
- res += " {} mark @{}".format(a.asFea(), m.name)
+ res += "\n" + indent + SHIFT + "{} mark @{}".format(a.asFea(), m.name)
res += ";"
return res
@@ -1261,7 +1272,7 @@
res += " " + " ".join(map(asFea, self.suffix))
else:
res += asFea(self.glyph)
- replacement = self.replacement or [ NullGlyph() ]
+ replacement = self.replacement or [NullGlyph()]
res += " by "
res += " ".join(map(asFea, replacement))
res += ";"
@@ -1657,7 +1668,7 @@
def escape(c, escape_pattern):
# Also escape U+0022 QUOTATION MARK and U+005C REVERSE SOLIDUS
if c >= 0x20 and c <= 0x7E and c not in (0x22, 0x5C):
- return unichr(c)
+ return chr(c)
else:
return escape_pattern % c
@@ -1699,6 +1710,16 @@
return '{} {}"{}";'.format(tag, plat, self.string)
+class STATNameStatement(NameRecord):
+ """Represents a STAT table ``name`` statement."""
+
+ def asFea(self, indent=""):
+ plat = simplify_name_attributes(self.platformID, self.platEncID, self.langID)
+ if plat != "":
+ plat += " "
+ return 'name {}"{}";'.format(plat, self.string)
+
+
class SizeParameters(Statement):
"""A ``parameters`` statement."""
@@ -1877,3 +1898,132 @@
fields = ("VertTypoAscender", "VertTypoDescender", "VertTypoLineGap")
keywords = dict([(x.lower(), x) for x in fields])
return "{} {};".format(keywords[self.key], self.value)
+
+
+class STATDesignAxisStatement(Statement):
+ """A STAT table Design Axis
+
+ Args:
+ tag (str): a 4 letter axis tag
+ axisOrder (int): an int
+ names (list): a list of :class:`STATNameStatement` objects
+ """
+
+ def __init__(self, tag, axisOrder, names, location=None):
+ Statement.__init__(self, location)
+ self.tag = tag
+ self.axisOrder = axisOrder
+ self.names = names
+ self.location = location
+
+ def build(self, builder):
+ builder.addDesignAxis(self, self.location)
+
+ def asFea(self, indent=""):
+ indent += SHIFT
+ res = f"DesignAxis {self.tag} {self.axisOrder} {{ \n"
+ res += ("\n" + indent).join([s.asFea(indent=indent) for s in self.names]) + "\n"
+ res += "};"
+ return res
+
+
+class ElidedFallbackName(Statement):
+ """STAT table ElidedFallbackName
+
+ Args:
+ names: a list of :class:`STATNameStatement` objects
+ """
+
+ def __init__(self, names, location=None):
+ Statement.__init__(self, location)
+ self.names = names
+ self.location = location
+
+ def build(self, builder):
+ builder.setElidedFallbackName(self.names, self.location)
+
+ def asFea(self, indent=""):
+ indent += SHIFT
+ res = "ElidedFallbackName { \n"
+ res += ("\n" + indent).join([s.asFea(indent=indent) for s in self.names]) + "\n"
+ res += "};"
+ return res
+
+
+class ElidedFallbackNameID(Statement):
+ """STAT table ElidedFallbackNameID
+
+ Args:
+ value: an int pointing to an existing name table name ID
+ """
+
+ def __init__(self, value, location=None):
+ Statement.__init__(self, location)
+ self.value = value
+ self.location = location
+
+ def build(self, builder):
+ builder.setElidedFallbackName(self.value, self.location)
+
+ def asFea(self, indent=""):
+ return f"ElidedFallbackNameID {self.value};"
+
+
+class STATAxisValueStatement(Statement):
+ """A STAT table Axis Value Record
+
+ Args:
+ names (list): a list of :class:`STATNameStatement` objects
+ locations (list): a list of :class:`AxisValueLocationStatement` objects
+ flags (int): an int
+ """
+
+ def __init__(self, names, locations, flags, location=None):
+ Statement.__init__(self, location)
+ self.names = names
+ self.locations = locations
+ self.flags = flags
+
+ def build(self, builder):
+ builder.addAxisValueRecord(self, self.location)
+
+ def asFea(self, indent=""):
+ res = "AxisValue {\n"
+ for location in self.locations:
+ res += location.asFea()
+
+ for nameRecord in self.names:
+ res += nameRecord.asFea()
+ res += "\n"
+
+ if self.flags:
+ flags = ["OlderSiblingFontAttribute", "ElidableAxisValueName"]
+ flagStrings = []
+ curr = 1
+ for i in range(len(flags)):
+ if self.flags & curr != 0:
+ flagStrings.append(flags[i])
+ curr = curr << 1
+ res += f"flag {' '.join(flagStrings)};\n"
+ res += "};"
+ return res
+
+
+class AxisValueLocationStatement(Statement):
+ """
+ A STAT table Axis Value Location
+
+ Args:
+ tag (str): a 4 letter axis tag
+ values (list): a list of ints and/or floats
+ """
+
+ def __init__(self, tag, values, location=None):
+ Statement.__init__(self, location)
+ self.tag = tag
+ self.values = values
+
+ def asFea(self, res=""):
+ res += f"location {self.tag} "
+ res += f"{' '.join(str(i) for i in self.values)};\n"
+ return res
diff --git a/Lib/fontTools/feaLib/builder.py b/Lib/fontTools/feaLib/builder.py
index 30046bd..4a7d957 100644
--- a/Lib/fontTools/feaLib/builder.py
+++ b/Lib/fontTools/feaLib/builder.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag, tostr
from fontTools.misc import sstruct
from fontTools.misc.textTools import binary2num, safeEval
from fontTools.feaLib.error import FeatureLibError
@@ -33,6 +33,7 @@
from fontTools.otlLib.error import OpenTypeLibError
from collections import defaultdict
import itertools
+from io import StringIO
import logging
import warnings
import os
@@ -78,7 +79,7 @@
"""
- featurefile = UnicodeIO(tounicode(features))
+ featurefile = StringIO(tostr(features))
if filename:
featurefile.name = filename
addOpenTypeFeatures(font, featurefile, tables=tables, debug=debug)
@@ -98,6 +99,7 @@
"hhea",
"name",
"vhea",
+ "STAT",
]
)
@@ -159,6 +161,8 @@
self.hhea_ = {}
# for table 'vhea'
self.vhea_ = {}
+ # for table 'STAT'
+ self.stat_ = {}
def build(self, tables=None, debug=False):
if self.parseTree is None:
@@ -188,6 +192,8 @@
self.build_name()
if "OS/2" in tables:
self.build_OS_2()
+ if "STAT" in tables:
+ self.build_STAT()
for tag in ("GPOS", "GSUB"):
if tag not in tables:
continue
@@ -510,6 +516,140 @@
if version >= 5:
checkattr(table, ("usLowerOpticalPointSize", "usUpperOpticalPointSize"))
+ def setElidedFallbackName(self, value, location):
+ # ElidedFallbackName is a convenience method for setting
+ # ElidedFallbackNameID so only one can be allowed
+ for token in ("ElidedFallbackName", "ElidedFallbackNameID"):
+ if token in self.stat_:
+ raise FeatureLibError(
+ f"{token} is already set.",
+ location,
+ )
+ if isinstance(value, int):
+ self.stat_["ElidedFallbackNameID"] = value
+ elif isinstance(value, list):
+ self.stat_["ElidedFallbackName"] = value
+ else:
+ raise AssertionError(value)
+
+ def addDesignAxis(self, designAxis, location):
+ if "DesignAxes" not in self.stat_:
+ self.stat_["DesignAxes"] = []
+ if designAxis.tag in (r.tag for r in self.stat_["DesignAxes"]):
+ raise FeatureLibError(
+ f'DesignAxis already defined for tag "{designAxis.tag}".',
+ location,
+ )
+ if designAxis.axisOrder in (r.axisOrder for r in self.stat_["DesignAxes"]):
+ raise FeatureLibError(
+ f"DesignAxis already defined for axis number {designAxis.axisOrder}.",
+ location,
+ )
+ self.stat_["DesignAxes"].append(designAxis)
+
+ def addAxisValueRecord(self, axisValueRecord, location):
+ if "AxisValueRecords" not in self.stat_:
+ self.stat_["AxisValueRecords"] = []
+ # Check for duplicate AxisValueRecords
+ for record_ in self.stat_["AxisValueRecords"]:
+ if (
+ {n.asFea() for n in record_.names}
+ == {n.asFea() for n in axisValueRecord.names}
+ and {n.asFea() for n in record_.locations}
+ == {n.asFea() for n in axisValueRecord.locations}
+ and record_.flags == axisValueRecord.flags
+ ):
+ raise FeatureLibError(
+ "An AxisValueRecord with these values is already defined.",
+ location,
+ )
+ self.stat_["AxisValueRecords"].append(axisValueRecord)
+
+ def build_STAT(self):
+ if not self.stat_:
+ return
+
+ axes = self.stat_.get("DesignAxes")
+ if not axes:
+ raise FeatureLibError("DesignAxes not defined", None)
+ axisValueRecords = self.stat_.get("AxisValueRecords")
+ axisValues = {}
+ format4_locations = []
+ for tag in axes:
+ axisValues[tag.tag] = []
+ if axisValueRecords is not None:
+ for avr in axisValueRecords:
+ valuesDict = {}
+ if avr.flags > 0:
+ valuesDict["flags"] = avr.flags
+ if len(avr.locations) == 1:
+ location = avr.locations[0]
+ values = location.values
+ if len(values) == 1: # format1
+ valuesDict.update({"value": values[0], "name": avr.names})
+ if len(values) == 2: # format3
+ valuesDict.update(
+ {
+ "value": values[0],
+ "linkedValue": values[1],
+ "name": avr.names,
+ }
+ )
+ if len(values) == 3: # format2
+ nominal, minVal, maxVal = values
+ valuesDict.update(
+ {
+ "nominalValue": nominal,
+ "rangeMinValue": minVal,
+ "rangeMaxValue": maxVal,
+ "name": avr.names,
+ }
+ )
+ axisValues[location.tag].append(valuesDict)
+ else:
+ valuesDict.update(
+ {
+ "location": {i.tag: i.values[0] for i in avr.locations},
+ "name": avr.names,
+ }
+ )
+ format4_locations.append(valuesDict)
+
+ designAxes = [
+ {
+ "ordering": a.axisOrder,
+ "tag": a.tag,
+ "name": a.names,
+ "values": axisValues[a.tag],
+ }
+ for a in axes
+ ]
+
+ nameTable = self.font.get("name")
+ if not nameTable: # this only happens for unit tests
+ nameTable = self.font["name"] = newTable("name")
+ nameTable.names = []
+
+ if "ElidedFallbackNameID" in self.stat_:
+ nameID = self.stat_["ElidedFallbackNameID"]
+ name = nameTable.getDebugName(nameID)
+ if not name:
+ raise FeatureLibError(
+ f"ElidedFallbackNameID {nameID} points "
+ "to a nameID that does not exist in the "
+ '"name" table',
+ None,
+ )
+ elif "ElidedFallbackName" in self.stat_:
+ nameID = self.stat_["ElidedFallbackName"]
+
+ otl.buildStatTable(
+ self.font,
+ designAxes,
+ locations=format4_locations,
+ elidedFallbackName=nameID,
+ )
+
def build_codepages_(self, pages):
pages2bits = {
1252: 0,
@@ -718,8 +858,10 @@
str(ix)
]._replace(feature=key)
except KeyError:
- warnings.warn("feaLib.Builder subclass needs upgrading to "
- "stash debug information. See fonttools#2065.")
+ warnings.warn(
+ "feaLib.Builder subclass needs upgrading to "
+ "stash debug information. See fonttools#2065."
+ )
feature_key = (feature_tag, lookup_indices)
feature_index = feature_indices.get(feature_key)
diff --git a/Lib/fontTools/feaLib/lexer.py b/Lib/fontTools/feaLib/lexer.py
index 3caf3dc..140fbd8 100644
--- a/Lib/fontTools/feaLib/lexer.py
+++ b/Lib/fontTools/feaLib/lexer.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
from fontTools.feaLib.location import FeatureLibLocation
import re
diff --git a/Lib/fontTools/feaLib/parser.py b/Lib/fontTools/feaLib/parser.py
index 23a4961..804cba9 100644
--- a/Lib/fontTools/feaLib/parser.py
+++ b/Lib/fontTools/feaLib/parser.py
@@ -1,7 +1,7 @@
from fontTools.feaLib.error import FeatureLibError
from fontTools.feaLib.lexer import Lexer, IncludingLexer, NonIncludingLexer
from fontTools.misc.encodingTools import getEncoding
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, tobytes, tostr
import fontTools.feaLib.ast as ast
import logging
import os
@@ -971,8 +971,8 @@
location = self.cur_token_location_
DesignSize = self.expect_decipoint_()
SubfamilyID = self.expect_number_()
- RangeStart = 0
- RangeEnd = 0
+ RangeStart = 0.
+ RangeEnd = 0.
if self.next_token_type_ in (Lexer.NUMBER, Lexer.FLOAT) or SubfamilyID != 0:
RangeStart = self.expect_decipoint_()
RangeEnd = self.expect_decipoint_()
@@ -1003,6 +1003,7 @@
"name": self.parse_table_name_,
"BASE": self.parse_table_BASE_,
"OS/2": self.parse_table_OS_2_,
+ "STAT": self.parse_table_STAT_,
}.get(name)
if handler:
handler(table)
@@ -1162,6 +1163,35 @@
unescaped = self.unescape_string_(string, encoding)
return platformID, platEncID, langID, unescaped
+ def parse_stat_name_(self):
+ platEncID = None
+ langID = None
+ if self.next_token_type_ in Lexer.NUMBERS:
+ platformID = self.expect_any_number_()
+ location = self.cur_token_location_
+ if platformID not in (1, 3):
+ raise FeatureLibError("Expected platform id 1 or 3", location)
+ if self.next_token_type_ in Lexer.NUMBERS:
+ platEncID = self.expect_any_number_()
+ langID = self.expect_any_number_()
+ else:
+ platformID = 3
+ location = self.cur_token_location_
+
+ if platformID == 1: # Macintosh
+ platEncID = platEncID or 0 # Roman
+ langID = langID or 0 # English
+ else: # 3, Windows
+ platEncID = platEncID or 1 # Unicode
+ langID = langID or 0x0409 # English
+
+ string = self.expect_string_()
+ encoding = getEncoding(platformID, platEncID, langID)
+ if encoding is None:
+ raise FeatureLibError("Unsupported encoding", location)
+ unescaped = self.unescape_string_(string, encoding)
+ return platformID, platEncID, langID, unescaped
+
def parse_nameid_(self):
assert self.cur_token_ == "nameid", self.cur_token_
location, nameID = self.cur_token_location_, self.expect_any_number_()
@@ -1192,12 +1222,12 @@
# We convert surrogates to actual Unicode by round-tripping through
# Python's UTF-16 codec in a special mode.
utf16 = tobytes(s, "utf_16_be", "surrogatepass")
- return tounicode(utf16, "utf_16_be")
+ return tostr(utf16, "utf_16_be")
@staticmethod
def unescape_unichr_(match):
n = match.group(0)[1:]
- return unichr(int(n, 16))
+ return chr(int(n, 16))
@staticmethod
def unescape_byte_(match, encoding):
@@ -1283,6 +1313,198 @@
elif self.cur_token_ == ";":
continue
+ def parse_STAT_ElidedFallbackName(self):
+ assert self.is_cur_keyword_("ElidedFallbackName")
+ self.expect_symbol_("{")
+ names = []
+ while self.next_token_ != "}" or self.cur_comments_:
+ self.advance_lexer_()
+ if self.is_cur_keyword_("name"):
+ platformID, platEncID, langID, string = self.parse_stat_name_()
+ nameRecord = self.ast.STATNameStatement(
+ "stat",
+ platformID,
+ platEncID,
+ langID,
+ string,
+ location=self.cur_token_location_,
+ )
+ names.append(nameRecord)
+ else:
+ if self.cur_token_ != ";":
+ raise FeatureLibError(
+ f"Unexpected token {self.cur_token_} " f"in ElidedFallbackName",
+ self.cur_token_location_,
+ )
+ self.expect_symbol_("}")
+ if not names:
+ raise FeatureLibError('Expected "name"', self.cur_token_location_)
+ return names
+
+ def parse_STAT_design_axis(self):
+ assert self.is_cur_keyword_("DesignAxis")
+ names = []
+ axisTag = self.expect_tag_()
+ if (
+ axisTag not in ("ital", "opsz", "slnt", "wdth", "wght")
+ and not axisTag.isupper()
+ ):
+ log.warning(f"Unregistered axis tag {axisTag} should be uppercase.")
+ axisOrder = self.expect_number_()
+ self.expect_symbol_("{")
+ while self.next_token_ != "}" or self.cur_comments_:
+ self.advance_lexer_()
+ if self.cur_token_type_ is Lexer.COMMENT:
+ continue
+ elif self.is_cur_keyword_("name"):
+ location = self.cur_token_location_
+ platformID, platEncID, langID, string = self.parse_stat_name_()
+ name = self.ast.STATNameStatement(
+ "stat", platformID, platEncID, langID, string, location=location
+ )
+ names.append(name)
+ elif self.cur_token_ == ";":
+ continue
+ else:
+ raise FeatureLibError(
+ f'Expected "name", got {self.cur_token_}', self.cur_token_location_
+ )
+
+ self.expect_symbol_("}")
+ return self.ast.STATDesignAxisStatement(
+ axisTag, axisOrder, names, self.cur_token_location_
+ )
+
+ def parse_STAT_axis_value_(self):
+ assert self.is_cur_keyword_("AxisValue")
+ self.expect_symbol_("{")
+ locations = []
+ names = []
+ flags = 0
+ while self.next_token_ != "}" or self.cur_comments_:
+ self.advance_lexer_(comments=True)
+ if self.cur_token_type_ is Lexer.COMMENT:
+ continue
+ elif self.is_cur_keyword_("name"):
+ location = self.cur_token_location_
+ platformID, platEncID, langID, string = self.parse_stat_name_()
+ name = self.ast.STATNameStatement(
+ "stat", platformID, platEncID, langID, string, location=location
+ )
+ names.append(name)
+ elif self.is_cur_keyword_("location"):
+ location = self.parse_STAT_location()
+ locations.append(location)
+ elif self.is_cur_keyword_("flag"):
+ flags = self.expect_stat_flags()
+ elif self.cur_token_ == ";":
+ continue
+ else:
+ raise FeatureLibError(
+ f"Unexpected token {self.cur_token_} " f"in AxisValue",
+ self.cur_token_location_,
+ )
+ self.expect_symbol_("}")
+ if not names:
+ raise FeatureLibError('Expected "Axis Name"', self.cur_token_location_)
+ if not locations:
+ raise FeatureLibError('Expected "Axis location"', self.cur_token_location_)
+ if len(locations) > 1:
+ for location in locations:
+ if len(location.values) > 1:
+ raise FeatureLibError(
+ "Only one value is allowed in a "
+ "Format 4 Axis Value Record, but "
+ f"{len(location.values)} were found.",
+ self.cur_token_location_,
+ )
+ format4_tags = []
+ for location in locations:
+ tag = location.tag
+ if tag in format4_tags:
+ raise FeatureLibError(
+ f"Axis tag {tag} already " "defined.", self.cur_token_location_
+ )
+ format4_tags.append(tag)
+
+ return self.ast.STATAxisValueStatement(
+ names, locations, flags, self.cur_token_location_
+ )
+
+ def parse_STAT_location(self):
+ values = []
+ tag = self.expect_tag_()
+ if len(tag.strip()) != 4:
+ raise FeatureLibError(
+ f"Axis tag {self.cur_token_} must be 4 " "characters",
+ self.cur_token_location_,
+ )
+
+ while self.next_token_ != ";":
+ if self.next_token_type_ is Lexer.FLOAT:
+ value = self.expect_float_()
+ values.append(value)
+ elif self.next_token_type_ is Lexer.NUMBER:
+ value = self.expect_number_()
+ values.append(value)
+ else:
+ raise FeatureLibError(
+ f'Unexpected value "{self.next_token_}". '
+ "Expected integer or float.",
+ self.next_token_location_,
+ )
+ if len(values) == 3:
+ nominal, min_val, max_val = values
+ if nominal < min_val or nominal > max_val:
+ raise FeatureLibError(
+ f"Default value {nominal} is outside "
+ f"of specified range "
+ f"{min_val}-{max_val}.",
+ self.next_token_location_,
+ )
+ return self.ast.AxisValueLocationStatement(tag, values)
+
+ def parse_table_STAT_(self, table):
+ statements = table.statements
+ design_axes = []
+ while self.next_token_ != "}" or self.cur_comments_:
+ self.advance_lexer_(comments=True)
+ if self.cur_token_type_ is Lexer.COMMENT:
+ statements.append(
+ self.ast.Comment(self.cur_token_, location=self.cur_token_location_)
+ )
+ elif self.cur_token_type_ is Lexer.NAME:
+ if self.is_cur_keyword_("ElidedFallbackName"):
+ names = self.parse_STAT_ElidedFallbackName()
+ statements.append(self.ast.ElidedFallbackName(names))
+ elif self.is_cur_keyword_("ElidedFallbackNameID"):
+ value = self.expect_number_()
+ statements.append(self.ast.ElidedFallbackNameID(value))
+ self.expect_symbol_(";")
+ elif self.is_cur_keyword_("DesignAxis"):
+ designAxis = self.parse_STAT_design_axis()
+ design_axes.append(designAxis.tag)
+ statements.append(designAxis)
+ self.expect_symbol_(";")
+ elif self.is_cur_keyword_("AxisValue"):
+ axisValueRecord = self.parse_STAT_axis_value_()
+ for location in axisValueRecord.locations:
+ if location.tag not in design_axes:
+ # Tag must be defined in a DesignAxis before it
+ # can be referenced
+ raise FeatureLibError(
+ "DesignAxis not defined for " f"{location.tag}.",
+ self.cur_token_location_,
+ )
+ statements.append(axisValueRecord)
+ self.expect_symbol_(";")
+ else:
+ raise FeatureLibError(
+ f"Unexpected token {self.cur_token_}", self.cur_token_location_
+ )
+ elif self.cur_token_ == ";":
+ continue
+
def parse_base_tag_list_(self):
# Parses BASE table entries. (See `section 9.a <https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#9.a>`_)
assert self.cur_token_ in (
@@ -1784,7 +2006,7 @@
raise FeatureLibError("Expected a tag", self.cur_token_location_)
if len(self.cur_token_) > 4:
raise FeatureLibError(
- "Tags can not be longer than 4 characters", self.cur_token_location_
+ "Tags cannot be longer than 4 characters", self.cur_token_location_
)
return (self.cur_token_ + " ")[:4]
@@ -1856,6 +2078,32 @@
"Expected an integer or floating-point number", self.cur_token_location_
)
+ def expect_stat_flags(self):
+ value = 0
+ flags = {
+ "OlderSiblingFontAttribute": 1,
+ "ElidableAxisValueName": 2,
+ }
+ while self.next_token_ != ";":
+ if self.next_token_ in flags:
+ name = self.expect_name_()
+ value = value | flags[name]
+ else:
+ raise FeatureLibError(
+ f"Unexpected STAT flag {self.cur_token_}", self.cur_token_location_
+ )
+ return value
+
+ def expect_stat_values_(self):
+ if self.next_token_type_ == Lexer.FLOAT:
+ return self.expect_float_()
+ elif self.next_token_type_ is Lexer.NUMBER:
+ return self.expect_number_()
+ else:
+ raise FeatureLibError(
+ "Expected an integer or floating-point number", self.cur_token_location_
+ )
+
def expect_string_(self):
self.advance_lexer_()
if self.cur_token_type_ is Lexer.STRING:
diff --git a/Lib/fontTools/fontBuilder.py b/Lib/fontTools/fontBuilder.py
index f4c943f..e282408 100644
--- a/Lib/fontTools/fontBuilder.py
+++ b/Lib/fontTools/fontBuilder.py
@@ -129,10 +129,8 @@
```
"""
-from .misc.py23 import *
from .ttLib import TTFont, newTable
from .ttLib.tables._c_m_a_p import cmap_classes
-from .ttLib.tables._n_a_m_e import NameRecord, makeName
from .misc.timeTools import timestampNow
import struct
from collections import OrderedDict
@@ -478,7 +476,7 @@
nameID = nameName
else:
nameID = _nameIDs[nameName]
- if isinstance(nameValue, basestring):
+ if isinstance(nameValue, str):
nameValue = dict(en=nameValue)
nameTable.addMultilingualName(
nameValue, ttFont=self.font, nameID=nameID, windows=windows, mac=mac
@@ -894,7 +892,6 @@
def addFvar(font, axes, instances):
from .ttLib.tables._f_v_a_r import Axis, NamedInstance
- from .designspaceLib import AxisDescriptor
assert axes
diff --git a/Lib/fontTools/merge.py b/Lib/fontTools/merge.py
index 96b8023..2df22a8 100644
--- a/Lib/fontTools/merge.py
+++ b/Lib/fontTools/merge.py
@@ -2,7 +2,6 @@
#
# Google Author(s): Behdad Esfahbod, Roozbeh Pournader
-from fontTools.misc.py23 import *
from fontTools.misc.timeTools import timestampNow
from fontTools import ttLib, cffLib
from fontTools.ttLib.tables import otTables, _h_e_a_d
diff --git a/Lib/fontTools/misc/__init__.py b/Lib/fontTools/misc/__init__.py
index b176031..156cb23 100644
--- a/Lib/fontTools/misc/__init__.py
+++ b/Lib/fontTools/misc/__init__.py
@@ -1,3 +1 @@
"""Empty __init__.py file to signal Python this directory is a package."""
-
-from fontTools.misc.py23 import *
diff --git a/Lib/fontTools/misc/arrayTools.py b/Lib/fontTools/misc/arrayTools.py
index e76ced7..c20a9ed 100644
--- a/Lib/fontTools/misc/arrayTools.py
+++ b/Lib/fontTools/misc/arrayTools.py
@@ -2,11 +2,11 @@
so on.
"""
-from fontTools.misc.py23 import *
-from fontTools.misc.fixedTools import otRound
-from numbers import Number
+from fontTools.misc.roundTools import otRound
+from fontTools.misc.vector import Vector as _Vector
import math
-import operator
+import warnings
+
def calcBounds(array):
"""Calculate the bounding rectangle of a 2D points array.
@@ -228,6 +228,19 @@
(xMin, yMin, xMax, yMax) = rect
return (xMin+xMax)/2, (yMin+yMax)/2
+def rectArea(rect):
+ """Determine rectangle area.
+
+ Args:
+ rect: Bounding rectangle, expressed as tuples
+ ``(xMin, yMin, xMax, yMax)``.
+
+ Returns:
+ The area of the rectangle.
+ """
+ (xMin, yMin, xMax, yMax) = rect
+ return (yMax - yMin) * (xMax - xMin)
+
def intRect(rect):
"""Round a rectangle to integer values.
@@ -248,107 +261,14 @@
return (xMin, yMin, xMax, yMax)
-class Vector(object):
- """A math-like vector.
+class Vector(_Vector):
- Represents an n-dimensional numeric vector. ``Vector`` objects support
- vector addition and subtraction, scalar multiplication and division,
- negation, rounding, and comparison tests.
-
- Attributes:
- values: Sequence of values stored in the vector.
- """
-
- def __init__(self, values, keep=False):
- """Initialize a vector. If ``keep`` is true, values will be copied."""
- self.values = values if keep else list(values)
-
- def __getitem__(self, index):
- return self.values[index]
-
- def __len__(self):
- return len(self.values)
-
- def __repr__(self):
- return "Vector(%s)" % self.values
-
- def _vectorOp(self, other, op):
- if isinstance(other, Vector):
- assert len(self.values) == len(other.values)
- a = self.values
- b = other.values
- return [op(a[i], b[i]) for i in range(len(self.values))]
- if isinstance(other, Number):
- return [op(v, other) for v in self.values]
- raise NotImplementedError
-
- def _scalarOp(self, other, op):
- if isinstance(other, Number):
- return [op(v, other) for v in self.values]
- raise NotImplementedError
-
- def _unaryOp(self, op):
- return [op(v) for v in self.values]
-
- def __add__(self, other):
- return Vector(self._vectorOp(other, operator.add), keep=True)
- def __iadd__(self, other):
- self.values = self._vectorOp(other, operator.add)
- return self
- __radd__ = __add__
-
- def __sub__(self, other):
- return Vector(self._vectorOp(other, operator.sub), keep=True)
- def __isub__(self, other):
- self.values = self._vectorOp(other, operator.sub)
- return self
- def __rsub__(self, other):
- return other + (-self)
-
- def __mul__(self, other):
- return Vector(self._scalarOp(other, operator.mul), keep=True)
- def __imul__(self, other):
- self.values = self._scalarOp(other, operator.mul)
- return self
- __rmul__ = __mul__
-
- def __truediv__(self, other):
- return Vector(self._scalarOp(other, operator.truediv), keep=True)
- def __itruediv__(self, other):
- self.values = self._scalarOp(other, operator.truediv)
- return self
-
- def __pos__(self):
- return Vector(self._unaryOp(operator.pos), keep=True)
- def __neg__(self):
- return Vector(self._unaryOp(operator.neg), keep=True)
- def __round__(self):
- return Vector(self._unaryOp(round), keep=True)
- def toInt(self):
- """Synonym for ``round``."""
- return self.__round__()
-
- def __eq__(self, other):
- if type(other) == Vector:
- return self.values == other.values
- else:
- return self.values == other
- def __ne__(self, other):
- return not self.__eq__(other)
-
- def __bool__(self):
- return any(self.values)
- __nonzero__ = __bool__
-
- def __abs__(self):
- return math.sqrt(sum([x*x for x in self.values]))
- def dot(self, other):
- """Performs vector dot product, returning sum of
- ``a[0] * b[0], a[1] * b[1], ...``"""
- a = self.values
- b = other.values if type(other) == Vector else b
- assert len(a) == len(b)
- return sum([a[i] * b[i] for i in range(len(a))])
+ def __init__(self, *args, **kwargs):
+ warnings.warn(
+ "fontTools.misc.arrayTools.Vector has been deprecated, please use "
+ "fontTools.misc.vector.Vector instead.",
+ DeprecationWarning,
+ )
def pairwise(iterable, reverse=False):
diff --git a/Lib/fontTools/misc/bezierTools.py b/Lib/fontTools/misc/bezierTools.py
index 659de34..2cf2640 100644
--- a/Lib/fontTools/misc/bezierTools.py
+++ b/Lib/fontTools/misc/bezierTools.py
@@ -2,9 +2,12 @@
"""fontTools.misc.bezierTools.py -- tools for working with Bezier path segments.
"""
-from fontTools.misc.arrayTools import calcBounds
-from fontTools.misc.py23 import *
+from fontTools.misc.arrayTools import calcBounds, sectRect, rectArea
+from fontTools.misc.transform import Identity
import math
+from collections import namedtuple
+
+Intersection = namedtuple("Intersection", ["pt", "t1", "t2"])
__all__ = [
@@ -25,6 +28,14 @@
"splitCubicAtT",
"solveQuadratic",
"solveCubic",
+ "quadraticPointAtT",
+ "cubicPointAtT",
+ "linePointAtT",
+ "segmentPointAtT",
+ "lineLineIntersections",
+ "curveLineIntersections",
+ "curveCurveIntersections",
+ "segmentSegmentIntersections",
]
@@ -42,23 +53,31 @@
Returns:
Arc length value.
"""
- return calcCubicArcLengthC(complex(*pt1), complex(*pt2), complex(*pt3), complex(*pt4), tolerance)
+ return calcCubicArcLengthC(
+ complex(*pt1), complex(*pt2), complex(*pt3), complex(*pt4), tolerance
+ )
def _split_cubic_into_two(p0, p1, p2, p3):
- mid = (p0 + 3 * (p1 + p2) + p3) * .125
- deriv3 = (p3 + p2 - p1 - p0) * .125
- return ((p0, (p0 + p1) * .5, mid - deriv3, mid),
- (mid, mid + deriv3, (p2 + p3) * .5, p3))
+ mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
+ deriv3 = (p3 + p2 - p1 - p0) * 0.125
+ return (
+ (p0, (p0 + p1) * 0.5, mid - deriv3, mid),
+ (mid, mid + deriv3, (p2 + p3) * 0.5, p3),
+ )
+
def _calcCubicArcLengthCRecurse(mult, p0, p1, p2, p3):
- arch = abs(p0-p3)
- box = abs(p0-p1) + abs(p1-p2) + abs(p2-p3)
- if arch * mult >= box:
- return (arch + box) * .5
- else:
- one,two = _split_cubic_into_two(p0,p1,p2,p3)
- return _calcCubicArcLengthCRecurse(mult, *one) + _calcCubicArcLengthCRecurse(mult, *two)
+ arch = abs(p0 - p3)
+ box = abs(p0 - p1) + abs(p1 - p2) + abs(p2 - p3)
+ if arch * mult >= box:
+ return (arch + box) * 0.5
+ else:
+ one, two = _split_cubic_into_two(p0, p1, p2, p3)
+ return _calcCubicArcLengthCRecurse(mult, *one) + _calcCubicArcLengthCRecurse(
+ mult, *two
+ )
+
def calcCubicArcLengthC(pt1, pt2, pt3, pt4, tolerance=0.005):
"""Calculates the arc length for a cubic Bezier segment.
@@ -70,7 +89,7 @@
Returns:
Arc length value.
"""
- mult = 1. + 1.5 * tolerance # The 1.5 is a empirical hack; no math
+ mult = 1.0 + 1.5 * tolerance # The 1.5 is a empirical hack; no math
return _calcCubicArcLengthCRecurse(mult, pt1, pt2, pt3, pt4)
@@ -85,7 +104,7 @@
def _intSecAtan(x):
# In : sympy.integrate(sp.sec(sp.atan(x)))
# Out: x*sqrt(x**2 + 1)/2 + asinh(x)/2
- return x * math.sqrt(x**2 + 1)/2 + math.asinh(x)/2
+ return x * math.sqrt(x ** 2 + 1) / 2 + math.asinh(x) / 2
def calcQuadraticArcLength(pt1, pt2, pt3):
@@ -141,16 +160,16 @@
d = d1 - d0
n = d * 1j
scale = abs(n)
- if scale == 0.:
- return abs(pt3-pt1)
- origDist = _dot(n,d0)
+ if scale == 0.0:
+ return abs(pt3 - pt1)
+ origDist = _dot(n, d0)
if abs(origDist) < epsilon:
- if _dot(d0,d1) >= 0:
- return abs(pt3-pt1)
+ if _dot(d0, d1) >= 0:
+ return abs(pt3 - pt1)
a, b = abs(d0), abs(d1)
- return (a*a + b*b) / (a+b)
- x0 = _dot(d,d0) / origDist
- x1 = _dot(d,d1) / origDist
+ return (a * a + b * b) / (a + b)
+ x0 = _dot(d, d0) / origDist
+ x1 = _dot(d, d1) / origDist
Len = abs(2 * (_intSecAtan(x1) - _intSecAtan(x0)) * origDist / (scale * (x1 - x0)))
return Len
@@ -190,13 +209,17 @@
# to be integrated with the best-matching fifth-degree polynomial
# approximation of it.
#
- #https://en.wikipedia.org/wiki/Gaussian_quadrature#Gauss.E2.80.93Legendre_quadrature
+ # https://en.wikipedia.org/wiki/Gaussian_quadrature#Gauss.E2.80.93Legendre_quadrature
# abs(BezierCurveC[2].diff(t).subs({t:T})) for T in sorted(.5, .5±sqrt(3/5)/2),
# weighted 5/18, 8/18, 5/18 respectively.
- v0 = abs(-0.492943519233745*pt1 + 0.430331482911935*pt2 + 0.0626120363218102*pt3)
- v1 = abs(pt3-pt1)*0.4444444444444444
- v2 = abs(-0.0626120363218102*pt1 - 0.430331482911935*pt2 + 0.492943519233745*pt3)
+ v0 = abs(
+ -0.492943519233745 * pt1 + 0.430331482911935 * pt2 + 0.0626120363218102 * pt3
+ )
+ v1 = abs(pt3 - pt1) * 0.4444444444444444
+ v2 = abs(
+ -0.0626120363218102 * pt1 - 0.430331482911935 * pt2 + 0.492943519233745 * pt3
+ )
return v0 + v1 + v2
@@ -220,14 +243,18 @@
(0.0, 0.0, 100, 100)
"""
(ax, ay), (bx, by), (cx, cy) = calcQuadraticParameters(pt1, pt2, pt3)
- ax2 = ax*2.0
- ay2 = ay*2.0
+ ax2 = ax * 2.0
+ ay2 = ay * 2.0
roots = []
if ax2 != 0:
- roots.append(-bx/ax2)
+ roots.append(-bx / ax2)
if ay2 != 0:
- roots.append(-by/ay2)
- points = [(ax*t*t + bx*t + cx, ay*t*t + by*t + cy) for t in roots if 0 <= t < 1] + [pt1, pt3]
+ roots.append(-by / ay2)
+ points = [
+ (ax * t * t + bx * t + cx, ay * t * t + by * t + cy)
+ for t in roots
+ if 0 <= t < 1
+ ] + [pt1, pt3]
return calcBounds(points)
@@ -256,7 +283,9 @@
>>> approximateCubicArcLength((0, 0), (50, 0), (100, -50), (-50, 0)) # cusp
154.80848416537057
"""
- return approximateCubicArcLengthC(complex(*pt1), complex(*pt2), complex(*pt3), complex(*pt4))
+ return approximateCubicArcLengthC(
+ complex(*pt1), complex(*pt2), complex(*pt3), complex(*pt4)
+ )
def approximateCubicArcLengthC(pt1, pt2, pt3, pt4):
@@ -276,11 +305,21 @@
# abs(BezierCurveC[3].diff(t).subs({t:T})) for T in sorted(0, .5±(3/7)**.5/2, .5, 1),
# weighted 1/20, 49/180, 32/90, 49/180, 1/20 respectively.
- v0 = abs(pt2-pt1)*.15
- v1 = abs(-0.558983582205757*pt1 + 0.325650248872424*pt2 + 0.208983582205757*pt3 + 0.024349751127576*pt4)
- v2 = abs(pt4-pt1+pt3-pt2)*0.26666666666666666
- v3 = abs(-0.024349751127576*pt1 - 0.208983582205757*pt2 - 0.325650248872424*pt3 + 0.558983582205757*pt4)
- v4 = abs(pt4-pt3)*.15
+ v0 = abs(pt2 - pt1) * 0.15
+ v1 = abs(
+ -0.558983582205757 * pt1
+ + 0.325650248872424 * pt2
+ + 0.208983582205757 * pt3
+ + 0.024349751127576 * pt4
+ )
+ v2 = abs(pt4 - pt1 + pt3 - pt2) * 0.26666666666666666
+ v3 = abs(
+ -0.024349751127576 * pt1
+ - 0.208983582205757 * pt2
+ - 0.325650248872424 * pt3
+ + 0.558983582205757 * pt4
+ )
+ v4 = abs(pt4 - pt3) * 0.15
return v0 + v1 + v2 + v3 + v4
@@ -313,7 +352,13 @@
yRoots = [t for t in solveQuadratic(ay3, by2, cy) if 0 <= t < 1]
roots = xRoots + yRoots
- points = [(ax*t*t*t + bx*t*t + cx * t + dx, ay*t*t*t + by*t*t + cy * t + dy) for t in roots] + [pt1, pt4]
+ points = [
+ (
+ ax * t * t * t + bx * t * t + cx * t + dx,
+ ay * t * t * t + by * t * t + cy * t + dy,
+ )
+ for t in roots
+ ] + [pt1, pt4]
return calcBounds(points)
@@ -356,8 +401,8 @@
pt1x, pt1y = pt1
pt2x, pt2y = pt2
- ax = (pt2x - pt1x)
- ay = (pt2y - pt1y)
+ ax = pt2x - pt1x
+ ay = pt2y - pt1y
bx = pt1x
by = pt1y
@@ -410,9 +455,10 @@
((50, 50), (75, 50), (100, 0))
"""
a, b, c = calcQuadraticParameters(pt1, pt2, pt3)
- solutions = solveQuadratic(a[isHorizontal], b[isHorizontal],
- c[isHorizontal] - where)
- solutions = sorted([t for t in solutions if 0 <= t < 1])
+ solutions = solveQuadratic(
+ a[isHorizontal], b[isHorizontal], c[isHorizontal] - where
+ )
+ solutions = sorted(t for t in solutions if 0 <= t < 1)
if not solutions:
return [(pt1, pt2, pt3)]
return _splitQuadraticAtT(a, b, c, *solutions)
@@ -446,9 +492,10 @@
((92.5259, 25), (95.202, 17.5085), (97.7062, 9.17517), (100, 1.77636e-15))
"""
a, b, c, d = calcCubicParameters(pt1, pt2, pt3, pt4)
- solutions = solveCubic(a[isHorizontal], b[isHorizontal], c[isHorizontal],
- d[isHorizontal] - where)
- solutions = sorted([t for t in solutions if 0 <= t < 1])
+ solutions = solveCubic(
+ a[isHorizontal], b[isHorizontal], c[isHorizontal], d[isHorizontal] - where
+ )
+ solutions = sorted(t for t in solutions if 0 <= t < 1)
if not solutions:
return [(pt1, pt2, pt3, pt4)]
return _splitCubicAtT(a, b, c, d, *solutions)
@@ -512,17 +559,17 @@
cx, cy = c
for i in range(len(ts) - 1):
t1 = ts[i]
- t2 = ts[i+1]
- delta = (t2 - t1)
+ t2 = ts[i + 1]
+ delta = t2 - t1
# calc new a, b and c
- delta_2 = delta*delta
+ delta_2 = delta * delta
a1x = ax * delta_2
a1y = ay * delta_2
- b1x = (2*ax*t1 + bx) * delta
- b1y = (2*ay*t1 + by) * delta
- t1_2 = t1*t1
- c1x = ax*t1_2 + bx*t1 + cx
- c1y = ay*t1_2 + by*t1 + cy
+ b1x = (2 * ax * t1 + bx) * delta
+ b1y = (2 * ay * t1 + by) * delta
+ t1_2 = t1 * t1
+ c1x = ax * t1_2 + bx * t1 + cx
+ c1y = ay * t1_2 + by * t1 + cy
pt1, pt2, pt3 = calcQuadraticPoints((a1x, a1y), (b1x, b1y), (c1x, c1y))
segments.append((pt1, pt2, pt3))
@@ -540,24 +587,26 @@
dx, dy = d
for i in range(len(ts) - 1):
t1 = ts[i]
- t2 = ts[i+1]
- delta = (t2 - t1)
+ t2 = ts[i + 1]
+ delta = t2 - t1
- delta_2 = delta*delta
- delta_3 = delta*delta_2
- t1_2 = t1*t1
- t1_3 = t1*t1_2
+ delta_2 = delta * delta
+ delta_3 = delta * delta_2
+ t1_2 = t1 * t1
+ t1_3 = t1 * t1_2
# calc new a, b, c and d
a1x = ax * delta_3
a1y = ay * delta_3
- b1x = (3*ax*t1 + bx) * delta_2
- b1y = (3*ay*t1 + by) * delta_2
- c1x = (2*bx*t1 + cx + 3*ax*t1_2) * delta
- c1y = (2*by*t1 + cy + 3*ay*t1_2) * delta
- d1x = ax*t1_3 + bx*t1_2 + cx*t1 + dx
- d1y = ay*t1_3 + by*t1_2 + cy*t1 + dy
- pt1, pt2, pt3, pt4 = calcCubicPoints((a1x, a1y), (b1x, b1y), (c1x, c1y), (d1x, d1y))
+ b1x = (3 * ax * t1 + bx) * delta_2
+ b1y = (3 * ay * t1 + by) * delta_2
+ c1x = (2 * bx * t1 + cx + 3 * ax * t1_2) * delta
+ c1y = (2 * by * t1 + cy + 3 * ay * t1_2) * delta
+ d1x = ax * t1_3 + bx * t1_2 + cx * t1 + dx
+ d1y = ay * t1_3 + by * t1_2 + cy * t1 + dy
+ pt1, pt2, pt3, pt4 = calcCubicPoints(
+ (a1x, a1y), (b1x, b1y), (c1x, c1y), (d1x, d1y)
+ )
segments.append((pt1, pt2, pt3, pt4))
return segments
@@ -569,8 +618,7 @@
from math import sqrt, acos, cos, pi
-def solveQuadratic(a, b, c,
- sqrt=sqrt):
+def solveQuadratic(a, b, c, sqrt=sqrt):
"""Solve a quadratic equation.
Solves *a*x*x + b*x + c = 0* where a, b and c are real.
@@ -590,13 +638,13 @@
roots = []
else:
# We have a linear equation with 1 root.
- roots = [-c/b]
+ roots = [-c / b]
else:
# We have a true quadratic equation. Apply the quadratic formula to find two roots.
- DD = b*b - 4.0*a*c
+ DD = b * b - 4.0 * a * c
if DD >= 0.0:
rDD = sqrt(DD)
- roots = [(-b+rDD)/2.0/a, (-b-rDD)/2.0/a]
+ roots = [(-b + rDD) / 2.0 / a, (-b - rDD) / 2.0 / a]
else:
# complex roots, ignore
roots = []
@@ -646,52 +694,52 @@
# returns unreliable results, so we fall back to quad.
return solveQuadratic(b, c, d)
a = float(a)
- a1 = b/a
- a2 = c/a
- a3 = d/a
+ a1 = b / a
+ a2 = c / a
+ a3 = d / a
- Q = (a1*a1 - 3.0*a2)/9.0
- R = (2.0*a1*a1*a1 - 9.0*a1*a2 + 27.0*a3)/54.0
+ Q = (a1 * a1 - 3.0 * a2) / 9.0
+ R = (2.0 * a1 * a1 * a1 - 9.0 * a1 * a2 + 27.0 * a3) / 54.0
- R2 = R*R
- Q3 = Q*Q*Q
+ R2 = R * R
+ Q3 = Q * Q * Q
R2 = 0 if R2 < epsilon else R2
Q3 = 0 if abs(Q3) < epsilon else Q3
R2_Q3 = R2 - Q3
- if R2 == 0. and Q3 == 0.:
- x = round(-a1/3.0, epsilonDigits)
+ if R2 == 0.0 and Q3 == 0.0:
+ x = round(-a1 / 3.0, epsilonDigits)
return [x, x, x]
- elif R2_Q3 <= epsilon * .5:
+ elif R2_Q3 <= epsilon * 0.5:
# The epsilon * .5 above ensures that Q3 is not zero.
- theta = acos(max(min(R/sqrt(Q3), 1.0), -1.0))
- rQ2 = -2.0*sqrt(Q)
- a1_3 = a1/3.0
- x0 = rQ2*cos(theta/3.0) - a1_3
- x1 = rQ2*cos((theta+2.0*pi)/3.0) - a1_3
- x2 = rQ2*cos((theta+4.0*pi)/3.0) - a1_3
+ theta = acos(max(min(R / sqrt(Q3), 1.0), -1.0))
+ rQ2 = -2.0 * sqrt(Q)
+ a1_3 = a1 / 3.0
+ x0 = rQ2 * cos(theta / 3.0) - a1_3
+ x1 = rQ2 * cos((theta + 2.0 * pi) / 3.0) - a1_3
+ x2 = rQ2 * cos((theta + 4.0 * pi) / 3.0) - a1_3
x0, x1, x2 = sorted([x0, x1, x2])
# Merge roots that are close-enough
if x1 - x0 < epsilon and x2 - x1 < epsilon:
- x0 = x1 = x2 = round((x0 + x1 + x2) / 3., epsilonDigits)
+ x0 = x1 = x2 = round((x0 + x1 + x2) / 3.0, epsilonDigits)
elif x1 - x0 < epsilon:
- x0 = x1 = round((x0 + x1) / 2., epsilonDigits)
+ x0 = x1 = round((x0 + x1) / 2.0, epsilonDigits)
x2 = round(x2, epsilonDigits)
elif x2 - x1 < epsilon:
x0 = round(x0, epsilonDigits)
- x1 = x2 = round((x1 + x2) / 2., epsilonDigits)
+ x1 = x2 = round((x1 + x2) / 2.0, epsilonDigits)
else:
x0 = round(x0, epsilonDigits)
x1 = round(x1, epsilonDigits)
x2 = round(x2, epsilonDigits)
return [x0, x1, x2]
else:
- x = pow(sqrt(R2_Q3)+abs(R), 1/3.0)
- x = x + Q/x
+ x = pow(sqrt(R2_Q3) + abs(R), 1 / 3.0)
+ x = x + Q / x
if R >= 0.0:
x = -x
- x = round(x - a1/3.0, epsilonDigits)
+ x = round(x - a1 / 3.0, epsilonDigits)
return [x]
@@ -699,6 +747,7 @@
# Conversion routines for points to parameters and vice versa
#
+
def calcQuadraticParameters(pt1, pt2, pt3):
x2, y2 = pt2
x3, y3 = pt3
@@ -753,17 +802,406 @@
return (x1, y1), (x2, y2), (x3, y3), (x4, y4)
+#
+# Point at time
+#
+
+
+def linePointAtT(pt1, pt2, t):
+ """Finds the point at time `t` on a line.
+
+ Args:
+ pt1, pt2: Coordinates of the line as 2D tuples.
+ t: The time along the line.
+
+ Returns:
+ A 2D tuple with the coordinates of the point.
+ """
+ return ((pt1[0] * (1 - t) + pt2[0] * t), (pt1[1] * (1 - t) + pt2[1] * t))
+
+
+def quadraticPointAtT(pt1, pt2, pt3, t):
+ """Finds the point at time `t` on a quadratic curve.
+
+ Args:
+ pt1, pt2, pt3: Coordinates of the curve as 2D tuples.
+ t: The time along the curve.
+
+ Returns:
+ A 2D tuple with the coordinates of the point.
+ """
+ x = (1 - t) * (1 - t) * pt1[0] + 2 * (1 - t) * t * pt2[0] + t * t * pt3[0]
+ y = (1 - t) * (1 - t) * pt1[1] + 2 * (1 - t) * t * pt2[1] + t * t * pt3[1]
+ return (x, y)
+
+
+def cubicPointAtT(pt1, pt2, pt3, pt4, t):
+ """Finds the point at time `t` on a cubic curve.
+
+ Args:
+ pt1, pt2, pt3, pt4: Coordinates of the curve as 2D tuples.
+ t: The time along the curve.
+
+ Returns:
+ A 2D tuple with the coordinates of the point.
+ """
+ x = (
+ (1 - t) * (1 - t) * (1 - t) * pt1[0]
+ + 3 * (1 - t) * (1 - t) * t * pt2[0]
+ + 3 * (1 - t) * t * t * pt3[0]
+ + t * t * t * pt4[0]
+ )
+ y = (
+ (1 - t) * (1 - t) * (1 - t) * pt1[1]
+ + 3 * (1 - t) * (1 - t) * t * pt2[1]
+ + 3 * (1 - t) * t * t * pt3[1]
+ + t * t * t * pt4[1]
+ )
+ return (x, y)
+
+
+def segmentPointAtT(seg, t):
+ if len(seg) == 2:
+ return linePointAtT(*seg, t)
+ elif len(seg) == 3:
+ return quadraticPointAtT(*seg, t)
+ elif len(seg) == 4:
+ return cubicPointAtT(*seg, t)
+ raise ValueError("Unknown curve degree")
+
+
+#
+# Intersection finders
+#
+
+
+def _line_t_of_pt(s, e, pt):
+ sx, sy = s
+ ex, ey = e
+ px, py = pt
+ if not math.isclose(sx, ex):
+ return (px - sx) / (ex - sx)
+ if not math.isclose(sy, ey):
+ return (py - sy) / (ey - sy)
+ # Line is a point!
+ return -1
+
+
+def _both_points_are_on_same_side_of_origin(a, b, origin):
+ xDiff = (a[0] - origin[0]) * (b[0] - origin[0])
+ yDiff = (a[1] - origin[1]) * (b[1] - origin[1])
+ return not (xDiff <= 0.0 and yDiff <= 0.0)
+
+
+def lineLineIntersections(s1, e1, s2, e2):
+ """Finds intersections between two line segments.
+
+ Args:
+ s1, e1: Coordinates of the first line as 2D tuples.
+ s2, e2: Coordinates of the second line as 2D tuples.
+
+ Returns:
+ A list of ``Intersection`` objects, each object having ``pt``, ``t1``
+ and ``t2`` attributes containing the intersection point, time on first
+ segment and time on second segment respectively.
+
+ Examples::
+
+ >>> a = lineLineIntersections( (310,389), (453, 222), (289, 251), (447, 367))
+ >>> len(a)
+ 1
+ >>> intersection = a[0]
+ >>> intersection.pt
+ (374.44882952482897, 313.73458370177315)
+ >>> (intersection.t1, intersection.t2)
+ (0.45069111555824454, 0.5408153767394238)
+ """
+ s1x, s1y = s1
+ e1x, e1y = e1
+ s2x, s2y = s2
+ e2x, e2y = e2
+ if (
+ math.isclose(s2x, e2x) and math.isclose(s1x, e1x) and not math.isclose(s1x, s2x)
+ ): # Parallel vertical
+ return []
+ if (
+ math.isclose(s2y, e2y) and math.isclose(s1y, e1y) and not math.isclose(s1y, s2y)
+ ): # Parallel horizontal
+ return []
+ if math.isclose(s2x, e2x) and math.isclose(s2y, e2y): # Line segment is tiny
+ return []
+ if math.isclose(s1x, e1x) and math.isclose(s1y, e1y): # Line segment is tiny
+ return []
+ if math.isclose(e1x, s1x):
+ x = s1x
+ slope34 = (e2y - s2y) / (e2x - s2x)
+ y = slope34 * (x - s2x) + s2y
+ pt = (x, y)
+ return [
+ Intersection(
+ pt=pt, t1=_line_t_of_pt(s1, e1, pt), t2=_line_t_of_pt(s2, e2, pt)
+ )
+ ]
+ if math.isclose(s2x, e2x):
+ x = s2x
+ slope12 = (e1y - s1y) / (e1x - s1x)
+ y = slope12 * (x - s1x) + s1y
+ pt = (x, y)
+ return [
+ Intersection(
+ pt=pt, t1=_line_t_of_pt(s1, e1, pt), t2=_line_t_of_pt(s2, e2, pt)
+ )
+ ]
+
+ slope12 = (e1y - s1y) / (e1x - s1x)
+ slope34 = (e2y - s2y) / (e2x - s2x)
+ if math.isclose(slope12, slope34):
+ return []
+ x = (slope12 * s1x - s1y - slope34 * s2x + s2y) / (slope12 - slope34)
+ y = slope12 * (x - s1x) + s1y
+ pt = (x, y)
+ if _both_points_are_on_same_side_of_origin(
+ pt, e1, s1
+ ) and _both_points_are_on_same_side_of_origin(pt, s2, e2):
+ return [
+ Intersection(
+ pt=pt, t1=_line_t_of_pt(s1, e1, pt), t2=_line_t_of_pt(s2, e2, pt)
+ )
+ ]
+ return []
+
+
+def _alignment_transformation(segment):
+ # Returns a transformation which aligns a segment horizontally at the
+ # origin. Apply this transformation to curves and root-find to find
+ # intersections with the segment.
+ start = segment[0]
+ end = segment[-1]
+ angle = math.atan2(end[1] - start[1], end[0] - start[0])
+ return Identity.rotate(-angle).translate(-start[0], -start[1])
+
+
+def _curve_line_intersections_t(curve, line):
+ aligned_curve = _alignment_transformation(line).transformPoints(curve)
+ if len(curve) == 3:
+ a, b, c = calcQuadraticParameters(*aligned_curve)
+ intersections = solveQuadratic(a[1], b[1], c[1])
+ elif len(curve) == 4:
+ a, b, c, d = calcCubicParameters(*aligned_curve)
+ intersections = solveCubic(a[1], b[1], c[1], d[1])
+ else:
+ raise ValueError("Unknown curve degree")
+ return sorted(i for i in intersections if 0.0 <= i <= 1)
+
+
+def curveLineIntersections(curve, line):
+ """Finds intersections between a curve and a line.
+
+ Args:
+ curve: List of coordinates of the curve segment as 2D tuples.
+ line: List of coordinates of the line segment as 2D tuples.
+
+ Returns:
+ A list of ``Intersection`` objects, each object having ``pt``, ``t1``
+ and ``t2`` attributes containing the intersection point, time on first
+ segment and time on second segment respectively.
+
+ Examples::
+ >>> curve = [ (100, 240), (30, 60), (210, 230), (160, 30) ]
+ >>> line = [ (25, 260), (230, 20) ]
+ >>> intersections = curveLineIntersections(curve, line)
+ >>> len(intersections)
+ 3
+ >>> intersections[0].pt
+ (84.90010344084885, 189.87306176459828)
+ """
+ if len(curve) == 3:
+ pointFinder = quadraticPointAtT
+ elif len(curve) == 4:
+ pointFinder = cubicPointAtT
+ else:
+ raise ValueError("Unknown curve degree")
+ intersections = []
+ for t in _curve_line_intersections_t(curve, line):
+ pt = pointFinder(*curve, t)
+ intersections.append(Intersection(pt=pt, t1=t, t2=_line_t_of_pt(*line, pt)))
+ return intersections
+
+
+def _curve_bounds(c):
+ if len(c) == 3:
+ return calcQuadraticBounds(*c)
+ elif len(c) == 4:
+ return calcCubicBounds(*c)
+ raise ValueError("Unknown curve degree")
+
+
+def _split_segment_at_t(c, t):
+ if len(c) == 2:
+ s, e = c
+ midpoint = linePointAtT(s, e, t)
+ return [(s, midpoint), (midpoint, e)]
+ if len(c) == 3:
+ return splitQuadraticAtT(*c, t)
+ elif len(c) == 4:
+ return splitCubicAtT(*c, t)
+ raise ValueError("Unknown curve degree")
+
+
+def _curve_curve_intersections_t(
+ curve1, curve2, precision=1e-3, range1=None, range2=None
+):
+ bounds1 = _curve_bounds(curve1)
+ bounds2 = _curve_bounds(curve2)
+
+ if not range1:
+ range1 = (0.0, 1.0)
+ if not range2:
+ range2 = (0.0, 1.0)
+
+ # If bounds don't intersect, go home
+ intersects, _ = sectRect(bounds1, bounds2)
+ if not intersects:
+ return []
+
+ def midpoint(r):
+ return 0.5 * (r[0] + r[1])
+
+ # If they do overlap but they're tiny, approximate
+ if rectArea(bounds1) < precision and rectArea(bounds2) < precision:
+ return [(midpoint(range1), midpoint(range2))]
+
+ c11, c12 = _split_segment_at_t(curve1, 0.5)
+ c11_range = (range1[0], midpoint(range1))
+ c12_range = (midpoint(range1), range1[1])
+
+ c21, c22 = _split_segment_at_t(curve2, 0.5)
+ c21_range = (range2[0], midpoint(range2))
+ c22_range = (midpoint(range2), range2[1])
+
+ found = []
+ found.extend(
+ _curve_curve_intersections_t(
+ c11, c21, precision, range1=c11_range, range2=c21_range
+ )
+ )
+ found.extend(
+ _curve_curve_intersections_t(
+ c12, c21, precision, range1=c12_range, range2=c21_range
+ )
+ )
+ found.extend(
+ _curve_curve_intersections_t(
+ c11, c22, precision, range1=c11_range, range2=c22_range
+ )
+ )
+ found.extend(
+ _curve_curve_intersections_t(
+ c12, c22, precision, range1=c12_range, range2=c22_range
+ )
+ )
+
+ unique_key = lambda ts: (int(ts[0] / precision), int(ts[1] / precision))
+ seen = set()
+ unique_values = []
+
+ for ts in found:
+ key = unique_key(ts)
+ if key in seen:
+ continue
+ seen.add(key)
+ unique_values.append(ts)
+
+ return unique_values
+
+
+def curveCurveIntersections(curve1, curve2):
+ """Finds intersections between a curve and a curve.
+
+ Args:
+ curve1: List of coordinates of the first curve segment as 2D tuples.
+ curve2: List of coordinates of the second curve segment as 2D tuples.
+
+ Returns:
+ A list of ``Intersection`` objects, each object having ``pt``, ``t1``
+ and ``t2`` attributes containing the intersection point, time on first
+ segment and time on second segment respectively.
+
+ Examples::
+ >>> curve1 = [ (10,100), (90,30), (40,140), (220,220) ]
+ >>> curve2 = [ (5,150), (180,20), (80,250), (210,190) ]
+ >>> intersections = curveCurveIntersections(curve1, curve2)
+ >>> len(intersections)
+ 3
+ >>> intersections[0].pt
+ (81.7831487395506, 109.88904552375288)
+ """
+ intersection_ts = _curve_curve_intersections_t(curve1, curve2)
+ return [
+ Intersection(pt=segmentPointAtT(curve1, ts[0]), t1=ts[0], t2=ts[1])
+ for ts in intersection_ts
+ ]
+
+
+def segmentSegmentIntersections(seg1, seg2):
+ """Finds intersections between two segments.
+
+ Args:
+ seg1: List of coordinates of the first segment as 2D tuples.
+ seg2: List of coordinates of the second segment as 2D tuples.
+
+ Returns:
+ A list of ``Intersection`` objects, each object having ``pt``, ``t1``
+ and ``t2`` attributes containing the intersection point, time on first
+ segment and time on second segment respectively.
+
+ Examples::
+ >>> curve1 = [ (10,100), (90,30), (40,140), (220,220) ]
+ >>> curve2 = [ (5,150), (180,20), (80,250), (210,190) ]
+ >>> intersections = segmentSegmentIntersections(curve1, curve2)
+ >>> len(intersections)
+ 3
+ >>> intersections[0].pt
+ (81.7831487395506, 109.88904552375288)
+ >>> curve3 = [ (100, 240), (30, 60), (210, 230), (160, 30) ]
+ >>> line = [ (25, 260), (230, 20) ]
+ >>> intersections = segmentSegmentIntersections(curve3, line)
+ >>> len(intersections)
+ 3
+ >>> intersections[0].pt
+ (84.90010344084885, 189.87306176459828)
+
+ """
+ # Arrange by degree
+ swapped = False
+ if len(seg2) > len(seg1):
+ seg2, seg1 = seg1, seg2
+ swapped = True
+ if len(seg1) > 2:
+ if len(seg2) > 2:
+ intersections = curveCurveIntersections(seg1, seg2)
+ else:
+ intersections = curveLineIntersections(seg1, seg2)
+ elif len(seg1) == 2 and len(seg2) == 2:
+ intersections = lineLineIntersections(*seg1, *seg2)
+ else:
+ raise ValueError("Couldn't work out which intersection function to use")
+ if not swapped:
+ return intersections
+ return [Intersection(pt=i.pt, t1=i.t2, t2=i.t1) for i in intersections]
+
+
def _segmentrepr(obj):
"""
- >>> _segmentrepr([1, [2, 3], [], [[2, [3, 4], [0.1, 2.2]]]])
- '(1, (2, 3), (), ((2, (3, 4), (0.1, 2.2))))'
+ >>> _segmentrepr([1, [2, 3], [], [[2, [3, 4], [0.1, 2.2]]]])
+ '(1, (2, 3), (), ((2, (3, 4), (0.1, 2.2))))'
"""
try:
it = iter(obj)
except TypeError:
return "%g" % obj
else:
- return "(%s)" % ", ".join([_segmentrepr(x) for x in it])
+ return "(%s)" % ", ".join(_segmentrepr(x) for x in it)
def printSegments(segments):
@@ -773,7 +1211,9 @@
for segment in segments:
print(_segmentrepr(segment))
+
if __name__ == "__main__":
import sys
import doctest
+
sys.exit(doctest.testmod().failed)
diff --git a/Lib/fontTools/misc/classifyTools.py b/Lib/fontTools/misc/classifyTools.py
index 7310118..ae88a8f 100644
--- a/Lib/fontTools/misc/classifyTools.py
+++ b/Lib/fontTools/misc/classifyTools.py
@@ -1,7 +1,6 @@
""" fontTools.misc.classifyTools.py -- tools for classifying things.
"""
-from fontTools.misc.py23 import *
class Classifier(object):
diff --git a/Lib/fontTools/misc/cliTools.py b/Lib/fontTools/misc/cliTools.py
index 4e5353b..e8c1767 100644
--- a/Lib/fontTools/misc/cliTools.py
+++ b/Lib/fontTools/misc/cliTools.py
@@ -1,5 +1,4 @@
"""Collection of utilities for command-line interfaces and console scripts."""
-from fontTools.misc.py23 import *
import os
import re
diff --git a/Lib/fontTools/misc/dictTools.py b/Lib/fontTools/misc/dictTools.py
index 4752868..ae7932c 100644
--- a/Lib/fontTools/misc/dictTools.py
+++ b/Lib/fontTools/misc/dictTools.py
@@ -1,6 +1,5 @@
"""Misc dict tools."""
-from fontTools.misc.py23 import *
__all__ = ['hashdict']
diff --git a/Lib/fontTools/misc/eexec.py b/Lib/fontTools/misc/eexec.py
index 36719a1..71f733c 100644
--- a/Lib/fontTools/misc/eexec.py
+++ b/Lib/fontTools/misc/eexec.py
@@ -12,7 +12,8 @@
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, bytesjoin, byteord
+
def _decryptChar(cipher, R):
cipher = byteord(cipher)
diff --git a/Lib/fontTools/misc/encodingTools.py b/Lib/fontTools/misc/encodingTools.py
index 438e484..eccf951 100644
--- a/Lib/fontTools/misc/encodingTools.py
+++ b/Lib/fontTools/misc/encodingTools.py
@@ -1,7 +1,6 @@
"""fontTools.misc.encodingTools.py -- tools for working with OpenType encodings.
"""
-from fontTools.misc.py23 import *
import fontTools.encodings.codecs
# Map keyed by platformID, then platEncID, then possibly langID
diff --git a/Lib/fontTools/misc/etree.py b/Lib/fontTools/misc/etree.py
index 2338f09..6e943e4 100644
--- a/Lib/fontTools/misc/etree.py
+++ b/Lib/fontTools/misc/etree.py
@@ -11,7 +11,7 @@
only availble in lxml, like OrderedDict for attributes, pretty_print and
iterwalk.
"""
-from fontTools.misc.py23 import basestring, unicode, tounicode, open
+from fontTools.misc.py23 import unicode, tostr
XML_DECLARATION = """<?xml version='1.0' encoding='%s'?>"""
@@ -242,7 +242,7 @@
Reject all bytes input that contains non-ASCII characters.
"""
try:
- s = tounicode(s, encoding="ascii", errors="strict")
+ s = tostr(s, encoding="ascii", errors="strict")
except UnicodeDecodeError:
raise ValueError(
"Bytes strings can only contain ASCII characters. "
@@ -356,7 +356,7 @@
if isinstance(tag, QName):
if tag.text not in qnames:
add_qname(tag.text)
- elif isinstance(tag, basestring):
+ elif isinstance(tag, str):
if tag not in qnames:
add_qname(tag)
elif tag is not None and tag is not Comment and tag is not PI:
diff --git a/Lib/fontTools/misc/filenames.py b/Lib/fontTools/misc/filenames.py
index f7eb247..0f01000 100644
--- a/Lib/fontTools/misc/filenames.py
+++ b/Lib/fontTools/misc/filenames.py
@@ -16,7 +16,7 @@
- Tal Leming
- Just van Rossum
"""
-from fontTools.misc.py23 import basestring, unicode
+
illegalCharacters = r"\" * + / : < > ? [ \ ] | \0".split(" ")
illegalCharacters += [chr(i) for i in range(1, 32)]
@@ -95,9 +95,9 @@
>>> userNameToFileName("alt.con") == "alt._con"
True
"""
- # the incoming name must be a unicode string
- if not isinstance(userName, unicode):
- raise ValueError("The value for userName must be a unicode string.")
+ # the incoming name must be a str
+ if not isinstance(userName, str):
+ raise ValueError("The value for userName must be a string.")
# establish the prefix and suffix lengths
prefixLength = len(prefix)
suffixLength = len(suffix)
diff --git a/Lib/fontTools/misc/fixedTools.py b/Lib/fontTools/misc/fixedTools.py
index 931b665..f0474ab 100644
--- a/Lib/fontTools/misc/fixedTools.py
+++ b/Lib/fontTools/misc/fixedTools.py
@@ -17,15 +17,13 @@
The maximum value that can still fit in an F2Dot14. (1.99993896484375)
"""
-from fontTools.misc.py23 import *
-import math
+from .roundTools import otRound
import logging
log = logging.getLogger(__name__)
__all__ = [
"MAX_F2DOT14",
- "otRound",
"fixedToFloat",
"floatToFixed",
"floatToFixedToFloat",
@@ -41,30 +39,6 @@
MAX_F2DOT14 = 0x7FFF / (1 << 14)
-def otRound(value):
- """Round float value to nearest integer towards ``+Infinity``.
-
- The OpenType spec (in the section on `"normalization" of OpenType Font Variations <https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview#coordinate-scales-and-normalization>`_)
- defines the required method for converting floating point values to
- fixed-point. In particular it specifies the following rounding strategy:
-
- for fractional values of 0.5 and higher, take the next higher integer;
- for other fractional values, truncate.
-
- This function rounds the floating-point value according to this strategy
- in preparation for conversion to fixed-point.
-
- Args:
- value (float): The input floating-point value.
-
- Returns
- float: The rounded value.
- """
- # See this thread for how we ended up with this implementation:
- # https://github.com/fonttools/fonttools/issues/1248#issuecomment-383198166
- return int(math.floor(value + 0.5))
-
-
def fixedToFloat(value, precisionBits):
"""Converts a fixed-point number to a float given the number of
precision bits.
diff --git a/Lib/fontTools/misc/intTools.py b/Lib/fontTools/misc/intTools.py
index 9f4497b..448e162 100644
--- a/Lib/fontTools/misc/intTools.py
+++ b/Lib/fontTools/misc/intTools.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
__all__ = ['popCount']
diff --git a/Lib/fontTools/misc/loggingTools.py b/Lib/fontTools/misc/loggingTools.py
index 3281d42..d1baa83 100644
--- a/Lib/fontTools/misc/loggingTools.py
+++ b/Lib/fontTools/misc/loggingTools.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import sys
import logging
import timeit
@@ -60,7 +59,7 @@
"only '%' percent style is supported in both python 2 and 3")
if fmt is None:
fmt = DEFAULT_FORMATS
- if isinstance(fmt, basestring):
+ if isinstance(fmt, str):
default_format = fmt
custom_formats = {}
elif isinstance(fmt, Mapping):
@@ -151,7 +150,7 @@
handlers = [h]
# By default, the top-level library logger is configured.
logger = kwargs.pop("logger", "fontTools")
- if not logger or isinstance(logger, basestring):
+ if not logger or isinstance(logger, str):
# empty "" or None means the 'root' logger
logger = logging.getLogger(logger)
# before (re)configuring, reset named logger and its children (if exist)
@@ -436,7 +435,7 @@
def __init__(self, logger, level):
super(CapturingLogHandler, self).__init__(level=level)
self.records = []
- if isinstance(logger, basestring):
+ if isinstance(logger, str):
self.logger = logging.getLogger(logger)
else:
self.logger = logger
diff --git a/Lib/fontTools/misc/macCreatorType.py b/Lib/fontTools/misc/macCreatorType.py
index c28ceb9..fb23720 100644
--- a/Lib/fontTools/misc/macCreatorType.py
+++ b/Lib/fontTools/misc/macCreatorType.py
@@ -1,5 +1,4 @@
-from fontTools.misc.py23 import *
-import sys
+from fontTools.misc.py23 import Tag, bytesjoin, strjoin
try:
import xattr
except ImportError:
diff --git a/Lib/fontTools/misc/macRes.py b/Lib/fontTools/misc/macRes.py
index 0053ee3..2c15b34 100644
--- a/Lib/fontTools/misc/macRes.py
+++ b/Lib/fontTools/misc/macRes.py
@@ -1,4 +1,5 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, tostr
+from io import BytesIO
import struct
from fontTools.misc import sstruct
from collections import OrderedDict
diff --git a/Lib/fontTools/misc/plistlib/__init__.py b/Lib/fontTools/misc/plistlib/__init__.py
index d839104..84dc418 100644
--- a/Lib/fontTools/misc/plistlib/__init__.py
+++ b/Lib/fontTools/misc/plistlib/__init__.py
@@ -1,5 +1,4 @@
import collections.abc
-import sys
import re
from typing import (
Any,
@@ -24,10 +23,8 @@
from fontTools.misc import etree
-from fontTools.misc.py23 import (
- tounicode,
- tobytes,
-)
+from fontTools.misc.py23 import tostr
+
# By default, we
# - deserialize <data> elements as bytes and
@@ -368,7 +365,7 @@
continue
raise TypeError("keys must be strings")
k = etree.SubElement(el, "key")
- k.text = tounicode(key, "utf-8")
+ k.text = tostr(key, "utf-8")
el.append(_make_element(value, ctx))
ctx.indent_level -= 1
return el
diff --git a/Lib/fontTools/misc/psCharStrings.py b/Lib/fontTools/misc/psCharStrings.py
index 5f1427d..cb67505 100644
--- a/Lib/fontTools/misc/psCharStrings.py
+++ b/Lib/fontTools/misc/psCharStrings.py
@@ -2,7 +2,7 @@
CFF dictionary data and Type1/Type2 CharStrings.
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin, strjoin
from fontTools.misc.fixedTools import (
fixedToFloat, floatToFixed, floatToFixedToStr, strToFixedToFloat,
)
@@ -997,7 +997,7 @@
# If present, remove return and endchar operators.
if program and program[-1] in ("return", "endchar"):
program = program[:-1]
- elif program and not isinstance(program[-1], basestring):
+ elif program and not isinstance(program[-1], str):
raise CharStringCompileError(
"T2CharString or Subr has items on the stack after last operator."
)
@@ -1010,7 +1010,7 @@
while i < end:
token = program[i]
i = i + 1
- if isinstance(token, basestring):
+ if isinstance(token, str):
try:
bytecode.extend(bytechr(b) for b in opcodes[token])
except KeyError:
@@ -1043,8 +1043,7 @@
self.program = None
def getToken(self, index,
- len=len, byteord=byteord, basestring=basestring,
- isinstance=isinstance):
+ len=len, byteord=byteord, isinstance=isinstance):
if self.bytecode is not None:
if index >= len(self.bytecode):
return None, 0, 0
@@ -1057,7 +1056,7 @@
return None, 0, 0
token = self.program[index]
index = index + 1
- isOperator = isinstance(token, basestring)
+ isOperator = isinstance(token, str)
return token, isOperator, index
def getBytes(self, index, nBytes):
diff --git a/Lib/fontTools/misc/psLib.py b/Lib/fontTools/misc/psLib.py
index e474830..916755c 100644
--- a/Lib/fontTools/misc/psLib.py
+++ b/Lib/fontTools/misc/psLib.py
@@ -1,6 +1,21 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin, tobytes, tostr
from fontTools.misc import eexec
-from .psOperators import *
+from .psOperators import (
+ PSOperators,
+ ps_StandardEncoding,
+ ps_array,
+ ps_boolean,
+ ps_dict,
+ ps_integer,
+ ps_literal,
+ ps_mark,
+ ps_name,
+ ps_operator,
+ ps_procedure,
+ ps_procmark,
+ ps_real,
+ ps_string,
+)
import re
from collections.abc import Callable
from string import whitespace
diff --git a/Lib/fontTools/misc/psOperators.py b/Lib/fontTools/misc/psOperators.py
index de278fd..3b378f5 100644
--- a/Lib/fontTools/misc/psOperators.py
+++ b/Lib/fontTools/misc/psOperators.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
_accessstrings = {0: "", 1: "readonly", 2: "executeonly", 3: "noaccess"}
diff --git a/Lib/fontTools/misc/py23.py b/Lib/fontTools/misc/py23.py
index bced800..9096e2e 100644
--- a/Lib/fontTools/misc/py23.py
+++ b/Lib/fontTools/misc/py23.py
@@ -9,7 +9,7 @@
from types import SimpleNamespace
warnings.warn(
- "The py23 module has been deprecated and will be removed in the next release. "
+ "The py23 module has been deprecated and will be removed in a future release. "
"Please update your code.",
DeprecationWarning,
)
diff --git a/Lib/fontTools/misc/roundTools.py b/Lib/fontTools/misc/roundTools.py
new file mode 100644
index 0000000..c1d546f
--- /dev/null
+++ b/Lib/fontTools/misc/roundTools.py
@@ -0,0 +1,58 @@
+"""
+Various round-to-integer helpers.
+"""
+
+import math
+import functools
+import logging
+
+log = logging.getLogger(__name__)
+
+__all__ = [
+ "noRound",
+ "otRound",
+ "maybeRound",
+ "roundFunc",
+]
+
+def noRound(value):
+ return value
+
+def otRound(value):
+ """Round float value to nearest integer towards ``+Infinity``.
+
+ The OpenType spec (in the section on `"normalization" of OpenType Font Variations <https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview#coordinate-scales-and-normalization>`_)
+ defines the required method for converting floating point values to
+ fixed-point. In particular it specifies the following rounding strategy:
+
+ for fractional values of 0.5 and higher, take the next higher integer;
+ for other fractional values, truncate.
+
+ This function rounds the floating-point value according to this strategy
+ in preparation for conversion to fixed-point.
+
+ Args:
+ value (float): The input floating-point value.
+
+ Returns
+ float: The rounded value.
+ """
+ # See this thread for how we ended up with this implementation:
+ # https://github.com/fonttools/fonttools/issues/1248#issuecomment-383198166
+ return int(math.floor(value + 0.5))
+
+def maybeRound(v, tolerance, round=otRound):
+ rounded = round(v)
+ return rounded if abs(rounded - v) <= tolerance else v
+
+def roundFunc(tolerance, round=otRound):
+ if tolerance < 0:
+ raise ValueError("Rounding tolerance must be positive")
+
+ if tolerance == 0:
+ return noRound
+
+ if tolerance >= .5:
+ return round
+
+ return functools.partial(maybeRound, tolerance=tolerance, round=round)
diff --git a/Lib/fontTools/misc/sstruct.py b/Lib/fontTools/misc/sstruct.py
index 8b69a42..ba1f878 100644
--- a/Lib/fontTools/misc/sstruct.py
+++ b/Lib/fontTools/misc/sstruct.py
@@ -46,7 +46,7 @@
it returns the size of the data in bytes.
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes, tostr
from fontTools.misc.fixedTools import fixedToFloat as fi2fl, floatToFixed as fl2fi
import struct
import re
@@ -68,7 +68,7 @@
if name in fixes:
# fixed point conversion
value = fl2fi(value, fixes[name])
- elif isinstance(value, basestring):
+ elif isinstance(value, str):
value = tobytes(value)
elements.append(value)
data = struct.pack(*(formatstring,) + tuple(elements))
diff --git a/Lib/fontTools/misc/symfont.py b/Lib/fontTools/misc/symfont.py
index d3e5ce2..a1a8730 100644
--- a/Lib/fontTools/misc/symfont.py
+++ b/Lib/fontTools/misc/symfont.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
from functools import partial
from itertools import count
@@ -112,8 +111,7 @@
def printGreenPen(penName, funcs, file=sys.stdout):
print(
-'''from fontTools.misc.py23 import *
-from fontTools.pens.basePen import BasePen
+'''from fontTools.pens.basePen import BasePen
class %s(BasePen):
diff --git a/Lib/fontTools/misc/testTools.py b/Lib/fontTools/misc/testTools.py
index be9bc85..1b258e3 100644
--- a/Lib/fontTools/misc/testTools.py
+++ b/Lib/fontTools/misc/testTools.py
@@ -1,12 +1,13 @@
"""Helpers for writing unit tests."""
from collections.abc import Iterable
+from io import BytesIO
import os
import shutil
import sys
import tempfile
from unittest import TestCase as _TestCase
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes
from fontTools.misc.xmlWriter import XMLWriter
@@ -25,7 +26,7 @@
xml = b"<root>"
if isinstance(xmlSnippet, bytes):
xml += xmlSnippet
- elif isinstance(xmlSnippet, unicode):
+ elif isinstance(xmlSnippet, str):
xml += tobytes(xmlSnippet, 'utf-8')
elif isinstance(xmlSnippet, Iterable):
xml += b"".join(tobytes(s, 'utf-8') for s in xmlSnippet)
diff --git a/Lib/fontTools/misc/textTools.py b/Lib/fontTools/misc/textTools.py
index 6a047ae..072976a 100644
--- a/Lib/fontTools/misc/textTools.py
+++ b/Lib/fontTools/misc/textTools.py
@@ -1,7 +1,7 @@
"""fontTools.misc.textTools.py -- miscellaneous routines."""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin, strjoin, tobytes
import ast
import string
@@ -12,7 +12,7 @@
def readHex(content):
"""Convert a list of hex strings to binary data."""
- return deHexStr(strjoin(chunk for chunk in content if isinstance(chunk, basestring)))
+ return deHexStr(strjoin(chunk for chunk in content if isinstance(chunk, str)))
def deHexStr(hexdata):
diff --git a/Lib/fontTools/misc/timeTools.py b/Lib/fontTools/misc/timeTools.py
index 1361382..f4b84f6 100644
--- a/Lib/fontTools/misc/timeTools.py
+++ b/Lib/fontTools/misc/timeTools.py
@@ -1,7 +1,6 @@
"""fontTools.misc.timeTools.py -- tools for working with OpenType timestamps.
"""
-from fontTools.misc.py23 import *
import os
import time
from datetime import datetime, timezone
diff --git a/Lib/fontTools/misc/vector.py b/Lib/fontTools/misc/vector.py
new file mode 100644
index 0000000..81c1484
--- /dev/null
+++ b/Lib/fontTools/misc/vector.py
@@ -0,0 +1,143 @@
+from numbers import Number
+import math
+import operator
+import warnings
+
+
+__all__ = ["Vector"]
+
+
+class Vector(tuple):
+
+ """A math-like vector.
+
+ Represents an n-dimensional numeric vector. ``Vector`` objects support
+ vector addition and subtraction, scalar multiplication and division,
+ negation, rounding, and comparison tests.
+ """
+
+ __slots__ = ()
+
+ def __new__(cls, values, keep=False):
+ if keep is not False:
+ warnings.warn(
+ "the 'keep' argument has been deprecated",
+ DeprecationWarning,
+ )
+ if type(values) == Vector:
+ # No need to create a new object
+ return values
+ return super().__new__(cls, values)
+
+ def __repr__(self):
+ return f"{self.__class__.__name__}({super().__repr__()})"
+
+ def _vectorOp(self, other, op):
+ if isinstance(other, Vector):
+ assert len(self) == len(other)
+ return self.__class__(op(a, b) for a, b in zip(self, other))
+ if isinstance(other, Number):
+ return self.__class__(op(v, other) for v in self)
+ raise NotImplementedError()
+
+ def _scalarOp(self, other, op):
+ if isinstance(other, Number):
+ return self.__class__(op(v, other) for v in self)
+ raise NotImplementedError()
+
+ def _unaryOp(self, op):
+ return self.__class__(op(v) for v in self)
+
+ def __add__(self, other):
+ return self._vectorOp(other, operator.add)
+
+ __radd__ = __add__
+
+ def __sub__(self, other):
+ return self._vectorOp(other, operator.sub)
+
+ def __rsub__(self, other):
+ return self._vectorOp(other, _operator_rsub)
+
+ def __mul__(self, other):
+ return self._scalarOp(other, operator.mul)
+
+ __rmul__ = __mul__
+
+ def __truediv__(self, other):
+ return self._scalarOp(other, operator.truediv)
+
+ def __rtruediv__(self, other):
+ return self._scalarOp(other, _operator_rtruediv)
+
+ def __pos__(self):
+ return self._unaryOp(operator.pos)
+
+ def __neg__(self):
+ return self._unaryOp(operator.neg)
+
+ def __round__(self, *, round=round):
+ return self._unaryOp(round)
+
+ def __eq__(self, other):
+ if isinstance(other, list):
+ # bw compat Vector([1, 2, 3]) == [1, 2, 3]
+ other = tuple(other)
+ return super().__eq__(other)
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ def __bool__(self):
+ return any(self)
+
+ __nonzero__ = __bool__
+
+ def __abs__(self):
+ return math.sqrt(sum(x * x for x in self))
+
+ def length(self):
+ """Return the length of the vector. Equivalent to abs(vector)."""
+ return abs(self)
+
+ def normalized(self):
+ """Return the normalized vector of the vector."""
+ return self / abs(self)
+
+ def dot(self, other):
+ """Performs vector dot product, returning the sum of
+ ``a[0] * b[0], a[1] * b[1], ...``"""
+ assert len(self) == len(other)
+ return sum(a * b for a, b in zip(self, other))
+
+ # Deprecated methods/properties
+
+ def toInt(self):
+ warnings.warn(
+ "the 'toInt' method has been deprecated, use round(vector) instead",
+ DeprecationWarning,
+ )
+ return self.__round__()
+
+ @property
+ def values(self):
+ warnings.warn(
+ "the 'values' attribute has been deprecated, use "
+ "the vector object itself instead",
+ DeprecationWarning,
+ )
+ return list(self)
+
+ @values.setter
+ def values(self, values):
+ raise AttributeError(
+ "can't set attribute, the 'values' attribute has been deprecated",
+ )
+
+
+def _operator_rsub(a, b):
+ return operator.sub(b, a)
+
+
+def _operator_rtruediv(a, b):
+ return operator.truediv(b, a)
diff --git a/Lib/fontTools/misc/xmlReader.py b/Lib/fontTools/misc/xmlReader.py
index 406bba2..b2707e9 100644
--- a/Lib/fontTools/misc/xmlReader.py
+++ b/Lib/fontTools/misc/xmlReader.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools import ttLib
from fontTools.misc.textTools import safeEval
from fontTools.ttLib.tables.DefaultTable import DefaultTable
diff --git a/Lib/fontTools/misc/xmlWriter.py b/Lib/fontTools/misc/xmlWriter.py
index 6ab8469..fec127a 100644
--- a/Lib/fontTools/misc/xmlWriter.py
+++ b/Lib/fontTools/misc/xmlWriter.py
@@ -1,6 +1,6 @@
"""xmlWriter.py -- Simple XML authoring class"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import byteord, strjoin, tobytes, tostr
import sys
import os
import string
@@ -34,8 +34,8 @@
self.totype = tobytes
except TypeError:
# This better not fail.
- self.file.write(tounicode(''))
- self.totype = tounicode
+ self.file.write('')
+ self.totype = tostr
self.indentwhite = self.totype(indentwhite)
if newlinestr is None:
self.newlinestr = self.totype(os.linesep)
@@ -156,7 +156,7 @@
return ""
data = ""
for attr, value in attributes:
- if not isinstance(value, (bytes, unicode)):
+ if not isinstance(value, (bytes, str)):
value = str(value)
data = data + ' %s="%s"' % (attr, escapeattr(value))
return data
diff --git a/Lib/fontTools/mtiLib/__init__.py b/Lib/fontTools/mtiLib/__init__.py
index 8525754..667a216 100644
--- a/Lib/fontTools/mtiLib/__init__.py
+++ b/Lib/fontTools/mtiLib/__init__.py
@@ -6,7 +6,6 @@
# http://monotype.github.io/OpenType_Table_Source/otl_source.html
# https://github.com/Monotype/OpenType_Table_Source/
-from fontTools.misc.py23 import *
from fontTools import ttLib
from fontTools.ttLib.tables._c_m_a_p import cmap_classes
from fontTools.ttLib.tables import otTables as ot
diff --git a/Lib/fontTools/mtiLib/__main__.py b/Lib/fontTools/mtiLib/__main__.py
index eacfefd..fe6b638 100644
--- a/Lib/fontTools/mtiLib/__main__.py
+++ b/Lib/fontTools/mtiLib/__main__.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import sys
from fontTools.mtiLib import main
diff --git a/Lib/fontTools/otlLib/builder.py b/Lib/fontTools/otlLib/builder.py
index 029aa3f..182f7da 100644
--- a/Lib/fontTools/otlLib/builder.py
+++ b/Lib/fontTools/otlLib/builder.py
@@ -9,7 +9,9 @@
CountReference,
)
from fontTools.ttLib.tables import otBase
+from fontTools.feaLib.ast import STATNameStatement
from fontTools.otlLib.error import OpenTypeLibError
+from functools import reduce
import logging
import copy
@@ -94,9 +96,10 @@
subtables = [st for st in subtables if st is not None]
if not subtables:
return None
- assert all(t.LookupType == subtables[0].LookupType for t in subtables), (
- "all subtables must have the same LookupType; got %s"
- % repr([t.LookupType for t in subtables])
+ assert all(
+ t.LookupType == subtables[0].LookupType for t in subtables
+ ), "all subtables must have the same LookupType; got %s" % repr(
+ [t.LookupType for t in subtables]
)
self = ot.Lookup()
self.LookupType = subtables[0].LookupType
@@ -1027,7 +1030,7 @@
builder.marks["acute"] = (0, a1)
builder.marks["grave"] = (0, a1)
builder.marks["cedilla"] = (1, a2)
- builder.baseMarks["acute"] = (0, a3)
+ builder.baseMarks["acute"] = {0: a3}
Attributes:
font (``fontTools.TTLib.TTFont``): A font object.
@@ -1035,8 +1038,8 @@
source which produced this lookup.
marks: An dictionary mapping a glyph name to a two-element
tuple containing a mark class ID and ``otTables.Anchor`` object.
- baseMarks: An dictionary mapping a glyph name to a two-element
- tuple containing a mark class ID and ``otTables.Anchor`` object.
+ baseMarks: An dictionary mapping a glyph name to a dictionary
+ containing one item: a mark class ID and a ``otTables.Anchor`` object.
lookupflag (int): The lookup's flag
markFilterSet: Either ``None`` if no mark filtering set is used, or
an integer representing the filtering set to be used for this
@@ -2073,8 +2076,8 @@
classDef2.add(gc2)
self = ot.PairPos()
self.Format = 2
- self.ValueFormat1 = _getValueFormat(valueFormat1, pairs.values(), 0)
- self.ValueFormat2 = _getValueFormat(valueFormat2, pairs.values(), 1)
+ valueFormat1 = self.ValueFormat1 = _getValueFormat(valueFormat1, pairs.values(), 0)
+ valueFormat2 = self.ValueFormat2 = _getValueFormat(valueFormat2, pairs.values(), 1)
self.Coverage = buildCoverage(coverage, glyphMap)
self.ClassDef1 = classDef1.build()
self.ClassDef2 = classDef2.build()
@@ -2087,7 +2090,9 @@
self.Class1Record.append(rec1)
for c2 in classes2:
rec2 = ot.Class2Record()
- rec2.Value1, rec2.Value2 = pairs.get((c1, c2), (None, None))
+ val1, val2 = pairs.get((c1, c2), (None, None))
+ rec2.Value1 = ValueRecord(src=val1, valueFormat=valueFormat1) if valueFormat1 else None
+ rec2.Value2 = ValueRecord(src=val2, valueFormat=valueFormat2) if valueFormat2 else None
rec1.Class2Record.append(rec2)
self.Class1Count = len(self.Class1Record)
self.Class2Count = len(classes2)
@@ -2172,8 +2177,8 @@
"""
self = ot.PairPos()
self.Format = 1
- self.ValueFormat1 = _getValueFormat(valueFormat1, pairs.values(), 0)
- self.ValueFormat2 = _getValueFormat(valueFormat2, pairs.values(), 1)
+ valueFormat1 = self.ValueFormat1 = _getValueFormat(valueFormat1, pairs.values(), 0)
+ valueFormat2 = self.ValueFormat2 = _getValueFormat(valueFormat2, pairs.values(), 1)
p = {}
for (glyphA, glyphB), (valA, valB) in pairs.items():
p.setdefault(glyphA, []).append((glyphB, valA, valB))
@@ -2186,8 +2191,8 @@
for glyph2, val1, val2 in sorted(p[glyph], key=lambda x: glyphMap[x[0]]):
pvr = ot.PairValueRecord()
pvr.SecondGlyph = glyph2
- pvr.Value1 = val1 if val1 and val1.getFormat() != 0 else None
- pvr.Value2 = val2 if val2 and val2.getFormat() != 0 else None
+ pvr.Value1 = ValueRecord(src=val1, valueFormat=valueFormat1) if valueFormat1 else None
+ pvr.Value2 = ValueRecord(src=val2, valueFormat=valueFormat2) if valueFormat2 else None
ps.PairValueRecord.append(pvr)
ps.PairValueCount = len(ps.PairValueRecord)
self.PairSetCount = len(self.PairSet)
@@ -2308,10 +2313,8 @@
"""
self = ot.SinglePos()
self.Coverage = buildCoverage(values.keys(), glyphMap)
- valueRecords = [values[g] for g in self.Coverage.glyphs]
- self.ValueFormat = 0
- for v in valueRecords:
- self.ValueFormat |= v.getFormat()
+ valueFormat = self.ValueFormat = reduce(int.__or__, [v.getFormat() for v in values.values()], 0)
+ valueRecords = [ValueRecord(src=values[g], valueFormat=valueFormat) for g in self.Coverage.glyphs]
if all(v == valueRecords[0] for v in valueRecords):
self.Format = 1
if self.ValueFormat != 0:
@@ -2575,7 +2578,9 @@
self.classes_.add(glyphs)
for glyph in glyphs:
if glyph in self.glyphs_:
- raise OpenTypeLibError(f"Glyph {glyph} is already present in class.", None)
+ raise OpenTypeLibError(
+ f"Glyph {glyph} is already present in class.", None
+ )
self.glyphs_[glyph] = glyphs
def classes(self):
@@ -2687,8 +2692,8 @@
]
The optional 'elidedFallbackName' argument can be a name ID (int),
- a string, or a dictionary containing multilingual names. It
- translates to the ElidedFallbackNameID field.
+ a string, a dictionary containing multilingual names, or a list of
+ STATNameStatements. It translates to the ElidedFallbackNameID field.
The 'ttFont' argument must be a TTFont instance that already has a
'name' table. If a 'STAT' table already exists, it will be
@@ -2797,6 +2802,20 @@
names = dict(en=value)
elif isinstance(value, dict):
names = value
+ elif isinstance(value, list):
+ nameID = nameTable._findUnusedNameID()
+ for nameRecord in value:
+ if isinstance(nameRecord, STATNameStatement):
+ nameTable.setName(
+ nameRecord.string,
+ nameID,
+ nameRecord.platformID,
+ nameRecord.platEncID,
+ nameRecord.langID,
+ )
+ else:
+ raise TypeError("value must be a list of STATNameStatements")
+ return nameID
else:
- raise TypeError("value must be int, str or dict")
+ raise TypeError("value must be int, str, dict or list")
return nameTable.addMultilingualName(names, minNameID=minNameID)
diff --git a/Lib/fontTools/pens/__init__.py b/Lib/fontTools/pens/__init__.py
index b176031..156cb23 100644
--- a/Lib/fontTools/pens/__init__.py
+++ b/Lib/fontTools/pens/__init__.py
@@ -1,3 +1 @@
"""Empty __init__.py file to signal Python this directory is a package."""
-
-from fontTools.misc.py23 import *
diff --git a/Lib/fontTools/pens/areaPen.py b/Lib/fontTools/pens/areaPen.py
index c930154..403afe7 100644
--- a/Lib/fontTools/pens/areaPen.py
+++ b/Lib/fontTools/pens/areaPen.py
@@ -1,6 +1,5 @@
"""Calculate the area of a glyph."""
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
diff --git a/Lib/fontTools/pens/basePen.py b/Lib/fontTools/pens/basePen.py
index c8c4c55..2161e02 100644
--- a/Lib/fontTools/pens/basePen.py
+++ b/Lib/fontTools/pens/basePen.py
@@ -36,26 +36,27 @@
sequence of length 2 will do.
"""
-from fontTools.misc.py23 import *
+from typing import Tuple
+
from fontTools.misc.loggingTools import LogMixin
__all__ = ["AbstractPen", "NullPen", "BasePen",
"decomposeSuperBezierSegment", "decomposeQuadraticSegment"]
-class AbstractPen(object):
+class AbstractPen:
- def moveTo(self, pt):
+ def moveTo(self, pt: Tuple[float, float]) -> None:
"""Begin a new sub path, set the current point to 'pt'. You must
end each sub path with a call to pen.closePath() or pen.endPath().
"""
raise NotImplementedError
- def lineTo(self, pt):
+ def lineTo(self, pt: Tuple[float, float]) -> None:
"""Draw a straight line from the current point to 'pt'."""
raise NotImplementedError
- def curveTo(self, *points):
+ def curveTo(self, *points: Tuple[float, float]) -> None:
"""Draw a cubic bezier with an arbitrary number of control points.
The last point specified is on-curve, all others are off-curve
@@ -76,7 +77,7 @@
"""
raise NotImplementedError
- def qCurveTo(self, *points):
+ def qCurveTo(self, *points: Tuple[float, float]) -> None:
"""Draw a whole string of quadratic curve segments.
The last point specified is on-curve, all others are off-curve
@@ -93,19 +94,23 @@
"""
raise NotImplementedError
- def closePath(self):
+ def closePath(self) -> None:
"""Close the current sub path. You must call either pen.closePath()
or pen.endPath() after each sub path.
"""
pass
- def endPath(self):
+ def endPath(self) -> None:
"""End the current sub path, but don't close it. You must call
either pen.closePath() or pen.endPath() after each sub path.
"""
pass
- def addComponent(self, glyphName, transformation):
+ def addComponent(
+ self,
+ glyphName: str,
+ transformation: Tuple[float, float, float, float, float, float]
+ ) -> None:
"""Add a sub glyph. The 'transformation' argument must be a 6-tuple
containing an affine transformation, or a Transform object from the
fontTools.misc.transform module. More precisely: it should be a
@@ -114,7 +119,7 @@
raise NotImplementedError
-class NullPen(object):
+class NullPen(AbstractPen):
"""A pen that does nothing.
"""
diff --git a/Lib/fontTools/pens/boundsPen.py b/Lib/fontTools/pens/boundsPen.py
index c76efdf..810715c 100644
--- a/Lib/fontTools/pens/boundsPen.py
+++ b/Lib/fontTools/pens/boundsPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.arrayTools import updateBounds, pointInRect, unionRect
from fontTools.misc.bezierTools import calcCubicBounds, calcQuadraticBounds
from fontTools.pens.basePen import BasePen
diff --git a/Lib/fontTools/pens/cocoaPen.py b/Lib/fontTools/pens/cocoaPen.py
index 9ca6f3b..67482b4 100644
--- a/Lib/fontTools/pens/cocoaPen.py
+++ b/Lib/fontTools/pens/cocoaPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
diff --git a/Lib/fontTools/pens/filterPen.py b/Lib/fontTools/pens/filterPen.py
index 7539efb..4355ba4 100644
--- a/Lib/fontTools/pens/filterPen.py
+++ b/Lib/fontTools/pens/filterPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import AbstractPen
from fontTools.pens.pointPen import AbstractPointPen
from fontTools.pens.recordingPen import RecordingPen
diff --git a/Lib/fontTools/pens/momentsPen.py b/Lib/fontTools/pens/momentsPen.py
index 694d6b0..8c90f70 100644
--- a/Lib/fontTools/pens/momentsPen.py
+++ b/Lib/fontTools/pens/momentsPen.py
@@ -1,6 +1,5 @@
"""Pen calculating 0th, 1st, and 2nd moments of area of glyph shapes.
This is low-level, autogenerated pen. Use statisticsPen instead."""
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
diff --git a/Lib/fontTools/pens/perimeterPen.py b/Lib/fontTools/pens/perimeterPen.py
index 36c7edb..9a09cb8 100644
--- a/Lib/fontTools/pens/perimeterPen.py
+++ b/Lib/fontTools/pens/perimeterPen.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
"""Calculate the perimeter of a glyph."""
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
from fontTools.misc.bezierTools import approximateQuadraticArcLengthC, calcQuadraticArcLengthC, approximateCubicArcLengthC, calcCubicArcLengthC
import math
diff --git a/Lib/fontTools/pens/pointInsidePen.py b/Lib/fontTools/pens/pointInsidePen.py
index 8de077c..34597f4 100644
--- a/Lib/fontTools/pens/pointInsidePen.py
+++ b/Lib/fontTools/pens/pointInsidePen.py
@@ -2,7 +2,6 @@
for shapes.
"""
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
from fontTools.misc.bezierTools import solveQuadratic, solveCubic
diff --git a/Lib/fontTools/pens/pointPen.py b/Lib/fontTools/pens/pointPen.py
index 5583218..26f99d4 100644
--- a/Lib/fontTools/pens/pointPen.py
+++ b/Lib/fontTools/pens/pointPen.py
@@ -11,8 +11,11 @@
This allows the caller to provide more data for each point.
For instance, whether or not a point is smooth, and its name.
"""
-from fontTools.pens.basePen import AbstractPen
+
import math
+from typing import Any, Optional, Tuple
+
+from fontTools.pens.basePen import AbstractPen
__all__ = [
"AbstractPointPen",
@@ -24,26 +27,36 @@
]
-class AbstractPointPen(object):
- """
- Baseclass for all PointPens.
- """
+class AbstractPointPen:
+ """Baseclass for all PointPens."""
- def beginPath(self, identifier=None, **kwargs):
+ def beginPath(self, identifier: Optional[str] = None, **kwargs: Any) -> None:
"""Start a new sub path."""
raise NotImplementedError
- def endPath(self):
+ def endPath(self) -> None:
"""End the current sub path."""
raise NotImplementedError
- def addPoint(self, pt, segmentType=None, smooth=False, name=None,
- identifier=None, **kwargs):
+ def addPoint(
+ self,
+ pt: Tuple[float, float],
+ segmentType: Optional[str] = None,
+ smooth: bool = False,
+ name: Optional[str] = None,
+ identifier: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
"""Add a point to the current sub path."""
raise NotImplementedError
- def addComponent(self, baseGlyphName, transformation, identifier=None,
- **kwargs):
+ def addComponent(
+ self,
+ baseGlyphName: str,
+ transformation: Tuple[float, float, float, float, float, float],
+ identifier: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
"""Add a sub glyph."""
raise NotImplementedError
diff --git a/Lib/fontTools/pens/qtPen.py b/Lib/fontTools/pens/qtPen.py
index 20d7e23..3473645 100644
--- a/Lib/fontTools/pens/qtPen.py
+++ b/Lib/fontTools/pens/qtPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
diff --git a/Lib/fontTools/pens/quartzPen.py b/Lib/fontTools/pens/quartzPen.py
index d35a993..16b9c2d 100644
--- a/Lib/fontTools/pens/quartzPen.py
+++ b/Lib/fontTools/pens/quartzPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
from Quartz.CoreGraphics import CGPathCreateMutable, CGPathMoveToPoint
diff --git a/Lib/fontTools/pens/recordingPen.py b/Lib/fontTools/pens/recordingPen.py
index b25011d..99e87e5 100644
--- a/Lib/fontTools/pens/recordingPen.py
+++ b/Lib/fontTools/pens/recordingPen.py
@@ -1,5 +1,4 @@
"""Pen recording operations that can be accessed or replayed."""
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import AbstractPen, DecomposingPen
from fontTools.pens.pointPen import AbstractPointPen
@@ -141,7 +140,6 @@
if __name__ == "__main__":
- from fontTools.pens.basePen import _TestPen
pen = RecordingPen()
pen.moveTo((0, 0))
pen.lineTo((0, 100))
diff --git a/Lib/fontTools/pens/reportLabPen.py b/Lib/fontTools/pens/reportLabPen.py
index 51d213f..c0a4610 100644
--- a/Lib/fontTools/pens/reportLabPen.py
+++ b/Lib/fontTools/pens/reportLabPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
from reportlab.graphics.shapes import Path
diff --git a/Lib/fontTools/pens/reverseContourPen.py b/Lib/fontTools/pens/reverseContourPen.py
index abc0fa2..9b3241b 100644
--- a/Lib/fontTools/pens/reverseContourPen.py
+++ b/Lib/fontTools/pens/reverseContourPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.arrayTools import pairwise
from fontTools.pens.filterPen import ContourFilterPen
diff --git a/Lib/fontTools/pens/roundingPen.py b/Lib/fontTools/pens/roundingPen.py
index c032cad..2a7c476 100644
--- a/Lib/fontTools/pens/roundingPen.py
+++ b/Lib/fontTools/pens/roundingPen.py
@@ -1,4 +1,4 @@
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import otRound
from fontTools.misc.transform import Transform
from fontTools.pens.filterPen import FilterPen, FilterPointPen
diff --git a/Lib/fontTools/pens/statisticsPen.py b/Lib/fontTools/pens/statisticsPen.py
index 7d60206..abd6ff5 100644
--- a/Lib/fontTools/pens/statisticsPen.py
+++ b/Lib/fontTools/pens/statisticsPen.py
@@ -1,6 +1,5 @@
"""Pen calculating area, center of mass, variance and standard-deviation,
covariance and correlation, and slant, of glyph shapes."""
-from fontTools.misc.py23 import *
import math
from fontTools.pens.momentsPen import MomentsPen
diff --git a/Lib/fontTools/pens/svgPathPen.py b/Lib/fontTools/pens/svgPathPen.py
index 803f393..4352ba4 100644
--- a/Lib/fontTools/pens/svgPathPen.py
+++ b/Lib/fontTools/pens/svgPathPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
diff --git a/Lib/fontTools/pens/t2CharStringPen.py b/Lib/fontTools/pens/t2CharStringPen.py
index 89340d1..0fddec1 100644
--- a/Lib/fontTools/pens/t2CharStringPen.py
+++ b/Lib/fontTools/pens/t2CharStringPen.py
@@ -1,37 +1,12 @@
# Copyright (c) 2009 Type Supply LLC
# Author: Tal Leming
-from fontTools.misc.py23 import *
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import otRound, roundFunc
from fontTools.misc.psCharStrings import T2CharString
from fontTools.pens.basePen import BasePen
from fontTools.cffLib.specializer import specializeCommands, commandsToProgram
-def t2c_round(number, tolerance=0.5):
- if tolerance == 0:
- return number # no-op
- rounded = otRound(number)
- # return rounded integer if the tolerance >= 0.5, or if the absolute
- # difference between the original float and the rounded integer is
- # within the tolerance
- if tolerance >= .5 or abs(rounded - number) <= tolerance:
- return rounded
- else:
- # else return the value un-rounded
- return number
-
-def makeRoundFunc(tolerance):
- if tolerance < 0:
- raise ValueError("Rounding tolerance must be positive")
-
- def roundPoint(point):
- x, y = point
- return t2c_round(x, tolerance), t2c_round(y, tolerance)
-
- return roundPoint
-
-
class T2CharStringPen(BasePen):
"""Pen to draw Type 2 CharStrings.
@@ -45,7 +20,7 @@
def __init__(self, width, glyphSet, roundTolerance=0.5, CFF2=False):
super(T2CharStringPen, self).__init__(glyphSet)
- self.roundPoint = makeRoundFunc(roundTolerance)
+ self.round = roundFunc(roundTolerance)
self._CFF2 = CFF2
self._width = width
self._commands = []
@@ -53,7 +28,7 @@
def _p(self, pt):
p0 = self._p0
- pt = self._p0 = self.roundPoint(pt)
+ pt = self._p0 = (self.round(pt[0]), self.round(pt[1]))
return [pt[0]-p0[0], pt[1]-p0[1]]
def _moveTo(self, pt):
diff --git a/Lib/fontTools/pens/teePen.py b/Lib/fontTools/pens/teePen.py
index 49420dc..2f30e92 100644
--- a/Lib/fontTools/pens/teePen.py
+++ b/Lib/fontTools/pens/teePen.py
@@ -1,5 +1,4 @@
"""Pen multiplexing drawing to one or more pens."""
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import AbstractPen
diff --git a/Lib/fontTools/pens/transformPen.py b/Lib/fontTools/pens/transformPen.py
index 6619ba7..2dcf83b 100644
--- a/Lib/fontTools/pens/transformPen.py
+++ b/Lib/fontTools/pens/transformPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.filterPen import FilterPen, FilterPointPen
diff --git a/Lib/fontTools/pens/ttGlyphPen.py b/Lib/fontTools/pens/ttGlyphPen.py
index 866298b..e7841ef 100644
--- a/Lib/fontTools/pens/ttGlyphPen.py
+++ b/Lib/fontTools/pens/ttGlyphPen.py
@@ -1,6 +1,6 @@
-from fontTools.misc.py23 import *
from array import array
from fontTools.misc.fixedTools import MAX_F2DOT14, otRound, floatToFixedToFloat
+from fontTools.misc.roundTools import otRound
from fontTools.pens.basePen import LoggingPen
from fontTools.pens.transformPen import TransformPen
from fontTools.ttLib.tables import ttProgram
@@ -73,6 +73,9 @@
assert self._isClosed(), '"move"-type point must begin a new contour.'
self._addPoint(pt, 1)
+ def curveTo(self, *points):
+ raise NotImplementedError
+
def qCurveTo(self, *points):
assert len(points) >= 1
for pt in points[:-1]:
diff --git a/Lib/fontTools/pens/wxPen.py b/Lib/fontTools/pens/wxPen.py
index 5ff6c47..1504f08 100644
--- a/Lib/fontTools/pens/wxPen.py
+++ b/Lib/fontTools/pens/wxPen.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen
diff --git a/Lib/fontTools/subset/__init__.py b/Lib/fontTools/subset/__init__.py
index 8162c09..f687b05 100644
--- a/Lib/fontTools/subset/__init__.py
+++ b/Lib/fontTools/subset/__init__.py
@@ -2,14 +2,13 @@
#
# Google Author(s): Behdad Esfahbod
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import otRound
from fontTools import ttLib
from fontTools.ttLib.tables import otTables
from fontTools.otlLib.maxContextCalc import maxCtxFont
from fontTools.pens.basePen import NullPen
from fontTools.misc.loggingTools import Timer
from fontTools.subset.cff import *
-from fontTools.varLib import varStore
import sys
import struct
import array
@@ -428,13 +427,14 @@
if v == klass and g in glyphs)
@_add_method(otTables.ClassDef)
-def subset(self, glyphs, remap=False):
+def subset(self, glyphs, remap=False, useClass0=True):
"""Returns ascending list of remaining classes."""
self.classDefs = {g:v for g,v in self.classDefs.items() if g in glyphs}
# Note: while class 0 has the special meaning of "not matched",
# if no glyph will ever /not match/, we can optimize class 0 out too.
+ # Only do this if allowed.
indices = _uniq_sort(
- ([0] if any(g not in self.classDefs for g in glyphs) else []) +
+ ([0] if ((not useClass0) or any(g not in self.classDefs for g in glyphs)) else []) +
list(self.classDefs.values()))
if remap:
self.remap(indices)
@@ -570,15 +570,16 @@
self.PairSetCount = len(self.PairSet)
return bool(self.PairSetCount)
elif self.Format == 2:
- class1_map = [c for c in self.ClassDef1.subset(s.glyphs, remap=True) if c < self.Class1Count]
- class2_map = [c for c in self.ClassDef2.subset(s.glyphs, remap=True) if c < self.Class2Count]
+ class1_map = [c for c in self.ClassDef1.subset(s.glyphs.intersection(self.Coverage.glyphs), remap=True) if c < self.Class1Count]
+ class2_map = [c for c in self.ClassDef2.subset(s.glyphs, remap=True, useClass0=False) if c < self.Class2Count]
self.Class1Record = [self.Class1Record[i] for i in class1_map]
for c in self.Class1Record:
c.Class2Record = [c.Class2Record[i] for i in class2_map]
self.Class1Count = len(class1_map)
self.Class2Count = len(class2_map)
+ # If only Class2 0 left, no need to keep anything.
return bool(self.Class1Count and
- self.Class2Count and
+ (self.Class2Count > 1) and
self.Coverage.subset(s.glyphs))
else:
assert 0, "unknown format: %s" % self.Format
@@ -1877,7 +1878,7 @@
table.RsbMap.mapping = _dict_subset(table.RsbMap.mapping, s.glyphs)
used.update(table.RsbMap.mapping.values())
- varidx_map = varStore.VarStore_subset_varidxes(table.VarStore, used, retainFirstMap=retainAdvMap, advIdxes=advIdxes_)
+ varidx_map = table.VarStore.subset_varidxes(used, retainFirstMap=retainAdvMap, advIdxes=advIdxes_)
if table.AdvWidthMap:
table.AdvWidthMap.mapping = _remap_index_map(s, varidx_map, table.AdvWidthMap)
@@ -1915,7 +1916,7 @@
table.VOrgMap.mapping = _dict_subset(table.VOrgMap.mapping, s.glyphs)
used.update(table.VOrgMap.mapping.values())
- varidx_map = varStore.VarStore_subset_varidxes(table.VarStore, used, retainFirstMap=retainAdvMap, advIdxes=advIdxes_)
+ varidx_map = table.VarStore.subset_varidxes(used, retainFirstMap=retainAdvMap, advIdxes=advIdxes_)
if table.AdvHeightMap:
table.AdvHeightMap.mapping = _remap_index_map(s, varidx_map, table.AdvHeightMap)
diff --git a/Lib/fontTools/subset/__main__.py b/Lib/fontTools/subset/__main__.py
index 93549d5..2203847 100644
--- a/Lib/fontTools/subset/__main__.py
+++ b/Lib/fontTools/subset/__main__.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import sys
from fontTools.subset import main
diff --git a/Lib/fontTools/subset/cff.py b/Lib/fontTools/subset/cff.py
index 7db6d88..b59c6b9 100644
--- a/Lib/fontTools/subset/cff.py
+++ b/Lib/fontTools/subset/cff.py
@@ -1,7 +1,7 @@
from fontTools.misc import psCharStrings
from fontTools import ttLib
from fontTools.pens.basePen import NullPen
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import otRound
from fontTools.varLib.varStore import VarStoreInstancer
def _add_method(*clazzes):
diff --git a/Lib/fontTools/svgLib/__init__.py b/Lib/fontTools/svgLib/__init__.py
index ca5af1c..c049006 100644
--- a/Lib/fontTools/svgLib/__init__.py
+++ b/Lib/fontTools/svgLib/__init__.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
from .path import SVGPath, parse_path
__all__ = ["SVGPath", "parse_path"]
diff --git a/Lib/fontTools/svgLib/path/__init__.py b/Lib/fontTools/svgLib/path/__init__.py
index 9dc5ac6..9440429 100644
--- a/Lib/fontTools/svgLib/path/__init__.py
+++ b/Lib/fontTools/svgLib/path/__init__.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tostr
from fontTools.pens.transformPen import TransformPen
from fontTools.misc import etree
diff --git a/Lib/fontTools/svgLib/path/arc.py b/Lib/fontTools/svgLib/path/arc.py
index 25b9aa5..3181071 100644
--- a/Lib/fontTools/svgLib/path/arc.py
+++ b/Lib/fontTools/svgLib/path/arc.py
@@ -4,10 +4,8 @@
https://github.com/chromium/chromium/blob/93831f2/third_party/
blink/renderer/core/svg/svg_path_parser.cc#L169-L278
"""
-from fontTools.misc.py23 import *
-from fontTools.misc.py23 import isfinite
from fontTools.misc.transform import Identity, Scale
-from math import atan2, ceil, cos, fabs, pi, radians, sin, sqrt, tan
+from math import atan2, ceil, cos, fabs, isfinite, pi, radians, sin, sqrt, tan
TWO_PI = 2 * pi
diff --git a/Lib/fontTools/svgLib/path/parser.py b/Lib/fontTools/svgLib/path/parser.py
index 3d8d539..1fcf899 100644
--- a/Lib/fontTools/svgLib/path/parser.py
+++ b/Lib/fontTools/svgLib/path/parser.py
@@ -7,7 +7,6 @@
# Copyright (c) 2013-2014 Lennart Regebro
# License: MIT
-from fontTools.misc.py23 import *
from .arc import EllipticalArc
import re
diff --git a/Lib/fontTools/t1Lib/__init__.py b/Lib/fontTools/t1Lib/__init__.py
index 88729ae..e1d94d3 100644
--- a/Lib/fontTools/t1Lib/__init__.py
+++ b/Lib/fontTools/t1Lib/__init__.py
@@ -15,7 +15,7 @@
part should be written as hexadecimal or binary, but only if kind
is 'OTHER'.
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin
from fontTools.misc import eexec
from fontTools.misc.macCreatorType import getMacCreatorAndType
import os
diff --git a/Lib/fontTools/ttLib/__init__.py b/Lib/fontTools/ttLib/__init__.py
index 7b01ddd..16417e7 100644
--- a/Lib/fontTools/ttLib/__init__.py
+++ b/Lib/fontTools/ttLib/__init__.py
@@ -41,7 +41,6 @@
"""
-from fontTools.misc.py23 import *
from fontTools.misc.loggingTools import deprecateFunction
import logging
diff --git a/Lib/fontTools/ttLib/macUtils.py b/Lib/fontTools/ttLib/macUtils.py
index 6a7cb2e..496fb67 100644
--- a/Lib/fontTools/ttLib/macUtils.py
+++ b/Lib/fontTools/ttLib/macUtils.py
@@ -1,5 +1,5 @@
"""ttLib.macUtils.py -- Various Mac-specific stuff."""
-from fontTools.misc.py23 import *
+from io import BytesIO
from fontTools.misc.macRes import ResourceReader, ResourceError
@@ -40,7 +40,7 @@
def __init__(self, path, res_name_or_index):
from fontTools import ttLib
reader = ResourceReader(path)
- if isinstance(res_name_or_index, basestring):
+ if isinstance(res_name_or_index, str):
rsrc = reader.getNamedResource('sfnt', res_name_or_index)
else:
rsrc = reader.getIndResource('sfnt', res_name_or_index)
diff --git a/Lib/fontTools/ttLib/standardGlyphOrder.py b/Lib/fontTools/ttLib/standardGlyphOrder.py
index 9697fcc..1f980e4 100644
--- a/Lib/fontTools/ttLib/standardGlyphOrder.py
+++ b/Lib/fontTools/ttLib/standardGlyphOrder.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
#
# 'post' table formats 1.0 and 2.0 rely on this list of "standard"
# glyphs.
diff --git a/Lib/fontTools/ttLib/tables/B_A_S_E_.py b/Lib/fontTools/ttLib/tables/B_A_S_E_.py
index 6c4863a..9551e2c 100644
--- a/Lib/fontTools/ttLib/tables/B_A_S_E_.py
+++ b/Lib/fontTools/ttLib/tables/B_A_S_E_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py b/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py
index 7e19b01..9197923 100644
--- a/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py
+++ b/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py
@@ -1,6 +1,5 @@
# Since bitmap glyph metrics are shared between EBLC and EBDT
# this class gets its own python file.
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
import logging
diff --git a/Lib/fontTools/ttLib/tables/C_B_D_T_.py b/Lib/fontTools/ttLib/tables/C_B_D_T_.py
index 6fd4143..11bb60b 100644
--- a/Lib/fontTools/ttLib/tables/C_B_D_T_.py
+++ b/Lib/fontTools/ttLib/tables/C_B_D_T_.py
@@ -3,7 +3,7 @@
# Google Author(s): Matt Fontaine
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from . import E_B_D_T_
from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat
diff --git a/Lib/fontTools/ttLib/tables/C_B_L_C_.py b/Lib/fontTools/ttLib/tables/C_B_L_C_.py
index ed7e3ae..2f78571 100644
--- a/Lib/fontTools/ttLib/tables/C_B_L_C_.py
+++ b/Lib/fontTools/ttLib/tables/C_B_L_C_.py
@@ -2,7 +2,6 @@
#
# Google Author(s): Matt Fontaine
-from fontTools.misc.py23 import *
from . import E_B_L_C_
class table_C_B_L_C_(E_B_L_C_.table_E_B_L_C_):
diff --git a/Lib/fontTools/ttLib/tables/C_F_F_.py b/Lib/fontTools/ttLib/tables/C_F_F_.py
index 1d3860c..d12b89d 100644
--- a/Lib/fontTools/ttLib/tables/C_F_F_.py
+++ b/Lib/fontTools/ttLib/tables/C_F_F_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from io import BytesIO
from fontTools import cffLib
from . import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/C_F_F__2.py b/Lib/fontTools/ttLib/tables/C_F_F__2.py
index 7aaf4ce..6217ebb 100644
--- a/Lib/fontTools/ttLib/tables/C_F_F__2.py
+++ b/Lib/fontTools/ttLib/tables/C_F_F__2.py
@@ -1,5 +1,4 @@
-from fontTools.misc.py23 import *
-from fontTools import cffLib
+from io import BytesIO
from fontTools.ttLib.tables.C_F_F_ import table_C_F_F_
diff --git a/Lib/fontTools/ttLib/tables/C_O_L_R_.py b/Lib/fontTools/ttLib/tables/C_O_L_R_.py
index db49052..4004d41 100644
--- a/Lib/fontTools/ttLib/tables/C_O_L_R_.py
+++ b/Lib/fontTools/ttLib/tables/C_O_L_R_.py
@@ -2,7 +2,6 @@
#
# Google Author(s): Behdad Esfahbod
-from fontTools.misc.py23 import *
from fontTools.misc.textTools import safeEval
from . import DefaultTable
@@ -105,11 +104,11 @@
self.ColorLayers = {}
glyphName = attrs["name"]
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
layers = []
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
layer = LayerRecord()
layer.fromXML(element[0], element[1], element[2], ttFont)
diff --git a/Lib/fontTools/ttLib/tables/C_P_A_L_.py b/Lib/fontTools/ttLib/tables/C_P_A_L_.py
index 22ef062..c095095 100644
--- a/Lib/fontTools/ttLib/tables/C_P_A_L_.py
+++ b/Lib/fontTools/ttLib/tables/C_P_A_L_.py
@@ -2,7 +2,7 @@
#
# Google Author(s): Behdad Esfahbod
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import array
@@ -208,7 +208,7 @@
self.paletteTypes.append(int(attrs.get("type", self.DEFAULT_PALETTE_TYPE)))
palette = []
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
attrs = element[1]
color = Color.fromHex(attrs["value"])
@@ -217,7 +217,7 @@
elif name == "paletteEntryLabels":
colorLabels = {}
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
elementName, elementAttr, _ = element
if elementName == "label":
diff --git a/Lib/fontTools/ttLib/tables/D_S_I_G_.py b/Lib/fontTools/ttLib/tables/D_S_I_G_.py
index d9a02ba..1a520ca 100644
--- a/Lib/fontTools/ttLib/tables/D_S_I_G_.py
+++ b/Lib/fontTools/ttLib/tables/D_S_I_G_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, strjoin, tobytes, tostr
from fontTools.misc.textTools import safeEval
from fontTools.misc import sstruct
from . import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/DefaultTable.py b/Lib/fontTools/ttLib/tables/DefaultTable.py
index 16f5da0..c70480a 100644
--- a/Lib/fontTools/ttLib/tables/DefaultTable.py
+++ b/Lib/fontTools/ttLib/tables/DefaultTable.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag
from fontTools.ttLib import getClassTag
class DefaultTable(object):
diff --git a/Lib/fontTools/ttLib/tables/E_B_D_T_.py b/Lib/fontTools/ttLib/tables/E_B_D_T_.py
index e85a4cd..5d9e724 100644
--- a/Lib/fontTools/ttLib/tables/E_B_D_T_.py
+++ b/Lib/fontTools/ttLib/tables/E_B_D_T_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin, strjoin
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, readHex, hexStr, deHexStr
from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat
diff --git a/Lib/fontTools/ttLib/tables/E_B_L_C_.py b/Lib/fontTools/ttLib/tables/E_B_L_C_.py
index b065df0..94d40d9 100644
--- a/Lib/fontTools/ttLib/tables/E_B_L_C_.py
+++ b/Lib/fontTools/ttLib/tables/E_B_L_C_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from . import DefaultTable
from fontTools.misc.textTools import safeEval
diff --git a/Lib/fontTools/ttLib/tables/F_F_T_M_.py b/Lib/fontTools/ttLib/tables/F_F_T_M_.py
index 20a12ec..2376f2d 100644
--- a/Lib/fontTools/ttLib/tables/F_F_T_M_.py
+++ b/Lib/fontTools/ttLib/tables/F_F_T_M_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from fontTools.misc.timeTools import timestampFromString, timestampToString
diff --git a/Lib/fontTools/ttLib/tables/F__e_a_t.py b/Lib/fontTools/ttLib/tables/F__e_a_t.py
index d7f0ba3..7e51061 100644
--- a/Lib/fontTools/ttLib/tables/F__e_a_t.py
+++ b/Lib/fontTools/ttLib/tables/F__e_a_t.py
@@ -1,8 +1,6 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import floatToFixedToStr
from fontTools.misc.textTools import safeEval
-from .otBase import BaseTTXConverter
from . import DefaultTable
from . import grUtils
import struct
diff --git a/Lib/fontTools/ttLib/tables/G_D_E_F_.py b/Lib/fontTools/ttLib/tables/G_D_E_F_.py
index 5fb65d5..d4a5741 100644
--- a/Lib/fontTools/ttLib/tables/G_D_E_F_.py
+++ b/Lib/fontTools/ttLib/tables/G_D_E_F_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/G_M_A_P_.py b/Lib/fontTools/ttLib/tables/G_M_A_P_.py
index ce3ac41..5b30dcf 100644
--- a/Lib/fontTools/ttLib/tables/G_M_A_P_.py
+++ b/Lib/fontTools/ttLib/tables/G_M_A_P_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes, tostr
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
@@ -115,7 +115,7 @@
gmapRecord = GMAPRecord()
self.gmapRecords.append(gmapRecord)
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
gmapRecord.fromXML(name, attrs, content, ttFont)
diff --git a/Lib/fontTools/ttLib/tables/G_P_K_G_.py b/Lib/fontTools/ttLib/tables/G_P_K_G_.py
index 601b3c2..7598a62 100644
--- a/Lib/fontTools/ttLib/tables/G_P_K_G_.py
+++ b/Lib/fontTools/ttLib/tables/G_P_K_G_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, readHex
from . import DefaultTable
@@ -106,7 +106,7 @@
if not hasattr(self, "GMAPs"):
self.GMAPs = []
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
itemName, itemAttrs, itemContent = element
if itemName == "hexdata":
@@ -115,7 +115,7 @@
if not hasattr(self, "glyphlets"):
self.glyphlets = []
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
itemName, itemAttrs, itemContent = element
if itemName == "hexdata":
diff --git a/Lib/fontTools/ttLib/tables/G_P_O_S_.py b/Lib/fontTools/ttLib/tables/G_P_O_S_.py
index 34d1ce1..013c820 100644
--- a/Lib/fontTools/ttLib/tables/G_P_O_S_.py
+++ b/Lib/fontTools/ttLib/tables/G_P_O_S_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/G_S_U_B_.py b/Lib/fontTools/ttLib/tables/G_S_U_B_.py
index 5ba8778..4403649 100644
--- a/Lib/fontTools/ttLib/tables/G_S_U_B_.py
+++ b/Lib/fontTools/ttLib/tables/G_S_U_B_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/G__l_a_t.py b/Lib/fontTools/ttLib/tables/G__l_a_t.py
index 8fdb967..a4e8e38 100644
--- a/Lib/fontTools/ttLib/tables/G__l_a_t.py
+++ b/Lib/fontTools/ttLib/tables/G__l_a_t.py
@@ -1,12 +1,11 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import floatToFixedToStr
from fontTools.misc.textTools import safeEval
-from itertools import *
+# from itertools import *
from functools import partial
from . import DefaultTable
from . import grUtils
-import struct, operator, warnings
+import struct
Glat_format_0 = """
diff --git a/Lib/fontTools/ttLib/tables/G__l_o_c.py b/Lib/fontTools/ttLib/tables/G__l_o_c.py
index 4ff8a47..fa114a3 100644
--- a/Lib/fontTools/ttLib/tables/G__l_o_c.py
+++ b/Lib/fontTools/ttLib/tables/G__l_o_c.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/H_V_A_R_.py b/Lib/fontTools/ttLib/tables/H_V_A_R_.py
index 67d5a7b..56992ad 100644
--- a/Lib/fontTools/ttLib/tables/H_V_A_R_.py
+++ b/Lib/fontTools/ttLib/tables/H_V_A_R_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/J_S_T_F_.py b/Lib/fontTools/ttLib/tables/J_S_T_F_.py
index 704f030..ddf5405 100644
--- a/Lib/fontTools/ttLib/tables/J_S_T_F_.py
+++ b/Lib/fontTools/ttLib/tables/J_S_T_F_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/L_T_S_H_.py b/Lib/fontTools/ttLib/tables/L_T_S_H_.py
index 689548b..94c2c22 100644
--- a/Lib/fontTools/ttLib/tables/L_T_S_H_.py
+++ b/Lib/fontTools/ttLib/tables/L_T_S_H_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import struct
diff --git a/Lib/fontTools/ttLib/tables/M_A_T_H_.py b/Lib/fontTools/ttLib/tables/M_A_T_H_.py
index 7bf9098..d894c08 100644
--- a/Lib/fontTools/ttLib/tables/M_A_T_H_.py
+++ b/Lib/fontTools/ttLib/tables/M_A_T_H_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/M_E_T_A_.py b/Lib/fontTools/ttLib/tables/M_E_T_A_.py
index 862487f..d4f6bc8 100644
--- a/Lib/fontTools/ttLib/tables/M_E_T_A_.py
+++ b/Lib/fontTools/ttLib/tables/M_E_T_A_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import byteord
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
@@ -173,7 +173,7 @@
glyphRec = GlyphRecord()
self.glyphRecords.append(glyphRec)
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
glyphRec.fromXML(name, attrs, content, ttFont)
@@ -207,7 +207,7 @@
stringRec = StringRecord()
self.stringRecs.append(stringRec)
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
stringRec.fromXML(name, attrs, content, ttFont)
stringRec.stringLen = len(stringRec.string)
@@ -229,7 +229,7 @@
# XXX The following two functions are really broken around UTF-8 vs Unicode
def mapXMLToUTF8(string):
- uString = unicode()
+ uString = str()
strLen = len(string)
i = 0
while i < strLen:
@@ -245,9 +245,9 @@
i = i+1
valStr = string[j:i]
- uString = uString + unichr(eval('0x' + valStr))
+ uString = uString + chr(eval('0x' + valStr))
else:
- uString = uString + unichr(byteord(string[i]))
+ uString = uString + chr(byteord(string[i]))
i = i +1
return uString.encode('utf_8')
@@ -281,7 +281,7 @@
def fromXML(self, name, attrs, content, ttFont):
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
value = attrs["value"]
diff --git a/Lib/fontTools/ttLib/tables/M_V_A_R_.py b/Lib/fontTools/ttLib/tables/M_V_A_R_.py
index 4bae5af..34ab20f 100644
--- a/Lib/fontTools/ttLib/tables/M_V_A_R_.py
+++ b/Lib/fontTools/ttLib/tables/M_V_A_R_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/O_S_2f_2.py b/Lib/fontTools/ttLib/tables/O_S_2f_2.py
index 9d833d9..a576522 100644
--- a/Lib/fontTools/ttLib/tables/O_S_2f_2.py
+++ b/Lib/fontTools/ttLib/tables/O_S_2f_2.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, num2binary, binary2num
from fontTools.ttLib.tables import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/S_I_N_G_.py b/Lib/fontTools/ttLib/tables/S_I_N_G_.py
index 6199242..dd9b63c 100644
--- a/Lib/fontTools/ttLib/tables/S_I_N_G_.py
+++ b/Lib/fontTools/ttLib/tables/S_I_N_G_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, tobytes, tostr
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/S_T_A_T_.py b/Lib/fontTools/ttLib/tables/S_T_A_T_.py
index c8278e0..1769de9 100644
--- a/Lib/fontTools/ttLib/tables/S_T_A_T_.py
+++ b/Lib/fontTools/ttLib/tables/S_T_A_T_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/S_V_G_.py b/Lib/fontTools/ttLib/tables/S_V_G_.py
index 89551cd..135f271 100644
--- a/Lib/fontTools/ttLib/tables/S_V_G_.py
+++ b/Lib/fontTools/ttLib/tables/S_V_G_.py
@@ -1,12 +1,12 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, strjoin, tobytes, tostr
from fontTools.misc import sstruct
from . import DefaultTable
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
+from io import BytesIO
import struct
-import re
import logging
diff --git a/Lib/fontTools/ttLib/tables/S__i_l_f.py b/Lib/fontTools/ttLib/tables/S__i_l_f.py
index 9953d15..95880b0 100644
--- a/Lib/fontTools/ttLib/tables/S__i_l_f.py
+++ b/Lib/fontTools/ttLib/tables/S__i_l_f.py
@@ -1,13 +1,13 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import byteord
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import floatToFixedToStr
from fontTools.misc.textTools import safeEval
-from itertools import *
+# from itertools import *
from . import DefaultTable
from . import grUtils
from array import array
from functools import reduce
-import struct, operator, warnings, re, sys
+import struct, re, sys
Silf_hdr_format = '''
>
diff --git a/Lib/fontTools/ttLib/tables/S__i_l_l.py b/Lib/fontTools/ttLib/tables/S__i_l_l.py
index 4d13441..5ab9ee3 100644
--- a/Lib/fontTools/ttLib/tables/S__i_l_l.py
+++ b/Lib/fontTools/ttLib/tables/S__i_l_l.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import floatToFixedToStr
from fontTools.misc.textTools import safeEval
diff --git a/Lib/fontTools/ttLib/tables/T_S_I_B_.py b/Lib/fontTools/ttLib/tables/T_S_I_B_.py
index 88b0015..25d4310 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I_B_.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I_B_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .T_S_I_V_ import table_T_S_I_V_
class table_T_S_I_B_(table_T_S_I_V_):
diff --git a/Lib/fontTools/ttLib/tables/T_S_I_C_.py b/Lib/fontTools/ttLib/tables/T_S_I_C_.py
index 4f4763f..573b3f9 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I_C_.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I_C_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/T_S_I_D_.py b/Lib/fontTools/ttLib/tables/T_S_I_D_.py
index 1fd3cb1..310eb17 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I_D_.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I_D_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .T_S_I_V_ import table_T_S_I_V_
class table_T_S_I_D_(table_T_S_I_V_):
diff --git a/Lib/fontTools/ttLib/tables/T_S_I_J_.py b/Lib/fontTools/ttLib/tables/T_S_I_J_.py
index 462ad89..c1a46ba 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I_J_.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I_J_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .T_S_I_V_ import table_T_S_I_V_
class table_T_S_I_J_(table_T_S_I_V_):
diff --git a/Lib/fontTools/ttLib/tables/T_S_I_P_.py b/Lib/fontTools/ttLib/tables/T_S_I_P_.py
index 06d5735..778974c 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I_P_.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I_P_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .T_S_I_V_ import table_T_S_I_V_
class table_T_S_I_P_(table_T_S_I_V_):
diff --git a/Lib/fontTools/ttLib/tables/T_S_I_S_.py b/Lib/fontTools/ttLib/tables/T_S_I_S_.py
index 27fcac7..61c9f76 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I_S_.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I_S_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .T_S_I_V_ import table_T_S_I_V_
class table_T_S_I_S_(table_T_S_I_V_):
diff --git a/Lib/fontTools/ttLib/tables/T_S_I_V_.py b/Lib/fontTools/ttLib/tables/T_S_I_V_.py
index 1939cdc..8021445 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I_V_.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I_V_.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import strjoin, tobytes, tostr
from . import asciiTable
class table_T_S_I_V_(asciiTable.asciiTable):
diff --git a/Lib/fontTools/ttLib/tables/T_S_I__0.py b/Lib/fontTools/ttLib/tables/T_S_I__0.py
index 04f58cd..b187f42 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I__0.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I__0.py
@@ -5,7 +5,6 @@
programs and 'extra' programs ('fpgm', 'prep', and 'cvt') that are contained
in the TSI1 table.
"""
-from fontTools.misc.py23 import *
from . import DefaultTable
import struct
diff --git a/Lib/fontTools/ttLib/tables/T_S_I__1.py b/Lib/fontTools/ttLib/tables/T_S_I__1.py
index b014cb4..9ae7acd 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I__1.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I__1.py
@@ -4,7 +4,7 @@
TSI1 contains the text of the glyph programs in the form of low-level assembly
code, as well as the 'extra' programs 'fpgm', 'ppgm' (i.e. 'prep'), and 'cvt'.
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import strjoin, tobytes, tostr
from . import DefaultTable
from fontTools.misc.loggingTools import LogMixin
@@ -68,7 +68,7 @@
"%r textLength (%d) must not be > 32768" % (name, textLength))
text = data[textOffset:textOffset+textLength]
assert len(text) == textLength
- text = tounicode(text, encoding='utf-8')
+ text = tostr(text, encoding='utf-8')
if text:
programs[name] = text
if isExtra:
diff --git a/Lib/fontTools/ttLib/tables/T_S_I__2.py b/Lib/fontTools/ttLib/tables/T_S_I__2.py
index f7206d0..036c981 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I__2.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I__2.py
@@ -5,7 +5,6 @@
programs that are contained in the TSI3 table. It uses the same format as
the TSI0 table.
"""
-from fontTools.misc.py23 import *
from fontTools import ttLib
superclass = ttLib.getTableClass("TSI0")
diff --git a/Lib/fontTools/ttLib/tables/T_S_I__3.py b/Lib/fontTools/ttLib/tables/T_S_I__3.py
index 92e0e53..a249014 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I__3.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I__3.py
@@ -3,7 +3,6 @@
TSI3 contains the text of the glyph programs in the form of 'VTTTalk' code.
"""
-from fontTools.misc.py23 import *
from fontTools import ttLib
superclass = ttLib.getTableClass("TSI1")
diff --git a/Lib/fontTools/ttLib/tables/T_S_I__5.py b/Lib/fontTools/ttLib/tables/T_S_I__5.py
index 5c7da1c..7be09f9 100644
--- a/Lib/fontTools/ttLib/tables/T_S_I__5.py
+++ b/Lib/fontTools/ttLib/tables/T_S_I__5.py
@@ -3,7 +3,6 @@
TSI5 contains the VTT character groups.
"""
-from fontTools.misc.py23 import *
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import sys
diff --git a/Lib/fontTools/ttLib/tables/T_T_F_A_.py b/Lib/fontTools/ttLib/tables/T_T_F_A_.py
index 3fdbd07..8446dfc 100644
--- a/Lib/fontTools/ttLib/tables/T_T_F_A_.py
+++ b/Lib/fontTools/ttLib/tables/T_T_F_A_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from . import asciiTable
class table_T_T_F_A_(asciiTable.asciiTable):
diff --git a/Lib/fontTools/ttLib/tables/TupleVariation.py b/Lib/fontTools/ttLib/tables/TupleVariation.py
index 7f5c3a6..a63fb6c 100644
--- a/Lib/fontTools/ttLib/tables/TupleVariation.py
+++ b/Lib/fontTools/ttLib/tables/TupleVariation.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
diff --git a/Lib/fontTools/ttLib/tables/V_D_M_X_.py b/Lib/fontTools/ttLib/tables/V_D_M_X_.py
index b4028c3..ba8593f 100644
--- a/Lib/fontTools/ttLib/tables/V_D_M_X_.py
+++ b/Lib/fontTools/ttLib/tables/V_D_M_X_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from . import DefaultTable
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
diff --git a/Lib/fontTools/ttLib/tables/V_O_R_G_.py b/Lib/fontTools/ttLib/tables/V_O_R_G_.py
index bbc6d02..0b7fe95 100644
--- a/Lib/fontTools/ttLib/tables/V_O_R_G_.py
+++ b/Lib/fontTools/ttLib/tables/V_O_R_G_.py
@@ -1,7 +1,6 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc.textTools import safeEval
from . import DefaultTable
-import operator
import struct
@@ -84,7 +83,7 @@
if name == "VOriginRecord":
vOriginRec = VOriginRecord()
for element in content:
- if isinstance(element, basestring):
+ if isinstance(element, str):
continue
name, attrs, content = element
vOriginRec.fromXML(name, attrs, content, ttFont)
diff --git a/Lib/fontTools/ttLib/tables/V_V_A_R_.py b/Lib/fontTools/ttLib/tables/V_V_A_R_.py
index b835fc1..88f3055 100644
--- a/Lib/fontTools/ttLib/tables/V_V_A_R_.py
+++ b/Lib/fontTools/ttLib/tables/V_V_A_R_.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/__init__.py b/Lib/fontTools/ttLib/tables/__init__.py
index 0c99c22..bbfb8b7 100644
--- a/Lib/fontTools/ttLib/tables/__init__.py
+++ b/Lib/fontTools/ttLib/tables/__init__.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
# DON'T EDIT! This file is generated by MetaTools/buildTableList.py.
def _moduleFinderHint():
@@ -15,6 +14,7 @@
from . import C_O_L_R_
from . import C_P_A_L_
from . import D_S_I_G_
+ from . import D__e_b_g
from . import E_B_D_T_
from . import E_B_L_C_
from . import F_F_T_M_
@@ -39,6 +39,7 @@
from . import S__i_l_f
from . import S__i_l_l
from . import T_S_I_B_
+ from . import T_S_I_C_
from . import T_S_I_D_
from . import T_S_I_J_
from . import T_S_I_P_
diff --git a/Lib/fontTools/ttLib/tables/_a_n_k_r.py b/Lib/fontTools/ttLib/tables/_a_n_k_r.py
index 9372168..1f2946c 100644
--- a/Lib/fontTools/ttLib/tables/_a_n_k_r.py
+++ b/Lib/fontTools/ttLib/tables/_a_n_k_r.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_a_v_a_r.py b/Lib/fontTools/ttLib/tables/_a_v_a_r.py
index 02c4c88..2b6a40e 100644
--- a/Lib/fontTools/ttLib/tables/_a_v_a_r.py
+++ b/Lib/fontTools/ttLib/tables/_a_v_a_r.py
@@ -1,5 +1,4 @@
-from fontTools.misc.py23 import *
-from fontTools import ttLib
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
@@ -7,10 +6,8 @@
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
)
-from fontTools.misc.textTools import safeEval
from fontTools.ttLib import TTLibError
from . import DefaultTable
-import array
import struct
import logging
diff --git a/Lib/fontTools/ttLib/tables/_b_s_l_n.py b/Lib/fontTools/ttLib/tables/_b_s_l_n.py
index 8c0e39e..8e266fa 100644
--- a/Lib/fontTools/ttLib/tables/_b_s_l_n.py
+++ b/Lib/fontTools/ttLib/tables/_b_s_l_n.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_c_i_d_g.py b/Lib/fontTools/ttLib/tables/_c_i_d_g.py
index b972256..de83d4d 100644
--- a/Lib/fontTools/ttLib/tables/_c_i_d_g.py
+++ b/Lib/fontTools/ttLib/tables/_c_i_d_g.py
@@ -1,5 +1,4 @@
# coding: utf-8
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_c_m_a_p.py b/Lib/fontTools/ttLib/tables/_c_m_a_p.py
index f7f9266..a65a0c2 100644
--- a/Lib/fontTools/ttLib/tables/_c_m_a_p.py
+++ b/Lib/fontTools/ttLib/tables/_c_m_a_p.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc.textTools import safeEval, readHex
from fontTools.misc.encodingTools import getEncoding
from fontTools.ttLib import getSearchRange
diff --git a/Lib/fontTools/ttLib/tables/_c_v_a_r.py b/Lib/fontTools/ttLib/tables/_c_v_a_r.py
index e336d24..09b2c16 100644
--- a/Lib/fontTools/ttLib/tables/_c_v_a_r.py
+++ b/Lib/fontTools/ttLib/tables/_c_v_a_r.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from . import DefaultTable
from fontTools.misc import sstruct
from fontTools.ttLib.tables.TupleVariation import \
diff --git a/Lib/fontTools/ttLib/tables/_c_v_t.py b/Lib/fontTools/ttLib/tables/_c_v_t.py
index 0016e3b..26395c9 100644
--- a/Lib/fontTools/ttLib/tables/_c_v_t.py
+++ b/Lib/fontTools/ttLib/tables/_c_v_t.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import sys
diff --git a/Lib/fontTools/ttLib/tables/_f_e_a_t.py b/Lib/fontTools/ttLib/tables/_f_e_a_t.py
index 35344fd..eb03f8b 100644
--- a/Lib/fontTools/ttLib/tables/_f_e_a_t.py
+++ b/Lib/fontTools/ttLib/tables/_f_e_a_t.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_f_p_g_m.py b/Lib/fontTools/ttLib/tables/_f_p_g_m.py
index 77fdc6d..ec3576c 100644
--- a/Lib/fontTools/ttLib/tables/_f_p_g_m.py
+++ b/Lib/fontTools/ttLib/tables/_f_p_g_m.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from . import DefaultTable
from . import ttProgram
diff --git a/Lib/fontTools/ttLib/tables/_f_v_a_r.py b/Lib/fontTools/ttLib/tables/_f_v_a_r.py
index 933b25e..7487da6 100644
--- a/Lib/fontTools/ttLib/tables/_f_v_a_r.py
+++ b/Lib/fontTools/ttLib/tables/_f_v_a_r.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag, bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
@@ -6,7 +6,7 @@
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
)
-from fontTools.misc.textTools import safeEval, num2binary, binary2num
+from fontTools.misc.textTools import safeEval
from fontTools.ttLib import TTLibError
from . import DefaultTable
import struct
diff --git a/Lib/fontTools/ttLib/tables/_g_a_s_p.py b/Lib/fontTools/ttLib/tables/_g_a_s_p.py
index b49ccb5..2c80913 100644
--- a/Lib/fontTools/ttLib/tables/_g_a_s_p.py
+++ b/Lib/fontTools/ttLib/tables/_g_a_s_p.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import struct
diff --git a/Lib/fontTools/ttLib/tables/_g_c_i_d.py b/Lib/fontTools/ttLib/tables/_g_c_i_d.py
index b2da40a..2e746c8 100644
--- a/Lib/fontTools/ttLib/tables/_g_c_i_d.py
+++ b/Lib/fontTools/ttLib/tables/_g_c_i_d.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
index e12969e..4680ddb 100644
--- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py
+++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
@@ -1,7 +1,7 @@
"""_g_l_y_f.py -- Converter classes for the 'glyf' table."""
from collections import namedtuple
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin, tostr
from fontTools.misc import sstruct
from fontTools import ttLib
from fontTools import version
@@ -152,7 +152,7 @@
if glyph.numberOfContours:
if splitGlyphs:
glyphPath = userNameToFileName(
- tounicode(glyphName, 'utf-8'),
+ tostr(glyphName, 'utf-8'),
existingGlyphFiles,
prefix=path + ".",
suffix=ext)
@@ -1506,12 +1506,12 @@
p = self._checkFloat(p)
self._a.extend(p)
- def toInt(self):
+ def toInt(self, *, round=otRound):
if not self.isFloat():
return
a = array.array("h")
for n in self._a:
- a.append(otRound(n))
+ a.append(round(n))
self._a = a
def relativeToAbsolute(self):
@@ -1626,13 +1626,9 @@
for i in range(len(a)):
a[i] = -a[i]
return r
- def __round__(self):
- """
- Note: This is Python 3 only. Python 2 does not call __round__.
- As such, we cannot test this method either. :(
- """
+ def __round__(self, *, round=otRound):
r = self.copy()
- r.toInt()
+ r.toInt(round=round)
return r
def __add__(self, other): return self.copy().__iadd__(other)
diff --git a/Lib/fontTools/ttLib/tables/_g_v_a_r.py b/Lib/fontTools/ttLib/tables/_g_v_a_r.py
index 9441707..8c9b530 100644
--- a/Lib/fontTools/ttLib/tables/_g_v_a_r.py
+++ b/Lib/fontTools/ttLib/tables/_g_v_a_r.py
@@ -1,8 +1,6 @@
-from fontTools.misc.py23 import *
-from fontTools import ttLib
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
-from fontTools.ttLib import TTLibError
from . import DefaultTable
import array
import itertools
diff --git a/Lib/fontTools/ttLib/tables/_h_d_m_x.py b/Lib/fontTools/ttLib/tables/_h_d_m_x.py
index db5d9d8..954d1bc 100644
--- a/Lib/fontTools/ttLib/tables/_h_d_m_x.py
+++ b/Lib/fontTools/ttLib/tables/_h_d_m_x.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, strjoin
from fontTools.misc import sstruct
from . import DefaultTable
import array
diff --git a/Lib/fontTools/ttLib/tables/_h_e_a_d.py b/Lib/fontTools/ttLib/tables/_h_e_a_d.py
index 154669a..4d19da0 100644
--- a/Lib/fontTools/ttLib/tables/_h_e_a_d.py
+++ b/Lib/fontTools/ttLib/tables/_h_e_a_d.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import floatToFixedToStr, strToFixedToFloat
from fontTools.misc.textTools import safeEval, num2binary, binary2num
diff --git a/Lib/fontTools/ttLib/tables/_h_h_e_a.py b/Lib/fontTools/ttLib/tables/_h_h_e_a.py
index 4d93b28..9b8baaa 100644
--- a/Lib/fontTools/ttLib/tables/_h_h_e_a.py
+++ b/Lib/fontTools/ttLib/tables/_h_h_e_a.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from fontTools.misc.fixedTools import (
diff --git a/Lib/fontTools/ttLib/tables/_h_m_t_x.py b/Lib/fontTools/ttLib/tables/_h_m_t_x.py
index a690a6e..6980b8d 100644
--- a/Lib/fontTools/ttLib/tables/_h_m_t_x.py
+++ b/Lib/fontTools/ttLib/tables/_h_m_t_x.py
@@ -1,5 +1,4 @@
-from fontTools.misc.py23 import *
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import otRound
from fontTools import ttLib
from fontTools.misc.textTools import safeEval
from . import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/_k_e_r_n.py b/Lib/fontTools/ttLib/tables/_k_e_r_n.py
index 39e6592..f3f714b 100644
--- a/Lib/fontTools/ttLib/tables/_k_e_r_n.py
+++ b/Lib/fontTools/ttLib/tables/_k_e_r_n.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import getSearchRange
from fontTools.misc.textTools import safeEval, readHex
from fontTools.misc.fixedTools import (
diff --git a/Lib/fontTools/ttLib/tables/_l_c_a_r.py b/Lib/fontTools/ttLib/tables/_l_c_a_r.py
index a3ee0dd..e63310e 100644
--- a/Lib/fontTools/ttLib/tables/_l_c_a_r.py
+++ b/Lib/fontTools/ttLib/tables/_l_c_a_r.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_l_o_c_a.py b/Lib/fontTools/ttLib/tables/_l_o_c_a.py
index df61faf..6a8693e 100644
--- a/Lib/fontTools/ttLib/tables/_l_o_c_a.py
+++ b/Lib/fontTools/ttLib/tables/_l_o_c_a.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from . import DefaultTable
import sys
import array
diff --git a/Lib/fontTools/ttLib/tables/_l_t_a_g.py b/Lib/fontTools/ttLib/tables/_l_t_a_g.py
index 011c46b..caec72a 100644
--- a/Lib/fontTools/ttLib/tables/_l_t_a_g.py
+++ b/Lib/fontTools/ttLib/tables/_l_t_a_g.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, tobytes
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import struct
diff --git a/Lib/fontTools/ttLib/tables/_m_a_x_p.py b/Lib/fontTools/ttLib/tables/_m_a_x_p.py
index fc1e69d..e810806 100644
--- a/Lib/fontTools/ttLib/tables/_m_a_x_p.py
+++ b/Lib/fontTools/ttLib/tables/_m_a_x_p.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/_m_e_t_a.py b/Lib/fontTools/ttLib/tables/_m_e_t_a.py
index 2cd479c..1a125f8 100644
--- a/Lib/fontTools/ttLib/tables/_m_e_t_a.py
+++ b/Lib/fontTools/ttLib/tables/_m_e_t_a.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, strjoin
from fontTools.misc import sstruct
from fontTools.misc.textTools import readHex
from fontTools.ttLib import TTLibError
diff --git a/Lib/fontTools/ttLib/tables/_m_o_r_t.py b/Lib/fontTools/ttLib/tables/_m_o_r_t.py
index ea86ba8..261e593 100644
--- a/Lib/fontTools/ttLib/tables/_m_o_r_t.py
+++ b/Lib/fontTools/ttLib/tables/_m_o_r_t.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_m_o_r_x.py b/Lib/fontTools/ttLib/tables/_m_o_r_x.py
index e64e2b8..da299c6 100644
--- a/Lib/fontTools/ttLib/tables/_m_o_r_x.py
+++ b/Lib/fontTools/ttLib/tables/_m_o_r_x.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_n_a_m_e.py b/Lib/fontTools/ttLib/tables/_n_a_m_e.py
index 4bb9024..206469d 100644
--- a/Lib/fontTools/ttLib/tables/_n_a_m_e.py
+++ b/Lib/fontTools/ttLib/tables/_n_a_m_e.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, bytesjoin, strjoin, tobytes, tostr
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from fontTools.misc.encodingTools import getEncoding
@@ -133,7 +133,7 @@
"""
if not hasattr(self, 'names'):
self.names = []
- if not isinstance(string, unicode):
+ if not isinstance(string, str):
if isinstance(string, bytes):
log.warning(
"name string is bytes, ensure it's correctly encoded: %r", string)
@@ -310,10 +310,9 @@
"'platforms' must contain at least one (platformID, platEncID, langID) tuple"
if not hasattr(self, 'names'):
self.names = []
- if not isinstance(string, unicode):
+ if not isinstance(string, str):
raise TypeError(
- "expected %s, found %s: %r" % (
- unicode.__name__, type(string).__name__,string ))
+ "expected str, found %s: %r" % (type(string).__name__, string))
nameID = self._findUnusedNameID(minNameID + 1)
for platformID, platEncID, langID in platforms:
self.names.append(makeName(string, nameID, platformID, platEncID, langID))
@@ -457,7 +456,7 @@
elif byteord(string[0]) == 0 and all(isascii(byteord(b)) for b in string[1:]):
string = bytesjoin(b'\0'+bytechr(byteord(b)) for b in string[1:])
- string = tounicode(string, encoding=encoding, errors=errors)
+ string = tostr(string, encoding=encoding, errors=errors)
# If decoded strings still looks like UTF-16BE, it suggests a double-encoding.
# Fix it up.
diff --git a/Lib/fontTools/ttLib/tables/_o_p_b_d.py b/Lib/fontTools/ttLib/tables/_o_p_b_d.py
index a876896..b22af21 100644
--- a/Lib/fontTools/ttLib/tables/_o_p_b_d.py
+++ b/Lib/fontTools/ttLib/tables/_o_p_b_d.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_p_o_s_t.py b/Lib/fontTools/ttLib/tables/_p_o_s_t.py
index 3dd3b77..e26e81f 100644
--- a/Lib/fontTools/ttLib/tables/_p_o_s_t.py
+++ b/Lib/fontTools/ttLib/tables/_p_o_s_t.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, byteord, tobytes, tostr
from fontTools import ttLib
from fontTools.ttLib.standardGlyphOrder import standardGlyphOrder
from fontTools.misc import sstruct
diff --git a/Lib/fontTools/ttLib/tables/_p_r_e_p.py b/Lib/fontTools/ttLib/tables/_p_r_e_p.py
index b66ad1b..7f517fb 100644
--- a/Lib/fontTools/ttLib/tables/_p_r_e_p.py
+++ b/Lib/fontTools/ttLib/tables/_p_r_e_p.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools import ttLib
superclass = ttLib.getTableClass("fpgm")
diff --git a/Lib/fontTools/ttLib/tables/_p_r_o_p.py b/Lib/fontTools/ttLib/tables/_p_r_o_p.py
index 7b4738a..aead9d7 100644
--- a/Lib/fontTools/ttLib/tables/_p_r_o_p.py
+++ b/Lib/fontTools/ttLib/tables/_p_r_o_p.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from .otBase import BaseTTXConverter
diff --git a/Lib/fontTools/ttLib/tables/_s_b_i_x.py b/Lib/fontTools/ttLib/tables/_s_b_i_x.py
index 0bfabca..c4b2ad3 100644
--- a/Lib/fontTools/ttLib/tables/_s_b_i_x.py
+++ b/Lib/fontTools/ttLib/tables/_s_b_i_x.py
@@ -1,9 +1,7 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, num2binary, binary2num
from . import DefaultTable
-from .sbixGlyph import *
-from .sbixStrike import *
+from .sbixStrike import Strike
sbixHeaderFormat = """
diff --git a/Lib/fontTools/ttLib/tables/_t_r_a_k.py b/Lib/fontTools/ttLib/tables/_t_r_a_k.py
index 7448916..7f3227d 100644
--- a/Lib/fontTools/ttLib/tables/_t_r_a_k.py
+++ b/Lib/fontTools/ttLib/tables/_t_r_a_k.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
diff --git a/Lib/fontTools/ttLib/tables/_v_h_e_a.py b/Lib/fontTools/ttLib/tables/_v_h_e_a.py
index 55ba45a..2bb2466 100644
--- a/Lib/fontTools/ttLib/tables/_v_h_e_a.py
+++ b/Lib/fontTools/ttLib/tables/_v_h_e_a.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from fontTools.misc.fixedTools import (
diff --git a/Lib/fontTools/ttLib/tables/_v_m_t_x.py b/Lib/fontTools/ttLib/tables/_v_m_t_x.py
index 761a4c9..fc818d8 100644
--- a/Lib/fontTools/ttLib/tables/_v_m_t_x.py
+++ b/Lib/fontTools/ttLib/tables/_v_m_t_x.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools import ttLib
superclass = ttLib.getTableClass("hmtx")
diff --git a/Lib/fontTools/ttLib/tables/asciiTable.py b/Lib/fontTools/ttLib/tables/asciiTable.py
index 0ad83eb..7b036c8 100644
--- a/Lib/fontTools/ttLib/tables/asciiTable.py
+++ b/Lib/fontTools/ttLib/tables/asciiTable.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import strjoin, tobytes, tostr
from . import DefaultTable
diff --git a/Lib/fontTools/ttLib/tables/otBase.py b/Lib/fontTools/ttLib/tables/otBase.py
index 5ce32c1..3c07f9e 100644
--- a/Lib/fontTools/ttLib/tables/otBase.py
+++ b/Lib/fontTools/ttLib/tables/otBase.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag, bytesjoin
from .DefaultTable import DefaultTable
import sys
import array
@@ -654,9 +654,15 @@
def compile(self, writer, font):
self.ensureDecompiled()
+ # TODO Following hack to be removed by rewriting how FormatSwitching tables
+ # are handled.
+ # https://github.com/fonttools/fonttools/pull/2238#issuecomment-805192631
if hasattr(self, 'preWrite'):
+ deleteFormat = not hasattr(self, 'Format')
table = self.preWrite(font)
+ deleteFormat = deleteFormat and hasattr(self, 'Format')
else:
+ deleteFormat = False
table = self.__dict__.copy()
# some count references may have been initialized in a custom preWrite; we set
@@ -740,6 +746,9 @@
if conv.isPropagated:
writer[conv.name] = value
+ if deleteFormat:
+ del self.Format
+
def readFormat(self, reader):
pass
diff --git a/Lib/fontTools/ttLib/tables/otConverters.py b/Lib/fontTools/ttLib/tables/otConverters.py
index 96d461a..4af38ac 100644
--- a/Lib/fontTools/ttLib/tables/otConverters.py
+++ b/Lib/fontTools/ttLib/tables/otConverters.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, tobytes, tostr
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
@@ -338,6 +338,18 @@
log.warning("name id %d missing from name table" % value)
xmlWriter.newline()
+class STATFlags(UShort):
+ def xmlWrite(self, xmlWriter, font, value, name, attrs):
+ xmlWriter.simpletag(name, attrs + [("value", value)])
+ flags = []
+ if value & 0x01:
+ flags.append("OlderSiblingFontAttribute")
+ if value & 0x02:
+ flags.append("ElidableAxisValueName")
+ if flags:
+ xmlWriter.write(" ")
+ xmlWriter.comment(" ".join(flags))
+ xmlWriter.newline()
class FloatValue(SimpleValue):
@staticmethod
@@ -412,8 +424,8 @@
zeroPos = data.find(b"\0")
if zeroPos >= 0:
data = data[:zeroPos]
- s = tounicode(data, encoding="ascii", errors="replace")
- if s != tounicode(data, encoding="ascii", errors="ignore"):
+ s = tostr(data, encoding="ascii", errors="replace")
+ if s != tostr(data, encoding="ascii", errors="ignore"):
log.warning('replaced non-ASCII characters in "%s"' %
s)
return s
@@ -1745,7 +1757,6 @@
"int8": Int8,
"int16": Short,
"uint8": UInt8,
- "uint8": UInt8,
"uint16": UShort,
"uint24": UInt24,
"uint32": ULong,
@@ -1770,6 +1781,7 @@
"LookupFlag": LookupFlag,
"ExtendMode": ExtendMode,
"CompositeMode": CompositeMode,
+ "STATFlags": STATFlags,
# AAT
"CIDGlyphMap": CIDGlyphMap,
diff --git a/Lib/fontTools/ttLib/tables/otData.py b/Lib/fontTools/ttLib/tables/otData.py
index 28b40c4..c429416 100755
--- a/Lib/fontTools/ttLib/tables/otData.py
+++ b/Lib/fontTools/ttLib/tables/otData.py
@@ -1,6 +1,3 @@
-# coding: utf-8
-from fontTools.misc.py23 import *
-
otData = [
#
@@ -872,7 +869,7 @@
('AxisValueFormat1', [
('uint16', 'Format', None, None, 'Format, = 1'),
('uint16', 'AxisIndex', None, None, 'Index into the axis record array identifying the axis of design variation to which the axis value record applies.'),
- ('uint16', 'Flags', None, None, 'Flags.'),
+ ('STATFlags', 'Flags', None, None, 'Flags.'),
('NameID', 'ValueNameID', None, None, ''),
('Fixed', 'Value', None, None, ''),
]),
@@ -880,7 +877,7 @@
('AxisValueFormat2', [
('uint16', 'Format', None, None, 'Format, = 2'),
('uint16', 'AxisIndex', None, None, 'Index into the axis record array identifying the axis of design variation to which the axis value record applies.'),
- ('uint16', 'Flags', None, None, 'Flags.'),
+ ('STATFlags', 'Flags', None, None, 'Flags.'),
('NameID', 'ValueNameID', None, None, ''),
('Fixed', 'NominalValue', None, None, ''),
('Fixed', 'RangeMinValue', None, None, ''),
@@ -890,7 +887,7 @@
('AxisValueFormat3', [
('uint16', 'Format', None, None, 'Format, = 3'),
('uint16', 'AxisIndex', None, None, 'Index into the axis record array identifying the axis of design variation to which the axis value record applies.'),
- ('uint16', 'Flags', None, None, 'Flags.'),
+ ('STATFlags', 'Flags', None, None, 'Flags.'),
('NameID', 'ValueNameID', None, None, ''),
('Fixed', 'Value', None, None, ''),
('Fixed', 'LinkedValue', None, None, ''),
@@ -899,7 +896,7 @@
('AxisValueFormat4', [
('uint16', 'Format', None, None, 'Format, = 4'),
('uint16', 'AxisCount', None, None, 'The total number of axes contributing to this axis-values combination.'),
- ('uint16', 'Flags', None, None, 'Flags.'),
+ ('STATFlags', 'Flags', None, None, 'Flags.'),
('NameID', 'ValueNameID', None, None, ''),
('struct', 'AxisValueRecord', 'AxisCount', 0, 'Array of AxisValue records that provide the combination of axis values, one for each contributing axis. '),
]),
diff --git a/Lib/fontTools/ttLib/tables/otTables.py b/Lib/fontTools/ttLib/tables/otTables.py
index 008909b..85befb3 100644
--- a/Lib/fontTools/ttLib/tables/otTables.py
+++ b/Lib/fontTools/ttLib/tables/otTables.py
@@ -8,8 +8,8 @@
from enum import IntEnum
import itertools
from collections import namedtuple
-from fontTools.misc.py23 import *
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.py23 import bytesjoin
+from fontTools.misc.roundTools import otRound
from fontTools.misc.textTools import pad, safeEval
from .otBase import (
BaseTable, FormatSwitchingBaseTable, ValueRecord, CountReference,
@@ -558,6 +558,7 @@
else:
self.glyphs = []
log.warning("Unknown Coverage format: %s", self.Format)
+ del self.Format # Don't need this anymore
def preWrite(self, font):
glyphs = getattr(self, "glyphs", None)
@@ -739,6 +740,7 @@
else:
assert 0, "unknown format: %s" % self.Format
self.mapping = mapping
+ del self.Format # Don't need this anymore
def preWrite(self, font):
mapping = getattr(self, "mapping", None)
@@ -809,6 +811,7 @@
else:
assert 0, "unknown format: %s" % self.Format
self.mapping = mapping
+ del self.Format # Don't need this anymore
def preWrite(self, font):
mapping = getattr(self, "mapping", None)
@@ -927,6 +930,7 @@
else:
log.warning("Unknown ClassDef format: %s", self.Format)
self.classDefs = classDefs
+ del self.Format # Don't need this anymore
def _getClassRanges(self, font):
classDefs = getattr(self, "classDefs", None)
@@ -1015,6 +1019,7 @@
else:
assert 0, "unknown format: %s" % self.Format
self.alternates = alternates
+ del self.Format # Don't need this anymore
def preWrite(self, font):
self.Format = 1
@@ -1085,6 +1090,7 @@
else:
assert 0, "unknown format: %s" % self.Format
self.ligatures = ligatures
+ del self.Format # Don't need this anymore
def preWrite(self, font):
self.Format = 1
@@ -1681,7 +1687,6 @@
oldSubTable.MarkCoverage.glyphs = oldMarkCoverage
newSubTable.MarkCoverage = oldSubTable.MarkCoverage.__class__()
- newSubTable.MarkCoverage.Format = oldSubTable.MarkCoverage.Format
newSubTable.MarkCoverage.glyphs = newMarkCoverage
# share the same BaseCoverage in both halves
diff --git a/Lib/fontTools/ttLib/tables/sbixGlyph.py b/Lib/fontTools/ttLib/tables/sbixGlyph.py
index c27ecfe..fe29c09 100644
--- a/Lib/fontTools/ttLib/tables/sbixGlyph.py
+++ b/Lib/fontTools/ttLib/tables/sbixGlyph.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import readHex, safeEval
import struct
diff --git a/Lib/fontTools/ttLib/tables/sbixStrike.py b/Lib/fontTools/ttLib/tables/sbixStrike.py
index 7e3e17e..b367a99 100644
--- a/Lib/fontTools/ttLib/tables/sbixStrike.py
+++ b/Lib/fontTools/ttLib/tables/sbixStrike.py
@@ -1,7 +1,6 @@
-from fontTools.misc.py23 import *
from fontTools.misc import sstruct
-from fontTools.misc.textTools import readHex
-from .sbixGlyph import *
+from fontTools.misc.textTools import safeEval
+from .sbixGlyph import Glyph
import struct
sbixStrikeHeaderFormat = """
diff --git a/Lib/fontTools/ttLib/tables/ttProgram.py b/Lib/fontTools/ttLib/tables/ttProgram.py
index 3094d62..a1dfa3c 100644
--- a/Lib/fontTools/ttLib/tables/ttProgram.py
+++ b/Lib/fontTools/ttLib/tables/ttProgram.py
@@ -1,8 +1,9 @@
"""ttLib.tables.ttProgram.py -- Assembler/disassembler for TrueType bytecode programs."""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import strjoin
from fontTools.misc.textTools import num2binary, binary2num, readHex
import array
+from io import StringIO
import re
import logging
diff --git a/Lib/fontTools/ttLib/ttCollection.py b/Lib/fontTools/ttLib/ttCollection.py
index eb22ba7..3db4c8c 100644
--- a/Lib/fontTools/ttLib/ttCollection.py
+++ b/Lib/fontTools/ttLib/ttCollection.py
@@ -1,6 +1,6 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib.ttFont import TTFont
from fontTools.ttLib.sfnt import readTTCHeader, writeTTCHeader
+from io import BytesIO
import struct
import logging
@@ -104,7 +104,7 @@
return self.fonts[item]
def __setitem__(self, item, value):
- self.fonts[item] = values
+ self.fonts[item] = value
def __delitem__(self, item):
return self.fonts[item]
diff --git a/Lib/fontTools/ttLib/ttFont.py b/Lib/fontTools/ttLib/ttFont.py
index 811cf00..41a4875 100644
--- a/Lib/fontTools/ttLib/ttFont.py
+++ b/Lib/fontTools/ttLib/ttFont.py
@@ -1,11 +1,12 @@
from fontTools.misc import xmlWriter
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag, byteord, tostr
from fontTools.misc.loggingTools import deprecateArgument
from fontTools.ttLib import TTLibError
from fontTools.ttLib.sfnt import SFNTReader, SFNTWriter
+from io import BytesIO, StringIO
import os
import logging
-import itertools
+import traceback
log = logging.getLogger(__name__)
@@ -161,22 +162,17 @@
if self.lazy and self.reader.file.name == file:
raise TTLibError(
"Can't overwrite TTFont when 'lazy' attribute is True")
- closeStream = True
- file = open(file, "wb")
+ createStream = True
else:
# assume "file" is a writable file object
- closeStream = False
+ createStream = False
tmp = BytesIO()
writer_reordersTables = self._save(tmp)
- if (reorderTables is None or writer_reordersTables or
+ if not (reorderTables is None or writer_reordersTables or
(reorderTables is False and self.reader is None)):
- # don't reorder tables and save as is
- file.write(tmp.getvalue())
- tmp.close()
- else:
if reorderTables is False:
# sort tables using the original font's order
tableOrder = list(self.reader.keys())
@@ -186,12 +182,17 @@
tmp.flush()
tmp2 = BytesIO()
reorderFontTables(tmp, tmp2, tableOrder)
- file.write(tmp2.getvalue())
tmp.close()
- tmp2.close()
+ tmp = tmp2
- if closeStream:
- file.close()
+ if createStream:
+ # "file" is a path
+ with open(file, "wb") as file:
+ file.write(tmp.getvalue())
+ else:
+ file.write(tmp.getvalue())
+
+ tmp.close()
def _save(self, file, tableCache=None):
"""Internal function, to be shared by save() and TTCollection.save()"""
@@ -368,45 +369,46 @@
def __getitem__(self, tag):
tag = Tag(tag)
- try:
- return self.tables[tag]
- except KeyError:
+ table = self.tables.get(tag)
+ if table is None:
if tag == "GlyphOrder":
table = GlyphOrder(tag)
self.tables[tag] = table
- return table
- if self.reader is not None:
- import traceback
- log.debug("Reading '%s' table from disk", tag)
- data = self.reader[tag]
- if self._tableCache is not None:
- table = self._tableCache.get((Tag(tag), data))
- if table is not None:
- return table
- tableClass = getTableClass(tag)
- table = tableClass(tag)
- self.tables[tag] = table
- log.debug("Decompiling '%s' table", tag)
- try:
- table.decompile(data, self)
- except:
- if not self.ignoreDecompileErrors:
- raise
- # fall back to DefaultTable, retaining the binary table data
- log.exception(
- "An exception occurred during the decompilation of the '%s' table", tag)
- from .tables.DefaultTable import DefaultTable
- file = StringIO()
- traceback.print_exc(file=file)
- table = DefaultTable(tag)
- table.ERROR = file.getvalue()
- self.tables[tag] = table
- table.decompile(data, self)
- if self._tableCache is not None:
- self._tableCache[(Tag(tag), data)] = table
- return table
+ elif self.reader is not None:
+ table = self._readTable(tag)
else:
raise KeyError("'%s' table not found" % tag)
+ return table
+
+ def _readTable(self, tag):
+ log.debug("Reading '%s' table from disk", tag)
+ data = self.reader[tag]
+ if self._tableCache is not None:
+ table = self._tableCache.get((tag, data))
+ if table is not None:
+ return table
+ tableClass = getTableClass(tag)
+ table = tableClass(tag)
+ self.tables[tag] = table
+ log.debug("Decompiling '%s' table", tag)
+ try:
+ table.decompile(data, self)
+ except Exception:
+ if not self.ignoreDecompileErrors:
+ raise
+ # fall back to DefaultTable, retaining the binary table data
+ log.exception(
+ "An exception occurred during the decompilation of the '%s' table", tag)
+ from .tables.DefaultTable import DefaultTable
+ file = StringIO()
+ traceback.print_exc(file=file)
+ table = DefaultTable(tag)
+ table.ERROR = file.getvalue()
+ self.tables[tag] = table
+ table.decompile(data, self)
+ if self._tableCache is not None:
+ self._tableCache[(tag, data)] = table
+ return table
def __setitem__(self, tag, table):
self.tables[Tag(tag)] = table
@@ -636,7 +638,7 @@
log.debug("reusing '%s' table", tag)
writer.setEntry(tag, entry)
return
- log.debug("writing '%s' table to disk", tag)
+ log.debug("Writing '%s' table to disk", tag)
writer[tag] = tabledata
if tableCache is not None:
tableCache[(Tag(tag), tabledata)] = writer[tag]
@@ -646,7 +648,7 @@
"""
tag = Tag(tag)
if self.isLoaded(tag):
- log.debug("compiling '%s' table", tag)
+ log.debug("Compiling '%s' table", tag)
return self.tables[tag].compile(self)
elif self.reader and tag in self.reader:
log.debug("Reading '%s' table from disk", tag)
diff --git a/Lib/fontTools/ttLib/woff2.py b/Lib/fontTools/ttLib/woff2.py
index d088b70..cc58afa 100644
--- a/Lib/fontTools/ttLib/woff2.py
+++ b/Lib/fontTools/ttLib/woff2.py
@@ -1,4 +1,5 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag, bytechr, byteord, bytesjoin
+from io import BytesIO
import sys
import array
import struct
diff --git a/Lib/fontTools/ttx.py b/Lib/fontTools/ttx.py
index 9522c62..2eed0c5 100644
--- a/Lib/fontTools/ttx.py
+++ b/Lib/fontTools/ttx.py
@@ -86,7 +86,7 @@
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag, tostr
from fontTools.ttLib import TTFont, TTLibError
from fontTools.misc.macCreatorType import getMacCreatorAndType
from fontTools.unicode import setUnicodeData
diff --git a/Lib/fontTools/ufoLib/plistlib.py b/Lib/fontTools/ufoLib/plistlib.py
index cfea9a5..7638168 100644
--- a/Lib/fontTools/ufoLib/plistlib.py
+++ b/Lib/fontTools/ufoLib/plistlib.py
@@ -2,7 +2,8 @@
for the old ufoLib.plistlib module, which was moved to fontTools.misc.plistlib.
Please use the latter instead.
"""
-from fontTools.misc.plistlib import dump, dumps, load, loads, tobytes
+from fontTools.misc.plistlib import dump, dumps, load, loads
+from fontTools.misc.py23 import tobytes
# The following functions were part of the old py2-like ufoLib.plistlib API.
# They are kept only for backward compatiblity.
diff --git a/Lib/fontTools/unicode.py b/Lib/fontTools/unicode.py
index 23589db..e0867aa 100644
--- a/Lib/fontTools/unicode.py
+++ b/Lib/fontTools/unicode.py
@@ -1,7 +1,4 @@
-from fontTools.misc.py23 import *
-
def _makeunicodes(f):
- import re
lines = iter(f.readlines())
unicodes = {}
for line in lines:
@@ -16,7 +13,7 @@
class _UnicodeCustom(object):
def __init__(self, f):
- if isinstance(f, basestring):
+ if isinstance(f, str):
with open(f) as fd:
codes = _makeunicodes(fd)
else:
@@ -39,7 +36,7 @@
except ImportError:
import unicodedata
try:
- return unicodedata.name(unichr(charCode))
+ return unicodedata.name(chr(charCode))
except ValueError:
return "????"
diff --git a/Lib/fontTools/unicodedata/__init__.py b/Lib/fontTools/unicodedata/__init__.py
index 404ad8b..8845b82 100644
--- a/Lib/fontTools/unicodedata/__init__.py
+++ b/Lib/fontTools/unicodedata/__init__.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import byteord, tostr
import re
from bisect import bisect_right
@@ -50,7 +50,7 @@
'Latn'
>>> script(",")
'Zyyy'
- >>> script(unichr(0x10FFFF))
+ >>> script(chr(0x10FFFF))
'Zzzz'
"""
code = byteord(char)
@@ -73,9 +73,9 @@
>>> script_extension("a") == {'Latn'}
True
- >>> script_extension(unichr(0x060C)) == {'Rohg', 'Syrc', 'Yezi', 'Arab', 'Thaa'}
+ >>> script_extension(chr(0x060C)) == {'Rohg', 'Syrc', 'Yezi', 'Arab', 'Thaa'}
True
- >>> script_extension(unichr(0x10FFFF)) == {'Zzzz'}
+ >>> script_extension(chr(0x10FFFF)) == {'Zzzz'}
True
"""
code = byteord(char)
@@ -219,9 +219,9 @@
>>> block("a")
'Basic Latin'
- >>> block(unichr(0x060C))
+ >>> block(chr(0x060C))
'Arabic'
- >>> block(unichr(0xEFFFF))
+ >>> block(chr(0xEFFFF))
'No_Block'
"""
code = byteord(char)
diff --git a/Lib/fontTools/varLib/__init__.py b/Lib/fontTools/varLib/__init__.py
index 605fda2..36ff0d9 100644
--- a/Lib/fontTools/varLib/__init__.py
+++ b/Lib/fontTools/varLib/__init__.py
@@ -18,9 +18,9 @@
API *will* change in near future.
"""
-from fontTools.misc.py23 import *
-from fontTools.misc.fixedTools import otRound
-from fontTools.misc.arrayTools import Vector
+from fontTools.misc.py23 import Tag, tostr
+from fontTools.misc.roundTools import noRound, otRound
+from fontTools.misc.vector import Vector
from fontTools.ttLib import TTFont, newTable
from fontTools.ttLib.tables._f_v_a_r import Axis, NamedInstance
from fontTools.ttLib.tables._g_l_y_f import GlyphCoordinates
@@ -34,6 +34,7 @@
from fontTools.varLib.iup import iup_delta_optimize
from fontTools.varLib.featureVars import addFeatureVariations
from fontTools.designspaceLib import DesignSpaceDocument
+from functools import partial
from collections import OrderedDict, namedtuple
import os.path
import logging
@@ -90,7 +91,7 @@
"stylename element with an 'xml:lang=\"en\"' attribute)."
)
localisedStyleName = dict(instance.localisedStyleName)
- localisedStyleName["en"] = tounicode(instance.styleName)
+ localisedStyleName["en"] = tostr(instance.styleName)
else:
localisedStyleName = instance.localisedStyleName
@@ -99,7 +100,7 @@
inst = NamedInstance()
inst.subfamilyNameID = nameTable.addMultilingualName(localisedStyleName)
if psname is not None:
- psname = tounicode(psname)
+ psname = tostr(psname)
inst.postscriptNameID = nameTable.addName(psname)
inst.coordinates = {axes[k].tag:axes[k].map_backward(v) for k,v in coordinates.items()}
#inst.coordinates = {axes[k].tag:v for k,v in coordinates.items()}
@@ -253,7 +254,7 @@
# Update gvar
gvar.variations[glyph] = []
- deltas = model.getDeltas(allCoords)
+ deltas = model.getDeltas(allCoords, round=partial(GlyphCoordinates.__round__, round=round))
supports = model.supports
assert len(deltas) == len(supports)
@@ -262,7 +263,7 @@
endPts = control.endPts
for i,(delta,support) in enumerate(zip(deltas[1:], supports[1:])):
- if all(abs(v) <= tolerance for v in delta.array) and not isComposite:
+ if all(v == 0 for v in delta.array) and not isComposite:
continue
var = TupleVariation(support, delta)
if optimize:
@@ -304,7 +305,7 @@
font["glyf"].removeHinting()
# TODO: Modify gasp table to deactivate gridfitting for all ranges?
-def _merge_TTHinting(font, masterModel, master_ttfs, tolerance=0.5):
+def _merge_TTHinting(font, masterModel, master_ttfs):
log.info("Merging TT hinting")
assert "cvar" not in font
@@ -363,10 +364,9 @@
return
variations = []
- deltas, supports = masterModel.getDeltasAndSupports(all_cvs)
+ deltas, supports = masterModel.getDeltasAndSupports(all_cvs, round=round) # builtin round calls into Vector.__round__, which uses builtin round as we like
for i,(delta,support) in enumerate(zip(deltas[1:], supports[1:])):
- delta = [otRound(d) for d in delta]
- if all(abs(v) <= tolerance for v in delta):
+ if all(v == 0 for v in delta):
continue
var = TupleVariation(support, delta)
variations.append(var)
@@ -441,7 +441,7 @@
vOrigDeltasAndSupports = {}
for glyph in glyphOrder:
vhAdvances = [metrics[glyph][0] if glyph in metrics else None for metrics in advMetricses]
- vhAdvanceDeltasAndSupports[glyph] = masterModel.getDeltasAndSupports(vhAdvances)
+ vhAdvanceDeltasAndSupports[glyph] = masterModel.getDeltasAndSupports(vhAdvances, round=round)
singleModel = models.allEqual(id(v[1]) for v in vhAdvanceDeltasAndSupports.values())
@@ -453,7 +453,7 @@
# glyphs which have a non-default vOrig.
vOrigs = [metrics[glyph] if glyph in metrics else defaultVOrig
for metrics, defaultVOrig in vOrigMetricses]
- vOrigDeltasAndSupports[glyph] = masterModel.getDeltasAndSupports(vOrigs)
+ vOrigDeltasAndSupports[glyph] = masterModel.getDeltasAndSupports(vOrigs, round=round)
directStore = None
if singleModel:
@@ -463,7 +463,7 @@
varTupleIndexes = list(range(len(supports)))
varData = builder.buildVarData(varTupleIndexes, [], optimize=False)
for glyphName in glyphOrder:
- varData.addItem(vhAdvanceDeltasAndSupports[glyphName][0])
+ varData.addItem(vhAdvanceDeltasAndSupports[glyphName][0], round=noRound)
varData.optimize()
directStore = builder.buildVarStore(varTupleList, [varData])
@@ -473,14 +473,14 @@
for glyphName in glyphOrder:
deltas, supports = vhAdvanceDeltasAndSupports[glyphName]
storeBuilder.setSupports(supports)
- advMapping[glyphName] = storeBuilder.storeDeltas(deltas)
+ advMapping[glyphName] = storeBuilder.storeDeltas(deltas, round=noRound)
if vOrigMetricses:
vOrigMap = {}
for glyphName in glyphOrder:
deltas, supports = vOrigDeltasAndSupports[glyphName]
storeBuilder.setSupports(supports)
- vOrigMap[glyphName] = storeBuilder.storeDeltas(deltas)
+ vOrigMap[glyphName] = storeBuilder.storeDeltas(deltas, round=noRound)
indirectStore = storeBuilder.finish()
mapping2 = indirectStore.optimize()
@@ -751,7 +751,7 @@
if not axis.tag:
raise VarLibValidationError(f"Axis at index {axis_index} needs a tag.")
if not axis.labelNames:
- axis.labelNames["en"] = tounicode(axis_name)
+ axis.labelNames["en"] = tostr(axis_name)
axes[axis_name] = axis
log.info("Axes:\n%s", pformat([axis.asdict() for axis in axes.values()]))
diff --git a/Lib/fontTools/varLib/cff.py b/Lib/fontTools/varLib/cff.py
index 0a6ba22..4eed8b3 100644
--- a/Lib/fontTools/varLib/cff.py
+++ b/Lib/fontTools/varLib/cff.py
@@ -17,10 +17,14 @@
from fontTools.ttLib import newTable
from fontTools import varLib
from fontTools.varLib.models import allEqual
+from fontTools.misc.roundTools import roundFunc
from fontTools.misc.psCharStrings import T2CharString, T2OutlineExtractor
-from fontTools.pens.t2CharStringPen import T2CharStringPen, t2c_round
+from fontTools.pens.t2CharStringPen import T2CharStringPen
+from functools import partial
-from .errors import VarLibCFFDictMergeError, VarLibCFFPointTypeMergeError, VarLibMergeError
+from .errors import (
+ VarLibCFFDictMergeError, VarLibCFFPointTypeMergeError,
+ VarLibCFFHintTypeMergeError,VarLibMergeError)
# Backwards compatibility
@@ -422,16 +426,6 @@
return cvData
-def makeRoundNumberFunc(tolerance):
- if tolerance < 0:
- raise ValueError("Rounding tolerance must be positive")
-
- def roundNumber(val):
- return t2c_round(val, tolerance)
-
- return roundNumber
-
-
class CFFToCFF2OutlineExtractor(T2OutlineExtractor):
""" This class is used to remove the initial width from the CFF
charstring without trying to add the width to self.nominalWidthX,
@@ -518,7 +512,7 @@
self.prev_move_idx = 0
self.seen_moveto = False
self.glyphName = glyphName
- self.roundNumber = makeRoundNumberFunc(roundTolerance)
+ self.round = roundFunc(roundTolerance, round=round)
def add_point(self, point_type, pt_coords):
if self.m_index == 0:
@@ -539,7 +533,7 @@
else:
cmd = self._commands[self.pt_index]
if cmd[0] != hint_type:
- raise VarLibCFFPointTypeMergeError(hint_type, self.pt_index, len(cmd[1]),
+ raise VarLibCFFHintTypeMergeError(hint_type, self.pt_index, len(cmd[1]),
cmd[0], self.glyphName)
cmd[1].append(args)
self.pt_index += 1
@@ -548,14 +542,14 @@
# For hintmask, fonttools.cffLib.specializer.py expects
# each of these to be represented by two sequential commands:
# first holding only the operator name, with an empty arg list,
- # second with an empty string as the op name, and the mask arg list.
+ # second with an empty string as the op name, and the mask arg list.
if self.m_index == 0:
self._commands.append([hint_type, []])
self._commands.append(["", [abs_args]])
else:
cmd = self._commands[self.pt_index]
if cmd[0] != hint_type:
- raise VarLibCFFPointTypeMergeError(hint_type, self.pt_index, len(cmd[1]),
+ raise VarLibCFFHintTypeMergeError(hint_type, self.pt_index, len(cmd[1]),
cmd[0], self.glyphName)
self.pt_index += 1
cmd = self._commands[self.pt_index]
@@ -594,7 +588,7 @@
def getCommands(self):
return self._commands
- def reorder_blend_args(self, commands, get_delta_func, round_func):
+ def reorder_blend_args(self, commands, get_delta_func):
"""
We first re-order the master coordinate values.
For a moveto to lineto, the args are now arranged as:
@@ -637,8 +631,6 @@
else:
# convert to deltas
deltas = get_delta_func(coord)[1:]
- if round_func:
- deltas = [round_func(delta) for delta in deltas]
coord = [coord[0]] + deltas
new_coords.append(coord)
cmd[1] = new_coords
@@ -649,8 +641,7 @@
self, private=None, globalSubrs=None,
var_model=None, optimize=True):
commands = self._commands
- commands = self.reorder_blend_args(commands, var_model.getDeltas,
- self.roundNumber)
+ commands = self.reorder_blend_args(commands, partial (var_model.getDeltas, round=self.round))
if optimize:
commands = specializeCommands(
commands, generalizeFirst=False,
diff --git a/Lib/fontTools/varLib/errors.py b/Lib/fontTools/varLib/errors.py
index b73f188..5840070 100644
--- a/Lib/fontTools/varLib/errors.py
+++ b/Lib/fontTools/varLib/errors.py
@@ -1,3 +1,6 @@
+import textwrap
+
+
class VarLibError(Exception):
"""Base exception for the varLib module."""
@@ -9,8 +12,144 @@
class VarLibMergeError(VarLibError):
"""Raised when input data cannot be merged into a variable font."""
+ def __init__(self, merger, **kwargs):
+ self.merger = merger
+ if not kwargs:
+ kwargs = {}
+ if "stack" in kwargs:
+ self.stack = kwargs["stack"]
+ del kwargs["stack"]
+ else:
+ self.stack = []
+ self.cause = kwargs
-class VarLibCFFDictMergeError(VarLibMergeError):
+ @property
+ def reason(self):
+ return self.__doc__
+
+ def _master_name(self, ix):
+ ttf = self.merger.ttfs[ix]
+ if (
+ "name" in ttf
+ and ttf["name"].getDebugName(1)
+ and ttf["name"].getDebugName(2)
+ ):
+ return ttf["name"].getDebugName(1) + " " + ttf["name"].getDebugName(2)
+ elif hasattr(ttf.reader, "file") and hasattr(ttf.reader.file, "name"):
+ return ttf.reader.file.name
+ else:
+ return "master number %i" % ix
+
+ @property
+ def offender(self):
+ if "expected" in self.cause and "got" in self.cause:
+ index = [x == self.cause["expected"] for x in self.cause["got"]].index(
+ False
+ )
+ return index, self._master_name(index)
+ return None, None
+
+ @property
+ def details(self):
+ if "expected" in self.cause and "got" in self.cause:
+ offender_index, offender = self.offender
+ got = self.cause["got"][offender_index]
+ return f"Expected to see {self.stack[0]}=={self.cause['expected']}, instead saw {got}\n"
+ return ""
+
+ def __str__(self):
+ offender_index, offender = self.offender
+ location = ""
+ if offender:
+ location = f"\n\nThe problem is likely to be in {offender}:\n"
+ context = "".join(reversed(self.stack))
+ basic = textwrap.fill(
+ f"Couldn't merge the fonts, because {self.reason}. "
+ f"This happened while performing the following operation: {context}",
+ width=78,
+ )
+ return "\n\n" + basic + location + self.details
+
+
+class ShouldBeConstant(VarLibMergeError):
+ """some values were different, but should have been the same"""
+
+ @property
+ def details(self):
+ if self.stack[0] != ".FeatureCount":
+ return super().details
+ offender_index, offender = self.offender
+ bad_ttf = self.merger.ttfs[offender_index]
+ good_ttf = self.merger.ttfs[offender_index - 1]
+
+ good_features = [
+ x.FeatureTag
+ for x in good_ttf[self.stack[-1]].table.FeatureList.FeatureRecord
+ ]
+ bad_features = [
+ x.FeatureTag
+ for x in bad_ttf[self.stack[-1]].table.FeatureList.FeatureRecord
+ ]
+ return (
+ "\nIncompatible features between masters.\n"
+ f"Expected: {', '.join(good_features)}.\n"
+ f"Got: {', '.join(bad_features)}.\n"
+ )
+
+
+class FoundANone(VarLibMergeError):
+ """one of the values in a list was empty when it shouldn't have been"""
+
+ @property
+ def offender(self):
+ cause = self.argv[0]
+ index = [x is None for x in cause["got"]].index(True)
+ return index, self._master_name(index)
+
+ @property
+ def details(self):
+ cause, stack = self.args[0], self.args[1:]
+ return f"{stack[0]}=={cause['got']}\n"
+
+
+class MismatchedTypes(VarLibMergeError):
+ """data had inconsistent types"""
+
+
+class LengthsDiffer(VarLibMergeError):
+ """a list of objects had inconsistent lengths"""
+
+
+class KeysDiffer(VarLibMergeError):
+ """a list of objects had different keys"""
+
+
+class InconsistentGlyphOrder(VarLibMergeError):
+ """the glyph order was inconsistent between masters"""
+
+
+class InconsistentExtensions(VarLibMergeError):
+ """the masters use extension lookups in inconsistent ways"""
+
+
+class UnsupportedFormat(VarLibMergeError):
+ """an OpenType subtable (%s) had a format I didn't expect"""
+
+ @property
+ def reason(self):
+ cause, stack = self.args[0], self.args[1:]
+ return self.__doc__ % cause["subtable"]
+
+
+class UnsupportedFormat(UnsupportedFormat):
+ """an OpenType subtable (%s) had inconsistent formats between masters"""
+
+
+class VarLibCFFMergeError(VarLibError):
+ pass
+
+
+class VarLibCFFDictMergeError(VarLibCFFMergeError):
"""Raised when a CFF PrivateDict cannot be merged."""
def __init__(self, key, value, values):
@@ -23,8 +162,8 @@
self.args = (error_msg,)
-class VarLibCFFPointTypeMergeError(VarLibMergeError):
- """Raised when a CFF glyph cannot be merged."""
+class VarLibCFFPointTypeMergeError(VarLibCFFMergeError):
+ """Raised when a CFF glyph cannot be merged because of point type differences."""
def __init__(self, point_type, pt_index, m_index, default_type, glyph_name):
error_msg = (
@@ -35,5 +174,17 @@
self.args = (error_msg,)
+class VarLibCFFHintTypeMergeError(VarLibCFFMergeError):
+ """Raised when a CFF glyph cannot be merged because of hint type differences."""
+
+ def __init__(self, hint_type, cmd_index, m_index, default_type, glyph_name):
+ error_msg = (
+ f"Glyph '{glyph_name}': '{hint_type}' at index {cmd_index} in "
+ f"master index {m_index} differs from the default font hint type "
+ f"'{default_type}'"
+ )
+ self.args = (error_msg,)
+
+
class VariationModelError(VarLibError):
"""Raised when a variation model is faulty."""
diff --git a/Lib/fontTools/varLib/instancer.py b/Lib/fontTools/varLib/instancer/__init__.py
similarity index 96%
rename from Lib/fontTools/varLib/instancer.py
rename to Lib/fontTools/varLib/instancer/__init__.py
index fba1784..9bd30f1 100644
--- a/Lib/fontTools/varLib/instancer.py
+++ b/Lib/fontTools/varLib/instancer/__init__.py
@@ -84,6 +84,7 @@
from fontTools.varLib import builder
from fontTools.varLib.mvar import MVAR_ENTRIES
from fontTools.varLib.merger import MutatorMerger
+from fontTools.varLib.instancer import names
from contextlib import contextmanager
import collections
from copy import deepcopy
@@ -1008,6 +1009,13 @@
):
return # STAT table empty, nothing to do
+ log.info("Instantiating STAT table")
+ newAxisValueTables = axisValuesFromAxisLimits(stat, axisLimits)
+ stat.AxisValueArray.AxisValue = newAxisValueTables
+ stat.AxisValueCount = len(stat.AxisValueArray.AxisValue)
+
+
+def axisValuesFromAxisLimits(stat, axisLimits):
location, axisRanges = splitAxisLocationAndRanges(axisLimits, rangeType=AxisRange)
def isAxisValueOutsideLimits(axisTag, axisValue):
@@ -1019,8 +1027,6 @@
return True
return False
- log.info("Instantiating STAT table")
-
# only keep AxisValues whose axis is not pinned nor restricted, or is pinned at the
# exact (nominal) value, or is restricted but the value is within the new range
designAxes = stat.DesignAxisRecord.Axis
@@ -1048,55 +1054,9 @@
if dropAxisValueTable:
continue
else:
- log.warn("Unknown AxisValue table format (%s); ignored", axisValueFormat)
+ log.warning("Unknown AxisValue table format (%s); ignored", axisValueFormat)
newAxisValueTables.append(axisValueTable)
-
- stat.AxisValueArray.AxisValue = newAxisValueTables
- stat.AxisValueCount = len(stat.AxisValueArray.AxisValue)
-
-
-def getVariationNameIDs(varfont):
- used = []
- if "fvar" in varfont:
- fvar = varfont["fvar"]
- for axis in fvar.axes:
- used.append(axis.axisNameID)
- for instance in fvar.instances:
- used.append(instance.subfamilyNameID)
- if instance.postscriptNameID != 0xFFFF:
- used.append(instance.postscriptNameID)
- if "STAT" in varfont:
- stat = varfont["STAT"].table
- for axis in stat.DesignAxisRecord.Axis if stat.DesignAxisRecord else ():
- used.append(axis.AxisNameID)
- for value in stat.AxisValueArray.AxisValue if stat.AxisValueArray else ():
- used.append(value.ValueNameID)
- # nameIDs <= 255 are reserved by OT spec so we don't touch them
- return {nameID for nameID in used if nameID > 255}
-
-
-@contextmanager
-def pruningUnusedNames(varfont):
- origNameIDs = getVariationNameIDs(varfont)
-
- yield
-
- log.info("Pruning name table")
- exclude = origNameIDs - getVariationNameIDs(varfont)
- varfont["name"].names[:] = [
- record for record in varfont["name"].names if record.nameID not in exclude
- ]
- if "ltag" in varfont:
- # Drop the whole 'ltag' table if all the language-dependent Unicode name
- # records that reference it have been dropped.
- # TODO: Only prune unused ltag tags, renumerating langIDs accordingly.
- # Note ltag can also be used by feat or morx tables, so check those too.
- if not any(
- record
- for record in varfont["name"].names
- if record.platformID == 0 and record.langID != 0xFFFF
- ):
- del varfont["ltag"]
+ return newAxisValueTables
def setMacOverlapFlags(glyfTable):
@@ -1187,6 +1147,7 @@
inplace=False,
optimize=True,
overlap=OverlapMode.KEEP_AND_SET_FLAGS,
+ updateFontNames=False,
):
"""Instantiate variable font, either fully or partially.
@@ -1219,6 +1180,11 @@
contours and components, you can pass OverlapMode.REMOVE. Note that this
requires the skia-pathops package (available to pip install).
The overlap parameter only has effect when generating full static instances.
+ updateFontNames (bool): if True, update the instantiated font's name table using
+ the Axis Value Tables from the STAT table. The name table will be updated so
+ it conforms to the R/I/B/BI model. If the STAT table is missing or
+ an Axis Value table is missing for a given axis coordinate, a ValueError will
+ be raised.
"""
# 'overlap' used to be bool and is now enum; for backward compat keep accepting bool
overlap = OverlapMode(int(overlap))
@@ -1234,6 +1200,10 @@
if not inplace:
varfont = deepcopy(varfont)
+ if updateFontNames:
+ log.info("Updating name table")
+ names.updateNameTable(varfont, axisLimits)
+
if "gvar" in varfont:
instantiateGvar(varfont, normalizedLimits, optimize=optimize)
@@ -1256,7 +1226,7 @@
if "avar" in varfont:
instantiateAvar(varfont, axisLimits)
- with pruningUnusedNames(varfont):
+ with names.pruningUnusedNames(varfont):
if "STAT" in varfont:
instantiateSTAT(varfont, axisLimits)
@@ -1345,7 +1315,7 @@
"locargs",
metavar="AXIS=LOC",
nargs="*",
- help="List of space separated locations. A location consist in "
+ help="List of space separated locations. A location consists of "
"the tag of a variation axis, followed by '=' and one of number, "
"number:number or the literal string 'drop'. "
"E.g.: wdth=100 or wght=75.0:125.0 or wght=drop",
@@ -1377,6 +1347,12 @@
help="Merge overlapping contours and components (only applicable "
"when generating a full instance). Requires skia-pathops",
)
+ parser.add_argument(
+ "--update-name-table",
+ action="store_true",
+ help="Update the instantiated font's `name` table. Input font must have "
+ "a STAT table with Axis Value Tables",
+ )
loggingGroup = parser.add_mutually_exclusive_group(required=False)
loggingGroup.add_argument(
"-v", "--verbose", action="store_true", help="Run more verbosely."
@@ -1428,6 +1404,7 @@
inplace=True,
optimize=options.optimize,
overlap=options.overlap,
+ updateFontNames=options.update_name_table,
)
outfile = (
@@ -1443,9 +1420,3 @@
outfile,
)
varfont.save(outfile)
-
-
-if __name__ == "__main__":
- import sys
-
- sys.exit(main())
diff --git a/Lib/fontTools/varLib/instancer/__main__.py b/Lib/fontTools/varLib/instancer/__main__.py
new file mode 100644
index 0000000..64ffff2
--- /dev/null
+++ b/Lib/fontTools/varLib/instancer/__main__.py
@@ -0,0 +1,5 @@
+import sys
+from fontTools.varLib.instancer import main
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/Lib/fontTools/varLib/instancer/names.py b/Lib/fontTools/varLib/instancer/names.py
new file mode 100644
index 0000000..cfe12a9
--- /dev/null
+++ b/Lib/fontTools/varLib/instancer/names.py
@@ -0,0 +1,379 @@
+"""Helpers for instantiating name table records."""
+
+from contextlib import contextmanager
+from copy import deepcopy
+from enum import IntEnum
+import re
+
+
+class NameID(IntEnum):
+ FAMILY_NAME = 1
+ SUBFAMILY_NAME = 2
+ UNIQUE_FONT_IDENTIFIER = 3
+ FULL_FONT_NAME = 4
+ VERSION_STRING = 5
+ POSTSCRIPT_NAME = 6
+ TYPOGRAPHIC_FAMILY_NAME = 16
+ TYPOGRAPHIC_SUBFAMILY_NAME = 17
+ VARIATIONS_POSTSCRIPT_NAME_PREFIX = 25
+
+
+ELIDABLE_AXIS_VALUE_NAME = 2
+
+
+def getVariationNameIDs(varfont):
+ used = []
+ if "fvar" in varfont:
+ fvar = varfont["fvar"]
+ for axis in fvar.axes:
+ used.append(axis.axisNameID)
+ for instance in fvar.instances:
+ used.append(instance.subfamilyNameID)
+ if instance.postscriptNameID != 0xFFFF:
+ used.append(instance.postscriptNameID)
+ if "STAT" in varfont:
+ stat = varfont["STAT"].table
+ for axis in stat.DesignAxisRecord.Axis if stat.DesignAxisRecord else ():
+ used.append(axis.AxisNameID)
+ for value in stat.AxisValueArray.AxisValue if stat.AxisValueArray else ():
+ used.append(value.ValueNameID)
+ # nameIDs <= 255 are reserved by OT spec so we don't touch them
+ return {nameID for nameID in used if nameID > 255}
+
+
+@contextmanager
+def pruningUnusedNames(varfont):
+ from . import log
+
+ origNameIDs = getVariationNameIDs(varfont)
+
+ yield
+
+ log.info("Pruning name table")
+ exclude = origNameIDs - getVariationNameIDs(varfont)
+ varfont["name"].names[:] = [
+ record for record in varfont["name"].names if record.nameID not in exclude
+ ]
+ if "ltag" in varfont:
+ # Drop the whole 'ltag' table if all the language-dependent Unicode name
+ # records that reference it have been dropped.
+ # TODO: Only prune unused ltag tags, renumerating langIDs accordingly.
+ # Note ltag can also be used by feat or morx tables, so check those too.
+ if not any(
+ record
+ for record in varfont["name"].names
+ if record.platformID == 0 and record.langID != 0xFFFF
+ ):
+ del varfont["ltag"]
+
+
+def updateNameTable(varfont, axisLimits):
+ """Update instatiated variable font's name table using STAT AxisValues.
+
+ Raises ValueError if the STAT table is missing or an Axis Value table is
+ missing for requested axis locations.
+
+ First, collect all STAT AxisValues that match the new default axis locations
+ (excluding "elided" ones); concatenate the strings in design axis order,
+ while giving priority to "synthetic" values (Format 4), to form the
+ typographic subfamily name associated with the new default instance.
+ Finally, update all related records in the name table, making sure that
+ legacy family/sub-family names conform to the the R/I/B/BI (Regular, Italic,
+ Bold, Bold Italic) naming model.
+
+ Example: Updating a partial variable font:
+ | >>> ttFont = TTFont("OpenSans[wdth,wght].ttf")
+ | >>> updateNameTable(ttFont, {"wght": AxisRange(400, 900), "wdth": 75})
+
+ The name table records will be updated in the following manner:
+ NameID 1 familyName: "Open Sans" --> "Open Sans Condensed"
+ NameID 2 subFamilyName: "Regular" --> "Regular"
+ NameID 3 Unique font identifier: "3.000;GOOG;OpenSans-Regular" --> \
+ "3.000;GOOG;OpenSans-Condensed"
+ NameID 4 Full font name: "Open Sans Regular" --> "Open Sans Condensed"
+ NameID 6 PostScript name: "OpenSans-Regular" --> "OpenSans-Condensed"
+ NameID 16 Typographic Family name: None --> "Open Sans"
+ NameID 17 Typographic Subfamily name: None --> "Condensed"
+
+ References:
+ https://docs.microsoft.com/en-us/typography/opentype/spec/stat
+ https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-ids
+ """
+ from . import AxisRange, axisValuesFromAxisLimits
+
+ if "STAT" not in varfont:
+ raise ValueError("Cannot update name table since there is no STAT table.")
+ stat = varfont["STAT"].table
+ if not stat.AxisValueArray:
+ raise ValueError("Cannot update name table since there are no STAT Axis Values")
+ fvar = varfont["fvar"]
+
+ # The updated name table will reflect the new 'zero origin' of the font.
+ # If we're instantiating a partial font, we will populate the unpinned
+ # axes with their default axis values.
+ fvarDefaults = {a.axisTag: a.defaultValue for a in fvar.axes}
+ defaultAxisCoords = deepcopy(axisLimits)
+ for axisTag, val in fvarDefaults.items():
+ if axisTag not in defaultAxisCoords or isinstance(
+ defaultAxisCoords[axisTag], AxisRange
+ ):
+ defaultAxisCoords[axisTag] = val
+
+ axisValueTables = axisValuesFromAxisLimits(stat, defaultAxisCoords)
+ checkAxisValuesExist(stat, axisValueTables, defaultAxisCoords)
+
+ # ignore "elidable" axis values, should be omitted in application font menus.
+ axisValueTables = [
+ v for v in axisValueTables if not v.Flags & ELIDABLE_AXIS_VALUE_NAME
+ ]
+ axisValueTables = _sortAxisValues(axisValueTables)
+ _updateNameRecords(varfont, axisValueTables)
+
+
+def checkAxisValuesExist(stat, axisValues, axisCoords):
+ seen = set()
+ designAxes = stat.DesignAxisRecord.Axis
+ for axisValueTable in axisValues:
+ axisValueFormat = axisValueTable.Format
+ if axisValueTable.Format in (1, 2, 3):
+ axisTag = designAxes[axisValueTable.AxisIndex].AxisTag
+ if axisValueFormat == 2:
+ axisValue = axisValueTable.NominalValue
+ else:
+ axisValue = axisValueTable.Value
+ if axisTag in axisCoords and axisValue == axisCoords[axisTag]:
+ seen.add(axisTag)
+ elif axisValueTable.Format == 4:
+ for rec in axisValueTable.AxisValueRecord:
+ axisTag = designAxes[rec.AxisIndex].AxisTag
+ if axisTag in axisCoords and rec.Value == axisCoords[axisTag]:
+ seen.add(axisTag)
+
+ missingAxes = set(axisCoords) - seen
+ if missingAxes:
+ missing = ", ".join(f"'{i}={axisCoords[i]}'" for i in missingAxes)
+ raise ValueError(f"Cannot find Axis Values [{missing}]")
+
+
+def _sortAxisValues(axisValues):
+ # Sort by axis index, remove duplicates and ensure that format 4 AxisValues
+ # are dominant.
+ # The MS Spec states: "if a format 1, format 2 or format 3 table has a
+ # (nominal) value used in a format 4 table that also has values for
+ # other axes, the format 4 table, being the more specific match, is used",
+ # https://docs.microsoft.com/en-us/typography/opentype/spec/stat#axis-value-table-format-4
+ results = []
+ seenAxes = set()
+ # Sort format 4 axes so the tables with the most AxisValueRecords are first
+ format4 = sorted(
+ [v for v in axisValues if v.Format == 4],
+ key=lambda v: len(v.AxisValueRecord),
+ reverse=True,
+ )
+
+ for val in format4:
+ axisIndexes = set(r.AxisIndex for r in val.AxisValueRecord)
+ minIndex = min(axisIndexes)
+ if not seenAxes & axisIndexes:
+ seenAxes |= axisIndexes
+ results.append((minIndex, val))
+
+ for val in axisValues:
+ if val in format4:
+ continue
+ axisIndex = val.AxisIndex
+ if axisIndex not in seenAxes:
+ seenAxes.add(axisIndex)
+ results.append((axisIndex, val))
+
+ return [axisValue for _, axisValue in sorted(results)]
+
+
+def _updateNameRecords(varfont, axisValues):
+ # Update nametable based on the axisValues using the R/I/B/BI model.
+ nametable = varfont["name"]
+ stat = varfont["STAT"].table
+
+ axisValueNameIDs = [a.ValueNameID for a in axisValues]
+ ribbiNameIDs = [n for n in axisValueNameIDs if _isRibbi(nametable, n)]
+ nonRibbiNameIDs = [n for n in axisValueNameIDs if n not in ribbiNameIDs]
+ elidedNameID = stat.ElidedFallbackNameID
+ elidedNameIsRibbi = _isRibbi(nametable, elidedNameID)
+
+ getName = nametable.getName
+ platforms = set((r.platformID, r.platEncID, r.langID) for r in nametable.names)
+ for platform in platforms:
+ if not all(getName(i, *platform) for i in (1, 2, elidedNameID)):
+ # Since no family name and subfamily name records were found,
+ # we cannot update this set of name Records.
+ continue
+
+ subFamilyName = " ".join(
+ getName(n, *platform).toUnicode() for n in ribbiNameIDs
+ )
+ if nonRibbiNameIDs:
+ typoSubFamilyName = " ".join(
+ getName(n, *platform).toUnicode() for n in axisValueNameIDs
+ )
+ else:
+ typoSubFamilyName = None
+
+ # If neither subFamilyName and typographic SubFamilyName exist,
+ # we will use the STAT's elidedFallbackName
+ if not typoSubFamilyName and not subFamilyName:
+ if elidedNameIsRibbi:
+ subFamilyName = getName(elidedNameID, *platform).toUnicode()
+ else:
+ typoSubFamilyName = getName(elidedNameID, *platform).toUnicode()
+
+ familyNameSuffix = " ".join(
+ getName(n, *platform).toUnicode() for n in nonRibbiNameIDs
+ )
+
+ _updateNameTableStyleRecords(
+ varfont,
+ familyNameSuffix,
+ subFamilyName,
+ typoSubFamilyName,
+ *platform,
+ )
+
+
+def _isRibbi(nametable, nameID):
+ englishRecord = nametable.getName(nameID, 3, 1, 0x409)
+ return (
+ True
+ if englishRecord is not None
+ and englishRecord.toUnicode() in ("Regular", "Italic", "Bold", "Bold Italic")
+ else False
+ )
+
+
+def _updateNameTableStyleRecords(
+ varfont,
+ familyNameSuffix,
+ subFamilyName,
+ typoSubFamilyName,
+ platformID=3,
+ platEncID=1,
+ langID=0x409,
+):
+ # TODO (Marc F) It may be nice to make this part a standalone
+ # font renamer in the future.
+ nametable = varfont["name"]
+ platform = (platformID, platEncID, langID)
+
+ currentFamilyName = nametable.getName(
+ NameID.TYPOGRAPHIC_FAMILY_NAME, *platform
+ ) or nametable.getName(NameID.FAMILY_NAME, *platform)
+
+ currentStyleName = nametable.getName(
+ NameID.TYPOGRAPHIC_SUBFAMILY_NAME, *platform
+ ) or nametable.getName(NameID.SUBFAMILY_NAME, *platform)
+
+ if not all([currentFamilyName, currentStyleName]):
+ raise ValueError(f"Missing required NameIDs 1 and 2 for platform {platform}")
+
+ currentFamilyName = currentFamilyName.toUnicode()
+ currentStyleName = currentStyleName.toUnicode()
+
+ nameIDs = {
+ NameID.FAMILY_NAME: currentFamilyName,
+ NameID.SUBFAMILY_NAME: subFamilyName or "Regular",
+ }
+ if typoSubFamilyName:
+ nameIDs[NameID.FAMILY_NAME] = f"{currentFamilyName} {familyNameSuffix}".strip()
+ nameIDs[NameID.TYPOGRAPHIC_FAMILY_NAME] = currentFamilyName
+ nameIDs[NameID.TYPOGRAPHIC_SUBFAMILY_NAME] = typoSubFamilyName
+ else:
+ # Remove previous Typographic Family and SubFamily names since they're
+ # no longer required
+ for nameID in (
+ NameID.TYPOGRAPHIC_FAMILY_NAME,
+ NameID.TYPOGRAPHIC_SUBFAMILY_NAME,
+ ):
+ nametable.removeNames(nameID=nameID)
+
+ newFamilyName = (
+ nameIDs.get(NameID.TYPOGRAPHIC_FAMILY_NAME) or nameIDs[NameID.FAMILY_NAME]
+ )
+ newStyleName = (
+ nameIDs.get(NameID.TYPOGRAPHIC_SUBFAMILY_NAME) or nameIDs[NameID.SUBFAMILY_NAME]
+ )
+
+ nameIDs[NameID.FULL_FONT_NAME] = f"{newFamilyName} {newStyleName}"
+ nameIDs[NameID.POSTSCRIPT_NAME] = _updatePSNameRecord(
+ varfont, newFamilyName, newStyleName, platform
+ )
+
+ uniqueID = _updateUniqueIdNameRecord(varfont, nameIDs, platform)
+ if uniqueID:
+ nameIDs[NameID.UNIQUE_FONT_IDENTIFIER] = uniqueID
+
+ for nameID, string in nameIDs.items():
+ assert string, nameID
+ nametable.setName(string, nameID, *platform)
+
+ if "fvar" not in varfont:
+ nametable.removeNames(NameID.VARIATIONS_POSTSCRIPT_NAME_PREFIX)
+
+
+def _updatePSNameRecord(varfont, familyName, styleName, platform):
+ # Implementation based on Adobe Technical Note #5902 :
+ # https://wwwimages2.adobe.com/content/dam/acom/en/devnet/font/pdfs/5902.AdobePSNameGeneration.pdf
+ nametable = varfont["name"]
+
+ family_prefix = nametable.getName(
+ NameID.VARIATIONS_POSTSCRIPT_NAME_PREFIX, *platform
+ )
+ if family_prefix:
+ family_prefix = family_prefix.toUnicode()
+ else:
+ family_prefix = familyName
+
+ psName = f"{family_prefix}-{styleName}"
+ # Remove any characters other than uppercase Latin letters, lowercase
+ # Latin letters, digits and hyphens.
+ psName = re.sub(r"[^A-Za-z0-9-]", r"", psName)
+
+ if len(psName) > 127:
+ # Abbreviating the stylename so it fits within 127 characters whilst
+ # conforming to every vendor's specification is too complex. Instead
+ # we simply truncate the psname and add the required "..."
+ return f"{psName[:124]}..."
+ return psName
+
+
+def _updateUniqueIdNameRecord(varfont, nameIDs, platform):
+ nametable = varfont["name"]
+ currentRecord = nametable.getName(NameID.UNIQUE_FONT_IDENTIFIER, *platform)
+ if not currentRecord:
+ return None
+
+ # Check if full name and postscript name are a substring of currentRecord
+ for nameID in (NameID.FULL_FONT_NAME, NameID.POSTSCRIPT_NAME):
+ nameRecord = nametable.getName(nameID, *platform)
+ if not nameRecord:
+ continue
+ if nameRecord.toUnicode() in currentRecord.toUnicode():
+ return currentRecord.toUnicode().replace(
+ nameRecord.toUnicode(), nameIDs[nameRecord.nameID]
+ )
+
+ # Create a new string since we couldn't find any substrings.
+ fontVersion = _fontVersion(varfont, platform)
+ achVendID = varfont["OS/2"].achVendID
+ # Remove non-ASCII characers and trailing spaces
+ vendor = re.sub(r"[^\x00-\x7F]", "", achVendID).strip()
+ psName = nameIDs[NameID.POSTSCRIPT_NAME]
+ return f"{fontVersion};{vendor};{psName}"
+
+
+def _fontVersion(font, platform=(3, 1, 0x409)):
+ nameRecord = font["name"].getName(NameID.VERSION_STRING, *platform)
+ if nameRecord is None:
+ return f'{font["head"].fontRevision:.3f}'
+ # "Version 1.101; ttfautohint (v1.8.1.43-b0c9)" --> "1.101"
+ # Also works fine with inputs "Version 1.101" or "1.101" etc
+ versionNumber = nameRecord.toUnicode().split(";")[0]
+ return versionNumber.lstrip("Version ").strip()
diff --git a/Lib/fontTools/varLib/merger.py b/Lib/fontTools/varLib/merger.py
index 071942b..c9d1438 100644
--- a/Lib/fontTools/varLib/merger.py
+++ b/Lib/fontTools/varLib/merger.py
@@ -3,8 +3,8 @@
"""
import copy
from operator import ior
-from fontTools.misc.fixedTools import otRound
from fontTools.misc import classifyTools
+from fontTools.misc.roundTools import otRound
from fontTools.ttLib.tables import otTables as ot
from fontTools.ttLib.tables import otBase as otBase
from fontTools.ttLib.tables.DefaultTable import DefaultTable
@@ -14,8 +14,18 @@
from functools import reduce
from fontTools.otlLib.builder import buildSinglePos
-from .errors import VarLibMergeError
-
+from .errors import (
+ ShouldBeConstant,
+ FoundANone,
+ MismatchedTypes,
+ LengthsDiffer,
+ KeysDiffer,
+ InconsistentGlyphOrder,
+ InconsistentExtensions,
+ UnsupportedFormat,
+ UnsupportedFormat,
+ VarLibMergeError,
+)
class Merger(object):
@@ -69,7 +79,9 @@
item.ensureDecompiled()
keys = sorted(vars(out).keys())
if not all(keys == sorted(vars(v).keys()) for v in lst):
- raise VarLibMergeError((keys, [sorted(vars(v).keys()) for v in lst]))
+ raise KeysDiffer(self, expected=keys,
+ got=[sorted(vars(v).keys()) for v in lst]
+ )
mergers = self.mergersFor(out)
defaultMerger = mergers.get('*', self.__class__.mergeThings)
try:
@@ -79,44 +91,47 @@
values = [getattr(table, key) for table in lst]
mergerFunc = mergers.get(key, defaultMerger)
mergerFunc(self, value, values)
- except Exception as e:
- e.args = e.args + ('.'+key,)
+ except VarLibMergeError as e:
+ e.stack.append('.'+key)
raise
def mergeLists(self, out, lst):
if not allEqualTo(out, lst, len):
- raise VarLibMergeError((len(out), [len(v) for v in lst]))
+ raise LengthsDiffer(self, expected=len(out), got=[len(x) for x in lst])
for i,(value,values) in enumerate(zip(out, zip(*lst))):
try:
self.mergeThings(value, values)
- except Exception as e:
- e.args = e.args + ('[%d]' % i,)
+ except VarLibMergeError as e:
+ e.stack.append('[%d]' % i)
raise
def mergeThings(self, out, lst):
- try:
- if not allEqualTo(out, lst, type):
- raise VarLibMergeError((out, lst))
- mergerFunc = self.mergersFor(out).get(None, None)
- if mergerFunc is not None:
- mergerFunc(self, out, lst)
- elif hasattr(out, '__dict__'):
- self.mergeObjects(out, lst)
- elif isinstance(out, list):
- self.mergeLists(out, lst)
- else:
- if not allEqualTo(out, lst):
- raise VarLibMergeError((out, lst))
- except Exception as e:
- e.args = e.args + (type(out).__name__,)
- raise
+ if not allEqualTo(out, lst, type):
+ raise MismatchedTypes(self,
+ expected=type(out).__name__,
+ got=[type(x).__name__ for x in lst]
+ )
+ mergerFunc = self.mergersFor(out).get(None, None)
+ if mergerFunc is not None:
+ mergerFunc(self, out, lst)
+ elif hasattr(out, '__dict__'):
+ self.mergeObjects(out, lst)
+ elif isinstance(out, list):
+ self.mergeLists(out, lst)
+ else:
+ if not allEqualTo(out, lst):
+ raise ShouldBeConstant(self, expected=out, got=lst)
def mergeTables(self, font, master_ttfs, tableTags):
-
for tag in tableTags:
if tag not in font: continue
- self.mergeThings(font[tag], [m[tag] if tag in m else None
- for m in master_ttfs])
+ try:
+ self.ttfs = [m for m in master_ttfs if tag in m]
+ self.mergeThings(font[tag], [m[tag] if tag in m else None
+ for m in master_ttfs])
+ except VarLibMergeError as e:
+ e.stack.append(tag)
+ raise
#
# Aligning merger
@@ -128,7 +143,7 @@
def merge(merger, self, lst):
if self is None:
if not allNone(lst):
- raise VarLibMergeError(lst)
+ raise NotANone(self, expected=None, got=lst)
return
lst = [l.classDefs for l in lst]
@@ -141,7 +156,7 @@
for k in allKeys:
allValues = nonNone(l.get(k) for l in lst)
if not allEqual(allValues):
- raise VarLibMergeError(allValues)
+ raise ShouldBeConstant(self, expected=allValues[0], got=lst, stack="."+k)
if not allValues:
self[k] = None
else:
@@ -178,7 +193,7 @@
order = sorted(combined, key=sortKey)
# Make sure all input glyphsets were in proper order
if not all(sorted(vs, key=sortKey) == vs for vs in lst):
- raise VarLibMergeError("Glyph order inconsistent across masters.")
+ raise InconsistentGlyphOrder(self)
del combined
paddedValues = None
@@ -205,10 +220,7 @@
elif self.Format == 2:
return self.Value[self.Coverage.glyphs.index(glyph)]
else:
- raise VarLibMergeError(
- "Cannot retrieve effective value for SinglePos lookup, unsupported "
- f"format {self.Format}."
- )
+ raise UnsupportedFormat(self, subtable="single positioning lookup")
return None
def _Lookup_PairPos_get_effective_value_pair(subtables, firstGlyph, secondGlyph):
@@ -230,17 +242,14 @@
klass2 = self.ClassDef2.classDefs.get(secondGlyph, 0)
return self.Class1Record[klass1].Class2Record[klass2]
else:
- raise VarLibMergeError(
- "Cannot retrieve effective value pair for PairPos lookup, unsupported "
- f"format {self.Format}."
- )
+ raise UnsupportedFormat(self, subtable="pair positioning lookup")
return None
@AligningMerger.merger(ot.SinglePos)
def merge(merger, self, lst):
self.ValueFormat = valueFormat = reduce(int.__or__, [l.ValueFormat for l in lst], 0)
if not (len(lst) == 1 or (valueFormat & ~0xF == 0)):
- raise VarLibMergeError(f"SinglePos format {valueFormat} is unsupported.")
+ raise UnsupportedFormat(self, subtable="single positioning lookup")
# If all have same coverage table and all are format 1,
coverageGlyphs = self.Coverage.glyphs
@@ -400,28 +409,12 @@
return self, classes
-# It's stupid that we need to do this here. Just need to, to match test
-# expecatation results, since ttx prints out format of ClassDef (and Coverage)
-# even though it should not.
-def _ClassDef_calculate_Format(self, font):
- fmt = 2
- ranges = self._getClassRanges(font)
- if ranges:
- startGlyph = ranges[0][1]
- endGlyph = ranges[-1][3]
- glyphCount = endGlyph - startGlyph + 1
- if len(ranges) * 3 >= glyphCount + 1:
- # Format 1 is more compact
- fmt = 1
- self.Format = fmt
-
def _PairPosFormat2_align_matrices(self, lst, font, transparent=False):
matrices = [l.Class1Record for l in lst]
# Align first classes
self.ClassDef1, classes = _ClassDef_merge_classify([l.ClassDef1 for l in lst], [l.Coverage.glyphs for l in lst])
- _ClassDef_calculate_Format(self.ClassDef1, font)
self.Class1Count = len(classes)
new_matrices = []
for l,matrix in zip(lst, matrices):
@@ -460,7 +453,6 @@
# Align second classes
self.ClassDef2, classes = _ClassDef_merge_classify([l.ClassDef2 for l in lst])
- _ClassDef_calculate_Format(self.ClassDef2, font)
self.Class2Count = len(classes)
new_matrices = []
for l,matrix in zip(lst, matrices):
@@ -526,9 +518,7 @@
elif self.Format == 2:
_PairPosFormat2_merge(self, lst, merger)
else:
- raise VarLibMergeError(
- f"Cannot merge PairPos lookup, unsupported format {self.Format}."
- )
+ raise UnsupportedFormat(self, subtable="pair positioning lookup")
del merger.valueFormat1, merger.valueFormat2
@@ -594,8 +584,7 @@
# input masters.
if not allEqual(allClasses):
- raise VarLibMergeError(allClasses)
- if not allClasses:
+ raise allClasses(self, allClasses)
rec = None
else:
rec = ot.MarkRecord()
@@ -644,36 +633,32 @@
@AligningMerger.merger(ot.MarkBasePos)
def merge(merger, self, lst):
if not allEqualTo(self.Format, (l.Format for l in lst)):
- raise VarLibMergeError(
- f"MarkBasePos formats inconsistent across masters, "
- f"expected {self.Format} but got {[l.Format for l in lst]}."
+ raise InconsistentFormats(self,
+ subtable="mark-to-base positioning lookup",
+ expected=self.Format,
+ got=[l.Format for l in lst]
)
if self.Format == 1:
_MarkBasePosFormat1_merge(self, lst, merger)
else:
- raise VarLibMergeError(
- f"Cannot merge MarkBasePos lookup, unsupported format {self.Format}."
- )
+ raise UnsupportedFormat(self, subtable="mark-to-base positioning lookup")
@AligningMerger.merger(ot.MarkMarkPos)
def merge(merger, self, lst):
if not allEqualTo(self.Format, (l.Format for l in lst)):
- raise VarLibMergeError(
- f"MarkMarkPos formats inconsistent across masters, "
- f"expected {self.Format} but got {[l.Format for l in lst]}."
+ raise InconsistentFormats(self,
+ subtable="mark-to-mark positioning lookup",
+ expected=self.Format,
+ got=[l.Format for l in lst]
)
if self.Format == 1:
_MarkBasePosFormat1_merge(self, lst, merger, 'Mark1', 'Mark2')
else:
- raise VarLibMergeError(
- f"Cannot merge MarkMarkPos lookup, unsupported format {self.Format}."
- )
-
+ raise UnsupportedFormat(self, subtable="mark-to-mark positioning lookup")
def _PairSet_flatten(lst, font):
self = ot.PairSet()
self.Coverage = ot.Coverage()
- self.Coverage.Format = 1
# Align them
glyphs, padded = _merge_GlyphOrders(font,
@@ -699,7 +684,6 @@
self = ot.PairPos()
self.Format = 1
self.Coverage = ot.Coverage()
- self.Coverage.Format = 1
self.ValueFormat1 = reduce(int.__or__, [l.ValueFormat1 for l in lst], 0)
self.ValueFormat2 = reduce(int.__or__, [l.ValueFormat2 for l in lst], 0)
@@ -720,7 +704,6 @@
self = ot.PairPos()
self.Format = 2
self.Coverage = ot.Coverage()
- self.Coverage.Format = 1
self.ValueFormat1 = reduce(int.__or__, [l.ValueFormat1 for l in lst], 0)
self.ValueFormat2 = reduce(int.__or__, [l.ValueFormat2 for l in lst], 0)
@@ -797,15 +780,12 @@
continue
if sts[0].__class__.__name__.startswith('Extension'):
if not allEqual([st.__class__ for st in sts]):
- raise VarLibMergeError(
- "Use of extensions inconsistent between masters: "
- f"{[st.__class__.__name__ for st in sts]}."
+ raise InconsistentExtensions(self,
+ expected="Extension",
+ got=[st.__class__.__name__ for st in sts]
)
if not allEqual([st.ExtensionLookupType for st in sts]):
- raise VarLibMergeError(
- "Extension lookup type differs between masters: "
- f"{[st.ExtensionLookupType for st in sts]}."
- )
+ raise InconsistentExtensions(self)
l.LookupType = sts[0].ExtensionLookupType
new_sts = [st.ExtSubTable for st in sts]
del sts[:]
@@ -1034,7 +1014,7 @@
if None in lst:
if allNone(lst):
if out is not None:
- raise VarLibMergeError((out, lst))
+ raise FoundANone(self, got=lst)
return
masterModel = self.model
model, lst = masterModel.getSubModel(lst)
@@ -1055,7 +1035,7 @@
@VariationMerger.merger(ot.BaseCoord)
def merge(merger, self, lst):
if self.Format != 1:
- raise VarLibMergeError(f"BaseCoord format {self.Format} unsupported.")
+ raise UnsupportedFormat(self, subtable="a baseline coordinate")
self.Coordinate, DeviceTable = buildVarDevTable(merger.store_builder, [a.Coordinate for a in lst])
if DeviceTable:
self.Format = 3
@@ -1064,7 +1044,7 @@
@VariationMerger.merger(ot.CaretValue)
def merge(merger, self, lst):
if self.Format != 1:
- raise VarLibMergeError(f"CaretValue format {self.Format} unsupported.")
+ raise UnsupportedFormat(self, subtable="a caret")
self.Coordinate, DeviceTable = buildVarDevTable(merger.store_builder, [a.Coordinate for a in lst])
if DeviceTable:
self.Format = 3
@@ -1073,7 +1053,7 @@
@VariationMerger.merger(ot.Anchor)
def merge(merger, self, lst):
if self.Format != 1:
- raise VarLibMergeError(f"Anchor format {self.Format} unsupported.")
+ raise UnsupportedFormat(self, subtable="an anchor")
self.XCoordinate, XDeviceTable = buildVarDevTable(merger.store_builder, [a.XCoordinate for a in lst])
self.YCoordinate, YDeviceTable = buildVarDevTable(merger.store_builder, [a.YCoordinate for a in lst])
if XDeviceTable or YDeviceTable:
diff --git a/Lib/fontTools/varLib/models.py b/Lib/fontTools/varLib/models.py
index 9cc40b1..9296ded 100644
--- a/Lib/fontTools/varLib/models.py
+++ b/Lib/fontTools/varLib/models.py
@@ -5,6 +5,7 @@
'supportScalar',
'VariationModel']
+from fontTools.misc.roundTools import noRound
from .errors import VariationModelError
@@ -281,34 +282,18 @@
def _computeMasterSupports(self, axisPoints):
supports = []
- deltaWeights = []
- locations = self.locations
- # Compute min/max across each axis, use it as total range.
- # TODO Take this as input from outside?
- minV = {}
- maxV = {}
- for l in locations:
- for k,v in l.items():
- minV[k] = min(v, minV.get(k, v))
- maxV[k] = max(v, maxV.get(k, v))
- for i,loc in enumerate(locations):
- box = {}
- for axis,locV in loc.items():
- if locV > 0:
- box[axis] = (0, locV, maxV[axis])
- else:
- box[axis] = (minV[axis], locV, 0)
-
- locAxes = set(loc.keys())
+ regions = self._locationsToRegions()
+ for i,region in enumerate(regions):
+ locAxes = set(region.keys())
# Walk over previous masters now
- for j,m in enumerate(locations[:i]):
+ for j,prev_region in enumerate(regions[:i]):
# Master with extra axes do not participte
- if not set(m.keys()).issubset(locAxes):
+ if not set(prev_region.keys()).issubset(locAxes):
continue
# If it's NOT in the current box, it does not participate
relevant = True
- for axis, (lower,peak,upper) in box.items():
- if axis not in m or not (m[axis] == peak or lower < m[axis] < upper):
+ for axis, (lower,peak,upper) in region.items():
+ if axis not in prev_region or not (prev_region[axis][1] == peak or lower < prev_region[axis][1] < upper):
relevant = False
break
if not relevant:
@@ -323,10 +308,10 @@
bestAxes = {}
bestRatio = -1
- for axis in m.keys():
- val = m[axis]
- assert axis in box
- lower,locV,upper = box[axis]
+ for axis in prev_region.keys():
+ val = prev_region[axis][1]
+ assert axis in region
+ lower,locV,upper = region[axis]
newLower, newUpper = lower, upper
if val < locV:
newLower = val
@@ -344,21 +329,46 @@
bestAxes[axis] = (newLower, locV, newUpper)
for axis,triple in bestAxes.items ():
- box[axis] = triple
- supports.append(box)
+ region[axis] = triple
+ supports.append(region)
+ self.supports = supports
+ self._computeDeltaWeights()
+ def _locationsToRegions(self):
+ locations = self.locations
+ # Compute min/max across each axis, use it as total range.
+ # TODO Take this as input from outside?
+ minV = {}
+ maxV = {}
+ for l in locations:
+ for k,v in l.items():
+ minV[k] = min(v, minV.get(k, v))
+ maxV[k] = max(v, maxV.get(k, v))
+
+ regions = []
+ for i,loc in enumerate(locations):
+ region = {}
+ for axis,locV in loc.items():
+ if locV > 0:
+ region[axis] = (0, locV, maxV[axis])
+ else:
+ region[axis] = (minV[axis], locV, 0)
+ regions.append(region)
+ return regions
+
+ def _computeDeltaWeights(self):
+ deltaWeights = []
+ for i,loc in enumerate(self.locations):
deltaWeight = {}
# Walk over previous masters now, populate deltaWeight
- for j,m in enumerate(locations[:i]):
- scalar = supportScalar(loc, supports[j])
+ for j,m in enumerate(self.locations[:i]):
+ scalar = supportScalar(loc, self.supports[j])
if scalar:
deltaWeight[j] = scalar
deltaWeights.append(deltaWeight)
-
- self.supports = supports
self.deltaWeights = deltaWeights
- def getDeltas(self, masterValues):
+ def getDeltas(self, masterValues, *, round=noRound):
assert len(masterValues) == len(self.deltaWeights)
mapping = self.reverseMapping
out = []
@@ -366,12 +376,12 @@
delta = masterValues[mapping[i]]
for j,weight in weights.items():
delta -= out[j] * weight
- out.append(delta)
+ out.append(round(delta))
return out
- def getDeltasAndSupports(self, items):
+ def getDeltasAndSupports(self, items, *, round=noRound):
model, items = self.getSubModel(items)
- return model.getDeltas(items), model.supports
+ return model.getDeltas(items, round=round), model.supports
def getScalars(self, loc):
return [supportScalar(loc, support) for support in self.supports]
@@ -393,12 +403,12 @@
scalars = self.getScalars(loc)
return self.interpolateFromDeltasAndScalars(deltas, scalars)
- def interpolateFromMasters(self, loc, masterValues):
- deltas = self.getDeltas(masterValues)
+ def interpolateFromMasters(self, loc, masterValues, *, round=noRound):
+ deltas = self.getDeltas(masterValues, round=round)
return self.interpolateFromDeltas(loc, deltas)
- def interpolateFromMastersAndScalars(self, masterValues, scalars):
- deltas = self.getDeltas(masterValues)
+ def interpolateFromMastersAndScalars(self, masterValues, scalars, *, round=noRound):
+ deltas = self.getDeltas(masterValues, round=round)
return self.interpolateFromDeltasAndScalars(deltas, scalars)
diff --git a/Lib/fontTools/varLib/mutator.py b/Lib/fontTools/varLib/mutator.py
index ad76420..02ce442 100644
--- a/Lib/fontTools/varLib/mutator.py
+++ b/Lib/fontTools/varLib/mutator.py
@@ -3,7 +3,8 @@
$ fonttools varLib.mutator ./NotoSansArabic-VF.ttf wght=140 wdth=85
"""
-from fontTools.misc.fixedTools import floatToFixedToFloat, otRound, floatToFixed
+from fontTools.misc.fixedTools import floatToFixedToFloat, floatToFixed
+from fontTools.misc.roundTools import otRound
from fontTools.pens.boundsPen import BoundsPen
from fontTools.ttLib import TTFont, newTable
from fontTools.ttLib.tables import ttProgram
@@ -345,14 +346,8 @@
# Change maxp attributes as IDEF is added
if 'maxp' in varfont:
maxp = varfont['maxp']
- if hasattr(maxp, "maxInstructionDefs"):
- maxp.maxInstructionDefs += 1
- else:
- setattr(maxp, "maxInstructionDefs", 1)
- if hasattr(maxp, "maxStackElements"):
- maxp.maxStackElements = max(len(loc), maxp.maxStackElements)
- else:
- setattr(maxp, "maxInstructionDefs", len(loc))
+ setattr(maxp, "maxInstructionDefs", 1 + getattr(maxp, "maxInstructionDefs", 0))
+ setattr(maxp, "maxStackElements", max(len(loc), getattr(maxp, "maxStackElements", 0)))
if 'name' in varfont:
log.info("Pruning name table")
diff --git a/Lib/fontTools/varLib/plot.py b/Lib/fontTools/varLib/plot.py
index b6561dc..811559f 100644
--- a/Lib/fontTools/varLib/plot.py
+++ b/Lib/fontTools/varLib/plot.py
@@ -2,8 +2,8 @@
from fontTools.varLib.models import VariationModel, supportScalar
from fontTools.designspaceLib import DesignSpaceDocument
-from mpl_toolkits.mplot3d import axes3d
from matplotlib import pyplot
+from mpl_toolkits.mplot3d import axes3d
from itertools import cycle
import math
import logging
@@ -68,10 +68,10 @@
def _plotLocations2D(model, axis, fig, cols, rows, names, **kwargs):
+ subplot = fig.add_subplot(111)
for i, (support, color, name) in enumerate(
zip(model.supports, cycle(pyplot.cm.Set1.colors), cycle(names))
):
- subplot = fig.add_subplot(rows, cols, i + 1)
if name is not None:
subplot.set_title(name)
subplot.set_xlabel(axis)
@@ -91,10 +91,10 @@
def _plotLocations3D(model, axes, fig, rows, cols, names, **kwargs):
ax1, ax2 = axes
+ axis3D = fig.add_subplot(111, projection='3d')
for i, (support, color, name) in enumerate(
zip(model.supports, cycle(pyplot.cm.Set1.colors), cycle(names))
):
- axis3D = fig.add_subplot(rows, cols, i + 1, projection='3d')
if name is not None:
axis3D.set_title(name)
axis3D.set_xlabel(ax1)
diff --git a/Lib/fontTools/varLib/varStore.py b/Lib/fontTools/varLib/varStore.py
index b28d2a6..8a382df 100644
--- a/Lib/fontTools/varLib/varStore.py
+++ b/Lib/fontTools/varLib/varStore.py
@@ -1,4 +1,4 @@
-from fontTools.misc.fixedTools import otRound
+from fontTools.misc.roundTools import noRound, otRound
from fontTools.ttLib.tables import otTables as ot
from fontTools.varLib.models import supportScalar
from fontTools.varLib.builder import (buildVarRegionList, buildVarStore,
@@ -83,15 +83,12 @@
def storeMasters(self, master_values):
- deltas = self._model.getDeltas(master_values)
- base = otRound(deltas.pop(0))
- return base, self.storeDeltas(deltas)
+ deltas = self._model.getDeltas(master_values, round=round)
+ base = deltas.pop(0)
+ return base, self.storeDeltas(deltas, round=noRound)
- def storeDeltas(self, deltas):
- # Pity that this exists here, since VarData_addItem
- # does the same. But to look into our cache, it's
- # good to adjust deltas here as well...
- deltas = [otRound(d) for d in deltas]
+ def storeDeltas(self, deltas, *, round=round):
+ deltas = [round(d) for d in deltas]
if len(deltas) == len(self._supports) + 1:
deltas = tuple(deltas[1:])
else:
@@ -109,14 +106,14 @@
# Full array. Start new one.
self._add_VarData()
return self.storeDeltas(deltas)
- self._data.addItem(deltas)
+ self._data.addItem(deltas, round=noRound)
varIdx = (self._outer << 16) + inner
self._cache[deltas] = varIdx
return varIdx
-def VarData_addItem(self, deltas):
- deltas = [otRound(d) for d in deltas]
+def VarData_addItem(self, deltas, *, round=round):
+ deltas = [round(d) for d in deltas]
countUs = self.VarRegionCount
countThem = len(deltas)
diff --git a/MANIFEST.in b/MANIFEST.in
index 31a9c25..8e2bcd1 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -12,7 +12,6 @@
include *requirements.txt
include tox.ini
include mypy.ini
-include run-tests.sh
recursive-include Lib/fontTools py.typed
diff --git a/METADATA b/METADATA
index 6bb4a20..6ef136d 100644
--- a/METADATA
+++ b/METADATA
@@ -10,13 +10,13 @@
}
url {
type: ARCHIVE
- value: "https://github.com/fonttools/fonttools/archive/4.20.0.zip"
+ value: "https://github.com/fonttools/fonttools/archive/4.22.0.zip"
}
- version: "4.20.0"
+ version: "4.22.0"
license_type: BY_EXCEPTION_ONLY
last_upgrade_date {
year: 2021
- month: 2
- day: 17
+ month: 4
+ day: 1
}
}
diff --git a/Makefile b/Makefile
index b2e3d96..21cad6c 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@
pip uninstall --yes fonttools
check: all
- ./run-tests.sh
+ pytest
clean:
./setup.py clean --all
diff --git a/MetaTools/buildTableList.py b/MetaTools/buildTableList.py
index 36b9fa0..c3766b9 100755
--- a/MetaTools/buildTableList.py
+++ b/MetaTools/buildTableList.py
@@ -33,8 +33,6 @@
with open(os.path.join(tablesDir, "__init__.py"), "w") as file:
file.write('''
-from fontTools.misc.py23 import *
-
# DON'T EDIT! This file is generated by MetaTools/buildTableList.py.
def _moduleFinderHint():
"""Dummy function to let modulefinder know what tables may be
diff --git a/NEWS.rst b/NEWS.rst
index 393795c..b07f5b1 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -1,3 +1,44 @@
+4.22.0 (released 2021-04-01)
+----------------------------
+
+- [ttLib] Remove .Format from Coverage, ClassDef, SingleSubst, LigatureSubst,
+ AlternateSubst, MultipleSubst (#2238).
+ ATTENTION: This will change your TTX dumps!
+- [misc.arrayTools] move Vector to its own submodule, and rewrite as a tuple
+ subclass (#2201).
+- [docs] Added a terminology section for varLib (#2209).
+- [varLib] Move rounding to VariationModel, to avoid error accumulation from
+ multiple deltas (#2214)
+- [varLib] Explain merge errors in more human-friendly terms (#2223, #2226)
+- [otlLib] Correct some documentation (#2225)
+- [varLib/otlLib] Allow merging into VariationFont without first saving GPOS
+ PairPos2 (#2229)
+- [subset] Improve PairPosFormat2 subsetting (#2221)
+- [ttLib] TTFont.save: create file on disk as late as possible (#2253)
+- [cffLib] Add missing CFF2 dict operators LanguageGroup and ExpansionFactor
+ (#2249)
+ ATTENTION: This will change your TTX dumps!
+
+4.21.1 (released 2021-02-26)
+----------------------------
+
+- [pens] Reverted breaking change that turned ``AbstractPen`` and ``AbstractPointPen``
+ into abstract base classes (#2164, #2198).
+
+4.21.0 (released 2021-02-26)
+----------------------------
+
+- [feaLib] Indent anchor statements in ``asFea()`` to make them more legible and
+ diff-able (#2193).
+- [pens] Turn ``AbstractPen`` and ``AbstractPointPen`` into abstract base classes
+ (#2164).
+- [feaLib] Added support for parsing and building ``STAT`` table from AFDKO feature
+ files (#2039).
+- [instancer] Added option to update name table of generated instance using ``STAT``
+ table's axis values (#2189).
+- [bezierTools] Added functions to compute bezier point-at-time, as well as line-line,
+ curve-line and curve-curve intersections (#2192).
+
4.20.0 (released 2021-02-15)
----------------------------
@@ -13,6 +54,7 @@
- [COLRv1] Replace hand-coded builder functions with otData-driven dynamic
implementation (#2181).
- [COLRv1] Define additional static (non-variable) Paint formats (#2181).
+- [subset] Added support for subsetting COLR v1 and CPAL tables (#2174, #2177).
- [fontBuilder] Allow ``setupFvar`` to optionally take ``designspaceLib.AxisDescriptor``
objects. Added new ``setupAvar`` method. Support localised names for axes and
named instances (#2185).
diff --git a/Snippets/cmap-format.py b/Snippets/cmap-format.py
index 369df00..0a78670 100755
--- a/Snippets/cmap-format.py
+++ b/Snippets/cmap-format.py
@@ -10,7 +10,6 @@
# getEncoding() of subtable and use that encoding to map the
# characters to Unicode... TODO: Extend this script to do that.
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables._c_m_a_p import CmapSubtable
import sys
diff --git a/Snippets/interpolate.py b/Snippets/interpolate.py
index ca44985..063046c 100755
--- a/Snippets/interpolate.py
+++ b/Snippets/interpolate.py
@@ -21,7 +21,6 @@
# $ ./interpolate.py && open Roboto.ttf
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables._n_a_m_e import NameRecord
from fontTools.ttLib.tables._f_v_a_r import table__f_v_a_r, Axis, NamedInstance
diff --git a/Snippets/layout-features.py b/Snippets/layout-features.py
index 60ed20d..53e9735 100755
--- a/Snippets/layout-features.py
+++ b/Snippets/layout-features.py
@@ -1,6 +1,5 @@
#! /usr/bin/env python3
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables import otTables
import sys
diff --git a/Snippets/subset-fpgm.py b/Snippets/subset-fpgm.py
index e242a77..d06c3f5 100755
--- a/Snippets/subset-fpgm.py
+++ b/Snippets/subset-fpgm.py
@@ -1,6 +1,5 @@
#! /usr/bin/env python3
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
import sys
diff --git a/Tests/afmLib/afmLib_test.py b/Tests/afmLib/afmLib_test.py
index 4986790..3e9d9d8 100644
--- a/Tests/afmLib/afmLib_test.py
+++ b/Tests/afmLib/afmLib_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import unittest
import os
from fontTools import afmLib
diff --git a/Tests/agl_test.py b/Tests/agl_test.py
index 0391ce2..f2fb72d 100644
--- a/Tests/agl_test.py
+++ b/Tests/agl_test.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-from fontTools.misc.py23 import *
from fontTools import agl
import unittest
diff --git a/Tests/cffLib/data/TestCFF2Widths.ttx b/Tests/cffLib/data/TestCFF2Widths.ttx
index bbac612..e3a3c9c 100644
--- a/Tests/cffLib/data/TestCFF2Widths.ttx
+++ b/Tests/cffLib/data/TestCFF2Widths.ttx
@@ -375,7 +375,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="B" class="1"/>
</GlyphClassDef>
diff --git a/Tests/designspaceLib/designspace_test.py b/Tests/designspaceLib/designspace_test.py
index f883730..8daf741 100644
--- a/Tests/designspaceLib/designspace_test.py
+++ b/Tests/designspaceLib/designspace_test.py
@@ -5,7 +5,6 @@
import pytest
import warnings
-from fontTools.misc.py23 import open
from fontTools.misc import plistlib
from fontTools.designspaceLib import (
DesignSpaceDocument, SourceDescriptor, AxisDescriptor, RuleDescriptor,
diff --git a/Tests/encodings/codecs_test.py b/Tests/encodings/codecs_test.py
index ec8f92c..9dac416 100644
--- a/Tests/encodings/codecs_test.py
+++ b/Tests/encodings/codecs_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
@@ -6,19 +5,19 @@
def test_decode_mac_japanese(self):
self.assertEqual(b'x\xfe\xfdy'.decode("x_mac_japanese_ttx"),
- unichr(0x78)+unichr(0x2122)+unichr(0x00A9)+unichr(0x79))
+ chr(0x78)+chr(0x2122)+chr(0x00A9)+chr(0x79))
def test_encode_mac_japanese(self):
self.assertEqual(b'x\xfe\xfdy',
- (unichr(0x78)+unichr(0x2122)+unichr(0x00A9)+unichr(0x79)).encode("x_mac_japanese_ttx"))
+ (chr(0x78)+chr(0x2122)+chr(0x00A9)+chr(0x79)).encode("x_mac_japanese_ttx"))
def test_decode_mac_trad_chinese(self):
self.assertEqual(b'\x80'.decode("x_mac_trad_chinese_ttx"),
- unichr(0x5C))
+ chr(0x5C))
def test_decode_mac_romanian(self):
self.assertEqual(b'x\xfb'.decode("mac_romanian"),
- unichr(0x78)+unichr(0x02DA))
+ chr(0x78)+chr(0x02DA))
if __name__ == '__main__':
import sys
diff --git a/Tests/feaLib/STAT2.fea b/Tests/feaLib/STAT2.fea
new file mode 100644
index 0000000..2595a9a
--- /dev/null
+++ b/Tests/feaLib/STAT2.fea
@@ -0,0 +1,4 @@
+table STAT {
+ ElidedFallbackName { name "Roman"; };
+ DesignAxis zonk 0 { name "Zonkey"; };'
+} STAT;
diff --git a/Tests/feaLib/builder_test.py b/Tests/feaLib/builder_test.py
index 279e8ca..0a55239 100644
--- a/Tests/feaLib/builder_test.py
+++ b/Tests/feaLib/builder_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.feaLib.builder import Builder, addOpenTypeFeatures, \
addOpenTypeFeaturesFromString
@@ -8,7 +7,9 @@
from fontTools.feaLib import ast
from fontTools.feaLib.lexer import Lexer
import difflib
+from io import StringIO
import os
+import re
import shutil
import sys
import tempfile
@@ -73,7 +74,7 @@
LigatureSubtable AlternateSubtable MultipleSubstSubtable
SingleSubstSubtable aalt_chain_contextual_subst AlternateChained
MultipleLookupsPerGlyph MultipleLookupsPerGlyph2 GSUB_6_formats
- GSUB_5_formats delete_glyph
+ GSUB_5_formats delete_glyph STAT_test STAT_test_elidedFallbackNameID
""".split()
def __init__(self, methodName):
@@ -118,7 +119,7 @@
def expect_ttx(self, font, expected_ttx, replace=None):
path = self.temp_path(suffix=".ttx")
font.saveXML(path, tables=['head', 'name', 'BASE', 'GDEF', 'GSUB',
- 'GPOS', 'OS/2', 'hhea', 'vhea'])
+ 'GPOS', 'OS/2', 'STAT', 'hhea', 'vhea'])
actual = self.read_ttx(path)
expected = self.read_ttx(expected_ttx)
if replace:
@@ -141,10 +142,15 @@
feapath = self.getpath("%s.fea" % name)
addOpenTypeFeatures(font, feapath)
self.expect_ttx(font, self.getpath("%s.ttx" % name))
- # Make sure we can produce binary OpenType tables, not just XML.
+ # Check that:
+ # 1) tables do compile (only G* tables as long as we have a mock font)
+ # 2) dumping after save-reload yields the same TTX dump as before
for tag in ('GDEF', 'GSUB', 'GPOS'):
if tag in font:
- font[tag].compile(font)
+ data = font[tag].compile(font)
+ font[tag].decompile(data, font)
+ self.expect_ttx(font, self.getpath("%s.ttx" % name))
+ # Optionally check a debug dump.
debugttx = self.getpath("%s-debug.ttx" % name)
if os.path.exists(debugttx):
addOpenTypeFeatures(font, feapath, debug=True)
@@ -463,6 +469,201 @@
"} test;"
)
+ def test_STAT_elidedfallbackname_already_defined(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'ElidedFallbackName is already set.',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' ElidedFallbackNameID 256;'
+ '} STAT;')
+
+ def test_STAT_elidedfallbackname_set_twice(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'ElidedFallbackName is already set.',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' ElidedFallbackName { name "Italic"; };'
+ '} STAT;')
+
+ def test_STAT_elidedfallbacknameID_already_defined(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'ElidedFallbackNameID is already set.',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackNameID 256;'
+ ' ElidedFallbackName { name "Roman"; };'
+ '} STAT;')
+
+ def test_STAT_elidedfallbacknameID_not_in_name_table(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'ElidedFallbackNameID 256 points to a nameID that does not '
+ 'exist in the "name" table',
+ self.build,
+ 'table name {'
+ ' nameid 257 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackNameID 256;'
+ ' DesignAxis opsz 1 { name "Optical Size"; };'
+ '} STAT;')
+
+ def test_STAT_design_axis_name(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'Expected "name"',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' DesignAxis opsz 0 { badtag "Optical Size"; };'
+ '} STAT;')
+
+ def test_STAT_duplicate_design_axis_name(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'DesignAxis already defined for tag "opsz".',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' DesignAxis opsz 0 { name "Optical Size"; };'
+ ' DesignAxis opsz 1 { name "Optical Size"; };'
+ '} STAT;')
+
+ def test_STAT_design_axis_duplicate_order(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ "DesignAxis already defined for axis number 0.",
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' DesignAxis opsz 0 { name "Optical Size"; };'
+ ' DesignAxis wdth 0 { name "Width"; };'
+ ' AxisValue {'
+ ' location opsz 8;'
+ ' location wdth 400;'
+ ' name "Caption";'
+ ' };'
+ '} STAT;')
+
+ def test_STAT_undefined_tag(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'DesignAxis not defined for wdth.',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' DesignAxis opsz 0 { name "Optical Size"; };'
+ ' AxisValue { '
+ ' location wdth 125; '
+ ' name "Wide"; '
+ ' };'
+ '} STAT;')
+
+ def test_STAT_axis_value_format4(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'Axis tag wdth already defined.',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' DesignAxis opsz 0 { name "Optical Size"; };'
+ ' DesignAxis wdth 1 { name "Width"; };'
+ ' DesignAxis wght 2 { name "Weight"; };'
+ ' AxisValue { '
+ ' location opsz 8; '
+ ' location wdth 125; '
+ ' location wdth 125; '
+ ' location wght 500; '
+ ' name "Caption Medium Wide"; '
+ ' };'
+ '} STAT;')
+
+ def test_STAT_duplicate_axis_value_record(self):
+ # Test for Duplicate AxisValueRecords even when the definition order
+ # is different.
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'An AxisValueRecord with these values is already defined.',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; };'
+ ' DesignAxis opsz 0 { name "Optical Size"; };'
+ ' DesignAxis wdth 1 { name "Width"; };'
+ ' AxisValue {'
+ ' location opsz 8;'
+ ' location wdth 400;'
+ ' name "Caption";'
+ ' };'
+ ' AxisValue {'
+ ' location wdth 400;'
+ ' location opsz 8;'
+ ' name "Caption";'
+ ' };'
+ '} STAT;')
+
+ def test_STAT_axis_value_missing_location(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'Expected "Axis location"',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; '
+ '};'
+ ' DesignAxis opsz 0 { name "Optical Size"; };'
+ ' AxisValue { '
+ ' name "Wide"; '
+ ' };'
+ '} STAT;')
+
+ def test_STAT_invalid_location_tag(self):
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'Tags cannot be longer than 4 characters',
+ self.build,
+ 'table name {'
+ ' nameid 256 "Roman"; '
+ '} name;'
+ 'table STAT {'
+ ' ElidedFallbackName { name "Roman"; '
+ ' name 3 1 0x0411 "ローマン"; }; '
+ ' DesignAxis width 0 { name "Width"; };'
+ '} STAT;')
+
def test_extensions(self):
class ast_BaseClass(ast.MarkClass):
def asFea(self, indent=""):
@@ -574,7 +775,7 @@
self.assertRaises(NotImplementedError, self.build, "", tables={"FOO"})
def test_build_pre_parsed_ast_featurefile(self):
- f = UnicodeIO("feature liga {sub f i by f_i;} liga;")
+ f = StringIO("feature liga {sub f i by f_i;} liga;")
tree = Parser(f).parse()
font = makeTTFont()
addOpenTypeFeatures(font, tree)
diff --git a/Tests/feaLib/data/GPOS_2.ttx b/Tests/feaLib/data/GPOS_2.ttx
index 84dc819..c9a6c14 100644
--- a/Tests/feaLib/data/GPOS_2.ttx
+++ b/Tests/feaLib/data/GPOS_2.ttx
@@ -76,6 +76,7 @@
<!-- Class2Count=2 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XAdvance="-26"/>
diff --git a/Tests/feaLib/data/GPOS_2b.ttx b/Tests/feaLib/data/GPOS_2b.ttx
index 40f458f..8a892c1 100644
--- a/Tests/feaLib/data/GPOS_2b.ttx
+++ b/Tests/feaLib/data/GPOS_2b.ttx
@@ -50,6 +50,7 @@
<!-- Class2Count=2 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XAdvance="1"/>
@@ -79,6 +80,7 @@
<!-- Class2Count=3 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XAdvance="4"/>
@@ -89,8 +91,10 @@
</Class1Record>
<Class1Record index="1">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="2">
<Value1 XAdvance="2"/>
@@ -114,6 +118,7 @@
<!-- Class2Count=2 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XPlacement="0" YPlacement="0" XAdvance="0" YAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XPlacement="5" YPlacement="5" XAdvance="5" YAdvance="5"/>
diff --git a/Tests/feaLib/data/GPOS_4.fea b/Tests/feaLib/data/GPOS_4.fea
index cfd2d75..7c90ab6 100644
--- a/Tests/feaLib/data/GPOS_4.fea
+++ b/Tests/feaLib/data/GPOS_4.fea
@@ -6,7 +6,11 @@
markClass [ogonek] <anchor 333 33> @SIDE_MARKS;
feature test {
- pos base a <anchor 11 1> mark @TOP_MARKS <anchor 12 -1> mark @BOTTOM_MARKS;
- pos base [b c] <anchor 22 -2> mark @BOTTOM_MARKS;
- pos base d <anchor 33 3> mark @SIDE_MARKS;
+ pos base a
+ <anchor 11 1> mark @TOP_MARKS
+ <anchor 12 -1> mark @BOTTOM_MARKS;
+ pos base [b c]
+ <anchor 22 -2> mark @BOTTOM_MARKS;
+ pos base d
+ <anchor 33 3> mark @SIDE_MARKS;
} test;
diff --git a/Tests/feaLib/data/GPOS_5.fea b/Tests/feaLib/data/GPOS_5.fea
index b116539..a8f8536 100644
--- a/Tests/feaLib/data/GPOS_5.fea
+++ b/Tests/feaLib/data/GPOS_5.fea
@@ -5,14 +5,29 @@
feature test {
- pos ligature [c_t s_t] <anchor 500 800> mark @TOP_MARKS <anchor 500 -200> mark @BOTTOM_MARKS
- ligComponent <anchor 1500 800> mark @TOP_MARKS <anchor 1500 -200> mark @BOTTOM_MARKS <anchor 1550 0> mark @OGONEK;
+ pos ligature [c_t s_t]
+ <anchor 500 800> mark @TOP_MARKS
+ <anchor 500 -200> mark @BOTTOM_MARKS
+ ligComponent
+ <anchor 1500 800> mark @TOP_MARKS
+ <anchor 1500 -200> mark @BOTTOM_MARKS
+ <anchor 1550 0> mark @OGONEK;
- pos ligature f_l <anchor 300 800> mark @TOP_MARKS <anchor 300 -200> mark @BOTTOM_MARKS
- ligComponent <anchor 600 800> mark @TOP_MARKS <anchor 600 -200> mark @BOTTOM_MARKS;
+ pos ligature f_l
+ <anchor 300 800> mark @TOP_MARKS
+ <anchor 300 -200> mark @BOTTOM_MARKS
+ ligComponent
+ <anchor 600 800> mark @TOP_MARKS
+ <anchor 600 -200> mark @BOTTOM_MARKS;
- pos ligature [f_f_l] <anchor 300 800> mark @TOP_MARKS <anchor 300 -200> mark @BOTTOM_MARKS
- ligComponent <anchor 600 800> mark @TOP_MARKS <anchor 600 -200> mark @BOTTOM_MARKS
- ligComponent <anchor 900 800> mark @TOP_MARKS <anchor 900 -200> mark @BOTTOM_MARKS;
+ pos ligature [f_f_l]
+ <anchor 300 800> mark @TOP_MARKS
+ <anchor 300 -200> mark @BOTTOM_MARKS
+ ligComponent
+ <anchor 600 800> mark @TOP_MARKS
+ <anchor 600 -200> mark @BOTTOM_MARKS
+ ligComponent
+ <anchor 900 800> mark @TOP_MARKS
+ <anchor 900 -200> mark @BOTTOM_MARKS;
} test;
diff --git a/Tests/feaLib/data/GPOS_6.fea b/Tests/feaLib/data/GPOS_6.fea
index 37b2936..e54ff6e 100644
--- a/Tests/feaLib/data/GPOS_6.fea
+++ b/Tests/feaLib/data/GPOS_6.fea
@@ -5,6 +5,9 @@
markClass [cedilla] <anchor 3 3 contourpoint 33> @BOTTOM_MARKS;
feature test {
- pos mark [acute grave macron ogonek] <anchor 500 200> mark @TOP_MARKS <anchor 500 -80> mark @BOTTOM_MARKS;
- pos mark [dieresis caron] <anchor 500 200> mark @TOP_MARKS;
+ pos mark [acute grave macron ogonek]
+ <anchor 500 200> mark @TOP_MARKS
+ <anchor 500 -80> mark @BOTTOM_MARKS;
+ pos mark [dieresis caron]
+ <anchor 500 200> mark @TOP_MARKS;
} test;
diff --git a/Tests/feaLib/data/PairPosSubtable.ttx b/Tests/feaLib/data/PairPosSubtable.ttx
index 4b76f99..2d78f64 100644
--- a/Tests/feaLib/data/PairPosSubtable.ttx
+++ b/Tests/feaLib/data/PairPosSubtable.ttx
@@ -76,6 +76,7 @@
<!-- Class2Count=2 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XAdvance="-12"/>
@@ -105,8 +106,10 @@
<!-- Class2Count=3 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="2">
<Value1 XAdvance="-20"/>
@@ -114,11 +117,13 @@
</Class1Record>
<Class1Record index="1">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XAdvance="-10"/>
</Class2Record>
<Class2Record index="2">
+ <Value1 XAdvance="0"/>
</Class2Record>
</Class1Record>
</PairPos>
diff --git a/Tests/feaLib/data/STAT_bad.fea b/Tests/feaLib/data/STAT_bad.fea
new file mode 100644
index 0000000..8ec887f
--- /dev/null
+++ b/Tests/feaLib/data/STAT_bad.fea
@@ -0,0 +1,96 @@
+# bad fea file: Testing DesignAxis tag with incorrect label
+table name {
+ nameid 25 "TestFont";
+} name;
+
+
+table STAT {
+
+ ElidedFallbackName { name "Roman"; };
+
+ DesignAxis opsz 0 { badtag "Optical Size"; }; #'badtag' instead of 'name' is incorrect
+ DesignAxis wdth 1 { name "Width"; };
+ DesignAxis wght 2 { name "Weight"; };
+ DesignAxis ital 3 { name "Italic"; };
+
+ AxisValue {
+ location opsz 8 5 9;
+ location wdth 300 350 450;
+ name "Caption";
+ };
+
+ AxisValue {
+ location opsz 11 9 12;
+ name "Text";
+ flag OlderSiblingFontAttribute ElidableAxisValueName ;
+ };
+
+ AxisValue {
+ location opsz 16.7 12 24;
+ name "Subhead";
+ };
+
+ AxisValue {
+ location opsz 72 24 72;
+ name "Display";
+ };
+
+ AxisValue {
+ location wdth 80 80 89;
+ name "Condensed";
+ };
+
+ AxisValue {
+ location wdth 90 90 96;
+ name "Semicondensed";
+ };
+
+ AxisValue {
+ location wdth 100 97 101;
+ name "Normal";
+ flag ElidableAxisValueName;
+ };
+
+ AxisValue {
+ location wdth 125 102 125;
+ name "Extended";
+ };
+
+ AxisValue {
+ location wght 300 300 349;
+ name "Light";
+ };
+
+ AxisValue {
+ location wght 400 350 449;
+ name "Regular";
+ flag ElidableAxisValueName;
+ };
+
+ AxisValue {
+ location wght 500 450 549;
+ name "Medium";
+ };
+
+ AxisValue {
+ location wght 600 550 649;
+ name "Semibold";
+ };
+
+ AxisValue {
+ location wght 700 650 749;
+ name "Bold";
+ };
+
+ AxisValue {
+ location wght 900 750 900;
+ name "Black";
+ };
+
+ AxisValue {
+ location ital 0;
+ name "Roman";
+ flag ElidableAxisValueName;
+ };
+
+} STAT;
diff --git a/Tests/feaLib/data/STAT_test.fea b/Tests/feaLib/data/STAT_test.fea
new file mode 100644
index 0000000..0103637
--- /dev/null
+++ b/Tests/feaLib/data/STAT_test.fea
@@ -0,0 +1,109 @@
+table name {
+ nameid 25 "TestFont";
+} name;
+
+
+table STAT {
+
+ ElidedFallbackName {
+ name "Roman";
+ name 3 1 1041 "ローマン";
+ };
+
+ DesignAxis opsz 0 {
+ name "Optical Size";
+ };
+
+ DesignAxis wdth 1 {
+ name "Width";
+ };
+
+ DesignAxis wght 2 {
+ name "Weight";
+ };
+
+ DesignAxis ital 3 {
+ name "Italic";
+ }; # here comment
+
+ AxisValue {
+ location opsz 8; # comment here
+ location wdth 400; # another comment
+ name "Caption"; # more comments
+ };
+
+ AxisValue {
+ location opsz 11 9 12;
+ name "Text";
+ flag OlderSiblingFontAttribute ElidableAxisValueName;
+ };
+
+ AxisValue {
+ location opsz 16.7 12 24;
+ name "Subhead";
+ };
+
+ AxisValue {
+ location opsz 72 24 72;
+ name "Display";
+ };
+
+ AxisValue {
+ location wdth 80 80 89;
+ name "Condensed";
+ };
+
+ AxisValue {
+ location wdth 90 90 96;
+ name "Semicondensed";
+ };
+
+ AxisValue {
+ location wdth 100 97 101;
+ name "Normal";
+ flag ElidableAxisValueName;
+ };
+
+ AxisValue {
+ location wdth 125 102 125;
+ name "Extended";
+ };
+
+ AxisValue {
+ location wght 300 300 349;
+ name "Light";
+ };
+
+ AxisValue {
+ location wght 400 350 449;
+ name "Regular";
+ flag ElidableAxisValueName;
+ };
+
+ AxisValue {
+ location wght 500 450 549;
+ name "Medium";
+ };
+
+ AxisValue {
+ location wght 600 550 649;
+ name "Semibold";
+ };
+
+ AxisValue {
+ location wght 700 650 749;
+ name "Bold";
+ };
+
+ AxisValue {
+ location wght 900 750 900;
+ name "Black";
+ };
+
+ AxisValue {
+ location ital 0;
+ name "Roman";
+ flag ElidableAxisValueName; # flag comment
+ };
+
+} STAT;
diff --git a/Tests/feaLib/data/STAT_test.ttx b/Tests/feaLib/data/STAT_test.ttx
new file mode 100644
index 0000000..d1b2b69
--- /dev/null
+++ b/Tests/feaLib/data/STAT_test.ttx
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <name>
+ <namerecord nameID="25" platformID="3" platEncID="1" langID="0x409">
+ TestFont
+ </namerecord>
+ <namerecord nameID="256" platformID="3" platEncID="1" langID="0x409">
+ Roman
+ </namerecord>
+ <namerecord nameID="256" platformID="3" platEncID="1" langID="0x411">
+ ローマン
+ </namerecord>
+ <namerecord nameID="257" platformID="3" platEncID="1" langID="0x409">
+ Optical Size
+ </namerecord>
+ <namerecord nameID="258" platformID="3" platEncID="1" langID="0x409">
+ Text
+ </namerecord>
+ <namerecord nameID="259" platformID="3" platEncID="1" langID="0x409">
+ Subhead
+ </namerecord>
+ <namerecord nameID="260" platformID="3" platEncID="1" langID="0x409">
+ Display
+ </namerecord>
+ <namerecord nameID="261" platformID="3" platEncID="1" langID="0x409">
+ Width
+ </namerecord>
+ <namerecord nameID="262" platformID="3" platEncID="1" langID="0x409">
+ Condensed
+ </namerecord>
+ <namerecord nameID="263" platformID="3" platEncID="1" langID="0x409">
+ Semicondensed
+ </namerecord>
+ <namerecord nameID="264" platformID="3" platEncID="1" langID="0x409">
+ Normal
+ </namerecord>
+ <namerecord nameID="265" platformID="3" platEncID="1" langID="0x409">
+ Extended
+ </namerecord>
+ <namerecord nameID="266" platformID="3" platEncID="1" langID="0x409">
+ Weight
+ </namerecord>
+ <namerecord nameID="267" platformID="3" platEncID="1" langID="0x409">
+ Light
+ </namerecord>
+ <namerecord nameID="268" platformID="3" platEncID="1" langID="0x409">
+ Regular
+ </namerecord>
+ <namerecord nameID="269" platformID="3" platEncID="1" langID="0x409">
+ Medium
+ </namerecord>
+ <namerecord nameID="270" platformID="3" platEncID="1" langID="0x409">
+ Semibold
+ </namerecord>
+ <namerecord nameID="271" platformID="3" platEncID="1" langID="0x409">
+ Bold
+ </namerecord>
+ <namerecord nameID="272" platformID="3" platEncID="1" langID="0x409">
+ Black
+ </namerecord>
+ <namerecord nameID="273" platformID="3" platEncID="1" langID="0x409">
+ Italic
+ </namerecord>
+ <namerecord nameID="274" platformID="3" platEncID="1" langID="0x409">
+ Roman
+ </namerecord>
+ <namerecord nameID="275" platformID="3" platEncID="1" langID="0x409">
+ Caption
+ </namerecord>
+ </name>
+
+ <STAT>
+ <Version value="0x00010002"/>
+ <DesignAxisRecordSize value="8"/>
+ <!-- DesignAxisCount=4 -->
+ <DesignAxisRecord>
+ <Axis index="0">
+ <AxisTag value="opsz"/>
+ <AxisNameID value="257"/> <!-- Optical Size -->
+ <AxisOrdering value="0"/>
+ </Axis>
+ <Axis index="1">
+ <AxisTag value="wdth"/>
+ <AxisNameID value="261"/> <!-- Width -->
+ <AxisOrdering value="1"/>
+ </Axis>
+ <Axis index="2">
+ <AxisTag value="wght"/>
+ <AxisNameID value="266"/> <!-- Weight -->
+ <AxisOrdering value="2"/>
+ </Axis>
+ <Axis index="3">
+ <AxisTag value="ital"/>
+ <AxisNameID value="273"/> <!-- Italic -->
+ <AxisOrdering value="3"/>
+ </Axis>
+ </DesignAxisRecord>
+ <!-- AxisValueCount=15 -->
+ <AxisValueArray>
+ <AxisValue index="0" Format="4">
+ <!-- AxisCount=2 -->
+ <Flags value="0"/>
+ <ValueNameID value="275"/> <!-- Caption -->
+ <AxisValueRecord index="0">
+ <AxisIndex value="0"/>
+ <Value value="8.0"/>
+ </AxisValueRecord>
+ <AxisValueRecord index="1">
+ <AxisIndex value="1"/>
+ <Value value="400.0"/>
+ </AxisValueRecord>
+ </AxisValue>
+ <AxisValue index="1" Format="2">
+ <AxisIndex value="0"/>
+ <Flags value="3"/> <!-- OlderSiblingFontAttribute ElidableAxisValueName -->
+ <ValueNameID value="258"/> <!-- Text -->
+ <NominalValue value="11.0"/>
+ <RangeMinValue value="9.0"/>
+ <RangeMaxValue value="12.0"/>
+ </AxisValue>
+ <AxisValue index="2" Format="2">
+ <AxisIndex value="0"/>
+ <Flags value="0"/>
+ <ValueNameID value="259"/> <!-- Subhead -->
+ <NominalValue value="16.7"/>
+ <RangeMinValue value="12.0"/>
+ <RangeMaxValue value="24.0"/>
+ </AxisValue>
+ <AxisValue index="3" Format="2">
+ <AxisIndex value="0"/>
+ <Flags value="0"/>
+ <ValueNameID value="260"/> <!-- Display -->
+ <NominalValue value="72.0"/>
+ <RangeMinValue value="24.0"/>
+ <RangeMaxValue value="72.0"/>
+ </AxisValue>
+ <AxisValue index="4" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="0"/>
+ <ValueNameID value="262"/> <!-- Condensed -->
+ <NominalValue value="80.0"/>
+ <RangeMinValue value="80.0"/>
+ <RangeMaxValue value="89.0"/>
+ </AxisValue>
+ <AxisValue index="5" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="0"/>
+ <ValueNameID value="263"/> <!-- Semicondensed -->
+ <NominalValue value="90.0"/>
+ <RangeMinValue value="90.0"/>
+ <RangeMaxValue value="96.0"/>
+ </AxisValue>
+ <AxisValue index="6" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
+ <ValueNameID value="264"/> <!-- Normal -->
+ <NominalValue value="100.0"/>
+ <RangeMinValue value="97.0"/>
+ <RangeMaxValue value="101.0"/>
+ </AxisValue>
+ <AxisValue index="7" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="0"/>
+ <ValueNameID value="265"/> <!-- Extended -->
+ <NominalValue value="125.0"/>
+ <RangeMinValue value="102.0"/>
+ <RangeMaxValue value="125.0"/>
+ </AxisValue>
+ <AxisValue index="8" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="267"/> <!-- Light -->
+ <NominalValue value="300.0"/>
+ <RangeMinValue value="300.0"/>
+ <RangeMaxValue value="349.0"/>
+ </AxisValue>
+ <AxisValue index="9" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
+ <ValueNameID value="268"/> <!-- Regular -->
+ <NominalValue value="400.0"/>
+ <RangeMinValue value="350.0"/>
+ <RangeMaxValue value="449.0"/>
+ </AxisValue>
+ <AxisValue index="10" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="269"/> <!-- Medium -->
+ <NominalValue value="500.0"/>
+ <RangeMinValue value="450.0"/>
+ <RangeMaxValue value="549.0"/>
+ </AxisValue>
+ <AxisValue index="11" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="270"/> <!-- Semibold -->
+ <NominalValue value="600.0"/>
+ <RangeMinValue value="550.0"/>
+ <RangeMaxValue value="649.0"/>
+ </AxisValue>
+ <AxisValue index="12" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="271"/> <!-- Bold -->
+ <NominalValue value="700.0"/>
+ <RangeMinValue value="650.0"/>
+ <RangeMaxValue value="749.0"/>
+ </AxisValue>
+ <AxisValue index="13" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="272"/> <!-- Black -->
+ <NominalValue value="900.0"/>
+ <RangeMinValue value="750.0"/>
+ <RangeMaxValue value="900.0"/>
+ </AxisValue>
+ <AxisValue index="14" Format="1">
+ <AxisIndex value="3"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
+ <ValueNameID value="274"/> <!-- Roman -->
+ <Value value="0.0"/>
+ </AxisValue>
+ </AxisValueArray>
+ <ElidedFallbackNameID value="256"/> <!-- Roman -->
+ </STAT>
+
+</ttFont>
diff --git a/Tests/feaLib/data/STAT_test_elidedFallbackNameID.fea b/Tests/feaLib/data/STAT_test_elidedFallbackNameID.fea
new file mode 100644
index 0000000..5a14180
--- /dev/null
+++ b/Tests/feaLib/data/STAT_test_elidedFallbackNameID.fea
@@ -0,0 +1,84 @@
+table name {
+ nameid 25 "TestFont";
+ nameid 256 "Roman";
+} name;
+table STAT {
+ ElidedFallbackNameID 256;
+ DesignAxis opsz 0 {
+ name "Optical Size";
+ };
+ DesignAxis wdth 1 {
+ name "Width";
+ };
+ DesignAxis wght 2 {
+ name "Weight";
+ };
+ DesignAxis ital 3 {
+ name "Italic";
+ }; # here comment
+ AxisValue {
+ location opsz 8; # comment here
+ location wdth 400; # another comment
+ name "Caption"; # more comments
+ };
+ AxisValue {
+ location opsz 11 9 12;
+ name "Text";
+ flag OlderSiblingFontAttribute ElidableAxisValueName;
+ };
+ AxisValue {
+ location opsz 16.7 12 24;
+ name "Subhead";
+ };
+ AxisValue {
+ location opsz 72 24 72;
+ name "Display";
+ };
+ AxisValue {
+ location wdth 80 80 89;
+ name "Condensed";
+ };
+ AxisValue {
+ location wdth 90 90 96;
+ name "Semicondensed";
+ };
+ AxisValue {
+ location wdth 100 97 101;
+ name "Normal";
+ flag ElidableAxisValueName;
+ };
+ AxisValue {
+ location wdth 125 102 125;
+ name "Extended";
+ };
+ AxisValue {
+ location wght 300 300 349;
+ name "Light";
+ };
+ AxisValue {
+ location wght 400 350 449;
+ name "Regular";
+ flag ElidableAxisValueName;
+ };
+ AxisValue {
+ location wght 500 450 549;
+ name "Medium";
+ };
+ AxisValue {
+ location wght 600 550 649;
+ name "Semibold";
+ };
+ AxisValue {
+ location wght 700 650 749;
+ name "Bold";
+ };
+ AxisValue {
+ location wght 900 750 900;
+ name "Black";
+ };
+ AxisValue {
+ location ital 0;
+ name "Roman";
+ flag ElidableAxisValueName; # flag comment
+ };
+} STAT;
\ No newline at end of file
diff --git a/Tests/feaLib/data/STAT_test_elidedFallbackNameID.ttx b/Tests/feaLib/data/STAT_test_elidedFallbackNameID.ttx
new file mode 100644
index 0000000..32802e0
--- /dev/null
+++ b/Tests/feaLib/data/STAT_test_elidedFallbackNameID.ttx
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <name>
+ <namerecord nameID="25" platformID="3" platEncID="1" langID="0x409">
+ TestFont
+ </namerecord>
+ <namerecord nameID="256" platformID="3" platEncID="1" langID="0x409">
+ Roman
+ </namerecord>
+ <namerecord nameID="257" platformID="3" platEncID="1" langID="0x409">
+ Optical Size
+ </namerecord>
+ <namerecord nameID="258" platformID="3" platEncID="1" langID="0x409">
+ Text
+ </namerecord>
+ <namerecord nameID="259" platformID="3" platEncID="1" langID="0x409">
+ Subhead
+ </namerecord>
+ <namerecord nameID="260" platformID="3" platEncID="1" langID="0x409">
+ Display
+ </namerecord>
+ <namerecord nameID="261" platformID="3" platEncID="1" langID="0x409">
+ Width
+ </namerecord>
+ <namerecord nameID="262" platformID="3" platEncID="1" langID="0x409">
+ Condensed
+ </namerecord>
+ <namerecord nameID="263" platformID="3" platEncID="1" langID="0x409">
+ Semicondensed
+ </namerecord>
+ <namerecord nameID="264" platformID="3" platEncID="1" langID="0x409">
+ Normal
+ </namerecord>
+ <namerecord nameID="265" platformID="3" platEncID="1" langID="0x409">
+ Extended
+ </namerecord>
+ <namerecord nameID="266" platformID="3" platEncID="1" langID="0x409">
+ Weight
+ </namerecord>
+ <namerecord nameID="267" platformID="3" platEncID="1" langID="0x409">
+ Light
+ </namerecord>
+ <namerecord nameID="268" platformID="3" platEncID="1" langID="0x409">
+ Regular
+ </namerecord>
+ <namerecord nameID="269" platformID="3" platEncID="1" langID="0x409">
+ Medium
+ </namerecord>
+ <namerecord nameID="270" platformID="3" platEncID="1" langID="0x409">
+ Semibold
+ </namerecord>
+ <namerecord nameID="271" platformID="3" platEncID="1" langID="0x409">
+ Bold
+ </namerecord>
+ <namerecord nameID="272" platformID="3" platEncID="1" langID="0x409">
+ Black
+ </namerecord>
+ <namerecord nameID="273" platformID="3" platEncID="1" langID="0x409">
+ Italic
+ </namerecord>
+ <namerecord nameID="274" platformID="3" platEncID="1" langID="0x409">
+ Roman
+ </namerecord>
+ <namerecord nameID="275" platformID="3" platEncID="1" langID="0x409">
+ Caption
+ </namerecord>
+ </name>
+
+ <STAT>
+ <Version value="0x00010002"/>
+ <DesignAxisRecordSize value="8"/>
+ <!-- DesignAxisCount=4 -->
+ <DesignAxisRecord>
+ <Axis index="0">
+ <AxisTag value="opsz"/>
+ <AxisNameID value="257"/> <!-- Optical Size -->
+ <AxisOrdering value="0"/>
+ </Axis>
+ <Axis index="1">
+ <AxisTag value="wdth"/>
+ <AxisNameID value="261"/> <!-- Width -->
+ <AxisOrdering value="1"/>
+ </Axis>
+ <Axis index="2">
+ <AxisTag value="wght"/>
+ <AxisNameID value="266"/> <!-- Weight -->
+ <AxisOrdering value="2"/>
+ </Axis>
+ <Axis index="3">
+ <AxisTag value="ital"/>
+ <AxisNameID value="273"/> <!-- Italic -->
+ <AxisOrdering value="3"/>
+ </Axis>
+ </DesignAxisRecord>
+ <!-- AxisValueCount=15 -->
+ <AxisValueArray>
+ <AxisValue index="0" Format="4">
+ <!-- AxisCount=2 -->
+ <Flags value="0"/>
+ <ValueNameID value="275"/> <!-- Caption -->
+ <AxisValueRecord index="0">
+ <AxisIndex value="0"/>
+ <Value value="8.0"/>
+ </AxisValueRecord>
+ <AxisValueRecord index="1">
+ <AxisIndex value="1"/>
+ <Value value="400.0"/>
+ </AxisValueRecord>
+ </AxisValue>
+ <AxisValue index="1" Format="2">
+ <AxisIndex value="0"/>
+ <Flags value="3"/> <!-- OlderSiblingFontAttribute ElidableAxisValueName -->
+ <ValueNameID value="258"/> <!-- Text -->
+ <NominalValue value="11.0"/>
+ <RangeMinValue value="9.0"/>
+ <RangeMaxValue value="12.0"/>
+ </AxisValue>
+ <AxisValue index="2" Format="2">
+ <AxisIndex value="0"/>
+ <Flags value="0"/>
+ <ValueNameID value="259"/> <!-- Subhead -->
+ <NominalValue value="16.7"/>
+ <RangeMinValue value="12.0"/>
+ <RangeMaxValue value="24.0"/>
+ </AxisValue>
+ <AxisValue index="3" Format="2">
+ <AxisIndex value="0"/>
+ <Flags value="0"/>
+ <ValueNameID value="260"/> <!-- Display -->
+ <NominalValue value="72.0"/>
+ <RangeMinValue value="24.0"/>
+ <RangeMaxValue value="72.0"/>
+ </AxisValue>
+ <AxisValue index="4" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="0"/>
+ <ValueNameID value="262"/> <!-- Condensed -->
+ <NominalValue value="80.0"/>
+ <RangeMinValue value="80.0"/>
+ <RangeMaxValue value="89.0"/>
+ </AxisValue>
+ <AxisValue index="5" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="0"/>
+ <ValueNameID value="263"/> <!-- Semicondensed -->
+ <NominalValue value="90.0"/>
+ <RangeMinValue value="90.0"/>
+ <RangeMaxValue value="96.0"/>
+ </AxisValue>
+ <AxisValue index="6" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
+ <ValueNameID value="264"/> <!-- Normal -->
+ <NominalValue value="100.0"/>
+ <RangeMinValue value="97.0"/>
+ <RangeMaxValue value="101.0"/>
+ </AxisValue>
+ <AxisValue index="7" Format="2">
+ <AxisIndex value="1"/>
+ <Flags value="0"/>
+ <ValueNameID value="265"/> <!-- Extended -->
+ <NominalValue value="125.0"/>
+ <RangeMinValue value="102.0"/>
+ <RangeMaxValue value="125.0"/>
+ </AxisValue>
+ <AxisValue index="8" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="267"/> <!-- Light -->
+ <NominalValue value="300.0"/>
+ <RangeMinValue value="300.0"/>
+ <RangeMaxValue value="349.0"/>
+ </AxisValue>
+ <AxisValue index="9" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
+ <ValueNameID value="268"/> <!-- Regular -->
+ <NominalValue value="400.0"/>
+ <RangeMinValue value="350.0"/>
+ <RangeMaxValue value="449.0"/>
+ </AxisValue>
+ <AxisValue index="10" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="269"/> <!-- Medium -->
+ <NominalValue value="500.0"/>
+ <RangeMinValue value="450.0"/>
+ <RangeMaxValue value="549.0"/>
+ </AxisValue>
+ <AxisValue index="11" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="270"/> <!-- Semibold -->
+ <NominalValue value="600.0"/>
+ <RangeMinValue value="550.0"/>
+ <RangeMaxValue value="649.0"/>
+ </AxisValue>
+ <AxisValue index="12" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="271"/> <!-- Bold -->
+ <NominalValue value="700.0"/>
+ <RangeMinValue value="650.0"/>
+ <RangeMaxValue value="749.0"/>
+ </AxisValue>
+ <AxisValue index="13" Format="2">
+ <AxisIndex value="2"/>
+ <Flags value="0"/>
+ <ValueNameID value="272"/> <!-- Black -->
+ <NominalValue value="900.0"/>
+ <RangeMinValue value="750.0"/>
+ <RangeMaxValue value="900.0"/>
+ </AxisValue>
+ <AxisValue index="14" Format="1">
+ <AxisIndex value="3"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
+ <ValueNameID value="274"/> <!-- Roman -->
+ <Value value="0.0"/>
+ </AxisValue>
+ </AxisValueArray>
+ <ElidedFallbackNameID value="256"/> <!-- Roman -->
+ </STAT>
+
+</ttFont>
diff --git a/Tests/feaLib/data/bug453.fea b/Tests/feaLib/data/bug453.fea
index 486632e..ed0e6f9 100644
--- a/Tests/feaLib/data/bug453.fea
+++ b/Tests/feaLib/data/bug453.fea
@@ -2,10 +2,12 @@
feature mark {
lookup mark1 {
markClass [acute] <anchor 150 -10> @TOP_MARKS;
- pos base [e] <anchor 250 450> mark @TOP_MARKS;
+ pos base [e]
+ <anchor 250 450> mark @TOP_MARKS;
} mark1;
lookup mark2 {
markClass [acute] <anchor 150 -20> @TOP_MARKS_2;
- pos base [e] <anchor 250 450> mark @TOP_MARKS_2;
+ pos base [e]
+ <anchor 250 450> mark @TOP_MARKS_2;
} mark2;
} mark;
diff --git a/Tests/feaLib/data/bug633.ttx b/Tests/feaLib/data/bug633.ttx
index b119ebb..075c177 100644
--- a/Tests/feaLib/data/bug633.ttx
+++ b/Tests/feaLib/data/bug633.ttx
@@ -52,6 +52,7 @@
<!-- Class2Count=3 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XAdvance="0"/>
diff --git a/Tests/feaLib/data/size2.ttx b/Tests/feaLib/data/size2.ttx
index a822af3..1a12ddf 100644
--- a/Tests/feaLib/data/size2.ttx
+++ b/Tests/feaLib/data/size2.ttx
@@ -26,8 +26,8 @@
<DesignSize value="10.0"/>
<SubfamilyID value="0"/>
<SubfamilyNameID value="0"/>
- <RangeStart value="0"/>
- <RangeEnd value="0"/>
+ <RangeStart value="0.0"/>
+ <RangeEnd value="0.0"/>
</FeatureParamsSize>
<!-- LookupCount=0 -->
</Feature>
diff --git a/Tests/feaLib/data/spec6b_ii.ttx b/Tests/feaLib/data/spec6b_ii.ttx
index a7131de..c7b8de8 100644
--- a/Tests/feaLib/data/spec6b_ii.ttx
+++ b/Tests/feaLib/data/spec6b_ii.ttx
@@ -91,6 +91,7 @@
<!-- Class2Count=2 -->
<Class1Record index="0">
<Class2Record index="0">
+ <Value1 XAdvance="0"/>
</Class2Record>
<Class2Record index="1">
<Value1 XAdvance="-100"/>
diff --git a/Tests/feaLib/data/spec6d2.fea b/Tests/feaLib/data/spec6d2.fea
index ead224f..5c2620d 100644
--- a/Tests/feaLib/data/spec6d2.fea
+++ b/Tests/feaLib/data/spec6d2.fea
@@ -9,7 +9,11 @@
markClass [cedilla] <anchor 300 600> @BOTTOM_MARKS;
feature test {
- pos base [e o] <anchor 250 450> mark @TOP_MARKS <anchor 250 -12> mark @BOTTOM_MARKS;
-#test-fea2fea: pos base [a u] <anchor 265 450> mark @TOP_MARKS <anchor 250 -10> mark @BOTTOM_MARKS;
- position base [a u] <anchor 265 450> mark @TOP_MARKS <anchor 250-10> mark @BOTTOM_MARKS;
+ pos base [e o]
+ <anchor 250 450> mark @TOP_MARKS
+ <anchor 250 -12> mark @BOTTOM_MARKS;
+#test-fea2fea: pos base [a u]
+ position base [a u]
+ <anchor 265 450> mark @TOP_MARKS
+ <anchor 250 -10> mark @BOTTOM_MARKS;
} test;
diff --git a/Tests/feaLib/data/spec6e.fea b/Tests/feaLib/data/spec6e.fea
index ed956c8..6461223 100644
--- a/Tests/feaLib/data/spec6e.fea
+++ b/Tests/feaLib/data/spec6e.fea
@@ -4,7 +4,10 @@
markClass kasratan <anchor 346 -98> @BOTTOM_MARKS;
feature test {
- pos ligature lam_meem_jeem <anchor 625 1800> mark @TOP_MARKS # mark above lam
- ligComponent <anchor 376 -368> mark @BOTTOM_MARKS # mark below meem
- ligComponent <anchor NULL>; # jeem has no marks
+ pos ligature lam_meem_jeem
+ <anchor 625 1800> mark @TOP_MARKS # mark above lam
+ ligComponent
+ <anchor 376 -368> mark @BOTTOM_MARKS # mark below meem
+ ligComponent
+ <anchor NULL>; # jeem has no marks
} test;
diff --git a/Tests/feaLib/data/spec6f.fea b/Tests/feaLib/data/spec6f.fea
index 8d32008..277bdb4 100644
--- a/Tests/feaLib/data/spec6f.fea
+++ b/Tests/feaLib/data/spec6f.fea
@@ -2,5 +2,6 @@
feature test {
markClass damma <anchor 189 -103> @MARK_CLASS_1;
- pos mark hamza <anchor 221 301> mark @MARK_CLASS_1;
+ pos mark hamza
+ <anchor 221 301> mark @MARK_CLASS_1;
} test;
diff --git a/Tests/feaLib/data/spec6h_ii.fea b/Tests/feaLib/data/spec6h_ii.fea
index 36a1f03..690d2a3 100644
--- a/Tests/feaLib/data/spec6h_ii.fea
+++ b/Tests/feaLib/data/spec6h_ii.fea
@@ -12,8 +12,10 @@
} CNTXT_PAIR_POS;
lookup CNTXT_MARK_TO_BASE {
- pos base o <anchor 250 450> mark @ALL_MARKS;
- pos base c <anchor 250 450> mark @ALL_MARKS;
+ pos base o
+ <anchor 250 450> mark @ALL_MARKS;
+ pos base c
+ <anchor 250 450> mark @ALL_MARKS;
} CNTXT_MARK_TO_BASE;
feature test {
diff --git a/Tests/feaLib/lexer_test.py b/Tests/feaLib/lexer_test.py
index 238552e..24dc5db 100644
--- a/Tests/feaLib/lexer_test.py
+++ b/Tests/feaLib/lexer_test.py
@@ -1,6 +1,7 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes
from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
from fontTools.feaLib.lexer import IncludingLexer, Lexer
+from io import StringIO
import os
import shutil
import tempfile
@@ -184,7 +185,7 @@
lambda: list(lexer))
def test_featurefilepath_None(self):
- lexer = IncludingLexer(UnicodeIO("# foobar"))
+ lexer = IncludingLexer(StringIO("# foobar"))
self.assertIsNone(lexer.featurefilepath)
files = set(loc.file for _, _, loc in lexer)
self.assertIn("<features>", files)
@@ -196,7 +197,7 @@
pos A B -40;
} kern;
""", encoding="utf-8"))
- including = UnicodeIO("include(%s);" % included.name)
+ including = StringIO("include(%s);" % included.name)
try:
lexer = IncludingLexer(including)
files = set(loc.file for _, _, loc in lexer)
@@ -224,7 +225,7 @@
# itself have a path, because it was initialized from
# an in-memory stream, so it will use the current working
# directory to resolve relative include statements
- lexer = IncludingLexer(UnicodeIO("include(included.fea);"))
+ lexer = IncludingLexer(StringIO("include(included.fea);"))
files = set(os.path.realpath(loc.file) for _, _, loc in lexer)
expected = os.path.realpath(included.name)
self.assertIn(expected, files)
diff --git a/Tests/feaLib/parser_test.py b/Tests/feaLib/parser_test.py
index db50595..de2bc3c 100644
--- a/Tests/feaLib/parser_test.py
+++ b/Tests/feaLib/parser_test.py
@@ -1280,6 +1280,76 @@
'"dflt" is not a valid script tag; use "DFLT" instead',
self.parse, "feature test {script dflt;} test;")
+ def test_stat_design_axis(self): # STAT DesignAxis
+ doc = self.parse('table STAT { DesignAxis opsz 0 '
+ '{name "Optical Size";}; } STAT;')
+ da = doc.statements[0].statements[0]
+ self.assertIsInstance(da, ast.STATDesignAxisStatement)
+ self.assertEqual(da.tag, 'opsz')
+ self.assertEqual(da.axisOrder, 0)
+ self.assertEqual(da.names[0].string, 'Optical Size')
+
+ def test_stat_axis_value_format1(self): # STAT AxisValue
+ doc = self.parse('table STAT { DesignAxis opsz 0 '
+ '{name "Optical Size";}; '
+ 'AxisValue {location opsz 8; name "Caption";}; } '
+ 'STAT;')
+ avr = doc.statements[0].statements[1]
+ self.assertIsInstance(avr, ast.STATAxisValueStatement)
+ self.assertEqual(avr.locations[0].tag, 'opsz')
+ self.assertEqual(avr.locations[0].values[0], 8)
+ self.assertEqual(avr.names[0].string, 'Caption')
+
+ def test_stat_axis_value_format2(self): # STAT AxisValue
+ doc = self.parse('table STAT { DesignAxis opsz 0 '
+ '{name "Optical Size";}; '
+ 'AxisValue {location opsz 8 6 10; name "Caption";}; } '
+ 'STAT;')
+ avr = doc.statements[0].statements[1]
+ self.assertIsInstance(avr, ast.STATAxisValueStatement)
+ self.assertEqual(avr.locations[0].tag, 'opsz')
+ self.assertEqual(avr.locations[0].values, [8, 6, 10])
+ self.assertEqual(avr.names[0].string, 'Caption')
+
+ def test_stat_axis_value_format2_bad_range(self): # STAT AxisValue
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'Default value 5 is outside of specified range 6-10.',
+ self.parse, 'table STAT { DesignAxis opsz 0 '
+ '{name "Optical Size";}; '
+ 'AxisValue {location opsz 5 6 10; name "Caption";}; } '
+ 'STAT;')
+
+ def test_stat_axis_value_format4(self): # STAT AxisValue
+ self.assertRaisesRegex(
+ FeatureLibError,
+ 'Only one value is allowed in a Format 4 Axis Value Record, but 3 were found.',
+ self.parse, 'table STAT { '
+ 'DesignAxis opsz 0 {name "Optical Size";}; '
+ 'DesignAxis wdth 0 {name "Width";}; '
+ 'AxisValue {'
+ 'location opsz 8 6 10; '
+ 'location wdth 400; '
+ 'name "Caption";}; } '
+ 'STAT;')
+
+ def test_stat_elidedfallbackname(self): # STAT ElidedFallbackName
+ doc = self.parse('table STAT { ElidedFallbackName {name "Roman"; '
+ 'name 3 1 0x0411 "ローマン"; }; '
+ '} STAT;')
+ nameRecord = doc.statements[0].statements[0]
+ self.assertIsInstance(nameRecord, ast.ElidedFallbackName)
+ self.assertEqual(nameRecord.names[0].string, 'Roman')
+ self.assertEqual(nameRecord.names[1].string, 'ローマン')
+
+ def test_stat_elidedfallbacknameid(self): # STAT ElidedFallbackNameID
+ doc = self.parse('table name { nameid 278 "Roman"; } name; '
+ 'table STAT { ElidedFallbackNameID 278; '
+ '} STAT;')
+ nameRecord = doc.statements[0].statements[0]
+ self.assertIsInstance(nameRecord, ast.NameRecord)
+ self.assertEqual(nameRecord.string, 'Roman')
+
def test_sub_single_format_a(self): # GSUB LookupType 1
doc = self.parse("feature smcp {substitute a by a.sc;} smcp;")
sub = doc.statements[0].statements[0]
diff --git a/Tests/fontBuilder/data/test.otf.ttx b/Tests/fontBuilder/data/test.otf.ttx
index 8fdd38f..7924ef5 100644
--- a/Tests/fontBuilder/data/test.otf.ttx
+++ b/Tests/fontBuilder/data/test.otf.ttx
@@ -266,7 +266,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
diff --git a/Tests/fontBuilder/data/test.ttf.ttx b/Tests/fontBuilder/data/test.ttf.ttx
index 584815e..8c3f00e 100644
--- a/Tests/fontBuilder/data/test.ttf.ttx
+++ b/Tests/fontBuilder/data/test.ttf.ttx
@@ -289,7 +289,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="A" out="a"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/fontBuilder/data/test_var.otf.ttx b/Tests/fontBuilder/data/test_var.otf.ttx
index 09246e5..ff14868 100644
--- a/Tests/fontBuilder/data/test_var.otf.ttx
+++ b/Tests/fontBuilder/data/test_var.otf.ttx
@@ -207,6 +207,8 @@
<BlueScale value="0.039625"/>
<BlueShift value="7"/>
<BlueFuzz value="1"/>
+ <LanguageGroup value="0"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
</FDArray>
diff --git a/Tests/fontBuilder/data/test_var.ttf.ttx b/Tests/fontBuilder/data/test_var.ttf.ttx
index 781bb64..e6d4d8d 100644
--- a/Tests/fontBuilder/data/test_var.ttf.ttx
+++ b/Tests/fontBuilder/data/test_var.ttf.ttx
@@ -300,7 +300,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="A" out="a"/>
</SingleSubst>
</Lookup>
@@ -393,7 +393,7 @@
<AxisValueArray>
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Neutral -->
<Value value="0.0"/>
</AxisValue>
@@ -405,7 +405,7 @@
</AxisValue>
<AxisValue index="2" Format="1">
<AxisIndex value="1"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Neutral -->
<Value value="0.0"/>
</AxisValue>
@@ -417,7 +417,7 @@
</AxisValue>
<AxisValue index="4" Format="1">
<AxisIndex value="2"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Neutral -->
<Value value="0.0"/>
</AxisValue>
@@ -429,7 +429,7 @@
</AxisValue>
<AxisValue index="6" Format="1">
<AxisIndex value="3"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Neutral -->
<Value value="0.0"/>
</AxisValue>
diff --git a/Tests/merge_test.py b/Tests/merge_test.py
index 0fb89c1..015248d 100644
--- a/Tests/merge_test.py
+++ b/Tests/merge_test.py
@@ -1,10 +1,9 @@
import io
import itertools
-from fontTools.misc.py23 import *
from fontTools import ttLib
from fontTools.ttLib.tables._g_l_y_f import Glyph
from fontTools.fontBuilder import FontBuilder
-from fontTools.merge import *
+from fontTools.merge import Merger
import unittest
import pytest
diff --git a/Tests/misc/arrayTools_test.py b/Tests/misc/arrayTools_test.py
index 73e0ab1..45b186f 100644
--- a/Tests/misc/arrayTools_test.py
+++ b/Tests/misc/arrayTools_test.py
@@ -1,7 +1,5 @@
-from fontTools.misc.py23 import *
-from fontTools.misc.py23 import round3
from fontTools.misc.arrayTools import (
- Vector, calcBounds, calcIntBounds, updateBounds, pointInRect, pointsInRect,
+ calcBounds, calcIntBounds, updateBounds, pointInRect, pointsInRect,
vectorLength, asInt16, normRect, scaleRect, offsetRect, insetRect,
sectRect, unionRect, rectCenter, intRect)
import math
@@ -20,7 +18,7 @@
assert calcIntBounds(
[(0.1, 40.1), (0.1, 100.1), (49.9, 49.9), (78.5, 9.5)],
- round=round3
+ round=round
) == (0, 10, 78, 100)
@@ -88,14 +86,3 @@
def test_intRect():
assert intRect((0.9, 2.9, 3.1, 4.1)) == (0, 2, 4, 5)
-
-
-def test_Vector():
- v = Vector([100, 200])
- assert v == Vector([100, 200])
- assert v == [100, 200]
- assert v + Vector([1, 2]) == [101, 202]
- assert v - Vector([1, 2]) == [99, 198]
- assert v * 2 == [200, 400]
- assert v * 0.5 == [50, 100]
- assert v / 2 == [50, 100]
diff --git a/Tests/misc/bezierTools_test.py b/Tests/misc/bezierTools_test.py
index 9096f27..c5cd1b7 100644
--- a/Tests/misc/bezierTools_test.py
+++ b/Tests/misc/bezierTools_test.py
@@ -1,6 +1,5 @@
-from fontTools.misc.py23 import *
from fontTools.misc.bezierTools import (
- calcQuadraticBounds, calcCubicBounds, splitLine, splitQuadratic,
+ calcQuadraticBounds, calcCubicBounds, segmentPointAtT, splitLine, splitQuadratic,
splitCubic, splitQuadraticAtT, splitCubicAtT, solveCubic)
import pytest
@@ -130,3 +129,22 @@
assert solveCubic(1.0, -4.5, 6.75, -3.375) == [1.5, 1.5, 1.5]
assert solveCubic(-12.0, 18.0, -9.0, 1.50023651123) == [0.5, 0.5, 0.5]
assert solveCubic(9.0, 0.0, 0.0, -7.62939453125e-05) == [-0.0, -0.0, -0.0]
+
+
+_segmentPointAtT_testData = [
+ ([(0, 10), (200, 100)], 0.0, (0, 10)),
+ ([(0, 10), (200, 100)], 0.5, (100, 55)),
+ ([(0, 10), (200, 100)], 1.0, (200, 100)),
+ ([(0, 10), (100, 100), (200, 50)], 0.0, (0, 10)),
+ ([(0, 10), (100, 100), (200, 50)], 0.5, (100, 65.0)),
+ ([(0, 10), (100, 100), (200, 50)], 1.0, (200, 50.0)),
+ ([(0, 10), (100, 100), (200, 100), (300, 0)], 0.0, (0, 10)),
+ ([(0, 10), (100, 100), (200, 100), (300, 0)], 0.5, (150, 76.25)),
+ ([(0, 10), (100, 100), (200, 100), (300, 0)], 1.0, (300, 0)),
+]
+
+
+@pytest.mark.parametrize("segment, t, expectedPoint", _segmentPointAtT_testData)
+def test_segmentPointAtT(segment, t, expectedPoint):
+ point = segmentPointAtT(segment, t)
+ assert expectedPoint == point
diff --git a/Tests/misc/classifyTools_test.py b/Tests/misc/classifyTools_test.py
index 071baec..72a9752 100644
--- a/Tests/misc/classifyTools_test.py
+++ b/Tests/misc/classifyTools_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.classifyTools import classify
diff --git a/Tests/misc/eexec_test.py b/Tests/misc/eexec_test.py
index 4c508dd..f72760a 100644
--- a/Tests/misc/eexec_test.py
+++ b/Tests/misc/eexec_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.eexec import decrypt, encrypt
diff --git a/Tests/misc/encodingTools_test.py b/Tests/misc/encodingTools_test.py
index 49961d8..1a131f6 100644
--- a/Tests/misc/encodingTools_test.py
+++ b/Tests/misc/encodingTools_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import unittest
from fontTools.misc.encodingTools import getEncoding
@@ -19,7 +18,7 @@
def test_extended_mac_encodings(self):
encoding = getEncoding(1, 1, 0) # Mac Japanese
decoded = b'\xfe'.decode(encoding)
- self.assertEqual(decoded, unichr(0x2122))
+ self.assertEqual(decoded, chr(0x2122))
def test_extended_unknown(self):
self.assertEqual(getEncoding(10, 11, 12), None)
diff --git a/Tests/misc/fixedTools_test.py b/Tests/misc/fixedTools_test.py
index fe836ea..dea61b9 100644
--- a/Tests/misc/fixedTools_test.py
+++ b/Tests/misc/fixedTools_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.fixedTools import (
fixedToFloat,
floatToFixed,
diff --git a/Tests/misc/loggingTools_test.py b/Tests/misc/loggingTools_test.py
index c726d5e..fd13044 100644
--- a/Tests/misc/loggingTools_test.py
+++ b/Tests/misc/loggingTools_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.loggingTools import (
LevelFormatter,
Timer,
@@ -6,6 +5,7 @@
ChannelsFilter,
LogMixin,
)
+from io import StringIO
import logging
import textwrap
import time
diff --git a/Tests/misc/macRes_test.py b/Tests/misc/macRes_test.py
index 2c0fd6a..a6a8e9d 100644
--- a/Tests/misc/macRes_test.py
+++ b/Tests/misc/macRes_test.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from io import BytesIO
import sys
import os
import tempfile
diff --git a/Tests/misc/plistlib_test.py b/Tests/misc/plistlib_test.py
index 7222bd2..b2ce408 100644
--- a/Tests/misc/plistlib_test.py
+++ b/Tests/misc/plistlib_test.py
@@ -5,7 +5,7 @@
import collections
from io import BytesIO
from numbers import Integral
-from fontTools.misc.py23 import tounicode
+from fontTools.misc.py23 import tostr
from fontTools.misc import etree
from fontTools.misc import plistlib
from fontTools.ufoLib.plistlib import (
@@ -421,7 +421,7 @@
def _strip(txt):
return (
- "".join(l.strip() for l in tounicode(txt, "utf-8").splitlines())
+ "".join(l.strip() for l in tostr(txt, "utf-8").splitlines())
if txt is not None
else ""
)
diff --git a/Tests/misc/py23_test.py b/Tests/misc/py23_test.py
index 1a21d5a..61274cc 100644
--- a/Tests/misc/py23_test.py
+++ b/Tests/misc/py23_test.py
@@ -1,6 +1,7 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes
from fontTools.misc.textTools import deHexStr
import filecmp
+from io import StringIO
import tempfile
from subprocess import check_call
import sys
@@ -389,35 +390,6 @@
self.assertAllNotClose(fraction_examples, rel_tol=1e-9)
-@unittest.skipUnless(
- (sys.version_info[0] == 2 and sys.maxunicode < 0x10FFFF),
- "requires 'narrow' Python 2.7 build")
-class NarrowUnicodeBuildTest(unittest.TestCase):
-
- def test_unichr(self):
- from __builtin__ import unichr as narrow_unichr
-
- self.assertRaises(
- ValueError,
- narrow_unichr, 0xFFFF + 1)
-
- self.assertEqual(unichr(1114111), u'\U0010FFFF')
-
- self.assertRaises(
- ValueError,
- unichr, 0x10FFFF + 1)
-
- def test_byteord(self):
- from __builtin__ import ord as narrow_ord
-
- self.assertRaises(
- TypeError,
- narrow_ord, u'\U00010000')
-
- self.assertEqual(byteord(u'\U00010000'), 0xFFFF + 1)
- self.assertEqual(byteord(u'\U0010FFFF'), 1114111)
-
-
class TestRedirectStream:
redirect_stream = None
diff --git a/Tests/misc/testTools_test.py b/Tests/misc/testTools_test.py
index 82e73a1..80d4d2b 100644
--- a/Tests/misc/testTools_test.py
+++ b/Tests/misc/testTools_test.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-from fontTools.misc.py23 import *
import fontTools.misc.testTools as testTools
import unittest
diff --git a/Tests/misc/textTools_test.py b/Tests/misc/textTools_test.py
index 44c7cc3..f83abf9 100644
--- a/Tests/misc/textTools_test.py
+++ b/Tests/misc/textTools_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.textTools import pad
diff --git a/Tests/misc/timeTools_test.py b/Tests/misc/timeTools_test.py
index 601f357..4d75ce4 100644
--- a/Tests/misc/timeTools_test.py
+++ b/Tests/misc/timeTools_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.timeTools import asctime, timestampNow, timestampToString, timestampFromString, epoch_diff
import os
import time
@@ -7,7 +6,7 @@
def test_asctime():
- assert isinstance(asctime(), basestring)
+ assert isinstance(asctime(), str)
assert asctime(time.gmtime(0)) == 'Thu Jan 1 00:00:00 1970'
diff --git a/Tests/misc/transform_test.py b/Tests/misc/transform_test.py
index d679e28..4efab81 100644
--- a/Tests/misc/transform_test.py
+++ b/Tests/misc/transform_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.transform import Transform, Identity, Offset, Scale
import math
import pytest
diff --git a/Tests/misc/vector_test.py b/Tests/misc/vector_test.py
new file mode 100644
index 0000000..236a3ba
--- /dev/null
+++ b/Tests/misc/vector_test.py
@@ -0,0 +1,71 @@
+import math
+import pytest
+from fontTools.misc.arrayTools import Vector as ArrayVector
+from fontTools.misc.vector import Vector
+
+
+def test_Vector():
+ v = Vector((100, 200))
+ assert repr(v) == "Vector((100, 200))"
+ assert v == Vector((100, 200))
+ assert v == Vector([100, 200])
+ assert v == (100, 200)
+ assert (100, 200) == v
+ assert v == [100, 200]
+ assert [100, 200] == v
+ assert v is Vector(v)
+ assert v + 10 == (110, 210)
+ assert 10 + v == (110, 210)
+ assert v + Vector((1, 2)) == (101, 202)
+ assert v - Vector((1, 2)) == (99, 198)
+ assert v * 2 == (200, 400)
+ assert 2 * v == (200, 400)
+ assert v * 0.5 == (50, 100)
+ assert v / 2 == (50, 100)
+ assert 2 / v == (0.02, 0.01)
+ v = Vector((3, 4))
+ assert abs(v) == 5 # length
+ assert v.length() == 5
+ assert v.normalized() == Vector((0.6, 0.8))
+ assert abs(Vector((1, 1, 1))) == math.sqrt(3)
+ assert bool(Vector((0, 0, 1)))
+ assert not bool(Vector((0, 0, 0)))
+ v1 = Vector((2, 3))
+ v2 = Vector((3, 4))
+ assert v1.dot(v2) == 18
+ v = Vector((2, 4))
+ assert round(v / 3) == (1, 1)
+ with pytest.raises(
+ AttributeError,
+ match="'Vector' object has no attribute 'newAttr'",
+ ):
+ v.newAttr = 12
+
+
+def test_deprecated():
+ with pytest.warns(
+ DeprecationWarning,
+ match="fontTools.misc.arrayTools.Vector has been deprecated",
+ ):
+ ArrayVector((1, 2))
+ with pytest.warns(
+ DeprecationWarning,
+ match="the 'keep' argument has been deprecated",
+ ):
+ Vector((1, 2), keep=True)
+ v = Vector((1, 2))
+ with pytest.warns(
+ DeprecationWarning,
+ match="the 'toInt' method has been deprecated",
+ ):
+ v.toInt()
+ with pytest.warns(
+ DeprecationWarning,
+ match="the 'values' attribute has been deprecated",
+ ):
+ v.values
+ with pytest.raises(
+ AttributeError,
+ match="the 'values' attribute has been deprecated",
+ ):
+ v.values = [12, 23]
diff --git a/Tests/misc/xmlReader_test.py b/Tests/misc/xmlReader_test.py
index afa1821..f6775cb 100644
--- a/Tests/misc/xmlReader_test.py
+++ b/Tests/misc/xmlReader_test.py
@@ -1,6 +1,5 @@
-# -*- coding: utf-8 -*-
-
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import strjoin
+from io import BytesIO
import os
import unittest
from fontTools.ttLib import TTFont
diff --git a/Tests/misc/xmlWriter_test.py b/Tests/misc/xmlWriter_test.py
index fd0ba89..fd4f240 100644
--- a/Tests/misc/xmlWriter_test.py
+++ b/Tests/misc/xmlWriter_test.py
@@ -1,4 +1,5 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, tobytes
+from io import BytesIO
import os
import unittest
from fontTools.misc.xmlWriter import XMLWriter
diff --git a/Tests/mtiLib/data/featurename-backward.ttx.GSUB b/Tests/mtiLib/data/featurename-backward.ttx.GSUB
index 9469c79..cc893cd 100644
--- a/Tests/mtiLib/data/featurename-backward.ttx.GSUB
+++ b/Tests/mtiLib/data/featurename-backward.ttx.GSUB
@@ -51,7 +51,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="a" out="b"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/mtiLib/data/featurename-forward.ttx.GSUB b/Tests/mtiLib/data/featurename-forward.ttx.GSUB
index 9469c79..cc893cd 100644
--- a/Tests/mtiLib/data/featurename-forward.ttx.GSUB
+++ b/Tests/mtiLib/data/featurename-forward.ttx.GSUB
@@ -51,7 +51,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="a" out="b"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/mtiLib/data/lookupnames-backward.ttx.GSUB b/Tests/mtiLib/data/lookupnames-backward.ttx.GSUB
index 698012c..cb358d7 100644
--- a/Tests/mtiLib/data/lookupnames-backward.ttx.GSUB
+++ b/Tests/mtiLib/data/lookupnames-backward.ttx.GSUB
@@ -39,7 +39,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uuvowelsignkannada" out="uuvowelsignaltkannada"/>
<Substitution in="uvowelsignkannada" out="uvowelsignaltkannada"/>
</SingleSubst>
@@ -49,11 +49,11 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uvowelsignkannada"/>
<Glyph value="uuvowelsignkannada"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="pakannada" class="1"/>
<ClassDef glyph="pevowelkannada" class="1"/>
<ClassDef glyph="phakannada" class="1"/>
@@ -61,7 +61,7 @@
<ClassDef glyph="vakannada" class="1"/>
<ClassDef glyph="vevowelkannada" class="1"/>
</BacktrackClassDef>
- <InputClassDef Format="1">
+ <InputClassDef>
<ClassDef glyph="uuvowelsignkannada" class="1"/>
<ClassDef glyph="uvowelsignkannada" class="1"/>
</InputClassDef>
diff --git a/Tests/mtiLib/data/lookupnames-forward.ttx.GSUB b/Tests/mtiLib/data/lookupnames-forward.ttx.GSUB
index 15e48d0..249d605 100644
--- a/Tests/mtiLib/data/lookupnames-forward.ttx.GSUB
+++ b/Tests/mtiLib/data/lookupnames-forward.ttx.GSUB
@@ -40,11 +40,11 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uvowelsignkannada"/>
<Glyph value="uuvowelsignkannada"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="pakannada" class="1"/>
<ClassDef glyph="pevowelkannada" class="1"/>
<ClassDef glyph="phakannada" class="1"/>
@@ -52,7 +52,7 @@
<ClassDef glyph="vakannada" class="1"/>
<ClassDef glyph="vevowelkannada" class="1"/>
</BacktrackClassDef>
- <InputClassDef Format="1">
+ <InputClassDef>
<ClassDef glyph="uuvowelsignkannada" class="1"/>
<ClassDef glyph="uvowelsignkannada" class="1"/>
</InputClassDef>
@@ -78,7 +78,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uuvowelsignkannada" out="uuvowelsignaltkannada"/>
<Substitution in="uvowelsignkannada" out="uvowelsignaltkannada"/>
</SingleSubst>
diff --git a/Tests/mtiLib/data/mixed-toplevels.ttx.GSUB b/Tests/mtiLib/data/mixed-toplevels.ttx.GSUB
index 15e48d0..249d605 100644
--- a/Tests/mtiLib/data/mixed-toplevels.ttx.GSUB
+++ b/Tests/mtiLib/data/mixed-toplevels.ttx.GSUB
@@ -40,11 +40,11 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uvowelsignkannada"/>
<Glyph value="uuvowelsignkannada"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="pakannada" class="1"/>
<ClassDef glyph="pevowelkannada" class="1"/>
<ClassDef glyph="phakannada" class="1"/>
@@ -52,7 +52,7 @@
<ClassDef glyph="vakannada" class="1"/>
<ClassDef glyph="vevowelkannada" class="1"/>
</BacktrackClassDef>
- <InputClassDef Format="1">
+ <InputClassDef>
<ClassDef glyph="uuvowelsignkannada" class="1"/>
<ClassDef glyph="uvowelsignkannada" class="1"/>
</InputClassDef>
@@ -78,7 +78,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uuvowelsignkannada" out="uuvowelsignaltkannada"/>
<Substitution in="uvowelsignkannada" out="uvowelsignaltkannada"/>
</SingleSubst>
diff --git a/Tests/mtiLib/data/mti/chained-glyph.ttx.GPOS b/Tests/mtiLib/data/mti/chained-glyph.ttx.GPOS
index 634c142..b550c70 100644
--- a/Tests/mtiLib/data/mti/chained-glyph.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/chained-glyph.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="512"/><!-- markAttachmentType[2] -->
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uuvowelsignsinh"/>
<Glyph value="uvowelsignsinh"/>
</Coverage>
diff --git a/Tests/mtiLib/data/mti/chained-glyph.ttx.GSUB b/Tests/mtiLib/data/mti/chained-glyph.ttx.GSUB
index 52935c3..7dfdb84 100644
--- a/Tests/mtiLib/data/mti/chained-glyph.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/chained-glyph.ttx.GSUB
@@ -8,7 +8,7 @@
<LookupFlag value="512"/><!-- markAttachmentType[2] -->
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uuvowelsignsinh"/>
<Glyph value="uvowelsignsinh"/>
</Coverage>
diff --git a/Tests/mtiLib/data/mti/chainedclass.ttx.GSUB b/Tests/mtiLib/data/mti/chainedclass.ttx.GSUB
index cfa391f..fcd7569 100644
--- a/Tests/mtiLib/data/mti/chainedclass.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/chainedclass.ttx.GSUB
@@ -8,11 +8,11 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uvowelsignkannada"/>
<Glyph value="uuvowelsignkannada"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="pakannada" class="1"/>
<ClassDef glyph="pevowelkannada" class="1"/>
<ClassDef glyph="phakannada" class="1"/>
@@ -20,7 +20,7 @@
<ClassDef glyph="vakannada" class="1"/>
<ClassDef glyph="vevowelkannada" class="1"/>
</BacktrackClassDef>
- <InputClassDef Format="1">
+ <InputClassDef>
<ClassDef glyph="uuvowelsignkannada" class="1"/>
<ClassDef glyph="uvowelsignkannada" class="1"/>
</InputClassDef>
@@ -46,7 +46,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uuvowelsignkannada" out="uuvowelsignaltkannada"/>
<Substitution in="uvowelsignkannada" out="uvowelsignaltkannada"/>
</SingleSubst>
diff --git a/Tests/mtiLib/data/mti/chainedcoverage.ttx.GSUB b/Tests/mtiLib/data/mti/chainedcoverage.ttx.GSUB
index 7c807a4..4f312c6 100644
--- a/Tests/mtiLib/data/mti/chainedcoverage.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/chainedcoverage.ttx.GSUB
@@ -9,7 +9,7 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="2">
+ <BacktrackCoverage index="0">
<Glyph value="zero"/>
<Glyph value="one"/>
<Glyph value="two"/>
@@ -22,11 +22,11 @@
<Glyph value="nine"/>
</BacktrackCoverage>
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="slash"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="2">
+ <LookAheadCoverage index="0">
<Glyph value="zero"/>
<Glyph value="one"/>
<Glyph value="two"/>
@@ -49,7 +49,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="slash" out="fraction"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/mtiLib/data/mti/gdefattach.ttx.GDEF b/Tests/mtiLib/data/mti/gdefattach.ttx.GDEF
index cc4c70d..79aed8f 100644
--- a/Tests/mtiLib/data/mti/gdefattach.ttx.GDEF
+++ b/Tests/mtiLib/data/mti/gdefattach.ttx.GDEF
@@ -2,7 +2,7 @@
<GDEF>
<Version value="0x00010000"/>
<AttachList>
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="B"/>
</Coverage>
diff --git a/Tests/mtiLib/data/mti/gdefclasses.ttx.GDEF b/Tests/mtiLib/data/mti/gdefclasses.ttx.GDEF
index e298c28..c3c9d68 100644
--- a/Tests/mtiLib/data/mti/gdefclasses.ttx.GDEF
+++ b/Tests/mtiLib/data/mti/gdefclasses.ttx.GDEF
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="C" class="1"/>
<ClassDef glyph="acute" class="3"/>
diff --git a/Tests/mtiLib/data/mti/gdefligcaret.ttx.GDEF b/Tests/mtiLib/data/mti/gdefligcaret.ttx.GDEF
index 48f7347..174af8e 100644
--- a/Tests/mtiLib/data/mti/gdefligcaret.ttx.GDEF
+++ b/Tests/mtiLib/data/mti/gdefligcaret.ttx.GDEF
@@ -2,7 +2,7 @@
<GDEF>
<Version value="0x00010000"/>
<LigCaretList>
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uniFB01"/>
<Glyph value="ffi"/>
</Coverage>
diff --git a/Tests/mtiLib/data/mti/gdefmarkattach.ttx.GDEF b/Tests/mtiLib/data/mti/gdefmarkattach.ttx.GDEF
index b6cbe10..97683ab 100644
--- a/Tests/mtiLib/data/mti/gdefmarkattach.ttx.GDEF
+++ b/Tests/mtiLib/data/mti/gdefmarkattach.ttx.GDEF
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<GDEF>
<Version value="0x00010000"/>
- <MarkAttachClassDef Format="1">
+ <MarkAttachClassDef>
<ClassDef glyph="breve" class="1"/>
<ClassDef glyph="commaacent" class="2"/>
<ClassDef glyph="dotbelow" class="2"/>
diff --git a/Tests/mtiLib/data/mti/gdefmarkfilter.ttx.GDEF b/Tests/mtiLib/data/mti/gdefmarkfilter.ttx.GDEF
index 3b23481..4f3593e 100644
--- a/Tests/mtiLib/data/mti/gdefmarkfilter.ttx.GDEF
+++ b/Tests/mtiLib/data/mti/gdefmarkfilter.ttx.GDEF
@@ -5,17 +5,17 @@
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
<Coverage index="0" empty="1"/>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="breve"/>
<Glyph value="acute"/>
<Glyph value="dotabove"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="dotbelow"/>
<Glyph value="cedilla"/>
<Glyph value="commaaccent"/>
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
<Glyph value="dotbelow"/>
<Glyph value="dotabove"/>
</Coverage>
diff --git a/Tests/mtiLib/data/mti/gposcursive.ttx.GPOS b/Tests/mtiLib/data/mti/gposcursive.ttx.GPOS
index 2965139..6c08c50 100644
--- a/Tests/mtiLib/data/mti/gposcursive.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/gposcursive.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="B"/>
</Coverage>
diff --git a/Tests/mtiLib/data/mti/gposkernset.ttx.GPOS b/Tests/mtiLib/data/mti/gposkernset.ttx.GPOS
index edfea10..a837123 100644
--- a/Tests/mtiLib/data/mti/gposkernset.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/gposkernset.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=2 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="Acircumflex"/>
<Glyph value="T"/>
</Coverage>
@@ -31,7 +31,7 @@
</PairSet>
</PairPos>
<PairPos index="1" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="Acircumflex"/>
<Glyph value="T"/>
@@ -44,7 +44,7 @@
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Aacute" class="1"/>
<ClassDef glyph="Acircumflex" class="1"/>
@@ -55,7 +55,7 @@
<ClassDef glyph="Ograve" class="2"/>
<ClassDef glyph="T" class="3"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
<ClassDef glyph="V" class="1"/>
<ClassDef glyph="a" class="2"/>
<ClassDef glyph="aacute" class="2"/>
diff --git a/Tests/mtiLib/data/mti/gposmarktobase.ttx.GPOS b/Tests/mtiLib/data/mti/gposmarktobase.ttx.GPOS
index b0a74e7..e6e2102 100644
--- a/Tests/mtiLib/data/mti/gposmarktobase.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/gposmarktobase.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="2">
+ <MarkCoverage>
<Glyph value="aimatrabindigurmukhi"/>
<Glyph value="aimatragurmukhi"/>
<Glyph value="aimatratippigurmukhi"/>
@@ -22,7 +22,7 @@
<Glyph value="oomatragurmukhi"/>
<Glyph value="oomatratippigurmukhi"/>
</MarkCoverage>
- <BaseCoverage Format="2">
+ <BaseCoverage>
<Glyph value="lagurmukhi"/>
<Glyph value="lanuktagurmukhi"/>
<Glyph value="nagurmukhi"/>
diff --git a/Tests/mtiLib/data/mti/gpospairclass.ttx.GPOS b/Tests/mtiLib/data/mti/gpospairclass.ttx.GPOS
index 567b2a7..32b35ae 100644
--- a/Tests/mtiLib/data/mti/gpospairclass.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/gpospairclass.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="Acircumflex"/>
<Glyph value="T"/>
@@ -21,7 +21,7 @@
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Aacute" class="1"/>
<ClassDef glyph="Acircumflex" class="1"/>
@@ -32,7 +32,7 @@
<ClassDef glyph="Ograve" class="2"/>
<ClassDef glyph="T" class="3"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
<ClassDef glyph="V" class="1"/>
<ClassDef glyph="a" class="2"/>
<ClassDef glyph="aacute" class="2"/>
diff --git a/Tests/mtiLib/data/mti/gpospairglyph.ttx.GPOS b/Tests/mtiLib/data/mti/gpospairglyph.ttx.GPOS
index ea0161b..f03a90e 100644
--- a/Tests/mtiLib/data/mti/gpospairglyph.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/gpospairglyph.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="Acircumflex"/>
<Glyph value="T"/>
diff --git a/Tests/mtiLib/data/mti/gpossingle.ttx.GPOS b/Tests/mtiLib/data/mti/gpossingle.ttx.GPOS
index adbb44f..c3bdbf6 100644
--- a/Tests/mtiLib/data/mti/gpossingle.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/gpossingle.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="2">
+ <Coverage>
<Glyph value="bsuperior"/>
<Glyph value="isuperior"/>
<Glyph value="vsuperior"/>
diff --git a/Tests/mtiLib/data/mti/gsubalternate.ttx.GSUB b/Tests/mtiLib/data/mti/gsubalternate.ttx.GSUB
index 4184325..86b0b73 100644
--- a/Tests/mtiLib/data/mti/gsubalternate.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/gsubalternate.ttx.GSUB
@@ -7,7 +7,7 @@
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <AlternateSubst index="0" Format="1">
+ <AlternateSubst index="0">
<AlternateSet glyph="eight">
<Alternate glyph="uniF738"/>
<Alternate glyph="uniE0C0"/>
diff --git a/Tests/mtiLib/data/mti/gsubligature.ttx.GSUB b/Tests/mtiLib/data/mti/gsubligature.ttx.GSUB
index ad8f505..26c88c8 100644
--- a/Tests/mtiLib/data/mti/gsubligature.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/gsubligature.ttx.GSUB
@@ -7,7 +7,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="I">
<Ligature components="J" glyph="IJ"/>
</LigatureSet>
diff --git a/Tests/mtiLib/data/mti/gsubmultiple.ttx.GSUB b/Tests/mtiLib/data/mti/gsubmultiple.ttx.GSUB
index a68a45a..5bedfba 100644
--- a/Tests/mtiLib/data/mti/gsubmultiple.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/gsubmultiple.ttx.GSUB
@@ -7,7 +7,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="janyevoweltelugu" out="jaivoweltelugu,nyasubscripttelugu"/>
<Substitution in="kassevoweltelugu" out="kaivoweltelugu,ssasubscripttelugu"/>
</MultipleSubst>
diff --git a/Tests/mtiLib/data/mti/gsubreversechanined.ttx.GSUB b/Tests/mtiLib/data/mti/gsubreversechanined.ttx.GSUB
index 38b3b75..d705af5 100644
--- a/Tests/mtiLib/data/mti/gsubreversechanined.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/gsubreversechanined.ttx.GSUB
@@ -8,14 +8,14 @@
<LookupFlag value="9"/><!-- rightToLeft ignoreMarks -->
<!-- SubTableCount=3 -->
<ReverseChainSingleSubst index="0" Format="1">
- <Coverage Format="2">
+ <Coverage>
<Glyph value="rayf2"/>
<Glyph value="reyf2"/>
<Glyph value="yayf2"/>
<Glyph value="zayf2"/>
</Coverage>
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="2">
+ <BacktrackCoverage index="0">
<Glyph value="bayi1"/>
<Glyph value="jeemi1"/>
<Glyph value="kafi1"/>
@@ -33,14 +33,14 @@
<Substitute index="3" value="zayf1"/>
</ReverseChainSingleSubst>
<ReverseChainSingleSubst index="1" Format="1">
- <Coverage Format="2">
+ <Coverage>
<Glyph value="ayehf2"/>
<Glyph value="hamzayeharabf2"/>
<Glyph value="hamzayehf2"/>
<Glyph value="yehf2"/>
</Coverage>
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="bayi1"/>
<Glyph value="kafi1"/>
<Glyph value="ghafi1"/>
@@ -58,14 +58,14 @@
<Substitute index="3" value="yehf1"/>
</ReverseChainSingleSubst>
<ReverseChainSingleSubst index="2" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="dal"/>
<Glyph value="del"/>
<Glyph value="zal"/>
</Coverage>
<!-- BacktrackGlyphCount=0 -->
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="2">
+ <LookAheadCoverage index="0">
<Glyph value="ray"/>
<Glyph value="rey"/>
<Glyph value="zay"/>
diff --git a/Tests/mtiLib/data/mti/gsubsingle.ttx.GSUB b/Tests/mtiLib/data/mti/gsubsingle.ttx.GSUB
index 525b365..dc6a295 100644
--- a/Tests/mtiLib/data/mti/gsubsingle.ttx.GSUB
+++ b/Tests/mtiLib/data/mti/gsubsingle.ttx.GSUB
@@ -7,7 +7,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="onehalf" out="onehalf.alt"/>
<Substitution in="onequarter" out="onequarter.alt"/>
<Substitution in="threequarters" out="threequarters.alt"/>
diff --git a/Tests/mtiLib/data/mti/mark-to-ligature.ttx.GPOS b/Tests/mtiLib/data/mti/mark-to-ligature.ttx.GPOS
index 7e02fe0..b5f275e 100644
--- a/Tests/mtiLib/data/mti/mark-to-ligature.ttx.GPOS
+++ b/Tests/mtiLib/data/mti/mark-to-ligature.ttx.GPOS
@@ -8,7 +8,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkLigPos index="0" Format="1">
- <MarkCoverage Format="2">
+ <MarkCoverage>
<Glyph value="AlefSuperiorNS"/>
<Glyph value="DammaNS"/>
<Glyph value="DammaRflxNS"/>
@@ -37,7 +37,7 @@
<Glyph value="UltapeshNS"/>
<Glyph value="WaslaNS"/>
</MarkCoverage>
- <LigatureCoverage Format="2">
+ <LigatureCoverage>
<Glyph value="AinIni.12m_MeemFin.02"/>
<Glyph value="AinIni_YehBarreeFin"/>
<Glyph value="AinMed_YehBarreeFin"/>
diff --git a/Tests/mtiLib/mti_test.py b/Tests/mtiLib/mti_test.py
index 1666dd4..f0e7bdf 100644
--- a/Tests/mtiLib/mti_test.py
+++ b/Tests/mtiLib/mti_test.py
@@ -1,8 +1,8 @@
-from fontTools.misc.py23 import *
from fontTools.misc.xmlWriter import XMLWriter
from fontTools.ttLib import TTFont
from fontTools import mtiLib
import difflib
+from io import StringIO
import os
import sys
import unittest
diff --git a/Tests/otlLib/builder_test.py b/Tests/otlLib/builder_test.py
index 3ea5a74..1c2c324 100644
--- a/Tests/otlLib/builder_test.py
+++ b/Tests/otlLib/builder_test.py
@@ -839,8 +839,12 @@
" <!-- Class2Count=3 -->",
' <Class1Record index="0">',
' <Class2Record index="0">',
+ ' <Value1 XPlacement="0" YPlacement="0"/>',
+ ' <Value2 XPlacement="0"/>',
" </Class2Record>",
' <Class2Record index="1">',
+ ' <Value1 XPlacement="0" YPlacement="0"/>',
+ ' <Value2 XPlacement="0"/>',
" </Class2Record>",
' <Class2Record index="2">',
' <Value1 XPlacement="-80" YPlacement="-20"/>',
@@ -849,12 +853,15 @@
" </Class1Record>",
' <Class1Record index="1">',
' <Class2Record index="0">',
+ ' <Value1 XPlacement="0" YPlacement="0"/>',
+ ' <Value2 XPlacement="0"/>',
" </Class2Record>",
' <Class2Record index="1">',
+ ' <Value1 XPlacement="0" YPlacement="0"/>',
' <Value2 XPlacement="-20"/>',
" </Class2Record>",
' <Class2Record index="2">',
- " <Value1/>",
+ ' <Value1 XPlacement="0" YPlacement="0"/>',
' <Value2 XPlacement="-50"/>',
" </Class2Record>",
" </Class1Record>",
@@ -911,9 +918,11 @@
("A", "zero"): (d0, d50),
("A", "one"): (None, d20),
("B", "five"): (d8020, d50),
+
},
self.GLYPHMAP,
)
+
assert getXML(subtable.toXML) == [
'<PairPos Format="1">',
" <Coverage>",
@@ -927,10 +936,12 @@
" <!-- PairValueCount=2 -->",
' <PairValueRecord index="0">',
' <SecondGlyph value="zero"/>',
+ ' <Value1 XPlacement="0" YPlacement="0"/>',
' <Value2 XPlacement="-50"/>',
" </PairValueRecord>",
' <PairValueRecord index="1">',
' <SecondGlyph value="one"/>',
+ ' <Value1 XPlacement="0" YPlacement="0"/>',
' <Value2 XPlacement="-20"/>',
" </PairValueRecord>",
" </PairSet>",
@@ -1031,8 +1042,8 @@
" </Coverage>",
' <ValueFormat value="3"/>',
" <!-- ValueCount=2 -->",
- ' <Value index="0" XPlacement="777"/>',
- ' <Value index="1" YPlacement="-888"/>',
+ ' <Value index="0" XPlacement="777" YPlacement="0"/>',
+ ' <Value index="1" XPlacement="0" YPlacement="-888"/>',
"</SinglePos>",
]
@@ -1138,7 +1149,7 @@
' </AxisValue>',
' <AxisValue index="1" Format="1">',
' <AxisIndex value="0"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="256"/> <!-- Regular -->',
' <Value value="400.0"/>',
' </AxisValue>',
@@ -1193,7 +1204,7 @@
' </AxisValue>',
' <AxisValue index="1" Format="1">',
' <AxisIndex value="0"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="258"/> <!-- Regular -->',
' <Value value="400.0"/>',
' </AxisValue>',
@@ -1211,7 +1222,7 @@
' </AxisValue>',
' <AxisValue index="4" Format="1">',
' <AxisIndex value="1"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="258"/> <!-- Regular -->',
' <Value value="100.0"/>',
' </AxisValue>',
@@ -1246,7 +1257,7 @@
' <AxisValueArray>',
' <AxisValue index="0" Format="1">',
' <AxisIndex value="0"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="257"/> <!-- Regular -->',
' <Value value="400.0"/>',
' </AxisValue>',
@@ -1291,7 +1302,7 @@
' </AxisValue>',
' <AxisValue index="1" Format="2">',
' <AxisIndex value="0"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="258"/> <!-- Text -->',
' <NominalValue value="14.0"/>',
' <RangeMinValue value="10.0"/>',
@@ -1354,7 +1365,7 @@
' </AxisValue>',
' <AxisValue index="1" Format="1">',
' <AxisIndex value="1"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="258"/> <!-- Regular -->',
' <Value value="100.0"/>',
' </AxisValue>',
diff --git a/Tests/otlLib/data/gpos_91.ttx b/Tests/otlLib/data/gpos_91.ttx
index ee7bf7c..7befe7b 100644
--- a/Tests/otlLib/data/gpos_91.ttx
+++ b/Tests/otlLib/data/gpos_91.ttx
@@ -85,7 +85,7 @@
<ExtensionPos index="0" Format="1">
<ExtensionLookupType value="1"/>
<SinglePos Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat value="4"/>
diff --git a/Tests/otlLib/data/gsub_51.ttx b/Tests/otlLib/data/gsub_51.ttx
index f0aba65..0e6a413 100644
--- a/Tests/otlLib/data/gsub_51.ttx
+++ b/Tests/otlLib/data/gsub_51.ttx
@@ -88,7 +88,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
</SingleSubst>
@@ -97,7 +97,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -107,7 +107,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -117,7 +117,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -126,7 +126,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/otlLib/data/gsub_52.ttx b/Tests/otlLib/data/gsub_52.ttx
index 03bd9ee..4e83b96 100644
--- a/Tests/otlLib/data/gsub_52.ttx
+++ b/Tests/otlLib/data/gsub_52.ttx
@@ -88,7 +88,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
</SingleSubst>
@@ -97,7 +97,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -107,7 +107,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -117,7 +117,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -126,10 +126,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- SubClassSetCount=2 -->
diff --git a/Tests/otlLib/data/gsub_71.ttx b/Tests/otlLib/data/gsub_71.ttx
index 201de4c..acf6cdb 100644
--- a/Tests/otlLib/data/gsub_71.ttx
+++ b/Tests/otlLib/data/gsub_71.ttx
@@ -87,7 +87,7 @@
<!-- SubTableCount=1 -->
<ExtensionSubst index="0" Format="1">
<ExtensionLookupType value="1"/>
- <SingleSubst Format="1">
+ <SingleSubst>
<Substitution in="g18" out="g23"/>
<Substitution in="g19" out="g24"/>
</SingleSubst>
diff --git a/Tests/pens/areaPen_test.py b/Tests/pens/areaPen_test.py
index f99e9fc..c3f3f80 100644
--- a/Tests/pens/areaPen_test.py
+++ b/Tests/pens/areaPen_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.areaPen import AreaPen
import unittest
diff --git a/Tests/pens/basePen_test.py b/Tests/pens/basePen_test.py
index 05ef4c6..db57e80 100644
--- a/Tests/pens/basePen_test.py
+++ b/Tests/pens/basePen_test.py
@@ -1,6 +1,6 @@
-from fontTools.misc.py23 import *
from fontTools.pens.basePen import \
- BasePen, decomposeSuperBezierSegment, decomposeQuadraticSegment
+ AbstractPen, BasePen, decomposeSuperBezierSegment, decomposeQuadraticSegment
+from fontTools.pens.pointPen import AbstractPointPen
from fontTools.misc.loggingTools import CapturingLogHandler
import unittest
diff --git a/Tests/pens/boundsPen_test.py b/Tests/pens/boundsPen_test.py
index 1d4b45e..c0c5610 100644
--- a/Tests/pens/boundsPen_test.py
+++ b/Tests/pens/boundsPen_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.boundsPen import BoundsPen, ControlBoundsPen
import unittest
diff --git a/Tests/pens/cocoaPen_test.py b/Tests/pens/cocoaPen_test.py
index 51795e1..11077c0 100644
--- a/Tests/pens/cocoaPen_test.py
+++ b/Tests/pens/cocoaPen_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import unittest
try:
@@ -48,7 +47,7 @@
"moveto 50.0 0.0 lineto 50.0 500.0 lineto 200.0 500.0 curveto 350.0 500.0 450.0 400.0 450.0 250.0 curveto 450.0 100.0 350.0 0.0 200.0 0.0 close ",
cocoaPathToString(pen.path)
)
-
+
def test_empty(self):
pen = CocoaPen(None)
self.assertEqual("", cocoaPathToString(pen.path))
diff --git a/Tests/pens/perimeterPen_test.py b/Tests/pens/perimeterPen_test.py
index 9feff18..1b64534 100644
--- a/Tests/pens/perimeterPen_test.py
+++ b/Tests/pens/perimeterPen_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.perimeterPen import PerimeterPen
import unittest
diff --git a/Tests/pens/pointInsidePen_test.py b/Tests/pens/pointInsidePen_test.py
index 4f27210..b561c43 100644
--- a/Tests/pens/pointInsidePen_test.py
+++ b/Tests/pens/pointInsidePen_test.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from io import StringIO
from fontTools.pens.pointInsidePen import PointInsidePen
import unittest
@@ -72,16 +72,16 @@
@staticmethod
def render(draw_function, even_odd):
- result = BytesIO()
+ result = StringIO()
for y in range(5):
for x in range(10):
pen = PointInsidePen(None, (x + 0.5, y + 0.5), even_odd)
draw_function(pen)
if pen.getResult():
- result.write(b"*")
+ result.write("*")
else:
- result.write(b" ")
- return tounicode(result.getvalue())
+ result.write(" ")
+ return result.getvalue()
def test_contour_no_solutions(self):
diff --git a/Tests/pens/pointPen_test.py b/Tests/pens/pointPen_test.py
index 7dfdf59..a920178 100644
--- a/Tests/pens/pointPen_test.py
+++ b/Tests/pens/pointPen_test.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-from fontTools.misc.loggingTools import CapturingLogHandler
import unittest
from fontTools.pens.basePen import AbstractPen
@@ -43,7 +41,7 @@
items = []
for key in sorted(kwargs):
value = kwargs[key]
- if isinstance(value, basestring):
+ if isinstance(value, str):
items.append("%s='%s'" % (key, value))
else:
items.append("%s=%s" % (key, value))
@@ -258,10 +256,10 @@
pen.closePath()
self.assertEqual("beginPath() addPoint((10, 10), segmentType='line') "
"addPoint((10, 20)) addPoint((20, 20)) "
- "addPoint((20, 10), segmentType=qcurve) endPath()",
+ "addPoint((20, 10), segmentType='qcurve') endPath()",
repr(tpen))
- def test_quad(self):
+ def test_quad2(self):
tpen = _TestPointPen()
pen = SegmentToPointPen(tpen)
pen.qCurveTo((10, 20), (20, 20), (20, 10), (10, 10), None)
diff --git a/Tests/pens/quartzPen_test.py b/Tests/pens/quartzPen_test.py
index 12fbd29..3a81d97 100644
--- a/Tests/pens/quartzPen_test.py
+++ b/Tests/pens/quartzPen_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import unittest
try:
@@ -68,7 +67,7 @@
"moveto 50.0 0.0 lineto 50.0 500.0 lineto 200.0 500.0 curveto 350.0 500.0 450.0 400.0 450.0 250.0 curveto 450.0 100.0 350.0 0.0 200.0 0.0 close ",
quartzPathToString(pen.path)
)
-
+
def test_empty(self):
pen = QuartzPen(None)
self.assertEqual("", quartzPathToString(pen.path))
diff --git a/Tests/pens/t2CharStringPen_test.py b/Tests/pens/t2CharStringPen_test.py
index 5de700a..b710df5 100644
--- a/Tests/pens/t2CharStringPen_test.py
+++ b/Tests/pens/t2CharStringPen_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.pens.t2CharStringPen import T2CharStringPen
import unittest
@@ -7,16 +6,12 @@
def __init__(self, methodName):
unittest.TestCase.__init__(self, methodName)
- # Python 3 renamed assertRaisesRegexp to assertRaisesRegex,
- # and fires deprecation warnings if a program uses the old name.
- if not hasattr(self, "assertRaisesRegex"):
- self.assertRaisesRegex = self.assertRaisesRegexp
def assertAlmostEqualProgram(self, expected, actual):
self.assertEqual(len(expected), len(actual))
for i1, i2 in zip(expected, actual):
- if isinstance(i1, basestring):
- self.assertIsInstance(i2, basestring)
+ if isinstance(i1, str):
+ self.assertIsInstance(i2, str)
self.assertEqual(i1, i2)
else:
self.assertAlmostEqual(i1, i2)
diff --git a/Tests/pens/ttGlyphPen_test.py b/Tests/pens/ttGlyphPen_test.py
index f6ad848..53db025 100644
--- a/Tests/pens/ttGlyphPen_test.py
+++ b/Tests/pens/ttGlyphPen_test.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
import os
import unittest
import struct
diff --git a/Tests/pens/utils.py b/Tests/pens/utils.py
index 05f438c..dced3c1 100644
--- a/Tests/pens/utils.py
+++ b/Tests/pens/utils.py
@@ -14,7 +14,7 @@
from . import CUBIC_GLYPHS
from fontTools.pens.pointPen import PointToSegmentPen, SegmentToPointPen
-from fontTools.misc.py23 import isclose
+from math import isclose
import unittest
diff --git a/Tests/subset/data/GPOS_PairPos_Format2_ClassDef1_useClass0.subset.ttx b/Tests/subset/data/GPOS_PairPos_Format2_ClassDef1_useClass0.subset.ttx
new file mode 100644
index 0000000..3df9aa8
--- /dev/null
+++ b/Tests/subset/data/GPOS_PairPos_Format2_ClassDef1_useClass0.subset.ttx
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="OTTO" ttLibVersion="4.21">
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=1 -->
+ <ScriptRecord index="0">
+ <ScriptTag value="latn"/>
+ <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=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=1 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="2">
+ <Coverage>
+ <Glyph value="g33"/>
+ </Coverage>
+ <ValueFormat1 value="1"/>
+ <ValueFormat2 value="0"/>
+ <ClassDef1>
+ </ClassDef1>
+ <ClassDef2>
+ <ClassDef glyph="g33" class="1"/>
+ </ClassDef2>
+ <!-- Class1Count=1 -->
+ <!-- Class2Count=2 -->
+ <Class1Record index="0">
+ <Class2Record index="0">
+ <Value1 XPlacement="0"/>
+ </Class2Record>
+ <Class2Record index="1">
+ <Value1 XPlacement="-100"/>
+ </Class2Record>
+ </Class1Record>
+ </PairPos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/subset/data/GPOS_PairPos_Format2_ClassDef2_useClass0.subset.ttx b/Tests/subset/data/GPOS_PairPos_Format2_ClassDef2_useClass0.subset.ttx
new file mode 100644
index 0000000..dc599f1
--- /dev/null
+++ b/Tests/subset/data/GPOS_PairPos_Format2_ClassDef2_useClass0.subset.ttx
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="OTTO" ttLibVersion="4.21">
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=0 -->
+ </ScriptList>
+ <FeatureList>
+ <!-- FeatureCount=0 -->
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=0 -->
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/subset/data/GPOS_PairPos_Format2_PR_2221.ttx b/Tests/subset/data/GPOS_PairPos_Format2_PR_2221.ttx
new file mode 100644
index 0000000..d5132d1
--- /dev/null
+++ b/Tests/subset/data/GPOS_PairPos_Format2_PR_2221.ttx
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="OTTO" ttLibVersion="4.21">
+
+ <GlyphOrder>
+ <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
+ <GlyphID id="0" name=".notdef"/>
+ <GlyphID id="1" name="g33"/>
+ <GlyphID id="2" name="g35"/>
+ </GlyphOrder>
+
+ <head>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="1.0"/>
+ <fontRevision value="1.0"/>
+ <checkSumAdjustment value="0x3d6ba467"/>
+ <magicNumber value="0x5f0f3cf5"/>
+ <flags value="00000000 00000001"/>
+ <unitsPerEm value="1500"/>
+ <created value="Thu Jan 1 00:00:00 1970"/>
+ <modified value="Mon Mar 29 14:18:07 2021"/>
+ <xMin value="24"/>
+ <yMin value="-31"/>
+ <xMax value="1000"/>
+ <yMax value="689"/>
+ <macStyle value="00000000 00000000"/>
+ <lowestRecPPEM value="3"/>
+ <fontDirectionHint value="2"/>
+ <indexToLocFormat value="0"/>
+ <glyphDataFormat value="0"/>
+ </head>
+
+ <hhea>
+ <tableVersion value="0x00010000"/>
+ <ascent value="2500"/>
+ <descent value="0"/>
+ <lineGap value="200"/>
+ <advanceWidthMax value="1500"/>
+ <minLeftSideBearing value="300"/>
+ <minRightSideBearing value="224"/>
+ <xMaxExtent value="1276"/>
+ <caretSlopeRise value="1"/>
+ <caretSlopeRun value="0"/>
+ <caretOffset value="0"/>
+ <reserved0 value="0"/>
+ <reserved1 value="0"/>
+ <reserved2 value="0"/>
+ <reserved3 value="0"/>
+ <metricDataFormat value="0"/>
+ <numberOfHMetrics value="1"/>
+ </hhea>
+
+ <maxp>
+ <tableVersion value="0x5000"/>
+ <numGlyphs value="3"/>
+ </maxp>
+
+ <OS_2>
+ <!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
+ will be recalculated by the compiler -->
+ <version value="2"/>
+ <xAvgCharWidth value="2500"/>
+ <usWeightClass value="400"/>
+ <usWidthClass value="5"/>
+ <fsType value="00000000 00001100"/>
+ <ySubscriptXSize value="500"/>
+ <ySubscriptYSize value="500"/>
+ <ySubscriptXOffset value="250"/>
+ <ySubscriptYOffset value="50"/>
+ <ySuperscriptXSize value="500"/>
+ <ySuperscriptYSize value="500"/>
+ <ySuperscriptXOffset value="0"/>
+ <ySuperscriptYOffset value="500"/>
+ <yStrikeoutSize value="50"/>
+ <yStrikeoutPosition value="500"/>
+ <sFamilyClass value="0"/>
+ <panose>
+ <bFamilyType value="2"/>
+ <bSerifStyle value="10"/>
+ <bWeight value="6"/>
+ <bProportion value="3"/>
+ <bContrast value="6"/>
+ <bStrokeVariation value="5"/>
+ <bArmStyle value="11"/>
+ <bLetterForm value="2"/>
+ <bMidline value="2"/>
+ <bXHeight value="4"/>
+ </panose>
+ <ulUnicodeRange1 value="00000000 00000000 00000000 00000001"/>
+ <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
+ <achVendID value="ADBE"/>
+ <fsSelection value="00000000 01000000"/>
+ <usFirstCharIndex value="33"/>
+ <usLastCharIndex value="35"/>
+ <sTypoAscender value="2500"/>
+ <sTypoDescender value="0"/>
+ <sTypoLineGap value="200"/>
+ <usWinAscent value="2500"/>
+ <usWinDescent value="0"/>
+ <ulCodePageRange1 value="11100000 00111111 00000001 11111111"/>
+ <ulCodePageRange2 value="11111111 11111111 00000000 00000000"/>
+ <sxHeight value="2500"/>
+ <sCapHeight value="2500"/>
+ <usDefaultChar value="65"/>
+ <usBreakChar value="65"/>
+ <usMaxContext value="0"/>
+ </OS_2>
+
+ <name>
+ <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
+ gpos2_2_font5
+ </namerecord>
+ <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
+ Regular
+ </namerecord>
+ <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
+ gpos2_2_font5
+ </namerecord>
+ <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
+ gpos2_2_font5
+ </namerecord>
+ <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
+ Version1.0
+ </namerecord>
+ <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
+ gpos2_2_font5
+ </namerecord>
+ </name>
+
+ <cmap>
+ <tableVersion version="0"/>
+ <cmap_format_4 platformID="3" platEncID="1" language="0">
+ <map code="0x21" name="g33"/><!-- EXCLAMATION MARK -->
+ <map code="0x23" name="g35"/><!-- NUMBER SIGN -->
+ </cmap_format_4>
+ </cmap>
+
+ <post>
+ <formatType value="3.0"/>
+ <italicAngle value="0.0"/>
+ <underlinePosition value="-100"/>
+ <underlineThickness value="50"/>
+ <isFixedPitch value="0"/>
+ <minMemType42 value="0"/>
+ <maxMemType42 value="0"/>
+ <minMemType1 value="0"/>
+ <maxMemType1 value="0"/>
+ </post>
+
+ <CFF>
+ <major value="1"/>
+ <minor value="0"/>
+ <CFFFont name="dummy">
+ <version value="001.000"/>
+ <Notice value="Copyright (c) 2002 Adobe Systems Incorporated. All Rights Reserved."/>
+ <FullName value="dummy"/>
+ <FamilyName value="dummy"/>
+ <Weight value="Regular"/>
+ <isFixedPitch value="0"/>
+ <ItalicAngle value="0"/>
+ <UnderlinePosition value="-125"/>
+ <UnderlineThickness value="50"/>
+ <PaintType value="0"/>
+ <CharstringType value="2"/>
+ <FontMatrix value="0.0008 0 0 0.0008 0 0"/>
+ <UniqueID value="44788"/>
+ <FontBBox value="24 -31 1000 689"/>
+ <StrokeWidth value="0"/>
+ <!-- charset is dumped separately as the 'GlyphOrder' element -->
+ <Encoding name="StandardEncoding"/>
+ <Private>
+ <BlueValues value="-25 0 657 682 439 464 640 653 708 733 475 500"/>
+ <OtherBlues value="283 308 -251 -226 -154 -129 -194 -169"/>
+ <FamilyBlues value="-25 0 657 682 439 464 640 653 708 733 475 500"/>
+ <FamilyOtherBlues value="283 308 -251 -226 -154 -129 -194 -169"/>
+ <BlueScale value="0.039625"/>
+ <BlueShift value="7"/>
+ <BlueFuzz value="1"/>
+ <StdHW value="32"/>
+ <StdVW value="85"/>
+ <StemSnapH value="32"/>
+ <StemSnapV value="85 90"/>
+ <ForceBold value="0"/>
+ <LanguageGroup value="0"/>
+ <ExpansionFactor value="0.06"/>
+ <initialRandomSeed value="0"/>
+ <defaultWidthX value="2500"/>
+ <nominalWidthX value="2500"/>
+ <Subrs>
+ <!-- The 'index' attribute is only for humans; it is ignored when parsed. -->
+ <CharString index="0">
+ 92 580 rmoveto
+ 13 6 13 7 14 4 54 16 184 1 9 -81 1 -13 -3 -13 -3 -14 -9 -45 -124 -14 -42 -8 rrcurveto
+ -2 -2 1 -1 hhcurveto
+ -2 vlineto
+ -30 -15 5 -40 35 -4 60 -5 62 -4 47 -43 83 -75 -108 -134 -82 -20 -75 -17 -101 91 -42 -14 -22 -8 -7 -18 10 -21 2 -2 2 -2 1 -2 10 -10 11 -3 10 2 rrcurveto
+ 2 2 -1 1 hhcurveto
+ 16 -7 15 -7 15 -7 33 -14 33 -14 35 -7 103 -18 81 94 48 78 51 83 -64 98 -77 36 -4 1 -3 2 -4 2 17 7 16 9 15 12 77 61 -32 107 -79 40 -91 47 -115 -9 -91 -40 rrcurveto
+ -27 -24 18 -37 36 7 rrcurveto
+ 408 -580 rmoveto
+ return
+ </CharString>
+ <CharString index="1">
+ 41 642 rmoveto
+ 1 -2 1 -1 -1 vvcurveto
+ -7 2 -7 5 -5 vhcurveto
+ 15 -69 -71 -105 61 -45 71 -50 214 60 48 -116 9 -20 3 -24 -3 -22 -13 -128 -51 -35 -120 -6 -38 -1 -62 -5 -26 34 -29 22 -33 -28 16 -33 39 -51 75 0 59 2 83 5 76 21 49 69 rrcurveto
+ 25 36 0 48 11 42 19 72 -43 43 -42 45 -62 68 -159 -25 -76 26 -20 43 44 56 -6 66 101 14 102 -5 103 -1 37 7 0 42 -35 11 -109 1 -110 5 -108 -17 rrcurveto
+ -1 1 0 0 1 vvcurveto
+ -25 33 -45 -26 18 -38 rrcurveto
+ 407 -673 rmoveto
+ return
+ </CharString>
+ </Subrs>
+ </Private>
+ <CharStrings>
+ <CharString name=".notdef">
+ endchar
+ </CharString>
+ <CharString name="g33">
+ -107 callsubr
+ -107 callsubr
+ endchar
+ </CharString>
+ <CharString name="g35">
+ -107 callsubr
+ -106 callsubr
+ endchar
+ </CharString>
+ </CharStrings>
+ </CFFFont>
+
+ <GlobalSubrs>
+ <!-- The 'index' attribute is only for humans; it is ignored when parsed. -->
+ </GlobalSubrs>
+ </CFF>
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=1 -->
+ <ScriptRecord index="0">
+ <ScriptTag value="latn"/>
+ <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=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=1 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="2">
+ <Coverage Format="1">
+ <Glyph value="g33"/>
+ <Glyph value="g35"/>
+ </Coverage>
+ <ValueFormat1 value="1"/>
+ <ValueFormat2 value="0"/>
+ <ClassDef1 Format="1">
+ <ClassDef glyph="g33" class="1"/>
+ <ClassDef glyph="g35" class="2"/>
+ </ClassDef1>
+ <ClassDef2 Format="1">
+ <ClassDef glyph="g33" class="1"/>
+ </ClassDef2>
+ <!-- Class1Count=3 -->
+ <!-- Class2Count=2 -->
+ <Class1Record index="0">
+ <Class2Record index="0">
+ <Value1 XPlacement="0"/>
+ </Class2Record>
+ <Class2Record index="1">
+ <Value1 XPlacement="0"/>
+ </Class2Record>
+ </Class1Record>
+ <Class1Record index="1">
+ <Class2Record index="0">
+ <Value1 XPlacement="0"/>
+ </Class2Record>
+ <Class2Record index="1">
+ <Value1 XPlacement="-100"/>
+ </Class2Record>
+ </Class1Record>
+ <Class1Record index="2">
+ <Class2Record index="0">
+ <Value1 XPlacement="0"/>
+ </Class2Record>
+ <Class2Record index="1">
+ <Value1 XPlacement="-100"/>
+ </Class2Record>
+ </Class1Record>
+ </PairPos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+ <hmtx>
+ <mtx name=".notdef" width="1500" lsb="300"/>
+ <mtx name="g33" width="1500" lsb="300"/>
+ <mtx name="g35" width="1500" lsb="300"/>
+ </hmtx>
+
+</ttFont>
diff --git a/Tests/subset/data/Lobster.subset.ttx b/Tests/subset/data/Lobster.subset.ttx
index c35e570..8089b24 100644
--- a/Tests/subset/data/Lobster.subset.ttx
+++ b/Tests/subset/data/Lobster.subset.ttx
@@ -490,7 +490,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="2">
+ <Coverage>
<Glyph value="one"/>
<Glyph value="three"/>
<Glyph value="two"/>
@@ -616,7 +616,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="A" out="A.salt"/>
<Substitution in="B" out="B.salt"/>
</SingleSubst>
@@ -625,7 +625,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="I">
<Ligature components="J" glyph="IJ"/>
</LigatureSet>
@@ -635,7 +635,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="A" out="A.salt"/>
<Substitution in="B" out="B.salt"/>
</SingleSubst>
diff --git a/Tests/subset/data/TestContextSubstFormat3.ttx b/Tests/subset/data/TestContextSubstFormat3.ttx
index 3e9bfcd..0ed43ee 100644
--- a/Tests/subset/data/TestContextSubstFormat3.ttx
+++ b/Tests/subset/data/TestContextSubstFormat3.ttx
@@ -328,7 +328,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph=".notdef" class="1"/>
<ClassDef glyph="glyph00002" class="1"/>
<ClassDef glyph="glyph00003" class="1"/>
@@ -430,17 +430,17 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="plus"/>
</Coverage>
- <BacktrackClassDef Format="1">
+ <BacktrackClassDef>
<ClassDef glyph="glyph00005" class="1"/>
<ClassDef glyph="glyph00007" class="1"/>
</BacktrackClassDef>
- <InputClassDef Format="1">
+ <InputClassDef>
<ClassDef glyph="plus" class="1"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
</LookAheadClassDef>
<!-- ChainSubClassSetCount=2 -->
<ChainSubClassSet index="0" empty="1"/>
@@ -527,13 +527,13 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=3 -->
<!-- SubstCount=2 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="glyph00002"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="glyph00004"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="glyph00005"/>
</Coverage>
<SubstLookupRecord index="0">
@@ -548,10 +548,10 @@
<ContextSubst index="1" Format="3">
<!-- GlyphCount=2 -->
<!-- SubstCount=2 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="glyph00002"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="glyph00005"/>
</Coverage>
<SubstLookupRecord index="0">
@@ -568,7 +568,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="plus" out="glyph00005"/>
</SingleSubst>
</Lookup>
@@ -576,7 +576,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="plus" out="glyph00004"/>
</SingleSubst>
</Lookup>
@@ -584,7 +584,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="plus" out="glyph00002"/>
</SingleSubst>
</Lookup>
@@ -592,7 +592,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="2">
+ <SingleSubst index="0">
<Substitution in="glyph00002" out="glyph00003"/>
<Substitution in="glyph00005" out="glyph00006"/>
<Substitution in="plus" out="glyph00007"/>
diff --git a/Tests/subset/data/expect_keep_math.ttx b/Tests/subset/data/expect_keep_math.ttx
index c734dd9..f2bc41d 100644
--- a/Tests/subset/data/expect_keep_math.ttx
+++ b/Tests/subset/data/expect_keep_math.ttx
@@ -417,7 +417,7 @@
</MathConstants>
<MathGlyphInfo>
<MathItalicsCorrectionInfo>
- <Coverage Format="1">
+ <Coverage>
<Glyph value="u1D435"/>
</Coverage>
<!-- ItalicsCorrectionCount=1 -->
@@ -426,7 +426,7 @@
</ItalicsCorrection>
</MathItalicsCorrectionInfo>
<MathTopAccentAttachment>
- <TopAccentCoverage Format="1">
+ <TopAccentCoverage>
<Glyph value="A"/>
<Glyph value="uni0302"/>
<Glyph value="u1D400"/>
@@ -466,14 +466,14 @@
<Value value="1164"/>
</TopAccentAttachment>
</MathTopAccentAttachment>
- <ExtendedShapeCoverage Format="1">
+ <ExtendedShapeCoverage>
<Glyph value="parenleft.size1"/>
<Glyph value="parenleft.size2"/>
<Glyph value="parenleft.size3"/>
<Glyph value="parenleft.size4"/>
</ExtendedShapeCoverage>
<MathKernInfo>
- <MathKernCoverage Format="1">
+ <MathKernCoverage>
<Glyph value="A"/>
<Glyph value="u1D400"/>
</MathKernCoverage>
@@ -522,10 +522,10 @@
</MathGlyphInfo>
<MathVariants>
<MinConnectorOverlap value="50"/>
- <VertGlyphCoverage Format="1">
+ <VertGlyphCoverage>
<Glyph value="parenleft"/>
</VertGlyphCoverage>
- <HorizGlyphCoverage Format="1">
+ <HorizGlyphCoverage>
<Glyph value="uni0302"/>
</HorizGlyphCoverage>
<!-- VertGlyphCount=1 -->
diff --git a/Tests/subset/data/expect_layout_scripts.ttx b/Tests/subset/data/expect_layout_scripts.ttx
index f3eea82..bd35083 100644
--- a/Tests/subset/data/expect_layout_scripts.ttx
+++ b/Tests/subset/data/expect_layout_scripts.ttx
@@ -89,7 +89,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="2">
+ <SingleSubst index="0">
<Substitution in="uni06F4" out="uni06F4.urd"/>
<Substitution in="uni06F6" out="uni06F6.urd"/>
<Substitution in="uni06F7" out="uni06F7.urd"/>
@@ -99,7 +99,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni06F0" out="uni06F0.numr"/>
<Substitution in="uni06F1" out="uni06F1.numr"/>
<Substitution in="uni06F2" out="uni06F2.numr"/>
@@ -119,7 +119,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="i" out="i.TRK"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/subset/data/layout_scripts.ttx b/Tests/subset/data/layout_scripts.ttx
index 37b2fd8..ddf0cd6 100644
--- a/Tests/subset/data/layout_scripts.ttx
+++ b/Tests/subset/data/layout_scripts.ttx
@@ -733,7 +733,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="i" class="1"/>
<ClassDef glyph="i.TRK" class="1"/>
<ClassDef glyph="uni06F0" class="1"/>
@@ -906,7 +906,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="2">
+ <SingleSubst index="0">
<Substitution in="uni06F4" out="uni06F4.urd"/>
<Substitution in="uni06F6" out="uni06F6.urd"/>
<Substitution in="uni06F7" out="uni06F7.urd"/>
@@ -916,7 +916,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="2">
+ <SingleSubst index="0">
<Substitution in="uni06F4" out="uni06F4.urd"/>
<Substitution in="uni06F6" out="uni06F6.urd"/>
<Substitution in="uni06F7" out="uni06F7.urd"/>
@@ -926,7 +926,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni06F6" out="uni06F6.urd"/>
<Substitution in="uni06F7" out="uni06F7.urd"/>
</SingleSubst>
@@ -935,7 +935,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni06F0" out="uni06F0.numr"/>
<Substitution in="uni06F1" out="uni06F1.numr"/>
<Substitution in="uni06F2" out="uni06F2.numr"/>
@@ -955,7 +955,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="i" out="i.TRK"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/subset/data/test_cntrmask_CFF.ttx b/Tests/subset/data/test_cntrmask_CFF.ttx
index 5ab6268..9e7d205 100644
--- a/Tests/subset/data/test_cntrmask_CFF.ttx
+++ b/Tests/subset/data/test_cntrmask_CFF.ttx
@@ -237,13 +237,13 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="Idieresis" class="1"/>
</GlyphClassDef>
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
</MarkGlyphSetsDef>
</GDEF>
@@ -335,15 +335,15 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="Idieresis"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="Idieresis" class="1"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
</ClassDef2>
<!-- Class1Count=2 -->
<!-- Class2Count=1 -->
diff --git a/Tests/subset/subset_test.py b/Tests/subset/subset_test.py
index 370f9b6..6fa1bf6 100644
--- a/Tests/subset/subset_test.py
+++ b/Tests/subset/subset_test.py
@@ -1,5 +1,5 @@
import io
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes, tostr
from fontTools.misc.testTools import getXML
from fontTools import subset
from fontTools.fontBuilder import FontBuilder
@@ -762,6 +762,37 @@
subsetfont = TTFont(subsetpath)
self.expect_ttx(subsetfont, self.getpath("CmapSubsetTest.subset.ttx"), ["cmap"])
+ def test_GPOS_PairPos_Format2_useClass0(self):
+ # Check two things related to class 0 ('every other glyph'):
+ # 1) that it's reused for ClassDef1 when it becomes empty as the subset glyphset
+ # is intersected with the table's Coverage
+ # 2) that it is never reused for ClassDef2 even when it happens to become empty
+ # because of the subset glyphset. In this case, we don't keep a PairPosClass2
+ # subtable if only ClassDef2's class0 survived subsetting.
+ # The test font (from Harfbuzz test suite) is constructed to trigger these two
+ # situations depending on the input subset --text.
+ # https://github.com/fonttools/fonttools/pull/2221
+ _, fontpath = self.compile_font(
+ self.getpath("GPOS_PairPos_Format2_PR_2221.ttx"), ".ttf"
+ )
+ subsetpath = self.temp_path(".ttf")
+
+ for n, text in enumerate("!#", start=1):
+ expected_ttx = self.getpath(
+ f"GPOS_PairPos_Format2_ClassDef{n}_useClass0.subset.ttx"
+ )
+ with self.subTest(text=text, expected_ttx=expected_ttx):
+ subset.main(
+ [
+ fontpath,
+ f"--text='{text}'",
+ "--layout-features+=test",
+ "--output-file=%s" % subsetpath,
+ ]
+ )
+ subsetfont = TTFont(subsetpath)
+ self.expect_ttx(subsetfont, expected_ttx, ["GPOS"])
+
@pytest.fixture
def featureVarsTestFont():
@@ -859,7 +890,7 @@
' <LookupFlag value="0"/>',
' <!-- SubTableCount=1 -->',
' <SinglePos index="0" Format="2">',
- ' <Coverage Format="1">',
+ ' <Coverage>',
' <Glyph value="a"/>',
' <Glyph value="b"/>',
' <Glyph value="c"/>',
@@ -886,7 +917,7 @@
' <LookupFlag value="0"/>',
' <!-- SubTableCount=1 -->',
' <SinglePos index="0" Format="1">',
- ' <Coverage Format="1">',
+ ' <Coverage>',
' <Glyph value="a"/>',
' <Glyph value="c"/>',
' </Coverage>',
diff --git a/Tests/svgLib/path/parser_test.py b/Tests/svgLib/path/parser_test.py
index d76e995..b533dd8 100644
--- a/Tests/svgLib/path/parser_test.py
+++ b/Tests/svgLib/path/parser_test.py
@@ -1,5 +1,3 @@
-
-from fontTools.misc.py23 import *
from fontTools.pens.recordingPen import RecordingPen
from fontTools.svgLib import parse_path
diff --git a/Tests/svgLib/path/path_test.py b/Tests/svgLib/path/path_test.py
index e99df50..8ee334a 100644
--- a/Tests/svgLib/path/path_test.py
+++ b/Tests/svgLib/path/path_test.py
@@ -1,5 +1,4 @@
-
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes
from fontTools.pens.recordingPen import RecordingPen
from fontTools.svgLib import SVGPath
diff --git a/Tests/svgLib/path/shapes_test.py b/Tests/svgLib/path/shapes_test.py
index 9cf8fad..24e3dd2 100644
--- a/Tests/svgLib/path/shapes_test.py
+++ b/Tests/svgLib/path/shapes_test.py
@@ -1,5 +1,3 @@
-
-from fontTools.misc.py23 import *
from fontTools.svgLib.path import shapes
from fontTools.misc import etree
import pytest
diff --git a/Tests/t1Lib/t1Lib_test.py b/Tests/t1Lib/t1Lib_test.py
index ba01225..92b3e9e 100644
--- a/Tests/t1Lib/t1Lib_test.py
+++ b/Tests/t1Lib/t1Lib_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
import unittest
import os
import sys
diff --git a/Tests/ttLib/tables/C_F_F__2_test.py b/Tests/ttLib/tables/C_F_F__2_test.py
index 2f0535c..10f9b2f 100644
--- a/Tests/ttLib/tables/C_F_F__2_test.py
+++ b/Tests/ttLib/tables/C_F_F__2_test.py
@@ -1,7 +1,7 @@
"""cff2Lib_test.py -- unit test for Adobe CFF fonts."""
-from fontTools.misc.py23 import *
-from fontTools.ttLib import TTFont, newTable
+from fontTools.ttLib import TTFont
+from io import StringIO
import re
import os
import unittest
@@ -39,7 +39,7 @@
font = TTFont(file=CFF_BIN)
cffTable = font['CFF2']
cffData = cffTable.compile(font)
- out = UnicodeIO()
+ out = StringIO()
font.saveXML(out)
cff2XML = out.getvalue()
cff2XML = strip_VariableItems(cff2XML)
diff --git a/Tests/ttLib/tables/C_F_F_test.py b/Tests/ttLib/tables/C_F_F_test.py
index bbdbf4c..cb8d8c5 100644
--- a/Tests/ttLib/tables/C_F_F_test.py
+++ b/Tests/ttLib/tables/C_F_F_test.py
@@ -1,7 +1,7 @@
"""cffLib_test.py -- unit test for Adobe CFF fonts."""
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont, newTable
+from io import StringIO
import re
import os
import unittest
@@ -31,7 +31,7 @@
font = TTFont(sfntVersion='OTTO')
cffTable = font['CFF '] = newTable('CFF ')
cffTable.decompile(self.cffData, font)
- out = UnicodeIO()
+ out = StringIO()
font.saveXML(out)
cffXML = strip_ttLibVersion(out.getvalue()).splitlines()
self.assertEqual(cffXML, self.cffXML)
diff --git a/Tests/ttLib/tables/C_P_A_L_test.py b/Tests/ttLib/tables/C_P_A_L_test.py
index b018a52..10c8ea0 100644
--- a/Tests/ttLib/tables/C_P_A_L_test.py
+++ b/Tests/ttLib/tables/C_P_A_L_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import getXML, parseXML
from fontTools.misc.textTools import deHexStr
from fontTools.ttLib import getTableModule, newTable
diff --git a/Tests/ttLib/tables/M_V_A_R_test.py b/Tests/ttLib/tables/M_V_A_R_test.py
index 356fc14..3972d8c 100644
--- a/Tests/ttLib/tables/M_V_A_R_test.py
+++ b/Tests/ttLib/tables/M_V_A_R_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib.tables._f_v_a_r import Axis
diff --git a/Tests/ttLib/tables/S_T_A_T_test.py b/Tests/ttLib/tables/S_T_A_T_test.py
index d8c1b7d..c5c1234 100644
--- a/Tests/ttLib/tables/S_T_A_T_test.py
+++ b/Tests/ttLib/tables/S_T_A_T_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr
from fontTools.ttLib import newTable
@@ -147,7 +146,7 @@
'<AxisValueArray>',
' <AxisValue index="0" Format="3">',
' <AxisIndex value="0"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="2"/>',
' <Value value="400.0"/>',
' <LinkedValue value="700.0"/>',
@@ -191,7 +190,7 @@
'<AxisValueArray>',
' <AxisValue index="0" Format="3">',
' <AxisIndex value="0"/>',
- ' <Flags value="2"/>',
+ ' <Flags value="2"/> <!-- ElidableAxisValueName -->',
' <ValueNameID value="2"/>',
' <Value value="400.0"/>',
' <LinkedValue value="700.0"/>',
diff --git a/Tests/ttLib/tables/T_S_I__0_test.py b/Tests/ttLib/tables/T_S_I__0_test.py
index 3e30d85..44ca44e 100644
--- a/Tests/ttLib/tables/T_S_I__0_test.py
+++ b/Tests/ttLib/tables/T_S_I__0_test.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import SimpleNamespace
+from types import SimpleNamespace
from fontTools.misc.textTools import deHexStr
from fontTools.misc.testTools import getXML
from fontTools.ttLib.tables.T_S_I__0 import table_T_S_I__0
diff --git a/Tests/ttLib/tables/T_S_I__1_test.py b/Tests/ttLib/tables/T_S_I__1_test.py
index 9f0c949..3a565ad 100644
--- a/Tests/ttLib/tables/T_S_I__1_test.py
+++ b/Tests/ttLib/tables/T_S_I__1_test.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import unichr, tobytes
+from fontTools.misc.py23 import tobytes
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.ttLib import TTFont, TTLibError
from fontTools.ttLib.tables.T_S_I__0 import table_T_S_I__0
@@ -33,7 +33,7 @@
# ['a', 'b', 'c', ...]
ch = 0x61
n = len(indextable.indices)
- font.glyphOrder = [unichr(i) for i in range(ch, ch+n)]
+ font.glyphOrder = [chr(i) for i in range(ch, ch+n)]
font['TSI0'] = indextable
return font
diff --git a/Tests/ttLib/tables/TupleVariation_test.py b/Tests/ttLib/tables/TupleVariation_test.py
index 06c5744..d7a0bc8 100644
--- a/Tests/ttLib/tables/TupleVariation_test.py
+++ b/Tests/ttLib/tables/TupleVariation_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.misc.testTools import parseXML
from fontTools.misc.textTools import deHexStr, hexStr
@@ -6,6 +5,7 @@
from fontTools.ttLib.tables.TupleVariation import \
log, TupleVariation, compileSharedTuples, decompileSharedTuples, \
compileTupleVariationStore, decompileTupleVariationStore, inferRegion_
+from io import BytesIO
import random
import unittest
diff --git a/Tests/ttLib/tables/_a_n_k_r_test.py b/Tests/ttLib/tables/_a_n_k_r_test.py
index 1679cc0..6c9be16 100644
--- a/Tests/ttLib/tables/_a_n_k_r_test.py
+++ b/Tests/ttLib/tables/_a_n_k_r_test.py
@@ -1,5 +1,4 @@
# coding: utf-8
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_a_v_a_r_test.py b/Tests/ttLib/tables/_a_v_a_r_test.py
index 0b5f0e7..429ca2e 100644
--- a/Tests/ttLib/tables/_a_v_a_r_test.py
+++ b/Tests/ttLib/tables/_a_v_a_r_test.py
@@ -1,12 +1,10 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import parseXML
from fontTools.misc.textTools import deHexStr
from fontTools.misc.xmlWriter import XMLWriter
from fontTools.ttLib import TTLibError
from fontTools.ttLib.tables._a_v_a_r import table__a_v_a_r
from fontTools.ttLib.tables._f_v_a_r import table__f_v_a_r, Axis
-import collections
-import logging
+from io import BytesIO
import unittest
diff --git a/Tests/ttLib/tables/_b_s_l_n_test.py b/Tests/ttLib/tables/_b_s_l_n_test.py
index 9fd9d38..e40c1bd 100644
--- a/Tests/ttLib/tables/_b_s_l_n_test.py
+++ b/Tests/ttLib/tables/_b_s_l_n_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_c_i_d_g_test.py b/Tests/ttLib/tables/_c_i_d_g_test.py
index 6414633..11c1fc0 100644
--- a/Tests/ttLib/tables/_c_i_d_g_test.py
+++ b/Tests/ttLib/tables/_c_i_d_g_test.py
@@ -1,5 +1,3 @@
-# coding: utf-8
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_c_m_a_p_test.py b/Tests/ttLib/tables/_c_m_a_p_test.py
index 2ea6e70..6328504 100644
--- a/Tests/ttLib/tables/_c_m_a_p_test.py
+++ b/Tests/ttLib/tables/_c_m_a_p_test.py
@@ -1,7 +1,6 @@
import io
import os
import re
-from fontTools.misc.py23 import *
from fontTools import ttLib
from fontTools.fontBuilder import FontBuilder
import unittest
diff --git a/Tests/ttLib/tables/_c_v_a_r_test.py b/Tests/ttLib/tables/_c_v_a_r_test.py
index cdd4c61..31c1953 100644
--- a/Tests/ttLib/tables/_c_v_a_r_test.py
+++ b/Tests/ttLib/tables/_c_v_a_r_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import TTLibError, getTableModule, newTable
diff --git a/Tests/ttLib/tables/_f_p_g_m_test.py b/Tests/ttLib/tables/_f_p_g_m_test.py
index 0a34121..ff233dd 100644
--- a/Tests/ttLib/tables/_f_p_g_m_test.py
+++ b/Tests/ttLib/tables/_f_p_g_m_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib.tables._f_p_g_m import table__f_p_g_m
from fontTools.ttLib.tables import ttProgram
diff --git a/Tests/ttLib/tables/_f_v_a_r_test.py b/Tests/ttLib/tables/_f_v_a_r_test.py
index 54c44eb..2ac5237 100644
--- a/Tests/ttLib/tables/_f_v_a_r_test.py
+++ b/Tests/ttLib/tables/_f_v_a_r_test.py
@@ -1,10 +1,10 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import parseXML
from fontTools.misc.textTools import deHexStr
from fontTools.misc.xmlWriter import XMLWriter
from fontTools.ttLib import TTLibError
from fontTools.ttLib.tables._f_v_a_r import table__f_v_a_r, Axis, NamedInstance
from fontTools.ttLib.tables._n_a_m_e import table__n_a_m_e, NameRecord
+from io import BytesIO
import unittest
diff --git a/Tests/ttLib/tables/_g_c_i_d_test.py b/Tests/ttLib/tables/_g_c_i_d_test.py
index 5093b78..e766677 100644
--- a/Tests/ttLib/tables/_g_c_i_d_test.py
+++ b/Tests/ttLib/tables/_g_c_i_d_test.py
@@ -1,5 +1,3 @@
-# coding: utf-8
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_g_l_y_f_test.py b/Tests/ttLib/tables/_g_l_y_f_test.py
index 79addce..531bb82 100644
--- a/Tests/ttLib/tables/_g_l_y_f_test.py
+++ b/Tests/ttLib/tables/_g_l_y_f_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.fixedTools import otRound
from fontTools.misc.testTools import getXML, parseXML
from fontTools.pens.ttGlyphPen import TTGlyphPen
@@ -19,6 +18,7 @@
from fontTools.ttLib.tables import ttProgram
import sys
import array
+from io import StringIO
import itertools
import pytest
import re
@@ -225,7 +225,7 @@
font['head'].decompile(self.headData, font)
font['loca'].decompile(self.locaData, font)
glyfTable.decompile(self.glyfData, font)
- out = UnicodeIO()
+ out = StringIO()
font.saveXML(out)
glyfXML = strip_ttLibVersion(out.getvalue()).splitlines()
self.assertEqual(glyfXML, self.glyfXML)
diff --git a/Tests/ttLib/tables/_g_v_a_r_test.py b/Tests/ttLib/tables/_g_v_a_r_test.py
index 9a00fde..077bb63 100644
--- a/Tests/ttLib/tables/_g_v_a_r_test.py
+++ b/Tests/ttLib/tables/_g_v_a_r_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import TTLibError, getTableClass, getTableModule, newTable
diff --git a/Tests/ttLib/tables/_h_h_e_a_test.py b/Tests/ttLib/tables/_h_h_e_a_test.py
index bba49e3..e04fd7b 100644
--- a/Tests/ttLib/tables/_h_h_e_a_test.py
+++ b/Tests/ttLib/tables/_h_h_e_a_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.misc.testTools import parseXML, getXML
from fontTools.misc.textTools import deHexStr
diff --git a/Tests/ttLib/tables/_h_m_t_x_test.py b/Tests/ttLib/tables/_h_m_t_x_test.py
index b21cda6..79d0cb7 100644
--- a/Tests/ttLib/tables/_h_m_t_x_test.py
+++ b/Tests/ttLib/tables/_h_m_t_x_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import parseXML, getXML
from fontTools.misc.textTools import deHexStr
from fontTools.ttLib import TTFont, newTable, TTLibError
diff --git a/Tests/ttLib/tables/_k_e_r_n_test.py b/Tests/ttLib/tables/_k_e_r_n_test.py
index 483086c..eb48bae 100644
--- a/Tests/ttLib/tables/_k_e_r_n_test.py
+++ b/Tests/ttLib/tables/_k_e_r_n_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import newTable
from fontTools.ttLib.tables._k_e_r_n import (
KernTable_format_0, KernTable_format_unkown)
diff --git a/Tests/ttLib/tables/_l_c_a_r_test.py b/Tests/ttLib/tables/_l_c_a_r_test.py
index 288092f..5837a07 100644
--- a/Tests/ttLib/tables/_l_c_a_r_test.py
+++ b/Tests/ttLib/tables/_l_c_a_r_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_l_t_a_g_test.py b/Tests/ttLib/tables/_l_t_a_g_test.py
index 6727936..fc9be82 100644
--- a/Tests/ttLib/tables/_l_t_a_g_test.py
+++ b/Tests/ttLib/tables/_l_t_a_g_test.py
@@ -1,6 +1,6 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import parseXML
from fontTools.misc.xmlWriter import XMLWriter
+from io import BytesIO
import os
import struct
import unittest
diff --git a/Tests/ttLib/tables/_m_e_t_a_test.py b/Tests/ttLib/tables/_m_e_t_a_test.py
index 3a4f2f5..f05ff57 100644
--- a/Tests/ttLib/tables/_m_e_t_a_test.py
+++ b/Tests/ttLib/tables/_m_e_t_a_test.py
@@ -1,9 +1,9 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import parseXML
from fontTools.misc.textTools import deHexStr
from fontTools.misc.xmlWriter import XMLWriter
from fontTools.ttLib import TTLibError
from fontTools.ttLib.tables._m_e_t_a import table__m_e_t_a
+from io import BytesIO
import unittest
diff --git a/Tests/ttLib/tables/_m_o_r_t_test.py b/Tests/ttLib/tables/_m_o_r_t_test.py
index c89a19b..3e7169b 100644
--- a/Tests/ttLib/tables/_m_o_r_t_test.py
+++ b/Tests/ttLib/tables/_m_o_r_t_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_m_o_r_x_test.py b/Tests/ttLib/tables/_m_o_r_x_test.py
index 0730d23..0b807f8 100644
--- a/Tests/ttLib/tables/_m_o_r_x_test.py
+++ b/Tests/ttLib/tables/_m_o_r_x_test.py
@@ -1,5 +1,4 @@
-# coding: utf-8
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytechr, bytesjoin
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_n_a_m_e_test.py b/Tests/ttLib/tables/_n_a_m_e_test.py
index 11aeeba..8e82970 100644
--- a/Tests/ttLib/tables/_n_a_m_e_test.py
+++ b/Tests/ttLib/tables/_n_a_m_e_test.py
@@ -1,9 +1,9 @@
-# -*- coding: utf-8 -*-
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import bytesjoin, tostr
from fontTools.misc import sstruct
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.misc.testTools import FakeFont
from fontTools.misc.xmlWriter import XMLWriter
+from io import BytesIO
import struct
import unittest
from fontTools.ttLib import newTable
@@ -338,7 +338,7 @@
def test_toUnicode_macromanian(self):
name = makeName(b"Foo Italic\xfb", 222, 1, 0, 37) # Mac Romanian
self.assertEqual("mac_romanian", name.getEncoding())
- self.assertEqual("Foo Italic"+unichr(0x02DA), name.toUnicode())
+ self.assertEqual("Foo Italic"+chr(0x02DA), name.toUnicode())
def test_toUnicode_UnicodeDecodeError(self):
name = makeName(b"\1", 111, 0, 2, 7)
@@ -430,7 +430,7 @@
def test_extended_mac_encodings(self):
name = makeName(b'\xfe', 123, 1, 1, 0) # Mac Japanese
- self.assertEqual(name.toUnicode(), unichr(0x2122))
+ self.assertEqual(name.toUnicode(), chr(0x2122))
def test_extended_mac_encodings_errors(self):
s = "汉仪彩云体简"
diff --git a/Tests/ttLib/tables/_o_p_b_d_test.py b/Tests/ttLib/tables/_o_p_b_d_test.py
index 3d5f90f..d62ada8 100644
--- a/Tests/ttLib/tables/_o_p_b_d_test.py
+++ b/Tests/ttLib/tables/_o_p_b_d_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_p_r_o_p_test.py b/Tests/ttLib/tables/_p_r_o_p_test.py
index b293fa6..63c2924 100644
--- a/Tests/ttLib/tables/_p_r_o_p_test.py
+++ b/Tests/ttLib/tables/_p_r_o_p_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import FakeFont, getXML, parseXML
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.ttLib import newTable
diff --git a/Tests/ttLib/tables/_t_r_a_k_test.py b/Tests/ttLib/tables/_t_r_a_k_test.py
index d37b548..2ea6cf5 100644
--- a/Tests/ttLib/tables/_t_r_a_k_test.py
+++ b/Tests/ttLib/tables/_t_r_a_k_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import parseXML, getXML
from fontTools.misc.textTools import deHexStr
from fontTools.ttLib import TTFont, TTLibError
diff --git a/Tests/ttLib/tables/_v_h_e_a_test.py b/Tests/ttLib/tables/_v_h_e_a_test.py
index 61445e5..c601863 100644
--- a/Tests/ttLib/tables/_v_h_e_a_test.py
+++ b/Tests/ttLib/tables/_v_h_e_a_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.misc.testTools import parseXML, getXML
from fontTools.misc.textTools import deHexStr
diff --git a/Tests/ttLib/tables/_v_m_t_x_test.py b/Tests/ttLib/tables/_v_m_t_x_test.py
index 286651c..5ea2d24 100644
--- a/Tests/ttLib/tables/_v_m_t_x_test.py
+++ b/Tests/ttLib/tables/_v_m_t_x_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib.tables._v_m_t_x import table__v_m_t_x
import _h_m_t_x_test
import unittest
diff --git a/Tests/ttLib/tables/data/C_F_F__2.bin b/Tests/ttLib/tables/data/C_F_F__2.bin
index faa0e91..52b0177 100644
--- a/Tests/ttLib/tables/data/C_F_F__2.bin
+++ b/Tests/ttLib/tables/data/C_F_F__2.bin
Binary files differ
diff --git a/Tests/ttLib/tables/data/C_F_F__2.ttx b/Tests/ttLib/tables/data/C_F_F__2.ttx
index c86252b..95f840f 100644
--- a/Tests/ttLib/tables/data/C_F_F__2.ttx
+++ b/Tests/ttLib/tables/data/C_F_F__2.ttx
@@ -21,7 +21,7 @@
<xMin value="51"/>
<yMin value="-115"/>
<xMax value="560"/>
- <yMax value="762"/>
+ <yMax value="731"/>
<macStyle value="00000000 00000000"/>
<lowestRecPPEM value="3"/>
<fontDirectionHint value="2"/>
@@ -106,6 +106,8 @@
<blend value="190 -110 -162 0 -110 -162"/>
<blend value="200 0 -6 0 0 -6"/>
</StemSnapV>
+ <LanguageGroup value="0"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
</FDArray>
diff --git a/Tests/ttLib/tables/data/aots/classdef1_font1.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef1_font1.ttx.GSUB
index 21f1ab1..7a8f510 100644
--- a/Tests/ttLib/tables/data/aots/classdef1_font1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef1_font1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="1">
+ <ClassDef>
<ClassDef glyph="g18" class="1"/>
<ClassDef glyph="g19" class="1"/>
<ClassDef glyph="g20" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/classdef1_font2.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef1_font2.ttx.GSUB
index ec7278e..563d6b6 100644
--- a/Tests/ttLib/tables/data/aots/classdef1_font2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef1_font2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="1">
+ <ClassDef>
<ClassDef glyph="g18" class="2"/>
<ClassDef glyph="g19" class="2"/>
<ClassDef glyph="g20" class="2"/>
diff --git a/Tests/ttLib/tables/data/aots/classdef1_font3.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef1_font3.ttx.GSUB
index 9bc1e43..0bcbc72 100644
--- a/Tests/ttLib/tables/data/aots/classdef1_font3.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef1_font3.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="1">
+ <ClassDef>
<ClassDef glyph="g18" class="2"/>
<ClassDef glyph="g19" class="2"/>
<ClassDef glyph="g20" class="2"/>
diff --git a/Tests/ttLib/tables/data/aots/classdef1_font4.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef1_font4.ttx.GSUB
index 681240d..dce2706 100644
--- a/Tests/ttLib/tables/data/aots/classdef1_font4.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef1_font4.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="1">
+ <ClassDef>
</ClassDef>
<!-- SubClassSetCount=1 -->
<SubClassSet index="0" empty="1"/>
diff --git a/Tests/ttLib/tables/data/aots/classdef2_font1.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef2_font1.ttx.GSUB
index f602354..7a8f510 100644
--- a/Tests/ttLib/tables/data/aots/classdef2_font1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef2_font1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g18" class="1"/>
<ClassDef glyph="g19" class="1"/>
<ClassDef glyph="g20" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/classdef2_font2.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef2_font2.ttx.GSUB
index d4650bd..563d6b6 100644
--- a/Tests/ttLib/tables/data/aots/classdef2_font2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef2_font2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g18" class="2"/>
<ClassDef glyph="g19" class="2"/>
<ClassDef glyph="g20" class="2"/>
diff --git a/Tests/ttLib/tables/data/aots/classdef2_font3.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef2_font3.ttx.GSUB
index 7cb045f..0bcbc72 100644
--- a/Tests/ttLib/tables/data/aots/classdef2_font3.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef2_font3.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g18" class="2"/>
<ClassDef glyph="g19" class="2"/>
<ClassDef glyph="g20" class="2"/>
diff --git a/Tests/ttLib/tables/data/aots/classdef2_font4.ttx.GSUB b/Tests/ttLib/tables/data/aots/classdef2_font4.ttx.GSUB
index 90f0b93..dce2706 100644
--- a/Tests/ttLib/tables/data/aots/classdef2_font4.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/classdef2_font4.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g3"/>
<Substitution in="g1" out="g4"/>
<Substitution in="g10" out="g13"/>
@@ -140,7 +140,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g4"/>
<Substitution in="g1" out="g5"/>
<Substitution in="g10" out="g14"/>
@@ -247,7 +247,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in=".notdef" out="g5"/>
<Substitution in="g1" out="g6"/>
<Substitution in="g10" out="g15"/>
@@ -355,7 +355,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value=".notdef"/>
<Glyph value="g1"/>
<Glyph value="g2"/>
@@ -457,7 +457,7 @@
<Glyph value="g98"/>
<Glyph value="g99"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
</ClassDef>
<!-- SubClassSetCount=1 -->
<SubClassSet index="0" empty="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GPOS
index 0ed7d63..3ab19a6 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos1_1_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f1.ttx.GPOS
index 00eacc3..508d14e 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f2.ttx.GPOS
index 1eff021..ef78ece 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f3.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f3.ttx.GPOS
index c3850df..523b139 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f3.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f3.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f4.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f4.ttx.GPOS
index f80286c..027d687 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_1_simple_f4.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos1_1_simple_f4.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_2_font1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos1_2_font1.ttx.GPOS
index 11351a6..058c302 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_2_font1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos1_2_font1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GPOS
index ecd96b0..2b557f7 100644
--- a/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos1_2_font2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_font6.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_1_font6.ttx.GPOS
index db1315b..e27e72b 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_font6.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_font6.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<ValueFormat1 value="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_font7.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_1_font7.ttx.GPOS
index 8b22294..01f6b45 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_font7.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_font7.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g21"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GPOS
index 4924787..329315c 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g19"/>
</Coverage>
<ValueFormat1 value="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GPOS
index 97f64ab..5650616 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_lookupflag_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g19"/>
</Coverage>
<ValueFormat1 value="4"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f1.ttx.GPOS
index d8b4e83..e5f8cc7 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<ValueFormat1 value="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f2.ttx.GPOS
index cf71f47..820bea6 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_next_glyph_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<ValueFormat1 value="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_1_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_1_simple_f1.ttx.GPOS
index 81b1720..55b8402 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_1_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_1_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<ValueFormat1 value="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_2_font1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_2_font1.ttx.GPOS
index 5595b99..d41d02d 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_2_font1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_2_font1.ttx.GPOS
@@ -34,15 +34,15 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<ValueFormat1 value="1"/>
<ValueFormat2 value="2"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
<ClassDef glyph="g18" class="1"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
<ClassDef glyph="g19" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GPOS
index 69abe30..c7f3f32 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_2_font2.ttx.GPOS
@@ -34,15 +34,15 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g19"/>
</Coverage>
<ValueFormat1 value="1"/>
<ValueFormat2 value="2"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
<ClassDef glyph="g19" class="1"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
<ClassDef glyph="g20" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GPOS
index 90771d3..25ac07c 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_2_font3.ttx.GPOS
@@ -34,15 +34,15 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g19"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="2"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
<ClassDef glyph="g19" class="1"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
<ClassDef glyph="g20" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos2_2_font4.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_2_font4.ttx.GPOS
index a2e6017..46f3e6e 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_2_font4.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_2_font4.ttx.GPOS
@@ -34,15 +34,15 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<ValueFormat1 value="1"/>
<ValueFormat2 value="2"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
<ClassDef glyph="g18" class="1"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
<ClassDef glyph="g18" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos2_2_font5.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos2_2_font5.ttx.GPOS
index d269735..1d589ca 100644
--- a/Tests/ttLib/tables/data/aots/gpos2_2_font5.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos2_2_font5.ttx.GPOS
@@ -34,15 +34,15 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<ValueFormat1 value="1"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
<ClassDef glyph="g18" class="1"/>
</ClassDef1>
- <ClassDef2 Format="2">
+ <ClassDef2>
<ClassDef glyph="g18" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos3_font1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos3_font1.ttx.GPOS
index 8cbdbc7..8babfbf 100644
--- a/Tests/ttLib/tables/data/aots/gpos3_font1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos3_font1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g19"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GDEF
index b5ca1ed..d2981b4 100644
--- a/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g21" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GPOS
index 0f94495..378af37 100644
--- a/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos3_font2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g19"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GDEF
index b5ca1ed..d2981b4 100644
--- a/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g21" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GPOS
index b3beb5c..7da5f5e 100644
--- a/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos3_font3.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g19"/>
<Glyph value="g20"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GDEF
index 5118ad8..e6b3946 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GDEF
@@ -3,13 +3,13 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g17" class="1"/>
<ClassDef glyph="g18" class="1"/>
<ClassDef glyph="g19" class="3"/>
<ClassDef glyph="g20" class="3"/>
</GlyphClassDef>
- <MarkAttachClassDef Format="2">
+ <MarkAttachClassDef>
<ClassDef glyph="g19" class="1"/>
<ClassDef glyph="g20" class="2"/>
</MarkAttachClassDef>
diff --git a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GPOS
index f86f1d2..d7526b5 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f1.ttx.GPOS
@@ -34,10 +34,10 @@
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="g19"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="g18"/>
</BaseCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GDEF
index 2627f21..8184af2 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g17" class="1"/>
<ClassDef glyph="g18" class="1"/>
<ClassDef glyph="g19" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GPOS
index 9f1be15..3efed82 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos4_lookupflag_f2.ttx.GPOS
@@ -34,10 +34,10 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="g19"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="g18"/>
</BaseCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GDEF
index 4f9f64a..a8df0fd 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g17" class="1"/>
<ClassDef glyph="g18" class="1"/>
<ClassDef glyph="g19" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GPOS
index afe7e6a..cfd3ddb 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos4_multiple_anchors_1.ttx.GPOS
@@ -34,13 +34,13 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="g19"/>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="g17"/>
<Glyph value="g18"/>
</BaseCoverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GDEF
index 2627f21..8184af2 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g17" class="1"/>
<ClassDef glyph="g18" class="1"/>
<ClassDef glyph="g19" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GPOS
index 3a2e623..ccbc784 100644
--- a/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos4_simple_1.ttx.GPOS
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="g19"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="g18"/>
</BaseCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GDEF
index ff2dc98..461a982 100644
--- a/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g17" class="1"/>
<ClassDef glyph="g18" class="2"/>
<ClassDef glyph="g19" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GPOS
index b5017b3..d5abadc 100644
--- a/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GPOS
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkLigPos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="g19"/>
</MarkCoverage>
- <LigatureCoverage Format="1">
+ <LigatureCoverage>
<Glyph value="g18"/>
</LigatureCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GSUB
index 88d3f24..f81552a 100644
--- a/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gpos5_font1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g30">
<Ligature components="g31" glyph="g18"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GDEF
index 640f3eb..f07a29b 100644
--- a/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g17" class="1"/>
<ClassDef glyph="g18" class="3"/>
<ClassDef glyph="g19" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GPOS
index d4c4da5..f2fd253 100644
--- a/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos6_font1.ttx.GPOS
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkMarkPos index="0" Format="1">
- <Mark1Coverage Format="1">
+ <Mark1Coverage>
<Glyph value="g19"/>
</Mark1Coverage>
- <Mark2Coverage Format="1">
+ <Mark2Coverage>
<Glyph value="g18"/>
</Mark2Coverage>
<!-- ClassCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos7_1_font1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos7_1_font1.ttx.GPOS
index 3d82e68..db3b76e 100644
--- a/Tests/ttLib/tables/data/aots/gpos7_1_font1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos7_1_font1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g19"/>
<Glyph value="g20"/>
@@ -51,7 +51,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos9_font1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos9_font1.ttx.GPOS
index bbc1c38..9bcef94 100644
--- a/Tests/ttLib/tables/data/aots/gpos9_font1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos9_font1.ttx.GPOS
@@ -36,7 +36,7 @@
<ExtensionPos index="0" Format="1">
<ExtensionLookupType value="1"/>
<SinglePos Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos9_font2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos9_font2.ttx.GPOS
index ac6d6af..ffb993b 100644
--- a/Tests/ttLib/tables/data/aots/gpos9_font2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos9_font2.ttx.GPOS
@@ -36,7 +36,7 @@
<ExtensionPos index="0" Format="1">
<ExtensionLookupType value="1"/>
<SinglePos Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g18"/>
<Glyph value="g20"/>
</Coverage>
@@ -47,7 +47,7 @@
<ExtensionPos index="1" Format="1">
<ExtensionLookupType value="1"/>
<SinglePos Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g19"/>
<Glyph value="g21"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GPOS
index 28832e4..a701d03 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GPOS
index 80ae0c7..865a69b 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GPOS
index 0958edf..f36b48a 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f3.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GPOS
index 8dc3f30..d497f58 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_boundary_f4.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g22"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GPOS
index dfde657..540a00e 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g22"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GPOS
index 3a83808..81374bc 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GPOS
index 7eaf23e..404e929 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_multiple_subrules_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GPOS
index 597baba..87be738 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_next_glyph_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
<Glyph value="g23"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GPOS
index 7f9b1c4..c755f87 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GPOS
index 70e0167..e211d85 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_simple_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g22"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GPOS
index eadac06..a2da259 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining1_successive_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- ChainPosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GPOS
index adcca5c..f8b5eac 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GPOS
index 5108ddc..aa832de 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GPOS
index de44a35..6ee0bc9 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f3.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GPOS
index c1e2151..1acf6c4 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_boundary_f4.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GPOS
index 7c2bbae..a5b4dec 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GPOS
index b1c77b5..c5b5253 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GPOS
index d098baf..b9512fa 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_multiple_subrules_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GPOS
index 2bf7df5..b9e864d 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_next_glyph_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GPOS
index feb38f2..3fddfb2 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GPOS
index a4d3497..248c52a 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_simple_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GPOS
index 1b64d37..4914552 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining2_successive_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -109,7 +109,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -118,7 +118,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -127,7 +127,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GPOS
index 0c5a58f..4a4f076 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,18 +101,18 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=2 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- PosCount=0 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GPOS
index 064ceb7..4f38aec 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,18 +101,18 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g22"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- PosCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GPOS
index 297f182..4cde228 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f3.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,14 +102,14 @@
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=0 -->
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g22"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- PosCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GPOS
index bafd2d3..ab46ecb 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_boundary_f4.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,14 +101,14 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=2 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g21"/>
</BacktrackCoverage>
- <BacktrackCoverage index="1" Format="1">
+ <BacktrackCoverage index="1">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=0 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GPOS
index 8f33742..2bc6f6b 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,27 +101,27 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=2 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g21"/>
</BacktrackCoverage>
- <BacktrackCoverage index="1" Format="1">
+ <BacktrackCoverage index="1">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=3 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g22"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g23"/>
</InputCoverage>
- <InputCoverage index="2" Format="1">
+ <InputCoverage index="2">
<Glyph value="g24"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g25"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g26"/>
</LookAheadCoverage>
<!-- PosCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GPOS
index ebb9f42..76be0ca 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_next_glyph_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,18 +101,18 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g22"/>
</BacktrackCoverage>
<!-- InputGlyphCount=2 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g21"/>
</LookAheadCoverage>
<!-- PosCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GPOS
index a610025..4a3d10a 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,18 +101,18 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=2 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- PosCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GPOS
index 8d4ab5b..1a1f57b 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_simple_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,27 +101,27 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=2 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g21"/>
</BacktrackCoverage>
- <BacktrackCoverage index="1" Format="1">
+ <BacktrackCoverage index="1">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=3 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g22"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g23"/>
</InputCoverage>
- <InputCoverage index="2" Format="1">
+ <InputCoverage index="2">
<Glyph value="g24"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g25"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g26"/>
</LookAheadCoverage>
<!-- PosCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GPOS
index d0e1009..2c6ebb6 100644
--- a/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_chaining3_successive_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -101,24 +101,24 @@
<!-- SubTableCount=1 -->
<ChainContextPos index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g25"/>
</BacktrackCoverage>
<!-- InputGlyphCount=4 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g20"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="2" Format="1">
+ <InputCoverage index="2">
<Glyph value="g22"/>
</InputCoverage>
- <InputCoverage index="3" Format="1">
+ <InputCoverage index="3">
<Glyph value="g23"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g24"/>
</LookAheadCoverage>
<!-- PosCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GPOS
index b085005..e61cc4e 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GPOS
index c397c07..70c9250 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_boundary_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GPOS
index cb05449..ba6c146 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_expansion_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GPOS
index ac299e5..8688a39 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GPOS
index 2571ad4..8e2621f 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_lookupflag_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GPOS
index cad6cd6..03cec90 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GPOS
index 7fcedc9..652850f 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_multiple_subrules_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GPOS
index 47c6d6c..6ad207d 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_next_glyph_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GPOS
index 14b2e95..a4c824f 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GPOS
index 33523f5..15faa22 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_simple_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GPOS
index 8188bdf..11ae1c7 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context1_successive_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,7 +100,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GPOS
index ea71d01..08af7f3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- PosClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GPOS
index c8067b0..832e37b 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_boundary_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- PosClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GPOS
index 64f8092..b06382d 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,11 +100,11 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="1"/>
<ClassDef glyph="g22" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GPOS
index 216ce46..a266ada 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_classes_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,13 +100,13 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
<Glyph value="g24"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="1"/>
<ClassDef glyph="g22" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GPOS
index 6b3b5d0..48833f7 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_expansion_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GPOS
index bf9cfba..d45c280 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GPOS
index 810bab3..6f3c016 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_lookupflag_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GPOS
index c906fe6..1a9b1e2 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GPOS
index 50f7743..f3f9d9d 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_multiple_subrules_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GPOS
index 57e6c41..655d1d3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_next_glyph_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- PosClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GPOS
index b38575d..bc06db5 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GPOS
index b2f467d..c2964bb 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_simple_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- PosClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GPOS
index b5f70e2..797b37b 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context2_successive_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -100,10 +100,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GPOS
index 19b685a..f709b3b 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,10 +102,10 @@
<ContextPos index="0" Format="3">
<!-- GlyphCount=2 -->
<!-- PosCount=0 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g20"/>
</Coverage>
</ContextPos>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GPOS
index bffcccb..a885d1a 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_boundary_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,7 +102,7 @@
<ContextPos index="0" Format="3">
<!-- GlyphCount=1 -->
<!-- PosCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
<PosLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GPOS
index 3cf82eb..286a200 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,13 +102,13 @@
<ContextPos index="0" Format="3">
<!-- GlyphCount=3 -->
<!-- PosCount=3 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
<PosLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GPOS
index e96abac..ea697fc 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_lookupflag_f2.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,13 +102,13 @@
<ContextPos index="0" Format="3">
<!-- GlyphCount=3 -->
<!-- PosCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
<PosLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GPOS
index 049ea85..c4b9d8a 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_next_glyph_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,10 +102,10 @@
<ContextPos index="0" Format="3">
<!-- GlyphCount=2 -->
<!-- PosCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g20"/>
</Coverage>
<PosLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GPOS
index b565dd3..7804fb8 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_simple_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,13 +102,13 @@
<ContextPos index="0" Format="3">
<!-- GlyphCount=3 -->
<!-- PosCount=3 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
<PosLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GPOS b/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GPOS
index 201052d..17b5ed2 100644
--- a/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GPOS
+++ b/Tests/ttLib/tables/data/aots/gpos_context3_successive_f1.ttx.GPOS
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -55,7 +55,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -75,7 +75,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<ValueFormat1 value="1"/>
@@ -102,16 +102,16 @@
<ContextPos index="0" Format="3">
<!-- GlyphCount=4 -->
<!-- PosCount=2 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
<Glyph value="g23"/>
</Coverage>
<PosLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GSUB
index 8b4839d..d5e0bf7 100644
--- a/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub1_1_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g18" out="g23"/>
<Substitution in="g19" out="g24"/>
</SingleSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub1_1_modulo_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub1_1_modulo_f1.ttx.GSUB
index b9923da..f145dd3 100644
--- a/Tests/ttLib/tables/data/aots/gsub1_1_modulo_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub1_1_modulo_f1.ttx.GSUB
@@ -34,11 +34,11 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=2 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g21" out="glyph32787"/>
<Substitution in="g22" out="glyph32788"/>
</SingleSubst>
- <SingleSubst index="1" Format="1">
+ <SingleSubst index="1">
<Substitution in="g19" out="glyph32789"/>
<Substitution in="g20" out="glyph32790"/>
</SingleSubst>
@@ -47,16 +47,16 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=4 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="glyph32787" out="g23"/>
</SingleSubst>
- <SingleSubst index="1" Format="1">
+ <SingleSubst index="1">
<Substitution in="glyph32788" out="g18"/>
</SingleSubst>
- <SingleSubst index="2" Format="1">
+ <SingleSubst index="2">
<Substitution in="glyph32789" out="g17"/>
</SingleSubst>
- <SingleSubst index="3" Format="1">
+ <SingleSubst index="3">
<Substitution in="glyph32790" out="g24"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/ttLib/tables/data/aots/gsub1_1_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub1_1_simple_f1.ttx.GSUB
index e76ba74..7de19b0 100644
--- a/Tests/ttLib/tables/data/aots/gsub1_1_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub1_1_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g18" out="g23"/>
<Substitution in="g19" out="g24"/>
</SingleSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GSUB
index bc4d20e..a518afb 100644
--- a/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub1_2_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="2">
+ <SingleSubst index="0">
<Substitution in="g18" out="g22"/>
<Substitution in="g20" out="g25"/>
</SingleSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub1_2_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub1_2_simple_f1.ttx.GSUB
index 55649d2..392ff3c 100644
--- a/Tests/ttLib/tables/data/aots/gsub1_2_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub1_2_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="2">
+ <SingleSubst index="0">
<Substitution in="g18" out="g22"/>
<Substitution in="g20" out="g25"/>
</SingleSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GSUB
index d3f65be..d3c37dc 100644
--- a/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub2_1_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="2"/>
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g18" out="g20,g21"/>
<Substitution in="g19" out="g22,g23"/>
</MultipleSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub2_1_multiple_sequences_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub2_1_multiple_sequences_f1.ttx.GSUB
index 5ec800e..1c4cd4c 100644
--- a/Tests/ttLib/tables/data/aots/gsub2_1_multiple_sequences_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub2_1_multiple_sequences_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g18" out="g20,g21"/>
<Substitution in="g19" out="g22,g23"/>
</MultipleSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub2_1_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub2_1_simple_f1.ttx.GSUB
index cae4f66..b2453ec 100644
--- a/Tests/ttLib/tables/data/aots/gsub2_1_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub2_1_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g18" out="g20,g21,g22"/>
</MultipleSubst>
</Lookup>
diff --git a/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GDEF
index 971a3f1..08e65de 100644
--- a/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g18" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GSUB
index 43a5e85..531c608 100644
--- a/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub3_1_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="3"/>
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
- <AlternateSubst index="0" Format="1">
+ <AlternateSubst index="0">
<AlternateSet glyph="g18">
<Alternate glyph="g20"/>
<Alternate glyph="g21"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub3_1_multiple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub3_1_multiple_f1.ttx.GSUB
index 1eae117..54a5219 100644
--- a/Tests/ttLib/tables/data/aots/gsub3_1_multiple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub3_1_multiple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <AlternateSubst index="0" Format="1">
+ <AlternateSubst index="0">
<AlternateSet glyph="g18">
<Alternate glyph="g20"/>
<Alternate glyph="g21"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub3_1_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub3_1_simple_f1.ttx.GSUB
index 7372cd0..9a516b2 100644
--- a/Tests/ttLib/tables/data/aots/gsub3_1_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub3_1_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <AlternateSubst index="0" Format="1">
+ <AlternateSubst index="0">
<AlternateSet glyph="g18">
<Alternate glyph="g20"/>
<Alternate glyph="g21"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GDEF
index ffcc7a1..269092d 100644
--- a/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g24" class="1"/>
</GlyphClassDef>
</GDEF>
diff --git a/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GSUB
index f485610..7dc3472 100644
--- a/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub4_1_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19,g20" glyph="g23"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f1.ttx.GSUB
index 9466f91..e9eb9ea 100644
--- a/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19,g20" glyph="g23"/>
<Ligature components="g19" glyph="g24"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f2.ttx.GSUB
index bc25e84..6756dfd 100644
--- a/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligatures_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19" glyph="g24"/>
<Ligature components="g19,g20" glyph="g23"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligsets_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligsets_f1.ttx.GSUB
index 0ea6495..ab04368 100644
--- a/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligsets_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub4_1_multiple_ligsets_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19" glyph="g23"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/gsub4_1_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub4_1_simple_f1.ttx.GSUB
index ecc8fa6..7f3012a 100644
--- a/Tests/ttLib/tables/data/aots/gsub4_1_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub4_1_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19,g20" glyph="g23"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/gsub7_font1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub7_font1.ttx.GSUB
index 3f65d93..cf43ec6 100644
--- a/Tests/ttLib/tables/data/aots/gsub7_font1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub7_font1.ttx.GSUB
@@ -35,7 +35,7 @@
<!-- SubTableCount=1 -->
<ExtensionSubst index="0" Format="1">
<ExtensionLookupType value="1"/>
- <SingleSubst Format="1">
+ <SingleSubst>
<Substitution in="g18" out="g23"/>
<Substitution in="g19" out="g24"/>
</SingleSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub7_font2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub7_font2.ttx.GSUB
index 98338ed..1f488f3 100644
--- a/Tests/ttLib/tables/data/aots/gsub7_font2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub7_font2.ttx.GSUB
@@ -35,13 +35,13 @@
<!-- SubTableCount=2 -->
<ExtensionSubst index="0" Format="1">
<ExtensionLookupType value="1"/>
- <SingleSubst Format="1">
+ <SingleSubst>
<Substitution in="g18" out="g23"/>
</SingleSubst>
</ExtensionSubst>
<ExtensionSubst index="1" Format="1">
<ExtensionLookupType value="1"/>
- <SingleSubst Format="1">
+ <SingleSubst>
<Substitution in="g19" out="g29"/>
</SingleSubst>
</ExtensionSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GSUB
index 1c808ab..897946e 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GSUB
index de223ab..896736c 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GSUB
index 3b7ea53..43a5914 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f3.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GSUB
index e98f40f..d649b63 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_boundary_f4.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g22"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GSUB
index 6b31555..dd83bd7 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g22"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GSUB
index fe8935d..b446f62 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GSUB
index 623534f..9b6b835 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_multiple_subrules_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GSUB
index b50bb4c..8b554ab 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_next_glyph_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
<Glyph value="g23"/>
</Coverage>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GSUB
index 62e93a8..f7dbe58 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g21"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GSUB
index fc4e2b5..a8894e5 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_simple_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g22"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GSUB
index 6b416df..52cf963 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining1_successive_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- ChainSubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GSUB
index 36f3742..9109e59 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GSUB
index ebaaa62..ead59dc 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GSUB
index ad5efd5..8163db1 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f3.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GSUB
index 5ef2c8d..48f9483 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_boundary_f4.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GSUB
index f54d484..a7f4ce6 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GSUB
index b972275..34cea46 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GSUB
index 790b312..21cbe2a 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_multiple_subrules_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GSUB
index 7743df5..d14ac1b 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_next_glyph_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GSUB
index 7ba2ad6..da6a915 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GSUB
index 02c2e01..94f6217 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_simple_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GSUB
index 8bf87f6..7dbc5e0 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining2_successive_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
@@ -88,7 +88,7 @@
<Glyph value="g25"/>
<Glyph value="g26"/>
</Coverage>
- <BacktrackClassDef Format="2">
+ <BacktrackClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -97,7 +97,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</BacktrackClassDef>
- <InputClassDef Format="2">
+ <InputClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
@@ -106,7 +106,7 @@
<ClassDef glyph="g25" class="25"/>
<ClassDef glyph="g26" class="26"/>
</InputClassDef>
- <LookAheadClassDef Format="2">
+ <LookAheadClassDef>
<ClassDef glyph="g20" class="20"/>
<ClassDef glyph="g21" class="21"/>
<ClassDef glyph="g22" class="22"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GSUB
index b1dcebd..82eb133 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,18 +80,18 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=2 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- SubstCount=0 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GSUB
index 82502fd..b5c1636 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,18 +80,18 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g22"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GSUB
index bc18856..76d5a46 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f3.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,14 +81,14 @@
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=0 -->
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g22"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GSUB
index 40090e6..9346d47 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_boundary_f4.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,14 +80,14 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=2 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g21"/>
</BacktrackCoverage>
- <BacktrackCoverage index="1" Format="1">
+ <BacktrackCoverage index="1">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=0 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GSUB
index 78957e4..c329936 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,27 +80,27 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=2 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g21"/>
</BacktrackCoverage>
- <BacktrackCoverage index="1" Format="1">
+ <BacktrackCoverage index="1">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=3 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g22"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g23"/>
</InputCoverage>
- <InputCoverage index="2" Format="1">
+ <InputCoverage index="2">
<Glyph value="g24"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g25"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g26"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GSUB
index eba78ce..46d1f85 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_next_glyph_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,18 +80,18 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g22"/>
</BacktrackCoverage>
<!-- InputGlyphCount=2 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g21"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GSUB
index d40f71b..722dcad 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,18 +80,18 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=2 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g22"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g23"/>
</LookAheadCoverage>
<!-- SubstCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GSUB
index 9fe4e1d..5842c55 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_simple_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,27 +80,27 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=2 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g21"/>
</BacktrackCoverage>
- <BacktrackCoverage index="1" Format="1">
+ <BacktrackCoverage index="1">
<Glyph value="g20"/>
</BacktrackCoverage>
<!-- InputGlyphCount=3 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g22"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g23"/>
</InputCoverage>
- <InputCoverage index="2" Format="1">
+ <InputCoverage index="2">
<Glyph value="g24"/>
</InputCoverage>
<!-- LookAheadGlyphCount=2 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g25"/>
</LookAheadCoverage>
- <LookAheadCoverage index="1" Format="1">
+ <LookAheadCoverage index="1">
<Glyph value="g26"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GSUB
index 4b7e83c..610ea56 100644
--- a/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_chaining3_successive_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -80,24 +80,24 @@
<!-- SubTableCount=1 -->
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=1 -->
- <BacktrackCoverage index="0" Format="1">
+ <BacktrackCoverage index="0">
<Glyph value="g25"/>
</BacktrackCoverage>
<!-- InputGlyphCount=4 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="g20"/>
</InputCoverage>
- <InputCoverage index="1" Format="1">
+ <InputCoverage index="1">
<Glyph value="g21"/>
</InputCoverage>
- <InputCoverage index="2" Format="1">
+ <InputCoverage index="2">
<Glyph value="g22"/>
</InputCoverage>
- <InputCoverage index="3" Format="1">
+ <InputCoverage index="3">
<Glyph value="g23"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="g24"/>
</LookAheadCoverage>
<!-- SubstCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GSUB
index 21ae346..6de6506 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GSUB
index 12fbc54..7d5772c 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_boundary_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GSUB
index be11729..e8dca8a 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_expansion_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GSUB
index 5f11e62..579294f 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GSUB
index 6982c7d..e583f6a 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_lookupflag_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GSUB
index 324d2cf..2202320 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GSUB
index 02b04f6..df568c3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_multiple_subrules_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GSUB
index 28a264f..518e754 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_next_glyph_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GSUB
index 902fdb8..2906b06 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GSUB
index 20b5f8f..554168b 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_simple_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GSUB
index fae8018..fc66abd 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context1_successive_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
<!-- SubRuleSetCount=1 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GSUB
index f56bb80..e1e12f8 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- SubClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GSUB
index 450df06..d2598d9 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_boundary_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- SubClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GSUB
index aa906e6..394df78 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,11 +79,11 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="1"/>
<ClassDef glyph="g22" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GSUB
index 067e839..4de5bc6 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_classes_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,13 +79,13 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
<Glyph value="g21"/>
<Glyph value="g22"/>
<Glyph value="g24"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="1"/>
<ClassDef glyph="g22" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GSUB
index 04afe57..5ab7d08 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_expansion_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GSUB
index 48a8ec1..4a8d749 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GSUB
index 3d1fad8..a672edf 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_lookupflag_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GSUB
index 60cb81c..07b5f5e 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GSUB
index 3e0965c..2252761 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_multiple_subrules_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GSUB
index 79227dc..b78220b 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_next_glyph_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- SubClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GSUB
index e188ea9..35fff94 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GSUB
index 1eeef69..28ab11e 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_simple_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
</ClassDef>
<!-- SubClassSetCount=2 -->
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GSUB
index fb3a2f0..a364207 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context2_successive_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -79,10 +79,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextSubst index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="g20"/>
</Coverage>
- <ClassDef Format="2">
+ <ClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="2"/>
<ClassDef glyph="g22" class="3"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GSUB
index 4b5bedd..9a73fac 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,10 +81,10 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=2 -->
<!-- SubstCount=0 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g20"/>
</Coverage>
</ContextSubst>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GSUB
index ecc88ad..d45e67b 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_boundary_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,7 +81,7 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=1 -->
<!-- SubstCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
<SubstLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GSUB
index 4882e5e..90b53f4 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,13 +81,13 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=3 -->
<!-- SubstCount=3 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
<SubstLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GSUB
index ff671b0..a82c3c0 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_lookupflag_f2.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,13 +81,13 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=3 -->
<!-- SubstCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
<SubstLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GSUB
index 5c7943d..a4f5add 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_next_glyph_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,10 +81,10 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=2 -->
<!-- SubstCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g20"/>
</Coverage>
<SubstLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GSUB
index 3008fff..15d6c08 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_simple_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,13 +81,13 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=3 -->
<!-- SubstCount=3 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
<SubstLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GDEF
index dba5550..b5c2ac3 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g80" class="1"/>
<ClassDef glyph="g81" class="1"/>
<ClassDef glyph="g82" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GSUB
index b5c336a..6558c69 100644
--- a/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/gsub_context3_successive_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="g20" out="g60"/>
<Substitution in="g21" out="g61"/>
<Substitution in="g22" out="g62"/>
@@ -50,7 +50,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -60,7 +60,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g21">
<Ligature components="g22" glyph="g61"/>
</LigatureSet>
@@ -70,7 +70,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="g21" out="g61,g62,g63"/>
</MultipleSubst>
</Lookup>
@@ -81,16 +81,16 @@
<ContextSubst index="0" Format="3">
<!-- GlyphCount=4 -->
<!-- SubstCount=2 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="g20"/>
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
<Glyph value="g21"/>
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
<Glyph value="g22"/>
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
<Glyph value="g23"/>
</Coverage>
<SubstLookupRecord index="0">
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GDEF
index 802351a..736e2d8 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g10" class="1"/>
<ClassDef glyph="g11" class="1"/>
<ClassDef glyph="g12" class="1"/>
@@ -21,7 +21,7 @@
<ClassDef glyph="g28" class="3"/>
<ClassDef glyph="g29" class="3"/>
</GlyphClassDef>
- <MarkAttachClassDef Format="2">
+ <MarkAttachClassDef>
<ClassDef glyph="g20" class="1"/>
<ClassDef glyph="g21" class="1"/>
<ClassDef glyph="g22" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GSUB
index 874ba00..42876ea 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_attach_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="512"/><!-- markAttachmentType[2] -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g11">
<Ligature components="g13,g26" glyph="g15"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GDEF
index 2b0a686..c6abc87 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g24" class="1"/>
<ClassDef glyph="g25" class="1"/>
</GlyphClassDef>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GSUB
index f485610..7dc3472 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_base_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="2"/><!-- ignoreBaseGlyphs -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19,g20" glyph="g23"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GDEF
index b67d75e..e81490b 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g24" class="1"/>
<ClassDef glyph="g25" class="1"/>
<ClassDef glyph="g26" class="1"/>
@@ -14,7 +14,7 @@
<ClassDef glyph="g31" class="3"/>
<ClassDef glyph="g32" class="3"/>
</GlyphClassDef>
- <MarkAttachClassDef Format="2">
+ <MarkAttachClassDef>
<ClassDef glyph="g25" class="1"/>
<ClassDef glyph="g26" class="2"/>
<ClassDef glyph="g28" class="1"/>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GSUB
index e257bd7..ffdc2ae 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_combination_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="514"/><!-- ignoreBaseGlyphs markAttachmentType[2] -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19,g20" glyph="g23"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GDEF
index 19aa7aa..b914431 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g24" class="1"/>
<ClassDef glyph="g25" class="1"/>
<ClassDef glyph="g26" class="2"/>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GSUB
index d270f3c..db7fcc0 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_ligatures_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="4"/><!-- ignoreLigatures -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19,g20" glyph="g23"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GDEF b/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GDEF
index 19aa7aa..b914431 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GDEF
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GDEF
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="g24" class="1"/>
<ClassDef glyph="g25" class="1"/>
<ClassDef glyph="g26" class="2"/>
diff --git a/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GSUB b/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GSUB
index 3712c06..b3fd500 100644
--- a/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GSUB
+++ b/Tests/ttLib/tables/data/aots/lookupflag_ignore_marks_f1.ttx.GSUB
@@ -33,7 +33,7 @@
<LookupType value="4"/>
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="g18">
<Ligature components="g19,g20" glyph="g23"/>
</LigatureSet>
diff --git a/Tests/ttLib/tables/otBase_test.py b/Tests/ttLib/tables/otBase_test.py
index 4351d03..ce0416e 100644
--- a/Tests/ttLib/tables/otBase_test.py
+++ b/Tests/ttLib/tables/otBase_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.textTools import deHexStr
from fontTools.ttLib.tables.otBase import OTTableReader, OTTableWriter
import unittest
diff --git a/Tests/ttLib/tables/otConverters_test.py b/Tests/ttLib/tables/otConverters_test.py
index dd90031..1aff03b 100644
--- a/Tests/ttLib/tables/otConverters_test.py
+++ b/Tests/ttLib/tables/otConverters_test.py
@@ -1,5 +1,3 @@
-# coding: utf-8
-from fontTools.misc.py23 import *
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.misc.testTools import FakeFont, makeXMLWriter
from fontTools.misc.textTools import deHexStr
diff --git a/Tests/ttLib/tables/otTables_test.py b/Tests/ttLib/tables/otTables_test.py
index bd4daeb..9202aa5 100644
--- a/Tests/ttLib/tables/otTables_test.py
+++ b/Tests/ttLib/tables/otTables_test.py
@@ -1,10 +1,9 @@
-# coding: utf-8
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import getXML, parseXML, FakeFont
from fontTools.misc.textTools import deHexStr, hexStr
from fontTools.misc.xmlWriter import XMLWriter
from fontTools.ttLib.tables.otBase import OTTableReader, OTTableWriter
import fontTools.ttLib.tables.otTables as otTables
+from io import StringIO
import unittest
@@ -169,7 +168,7 @@
table = otTables.MultipleSubst()
table.Format = 1
for name, attrs, content in parseXML(
- '<Coverage Format="1">'
+ '<Coverage>'
' <Glyph value="o"/>'
' <Glyph value="l"/>'
'</Coverage>'
@@ -599,7 +598,6 @@
glyphMap = {g: i for i, g in enumerate(glyphOrder)}
oldSubTable = buildMarkBasePosSubtable(marks, bases, glyphMap)
- oldSubTable.MarkCoverage.Format = oldSubTable.BaseCoverage.Format = 1
newSubTable = otTables.MarkBasePos()
ok = otTables.splitMarkBasePos(oldSubTable, newSubTable, overflowRecord=None)
@@ -608,11 +606,11 @@
assert getXML(oldSubTable.toXML) == [
'<MarkBasePos Format="1">',
- ' <MarkCoverage Format="1">',
+ ' <MarkCoverage>',
' <Glyph value="acutecomb"/>',
' <Glyph value="gravecomb"/>',
' </MarkCoverage>',
- ' <BaseCoverage Format="1">',
+ ' <BaseCoverage>',
' <Glyph value="a"/>',
' <Glyph value="c"/>',
' </BaseCoverage>',
@@ -654,10 +652,10 @@
assert getXML(newSubTable.toXML) == [
'<MarkBasePos Format="1">',
- ' <MarkCoverage Format="1">',
+ ' <MarkCoverage>',
' <Glyph value="cedillacomb"/>',
' </MarkCoverage>',
- ' <BaseCoverage Format="1">',
+ ' <BaseCoverage>',
' <Glyph value="a"/>',
' <Glyph value="c"/>',
' </BaseCoverage>',
diff --git a/Tests/ttLib/tables/tables_test.py b/Tests/ttLib/tables/tables_test.py
index b031b48..f66323f 100644
--- a/Tests/ttLib/tables/tables_test.py
+++ b/Tests/ttLib/tables/tables_test.py
@@ -1,5 +1,5 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont, tagToXML
+from io import StringIO
import os
import sys
import re
@@ -253,13 +253,13 @@
def dump_ttx(font, tableTag):
- f = UnicodeIO()
+ f = StringIO()
font.saveXML(f, newlinestr='\n', tables=[tableTag])
return ttLibVersion_RE.sub('', f.getvalue())
def load_ttx(ttx):
- f = UnicodeIO()
+ f = StringIO()
f.write(ttx)
f.seek(0)
font = TTFont()
diff --git a/Tests/ttLib/tables/ttProgram_test.py b/Tests/ttLib/tables/ttProgram_test.py
index 0bc14ab..be6e86a 100644
--- a/Tests/ttLib/tables/ttProgram_test.py
+++ b/Tests/ttLib/tables/ttProgram_test.py
@@ -1,10 +1,9 @@
-from fontTools.misc.py23 import *
from fontTools.misc.xmlWriter import XMLWriter
from fontTools.ttLib.tables.ttProgram import Program
from fontTools.misc.textTools import deHexStr
import array
+from io import StringIO
import os
-import re
import unittest
CURR_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
@@ -104,7 +103,7 @@
p = Program()
p.fromBytecode(BYTECODE)
ttfont = TestFont()
- buf = UnicodeIO()
+ buf = StringIO()
writer = XMLWriter(buf, newlinestr='\n')
try:
p.toXML(writer, ttfont)
diff --git a/Tests/ttLib/woff2_test.py b/Tests/ttLib/woff2_test.py
index 23aab4a..c0d60ce 100644
--- a/Tests/ttLib/woff2_test.py
+++ b/Tests/ttLib/woff2_test.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag, bytechr, byteord
from fontTools import ttLib
from fontTools.ttLib import woff2
from fontTools.ttLib.tables import _g_l_y_f
@@ -12,6 +12,7 @@
from fontTools.misc import sstruct
from fontTools import fontBuilder
from fontTools.pens.ttGlyphPen import TTGlyphPen
+from io import BytesIO
import struct
import os
import random
diff --git a/Tests/ttx/ttx_test.py b/Tests/ttx/ttx_test.py
index 3d4c3f9..c246347 100644
--- a/Tests/ttx/ttx_test.py
+++ b/Tests/ttx/ttx_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.misc.testTools import parseXML
from fontTools.misc.timeTools import timestampSinceEpoch
from fontTools.ttLib import TTFont, TTLibError
diff --git a/Tests/unicodedata_test.py b/Tests/unicodedata_test.py
index a1ab6f1..05f7de6 100644
--- a/Tests/unicodedata_test.py
+++ b/Tests/unicodedata_test.py
@@ -1,5 +1,3 @@
-from fontTools.misc.py23 import *
-
from fontTools import unicodedata
import pytest
@@ -7,159 +5,159 @@
def test_script():
assert unicodedata.script("a") == "Latn"
- assert unicodedata.script(unichr(0)) == "Zyyy"
- assert unicodedata.script(unichr(0x0378)) == "Zzzz"
- assert unicodedata.script(unichr(0x10FFFF)) == "Zzzz"
+ assert unicodedata.script(chr(0)) == "Zyyy"
+ assert unicodedata.script(chr(0x0378)) == "Zzzz"
+ assert unicodedata.script(chr(0x10FFFF)) == "Zzzz"
# these were randomly sampled, one character per script
- assert unicodedata.script(unichr(0x1E918)) == 'Adlm'
- assert unicodedata.script(unichr(0x1170D)) == 'Ahom'
- assert unicodedata.script(unichr(0x145A0)) == 'Hluw'
- assert unicodedata.script(unichr(0x0607)) == 'Arab'
- assert unicodedata.script(unichr(0x056C)) == 'Armn'
- assert unicodedata.script(unichr(0x10B27)) == 'Avst'
- assert unicodedata.script(unichr(0x1B41)) == 'Bali'
- assert unicodedata.script(unichr(0x168AD)) == 'Bamu'
- assert unicodedata.script(unichr(0x16ADD)) == 'Bass'
- assert unicodedata.script(unichr(0x1BE5)) == 'Batk'
- assert unicodedata.script(unichr(0x09F3)) == 'Beng'
- assert unicodedata.script(unichr(0x11C5B)) == 'Bhks'
- assert unicodedata.script(unichr(0x3126)) == 'Bopo'
- assert unicodedata.script(unichr(0x1103B)) == 'Brah'
- assert unicodedata.script(unichr(0x2849)) == 'Brai'
- assert unicodedata.script(unichr(0x1A0A)) == 'Bugi'
- assert unicodedata.script(unichr(0x174E)) == 'Buhd'
- assert unicodedata.script(unichr(0x18EE)) == 'Cans'
- assert unicodedata.script(unichr(0x102B7)) == 'Cari'
- assert unicodedata.script(unichr(0x1053D)) == 'Aghb'
- assert unicodedata.script(unichr(0x11123)) == 'Cakm'
- assert unicodedata.script(unichr(0xAA1F)) == 'Cham'
- assert unicodedata.script(unichr(0xAB95)) == 'Cher'
- assert unicodedata.script(unichr(0x1F0C7)) == 'Zyyy'
- assert unicodedata.script(unichr(0x2C85)) == 'Copt'
- assert unicodedata.script(unichr(0x12014)) == 'Xsux'
- assert unicodedata.script(unichr(0x1082E)) == 'Cprt'
- assert unicodedata.script(unichr(0xA686)) == 'Cyrl'
- assert unicodedata.script(unichr(0x10417)) == 'Dsrt'
- assert unicodedata.script(unichr(0x093E)) == 'Deva'
- assert unicodedata.script(unichr(0x1BC4B)) == 'Dupl'
- assert unicodedata.script(unichr(0x1310C)) == 'Egyp'
- assert unicodedata.script(unichr(0x1051C)) == 'Elba'
- assert unicodedata.script(unichr(0x2DA6)) == 'Ethi'
- assert unicodedata.script(unichr(0x10AD)) == 'Geor'
- assert unicodedata.script(unichr(0x2C52)) == 'Glag'
- assert unicodedata.script(unichr(0x10343)) == 'Goth'
- assert unicodedata.script(unichr(0x11371)) == 'Gran'
- assert unicodedata.script(unichr(0x03D0)) == 'Grek'
- assert unicodedata.script(unichr(0x0AAA)) == 'Gujr'
- assert unicodedata.script(unichr(0x0A4C)) == 'Guru'
- assert unicodedata.script(unichr(0x23C9F)) == 'Hani'
- assert unicodedata.script(unichr(0xC259)) == 'Hang'
- assert unicodedata.script(unichr(0x1722)) == 'Hano'
- assert unicodedata.script(unichr(0x108F5)) == 'Hatr'
- assert unicodedata.script(unichr(0x05C2)) == 'Hebr'
- assert unicodedata.script(unichr(0x1B072)) == 'Hira'
- assert unicodedata.script(unichr(0x10847)) == 'Armi'
- assert unicodedata.script(unichr(0x033A)) == 'Zinh'
- assert unicodedata.script(unichr(0x10B66)) == 'Phli'
- assert unicodedata.script(unichr(0x10B4B)) == 'Prti'
- assert unicodedata.script(unichr(0xA98A)) == 'Java'
- assert unicodedata.script(unichr(0x110B2)) == 'Kthi'
- assert unicodedata.script(unichr(0x0CC6)) == 'Knda'
- assert unicodedata.script(unichr(0x3337)) == 'Kana'
- assert unicodedata.script(unichr(0xA915)) == 'Kali'
- assert unicodedata.script(unichr(0x10A2E)) == 'Khar'
- assert unicodedata.script(unichr(0x17AA)) == 'Khmr'
- assert unicodedata.script(unichr(0x11225)) == 'Khoj'
- assert unicodedata.script(unichr(0x112B6)) == 'Sind'
- assert unicodedata.script(unichr(0x0ED7)) == 'Laoo'
- assert unicodedata.script(unichr(0xAB3C)) == 'Latn'
- assert unicodedata.script(unichr(0x1C48)) == 'Lepc'
- assert unicodedata.script(unichr(0x1923)) == 'Limb'
- assert unicodedata.script(unichr(0x1071D)) == 'Lina'
- assert unicodedata.script(unichr(0x100EC)) == 'Linb'
- assert unicodedata.script(unichr(0xA4E9)) == 'Lisu'
- assert unicodedata.script(unichr(0x10284)) == 'Lyci'
- assert unicodedata.script(unichr(0x10926)) == 'Lydi'
- assert unicodedata.script(unichr(0x11161)) == 'Mahj'
- assert unicodedata.script(unichr(0x0D56)) == 'Mlym'
- assert unicodedata.script(unichr(0x0856)) == 'Mand'
- assert unicodedata.script(unichr(0x10AF0)) == 'Mani'
- assert unicodedata.script(unichr(0x11CB0)) == 'Marc'
- assert unicodedata.script(unichr(0x11D28)) == 'Gonm'
- assert unicodedata.script(unichr(0xABDD)) == 'Mtei'
- assert unicodedata.script(unichr(0x1E897)) == 'Mend'
- assert unicodedata.script(unichr(0x109B0)) == 'Merc'
- assert unicodedata.script(unichr(0x10993)) == 'Mero'
- assert unicodedata.script(unichr(0x16F5D)) == 'Plrd'
- assert unicodedata.script(unichr(0x1160B)) == 'Modi'
- assert unicodedata.script(unichr(0x18A8)) == 'Mong'
- assert unicodedata.script(unichr(0x16A48)) == 'Mroo'
- assert unicodedata.script(unichr(0x1128C)) == 'Mult'
- assert unicodedata.script(unichr(0x105B)) == 'Mymr'
- assert unicodedata.script(unichr(0x108AF)) == 'Nbat'
- assert unicodedata.script(unichr(0x19B3)) == 'Talu'
- assert unicodedata.script(unichr(0x1143D)) == 'Newa'
- assert unicodedata.script(unichr(0x07F4)) == 'Nkoo'
- assert unicodedata.script(unichr(0x1B192)) == 'Nshu'
- assert unicodedata.script(unichr(0x169C)) == 'Ogam'
- assert unicodedata.script(unichr(0x1C56)) == 'Olck'
- assert unicodedata.script(unichr(0x10CE9)) == 'Hung'
- assert unicodedata.script(unichr(0x10316)) == 'Ital'
- assert unicodedata.script(unichr(0x10A93)) == 'Narb'
- assert unicodedata.script(unichr(0x1035A)) == 'Perm'
- assert unicodedata.script(unichr(0x103D5)) == 'Xpeo'
- assert unicodedata.script(unichr(0x10A65)) == 'Sarb'
- assert unicodedata.script(unichr(0x10C09)) == 'Orkh'
- assert unicodedata.script(unichr(0x0B60)) == 'Orya'
- assert unicodedata.script(unichr(0x104CF)) == 'Osge'
- assert unicodedata.script(unichr(0x104A8)) == 'Osma'
- assert unicodedata.script(unichr(0x16B12)) == 'Hmng'
- assert unicodedata.script(unichr(0x10879)) == 'Palm'
- assert unicodedata.script(unichr(0x11AF1)) == 'Pauc'
- assert unicodedata.script(unichr(0xA869)) == 'Phag'
- assert unicodedata.script(unichr(0x10909)) == 'Phnx'
- assert unicodedata.script(unichr(0x10B81)) == 'Phlp'
- assert unicodedata.script(unichr(0xA941)) == 'Rjng'
- assert unicodedata.script(unichr(0x16C3)) == 'Runr'
- assert unicodedata.script(unichr(0x0814)) == 'Samr'
- assert unicodedata.script(unichr(0xA88C)) == 'Saur'
- assert unicodedata.script(unichr(0x111C8)) == 'Shrd'
- assert unicodedata.script(unichr(0x1045F)) == 'Shaw'
- assert unicodedata.script(unichr(0x115AD)) == 'Sidd'
- assert unicodedata.script(unichr(0x1D8C0)) == 'Sgnw'
- assert unicodedata.script(unichr(0x0DB9)) == 'Sinh'
- assert unicodedata.script(unichr(0x110F9)) == 'Sora'
- assert unicodedata.script(unichr(0x11A60)) == 'Soyo'
- assert unicodedata.script(unichr(0x1B94)) == 'Sund'
- assert unicodedata.script(unichr(0xA81F)) == 'Sylo'
- assert unicodedata.script(unichr(0x0740)) == 'Syrc'
- assert unicodedata.script(unichr(0x1714)) == 'Tglg'
- assert unicodedata.script(unichr(0x1761)) == 'Tagb'
- assert unicodedata.script(unichr(0x1965)) == 'Tale'
- assert unicodedata.script(unichr(0x1A32)) == 'Lana'
- assert unicodedata.script(unichr(0xAA86)) == 'Tavt'
- assert unicodedata.script(unichr(0x116A5)) == 'Takr'
- assert unicodedata.script(unichr(0x0B8E)) == 'Taml'
- assert unicodedata.script(unichr(0x1754D)) == 'Tang'
- assert unicodedata.script(unichr(0x0C40)) == 'Telu'
- assert unicodedata.script(unichr(0x07A4)) == 'Thaa'
- assert unicodedata.script(unichr(0x0E42)) == 'Thai'
- assert unicodedata.script(unichr(0x0F09)) == 'Tibt'
- assert unicodedata.script(unichr(0x2D3A)) == 'Tfng'
- assert unicodedata.script(unichr(0x114B0)) == 'Tirh'
- assert unicodedata.script(unichr(0x1038B)) == 'Ugar'
- assert unicodedata.script(unichr(0xA585)) == 'Vaii'
- assert unicodedata.script(unichr(0x118CF)) == 'Wara'
- assert unicodedata.script(unichr(0xA066)) == 'Yiii'
- assert unicodedata.script(unichr(0x11A31)) == 'Zanb'
+ assert unicodedata.script(chr(0x1E918)) == 'Adlm'
+ assert unicodedata.script(chr(0x1170D)) == 'Ahom'
+ assert unicodedata.script(chr(0x145A0)) == 'Hluw'
+ assert unicodedata.script(chr(0x0607)) == 'Arab'
+ assert unicodedata.script(chr(0x056C)) == 'Armn'
+ assert unicodedata.script(chr(0x10B27)) == 'Avst'
+ assert unicodedata.script(chr(0x1B41)) == 'Bali'
+ assert unicodedata.script(chr(0x168AD)) == 'Bamu'
+ assert unicodedata.script(chr(0x16ADD)) == 'Bass'
+ assert unicodedata.script(chr(0x1BE5)) == 'Batk'
+ assert unicodedata.script(chr(0x09F3)) == 'Beng'
+ assert unicodedata.script(chr(0x11C5B)) == 'Bhks'
+ assert unicodedata.script(chr(0x3126)) == 'Bopo'
+ assert unicodedata.script(chr(0x1103B)) == 'Brah'
+ assert unicodedata.script(chr(0x2849)) == 'Brai'
+ assert unicodedata.script(chr(0x1A0A)) == 'Bugi'
+ assert unicodedata.script(chr(0x174E)) == 'Buhd'
+ assert unicodedata.script(chr(0x18EE)) == 'Cans'
+ assert unicodedata.script(chr(0x102B7)) == 'Cari'
+ assert unicodedata.script(chr(0x1053D)) == 'Aghb'
+ assert unicodedata.script(chr(0x11123)) == 'Cakm'
+ assert unicodedata.script(chr(0xAA1F)) == 'Cham'
+ assert unicodedata.script(chr(0xAB95)) == 'Cher'
+ assert unicodedata.script(chr(0x1F0C7)) == 'Zyyy'
+ assert unicodedata.script(chr(0x2C85)) == 'Copt'
+ assert unicodedata.script(chr(0x12014)) == 'Xsux'
+ assert unicodedata.script(chr(0x1082E)) == 'Cprt'
+ assert unicodedata.script(chr(0xA686)) == 'Cyrl'
+ assert unicodedata.script(chr(0x10417)) == 'Dsrt'
+ assert unicodedata.script(chr(0x093E)) == 'Deva'
+ assert unicodedata.script(chr(0x1BC4B)) == 'Dupl'
+ assert unicodedata.script(chr(0x1310C)) == 'Egyp'
+ assert unicodedata.script(chr(0x1051C)) == 'Elba'
+ assert unicodedata.script(chr(0x2DA6)) == 'Ethi'
+ assert unicodedata.script(chr(0x10AD)) == 'Geor'
+ assert unicodedata.script(chr(0x2C52)) == 'Glag'
+ assert unicodedata.script(chr(0x10343)) == 'Goth'
+ assert unicodedata.script(chr(0x11371)) == 'Gran'
+ assert unicodedata.script(chr(0x03D0)) == 'Grek'
+ assert unicodedata.script(chr(0x0AAA)) == 'Gujr'
+ assert unicodedata.script(chr(0x0A4C)) == 'Guru'
+ assert unicodedata.script(chr(0x23C9F)) == 'Hani'
+ assert unicodedata.script(chr(0xC259)) == 'Hang'
+ assert unicodedata.script(chr(0x1722)) == 'Hano'
+ assert unicodedata.script(chr(0x108F5)) == 'Hatr'
+ assert unicodedata.script(chr(0x05C2)) == 'Hebr'
+ assert unicodedata.script(chr(0x1B072)) == 'Hira'
+ assert unicodedata.script(chr(0x10847)) == 'Armi'
+ assert unicodedata.script(chr(0x033A)) == 'Zinh'
+ assert unicodedata.script(chr(0x10B66)) == 'Phli'
+ assert unicodedata.script(chr(0x10B4B)) == 'Prti'
+ assert unicodedata.script(chr(0xA98A)) == 'Java'
+ assert unicodedata.script(chr(0x110B2)) == 'Kthi'
+ assert unicodedata.script(chr(0x0CC6)) == 'Knda'
+ assert unicodedata.script(chr(0x3337)) == 'Kana'
+ assert unicodedata.script(chr(0xA915)) == 'Kali'
+ assert unicodedata.script(chr(0x10A2E)) == 'Khar'
+ assert unicodedata.script(chr(0x17AA)) == 'Khmr'
+ assert unicodedata.script(chr(0x11225)) == 'Khoj'
+ assert unicodedata.script(chr(0x112B6)) == 'Sind'
+ assert unicodedata.script(chr(0x0ED7)) == 'Laoo'
+ assert unicodedata.script(chr(0xAB3C)) == 'Latn'
+ assert unicodedata.script(chr(0x1C48)) == 'Lepc'
+ assert unicodedata.script(chr(0x1923)) == 'Limb'
+ assert unicodedata.script(chr(0x1071D)) == 'Lina'
+ assert unicodedata.script(chr(0x100EC)) == 'Linb'
+ assert unicodedata.script(chr(0xA4E9)) == 'Lisu'
+ assert unicodedata.script(chr(0x10284)) == 'Lyci'
+ assert unicodedata.script(chr(0x10926)) == 'Lydi'
+ assert unicodedata.script(chr(0x11161)) == 'Mahj'
+ assert unicodedata.script(chr(0x0D56)) == 'Mlym'
+ assert unicodedata.script(chr(0x0856)) == 'Mand'
+ assert unicodedata.script(chr(0x10AF0)) == 'Mani'
+ assert unicodedata.script(chr(0x11CB0)) == 'Marc'
+ assert unicodedata.script(chr(0x11D28)) == 'Gonm'
+ assert unicodedata.script(chr(0xABDD)) == 'Mtei'
+ assert unicodedata.script(chr(0x1E897)) == 'Mend'
+ assert unicodedata.script(chr(0x109B0)) == 'Merc'
+ assert unicodedata.script(chr(0x10993)) == 'Mero'
+ assert unicodedata.script(chr(0x16F5D)) == 'Plrd'
+ assert unicodedata.script(chr(0x1160B)) == 'Modi'
+ assert unicodedata.script(chr(0x18A8)) == 'Mong'
+ assert unicodedata.script(chr(0x16A48)) == 'Mroo'
+ assert unicodedata.script(chr(0x1128C)) == 'Mult'
+ assert unicodedata.script(chr(0x105B)) == 'Mymr'
+ assert unicodedata.script(chr(0x108AF)) == 'Nbat'
+ assert unicodedata.script(chr(0x19B3)) == 'Talu'
+ assert unicodedata.script(chr(0x1143D)) == 'Newa'
+ assert unicodedata.script(chr(0x07F4)) == 'Nkoo'
+ assert unicodedata.script(chr(0x1B192)) == 'Nshu'
+ assert unicodedata.script(chr(0x169C)) == 'Ogam'
+ assert unicodedata.script(chr(0x1C56)) == 'Olck'
+ assert unicodedata.script(chr(0x10CE9)) == 'Hung'
+ assert unicodedata.script(chr(0x10316)) == 'Ital'
+ assert unicodedata.script(chr(0x10A93)) == 'Narb'
+ assert unicodedata.script(chr(0x1035A)) == 'Perm'
+ assert unicodedata.script(chr(0x103D5)) == 'Xpeo'
+ assert unicodedata.script(chr(0x10A65)) == 'Sarb'
+ assert unicodedata.script(chr(0x10C09)) == 'Orkh'
+ assert unicodedata.script(chr(0x0B60)) == 'Orya'
+ assert unicodedata.script(chr(0x104CF)) == 'Osge'
+ assert unicodedata.script(chr(0x104A8)) == 'Osma'
+ assert unicodedata.script(chr(0x16B12)) == 'Hmng'
+ assert unicodedata.script(chr(0x10879)) == 'Palm'
+ assert unicodedata.script(chr(0x11AF1)) == 'Pauc'
+ assert unicodedata.script(chr(0xA869)) == 'Phag'
+ assert unicodedata.script(chr(0x10909)) == 'Phnx'
+ assert unicodedata.script(chr(0x10B81)) == 'Phlp'
+ assert unicodedata.script(chr(0xA941)) == 'Rjng'
+ assert unicodedata.script(chr(0x16C3)) == 'Runr'
+ assert unicodedata.script(chr(0x0814)) == 'Samr'
+ assert unicodedata.script(chr(0xA88C)) == 'Saur'
+ assert unicodedata.script(chr(0x111C8)) == 'Shrd'
+ assert unicodedata.script(chr(0x1045F)) == 'Shaw'
+ assert unicodedata.script(chr(0x115AD)) == 'Sidd'
+ assert unicodedata.script(chr(0x1D8C0)) == 'Sgnw'
+ assert unicodedata.script(chr(0x0DB9)) == 'Sinh'
+ assert unicodedata.script(chr(0x110F9)) == 'Sora'
+ assert unicodedata.script(chr(0x11A60)) == 'Soyo'
+ assert unicodedata.script(chr(0x1B94)) == 'Sund'
+ assert unicodedata.script(chr(0xA81F)) == 'Sylo'
+ assert unicodedata.script(chr(0x0740)) == 'Syrc'
+ assert unicodedata.script(chr(0x1714)) == 'Tglg'
+ assert unicodedata.script(chr(0x1761)) == 'Tagb'
+ assert unicodedata.script(chr(0x1965)) == 'Tale'
+ assert unicodedata.script(chr(0x1A32)) == 'Lana'
+ assert unicodedata.script(chr(0xAA86)) == 'Tavt'
+ assert unicodedata.script(chr(0x116A5)) == 'Takr'
+ assert unicodedata.script(chr(0x0B8E)) == 'Taml'
+ assert unicodedata.script(chr(0x1754D)) == 'Tang'
+ assert unicodedata.script(chr(0x0C40)) == 'Telu'
+ assert unicodedata.script(chr(0x07A4)) == 'Thaa'
+ assert unicodedata.script(chr(0x0E42)) == 'Thai'
+ assert unicodedata.script(chr(0x0F09)) == 'Tibt'
+ assert unicodedata.script(chr(0x2D3A)) == 'Tfng'
+ assert unicodedata.script(chr(0x114B0)) == 'Tirh'
+ assert unicodedata.script(chr(0x1038B)) == 'Ugar'
+ assert unicodedata.script(chr(0xA585)) == 'Vaii'
+ assert unicodedata.script(chr(0x118CF)) == 'Wara'
+ assert unicodedata.script(chr(0xA066)) == 'Yiii'
+ assert unicodedata.script(chr(0x11A31)) == 'Zanb'
def test_script_extension():
assert unicodedata.script_extension("a") == {"Latn"}
- assert unicodedata.script_extension(unichr(0)) == {"Zyyy"}
- assert unicodedata.script_extension(unichr(0x0378)) == {"Zzzz"}
- assert unicodedata.script_extension(unichr(0x10FFFF)) == {"Zzzz"}
+ assert unicodedata.script_extension(chr(0)) == {"Zyyy"}
+ assert unicodedata.script_extension(chr(0x0378)) == {"Zzzz"}
+ assert unicodedata.script_extension(chr(0x10FFFF)) == {"Zzzz"}
assert unicodedata.script_extension("\u0660") == {'Arab', 'Thaa', 'Yezi'}
assert unicodedata.script_extension("\u0964") == {
diff --git a/Tests/varLib/data/IncompatibleArrays.designspace b/Tests/varLib/data/IncompatibleArrays.designspace
new file mode 100644
index 0000000..399810e
--- /dev/null
+++ b/Tests/varLib/data/IncompatibleArrays.designspace
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<designspace format="4.1">
+ <axes>
+ <axis tag="wght" name="Weight" minimum="200" maximum="700" default="200"/>
+ </axes>
+ <sources>
+ <source filename="master_incompatible_arrays/IncompatibleArrays-Regular.ttx" name="Simple Two Axis Regular" familyname="Simple Two Axis" stylename="Regular">
+ <lib copy="1"/>
+ <groups copy="1"/>
+ <features copy="1"/>
+ <info copy="1"/>
+ <location>
+ <dimension name="Weight" xvalue="200"/>
+ </location>
+ </source>
+ <source filename="master_incompatible_arrays/IncompatibleArrays-Bold.ttx" name="Simple Two Axis Bold" familyname="Simple Two Axis" stylename="Bold">
+ <location>
+ <dimension name="Weight" xvalue="700"/>
+ </location>
+ </source>
+ </sources>
+</designspace>
diff --git a/Tests/varLib/data/IncompatibleFeatures.designspace b/Tests/varLib/data/IncompatibleFeatures.designspace
new file mode 100644
index 0000000..ab27516
--- /dev/null
+++ b/Tests/varLib/data/IncompatibleFeatures.designspace
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<designspace format="4.1">
+ <axes>
+ <axis tag="wght" name="Weight" minimum="200" maximum="700" default="200"/>
+ </axes>
+ <sources>
+ <source filename="master_incompatible_features/IncompatibleFeatures-Regular.ttx" name="Simple Two Axis Regular" familyname="Simple Two Axis" stylename="Regular">
+ <lib copy="1"/>
+ <groups copy="1"/>
+ <features copy="1"/>
+ <info copy="1"/>
+ <location>
+ <dimension name="Weight" xvalue="200"/>
+ </location>
+ </source>
+ <source filename="master_incompatible_features/IncompatibleFeatures-Bold.ttx" name="Simple Two Axis Bold" familyname="Simple Two Axis" stylename="Bold">
+ <location>
+ <dimension name="Weight" xvalue="700"/>
+ </location>
+ </source>
+ </sources>
+</designspace>
diff --git a/Tests/varLib/data/IncompatibleLookupTypes.designspace b/Tests/varLib/data/IncompatibleLookupTypes.designspace
new file mode 100644
index 0000000..c7d3575
--- /dev/null
+++ b/Tests/varLib/data/IncompatibleLookupTypes.designspace
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<designspace format="4.1">
+ <axes>
+ <axis tag="wght" name="Weight" minimum="200" maximum="700" default="200"/>
+ </axes>
+ <sources>
+ <source filename="master_incompatible_lookup_types/IncompatibleLookupTypes-Regular.ttx" name="Simple Two Axis Regular" familyname="Simple Two Axis" stylename="Regular">
+ <lib copy="1"/>
+ <groups copy="1"/>
+ <features copy="1"/>
+ <info copy="1"/>
+ <location>
+ <dimension name="Weight" xvalue="200"/>
+ </location>
+ </source>
+ <source filename="master_incompatible_lookup_types/IncompatibleLookupTypes-Bold.ttx" name="Simple Two Axis Bold" familyname="Simple Two Axis" stylename="Bold">
+ <location>
+ <dimension name="Weight" xvalue="700"/>
+ </location>
+ </source>
+ </sources>
+</designspace>
diff --git a/Tests/varLib/data/master_cff2/TestCFF2_Black.ttx b/Tests/varLib/data/master_cff2/TestCFF2_Black.ttx
index 7270a16..8b633f1 100644
--- a/Tests/varLib/data/master_cff2/TestCFF2_Black.ttx
+++ b/Tests/varLib/data/master_cff2/TestCFF2_Black.ttx
@@ -495,7 +495,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="dollar.a"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/master_cff2/TestCFF2_ExtraLight.ttx b/Tests/varLib/data/master_cff2/TestCFF2_ExtraLight.ttx
index 41dbb75..aae43aa 100644
--- a/Tests/varLib/data/master_cff2/TestCFF2_ExtraLight.ttx
+++ b/Tests/varLib/data/master_cff2/TestCFF2_ExtraLight.ttx
@@ -495,7 +495,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="dollar.a"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/master_cff2/TestCFF2_Regular.ttx b/Tests/varLib/data/master_cff2/TestCFF2_Regular.ttx
index 49d116c..471eb24 100644
--- a/Tests/varLib/data/master_cff2/TestCFF2_Regular.ttx
+++ b/Tests/varLib/data/master_cff2/TestCFF2_Regular.ttx
@@ -493,7 +493,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="dollar.a"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/master_cff2_input/TestCFF2_Black.ttx b/Tests/varLib/data/master_cff2_input/TestCFF2_Black.ttx
index 22f8275..3280eea 100644
--- a/Tests/varLib/data/master_cff2_input/TestCFF2_Black.ttx
+++ b/Tests/varLib/data/master_cff2_input/TestCFF2_Black.ttx
@@ -487,7 +487,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="dollar.a"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/master_cff2_input/TestCFF2_ExtraLight.ttx b/Tests/varLib/data/master_cff2_input/TestCFF2_ExtraLight.ttx
index e3a35f0..fbcf91a 100644
--- a/Tests/varLib/data/master_cff2_input/TestCFF2_ExtraLight.ttx
+++ b/Tests/varLib/data/master_cff2_input/TestCFF2_ExtraLight.ttx
@@ -487,7 +487,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="dollar.a"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/master_cff2_input/TestCFF2_Regular.ttx b/Tests/varLib/data/master_cff2_input/TestCFF2_Regular.ttx
index bf0a962..757e5b8 100644
--- a/Tests/varLib/data/master_cff2_input/TestCFF2_Regular.ttx
+++ b/Tests/varLib/data/master_cff2_input/TestCFF2_Regular.ttx
@@ -485,7 +485,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="dollar.a"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/master_incompatible_arrays/IncompatibleArrays-Bold.ttx b/Tests/varLib/data/master_incompatible_arrays/IncompatibleArrays-Bold.ttx
new file mode 100644
index 0000000..c47ecba
--- /dev/null
+++ b/Tests/varLib/data/master_incompatible_arrays/IncompatibleArrays-Bold.ttx
@@ -0,0 +1,612 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <GlyphOrder>
+ <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
+ <GlyphID id="0" name=".notdef"/>
+ <GlyphID id="1" name="A"/>
+ <GlyphID id="2" name="Aacute"/>
+ <GlyphID id="3" name="O"/>
+ <GlyphID id="4" name="V"/>
+ <GlyphID id="5" name="space"/>
+ <GlyphID id="6" name="dollar"/>
+ <GlyphID id="7" name="dollar.bold"/>
+ <GlyphID id="8" name="acutecomb"/>
+ <GlyphID id="9" name="dollar.BRACKET.500"/>
+ </GlyphOrder>
+
+ <head>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="1.0"/>
+ <fontRevision value="1.0"/>
+ <checkSumAdjustment value="0x10cb3f3"/>
+ <magicNumber value="0x5f0f3cf5"/>
+ <flags value="00000000 00000011"/>
+ <unitsPerEm value="1000"/>
+ <created value="Fri Jan 15 14:37:13 2021"/>
+ <modified value="Mon Mar 15 12:57:03 2021"/>
+ <xMin value="-141"/>
+ <yMin value="-200"/>
+ <xMax value="906"/>
+ <yMax value="949"/>
+ <macStyle value="00000000 00000001"/>
+ <lowestRecPPEM value="6"/>
+ <fontDirectionHint value="2"/>
+ <indexToLocFormat value="0"/>
+ <glyphDataFormat value="0"/>
+ </head>
+
+ <hhea>
+ <tableVersion value="0x00010000"/>
+ <ascent value="1000"/>
+ <descent value="-200"/>
+ <lineGap value="0"/>
+ <advanceWidthMax value="911"/>
+ <minLeftSideBearing value="-141"/>
+ <minRightSideBearing value="-125"/>
+ <xMaxExtent value="906"/>
+ <caretSlopeRise value="1"/>
+ <caretSlopeRun value="0"/>
+ <caretOffset value="0"/>
+ <reserved0 value="0"/>
+ <reserved1 value="0"/>
+ <reserved2 value="0"/>
+ <reserved3 value="0"/>
+ <metricDataFormat value="0"/>
+ <numberOfHMetrics value="10"/>
+ </hhea>
+
+ <maxp>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="0x10000"/>
+ <numGlyphs value="10"/>
+ <maxPoints value="52"/>
+ <maxContours value="3"/>
+ <maxCompositePoints value="16"/>
+ <maxCompositeContours value="4"/>
+ <maxZones value="1"/>
+ <maxTwilightPoints value="0"/>
+ <maxStorage value="0"/>
+ <maxFunctionDefs value="0"/>
+ <maxInstructionDefs value="0"/>
+ <maxStackElements value="0"/>
+ <maxSizeOfInstructions value="0"/>
+ <maxComponentElements value="2"/>
+ <maxComponentDepth value="1"/>
+ </maxp>
+
+ <OS_2>
+ <!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
+ will be recalculated by the compiler -->
+ <version value="4"/>
+ <xAvgCharWidth value="672"/>
+ <usWeightClass value="400"/>
+ <usWidthClass value="5"/>
+ <fsType value="00000000 00001000"/>
+ <ySubscriptXSize value="650"/>
+ <ySubscriptYSize value="600"/>
+ <ySubscriptXOffset value="0"/>
+ <ySubscriptYOffset value="75"/>
+ <ySuperscriptXSize value="650"/>
+ <ySuperscriptYSize value="600"/>
+ <ySuperscriptXOffset value="0"/>
+ <ySuperscriptYOffset value="350"/>
+ <yStrikeoutSize value="50"/>
+ <yStrikeoutPosition value="300"/>
+ <sFamilyClass value="0"/>
+ <panose>
+ <bFamilyType value="0"/>
+ <bSerifStyle value="0"/>
+ <bWeight value="0"/>
+ <bProportion value="0"/>
+ <bContrast value="0"/>
+ <bStrokeVariation value="0"/>
+ <bArmStyle value="0"/>
+ <bLetterForm value="0"/>
+ <bMidline value="0"/>
+ <bXHeight value="0"/>
+ </panose>
+ <ulUnicodeRange1 value="00000000 00000000 00000000 01000011"/>
+ <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
+ <achVendID value="NONE"/>
+ <fsSelection value="00000000 00100000"/>
+ <usFirstCharIndex value="32"/>
+ <usLastCharIndex value="769"/>
+ <sTypoAscender value="800"/>
+ <sTypoDescender value="-200"/>
+ <sTypoLineGap value="200"/>
+ <usWinAscent value="1000"/>
+ <usWinDescent value="200"/>
+ <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
+ <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
+ <sxHeight value="500"/>
+ <sCapHeight value="700"/>
+ <usDefaultChar value="0"/>
+ <usBreakChar value="32"/>
+ <usMaxContext value="2"/>
+ </OS_2>
+
+ <hmtx>
+ <mtx name=".notdef" width="500" lsb="50"/>
+ <mtx name="A" width="911" lsb="5"/>
+ <mtx name="Aacute" width="911" lsb="5"/>
+ <mtx name="O" width="715" lsb="15"/>
+ <mtx name="V" width="911" lsb="5"/>
+ <mtx name="acutecomb" width="0" lsb="-141"/>
+ <mtx name="dollar" width="600" lsb="1"/>
+ <mtx name="dollar.BRACKET.500" width="600" lsb="1"/>
+ <mtx name="dollar.bold" width="600" lsb="1"/>
+ <mtx name="space" width="300" lsb="0"/>
+ </hmtx>
+
+ <cmap>
+ <tableVersion version="0"/>
+ <cmap_format_4 platformID="0" platEncID="3" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ <cmap_format_4 platformID="3" platEncID="1" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ </cmap>
+
+ <loca>
+ <!-- The 'loca' table will be calculated by the compiler -->
+ </loca>
+
+ <glyf>
+
+ <!-- The xMin, yMin, xMax and yMax values
+ will be recalculated by the compiler. -->
+
+ <TTGlyph name=".notdef" xMin="50" yMin="-200" xMax="450" yMax="800">
+ <contour>
+ <pt x="50" y="-200" on="1"/>
+ <pt x="50" y="800" on="1"/>
+ <pt x="450" y="800" on="1"/>
+ <pt x="450" y="-200" on="1"/>
+ </contour>
+ <contour>
+ <pt x="100" y="-150" on="1"/>
+ <pt x="400" y="-150" on="1"/>
+ <pt x="400" y="750" on="1"/>
+ <pt x="100" y="750" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="A" xMin="5" yMin="0" xMax="906" yMax="700">
+ <contour>
+ <pt x="705" y="0" on="1"/>
+ <pt x="906" y="0" on="1"/>
+ <pt x="556" y="700" on="1"/>
+ <pt x="355" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="5" y="0" on="1"/>
+ <pt x="206" y="0" on="1"/>
+ <pt x="556" y="700" on="1"/>
+ <pt x="355" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="640" y="311" on="1"/>
+ <pt x="190" y="311" on="1"/>
+ <pt x="190" y="191" on="1"/>
+ <pt x="640" y="191" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="Aacute" xMin="5" yMin="0" xMax="906" yMax="949">
+ <component glyphName="A" x="0" y="0" flags="0x204"/>
+ <component glyphName="acutecomb" x="479" y="124" flags="0x4"/>
+ </TTGlyph>
+
+ <TTGlyph name="O" xMin="15" yMin="-10" xMax="670" yMax="710">
+ <contour>
+ <pt x="342" y="-10" on="1"/>
+ <pt x="172" y="-10" on="0"/>
+ <pt x="15" y="163" on="0"/>
+ <pt x="15" y="350" on="1"/>
+ <pt x="15" y="538" on="0"/>
+ <pt x="172" y="710" on="0"/>
+ <pt x="342" y="710" on="1"/>
+ <pt x="513" y="710" on="0"/>
+ <pt x="670" y="538" on="0"/>
+ <pt x="670" y="350" on="1"/>
+ <pt x="670" y="163" on="0"/>
+ <pt x="513" y="-10" on="0"/>
+ </contour>
+ <contour>
+ <pt x="342" y="153" on="1"/>
+ <pt x="419" y="153" on="0"/>
+ <pt x="490" y="247" on="0"/>
+ <pt x="490" y="350" on="1"/>
+ <pt x="490" y="453" on="0"/>
+ <pt x="419" y="547" on="0"/>
+ <pt x="342" y="547" on="1"/>
+ <pt x="266" y="547" on="0"/>
+ <pt x="195" y="453" on="0"/>
+ <pt x="195" y="350" on="1"/>
+ <pt x="195" y="247" on="0"/>
+ <pt x="266" y="153" on="0"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="V" xMin="5" yMin="0" xMax="906" yMax="700">
+ <contour>
+ <pt x="355" y="0" on="1"/>
+ <pt x="705" y="700" on="1"/>
+ <pt x="906" y="700" on="1"/>
+ <pt x="556" y="0" on="1"/>
+ </contour>
+ <contour>
+ <pt x="355" y="0" on="1"/>
+ <pt x="5" y="700" on="1"/>
+ <pt x="206" y="700" on="1"/>
+ <pt x="556" y="0" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="acutecomb" xMin="-141" yMin="630" xMax="125" yMax="825">
+ <contour>
+ <pt x="-118" y="756" on="1"/>
+ <pt x="-141" y="630" on="1"/>
+ <pt x="102" y="699" on="1"/>
+ <pt x="125" y="825" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="479" y="549" on="0"/>
+ <pt x="411" y="588" on="0"/>
+ <pt x="369" y="595" on="1"/>
+ <pt x="369" y="400" on="1"/>
+ <pt x="476" y="378" on="0"/>
+ <pt x="595" y="278" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="118" y="144" on="0"/>
+ <pt x="195" y="106" on="0"/>
+ <pt x="249" y="100" on="1"/>
+ <pt x="249" y="273" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="294" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <contour>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="480" on="0"/>
+ <pt x="166" y="453" on="0"/>
+ <pt x="208" y="434" on="0"/>
+ <pt x="249" y="424" on="1"/>
+ <pt x="249" y="595" on="1"/>
+ <pt x="199" y="587" on="0"/>
+ <pt x="152" y="538" on="0"/>
+ </contour>
+ <contour>
+ <pt x="369" y="100" on="1"/>
+ <pt x="426" y="107" on="0"/>
+ <pt x="471" y="150" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="201" on="0"/>
+ <pt x="456" y="225" on="0"/>
+ <pt x="412" y="243" on="0"/>
+ <pt x="369" y="252" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.BRACKET.500" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="468" y="560" on="0"/>
+ <pt x="374" y="600" on="0"/>
+ <pt x="308" y="600" on="1"/>
+ <pt x="227" y="600" on="0"/>
+ <pt x="152" y="548" on="0"/>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="479" on="0"/>
+ <pt x="168" y="450" on="0"/>
+ <pt x="217" y="431" on="0"/>
+ <pt x="264" y="421" on="1"/>
+ <pt x="363" y="401" on="1"/>
+ <pt x="473" y="379" on="0"/>
+ <pt x="595" y="279" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="112" y="150" on="0"/>
+ <pt x="176" y="114" on="0"/>
+ <pt x="256" y="97" on="0"/>
+ <pt x="310" y="97" on="1"/>
+ <pt x="402" y="97" on="0"/>
+ <pt x="471" y="143" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="203" on="0"/>
+ <pt x="453" y="228" on="0"/>
+ <pt x="399" y="247" on="0"/>
+ <pt x="345" y="256" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="293" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.bold" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="468" y="560" on="0"/>
+ <pt x="374" y="600" on="0"/>
+ <pt x="308" y="600" on="1"/>
+ <pt x="227" y="600" on="0"/>
+ <pt x="152" y="548" on="0"/>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="479" on="0"/>
+ <pt x="168" y="450" on="0"/>
+ <pt x="217" y="431" on="0"/>
+ <pt x="264" y="421" on="1"/>
+ <pt x="363" y="401" on="1"/>
+ <pt x="473" y="379" on="0"/>
+ <pt x="595" y="279" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="112" y="150" on="0"/>
+ <pt x="176" y="114" on="0"/>
+ <pt x="256" y="97" on="0"/>
+ <pt x="310" y="97" on="1"/>
+ <pt x="402" y="97" on="0"/>
+ <pt x="471" y="143" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="203" on="0"/>
+ <pt x="453" y="228" on="0"/>
+ <pt x="399" y="247" on="0"/>
+ <pt x="345" y="256" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="293" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="space"/><!-- contains no outline data -->
+
+ </glyf>
+
+ <name>
+ <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis
+ </namerecord>
+ <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
+ Bold
+ </namerecord>
+ <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
+ 1.000;NONE;SimpleTwoAxis-Bold
+ </namerecord>
+ <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis Bold
+ </namerecord>
+ <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
+ Version 1.000
+ </namerecord>
+ <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
+ SimpleTwoAxis-Bold
+ </namerecord>
+ </name>
+
+ <post>
+ <formatType value="2.0"/>
+ <italicAngle value="0.0"/>
+ <underlinePosition value="-100"/>
+ <underlineThickness value="50"/>
+ <isFixedPitch value="0"/>
+ <minMemType42 value="0"/>
+ <maxMemType42 value="0"/>
+ <minMemType1 value="0"/>
+ <maxMemType1 value="0"/>
+ <psNames>
+ <!-- This file uses unique glyph names based on the information
+ found in the 'post' table. Since these names might not be unique,
+ we have to invent artificial names in case of clashes. In order to
+ be able to retain the original information, we need a name to
+ ps name mapping for those cases where they differ. That's what
+ you see below.
+ -->
+ </psNames>
+ <extraNames>
+ <!-- following are the name that are not taken from the standard Mac glyph order -->
+ <psName name="dollar.bold"/>
+ <psName name="acutecomb"/>
+ <psName name="dollar.BRACKET.500"/>
+ </extraNames>
+ </post>
+
+ <GDEF>
+ <Version value="0x00010000"/>
+ <GlyphClassDef>
+ <ClassDef glyph="A" class="1"/>
+ <ClassDef glyph="Aacute" class="1"/>
+ <ClassDef glyph="acutecomb" class="3"/>
+ </GlyphClassDef>
+ </GDEF>
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ </ScriptList>
+ <FeatureList>
+ <!-- FeatureCount=2 -->
+ <FeatureRecord index="0">
+ <FeatureTag value="kern"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ <FeatureRecord index="1">
+ <FeatureTag value="mark"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="1"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=2 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="8"/><!-- ignoreMarks -->
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="1">
+ <Coverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ <Glyph value="V"/>
+ </Coverage>
+ <ValueFormat1 value="4"/>
+ <ValueFormat2 value="0"/>
+ <!-- PairSetCount=3 -->
+ <PairSet index="0">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="1">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="2">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="O"/>
+ <Value1 XAdvance="-20"/>
+ </PairValueRecord>
+ </PairSet>
+ </PairPos>
+ </Lookup>
+ <Lookup index="1">
+ <LookupType value="4"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
+ <MarkBasePos index="0" Format="1">
+ <MarkCoverage>
+ <Glyph value="acutecomb"/>
+ </MarkCoverage>
+ <BaseCoverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ </BaseCoverage>
+ <!-- ClassCount=1 -->
+ <MarkArray>
+ <!-- MarkCount=1 -->
+ <MarkRecord index="0">
+ <Class value="0"/>
+ <MarkAnchor Format="1">
+ <XCoordinate value="4"/>
+ <YCoordinate value="623"/>
+ </MarkAnchor>
+ </MarkRecord>
+ </MarkArray>
+ <BaseArray>
+ <!-- BaseCount=2 -->
+ <BaseRecord index="0">
+ <BaseAnchor index="0" Format="1">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ <BaseRecord index="1">
+ <BaseAnchor index="0" Format="1">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ </BaseArray>
+ </MarkBasePos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/varLib/data/master_incompatible_arrays/IncompatibleArrays-Regular.ttx b/Tests/varLib/data/master_incompatible_arrays/IncompatibleArrays-Regular.ttx
new file mode 100644
index 0000000..cabb69a
--- /dev/null
+++ b/Tests/varLib/data/master_incompatible_arrays/IncompatibleArrays-Regular.ttx
@@ -0,0 +1,626 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <GlyphOrder>
+ <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
+ <GlyphID id="0" name=".notdef"/>
+ <GlyphID id="1" name="A"/>
+ <GlyphID id="2" name="Aacute"/>
+ <GlyphID id="3" name="O"/>
+ <GlyphID id="4" name="V"/>
+ <GlyphID id="5" name="space"/>
+ <GlyphID id="6" name="dollar"/>
+ <GlyphID id="7" name="dollar.bold"/>
+ <GlyphID id="8" name="acutecomb"/>
+ <GlyphID id="9" name="dollar.BRACKET.500"/>
+ </GlyphOrder>
+
+ <head>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="1.0"/>
+ <fontRevision value="1.0"/>
+ <checkSumAdjustment value="0x3c7bc79b"/>
+ <magicNumber value="0x5f0f3cf5"/>
+ <flags value="00000000 00000011"/>
+ <unitsPerEm value="1000"/>
+ <created value="Fri Jan 15 14:37:13 2021"/>
+ <modified value="Mon Mar 15 12:57:03 2021"/>
+ <xMin value="-141"/>
+ <yMin value="-200"/>
+ <xMax value="751"/>
+ <yMax value="915"/>
+ <macStyle value="00000000 00000000"/>
+ <lowestRecPPEM value="6"/>
+ <fontDirectionHint value="2"/>
+ <indexToLocFormat value="0"/>
+ <glyphDataFormat value="0"/>
+ </head>
+
+ <hhea>
+ <tableVersion value="0x00010000"/>
+ <ascent value="1000"/>
+ <descent value="-200"/>
+ <lineGap value="0"/>
+ <advanceWidthMax value="756"/>
+ <minLeftSideBearing value="-141"/>
+ <minRightSideBearing value="-125"/>
+ <xMaxExtent value="751"/>
+ <caretSlopeRise value="1"/>
+ <caretSlopeRun value="0"/>
+ <caretOffset value="0"/>
+ <reserved0 value="0"/>
+ <reserved1 value="0"/>
+ <reserved2 value="0"/>
+ <reserved3 value="0"/>
+ <metricDataFormat value="0"/>
+ <numberOfHMetrics value="10"/>
+ </hhea>
+
+ <maxp>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="0x10000"/>
+ <numGlyphs value="10"/>
+ <maxPoints value="52"/>
+ <maxContours value="3"/>
+ <maxCompositePoints value="16"/>
+ <maxCompositeContours value="4"/>
+ <maxZones value="1"/>
+ <maxTwilightPoints value="0"/>
+ <maxStorage value="0"/>
+ <maxFunctionDefs value="0"/>
+ <maxInstructionDefs value="0"/>
+ <maxStackElements value="0"/>
+ <maxSizeOfInstructions value="0"/>
+ <maxComponentElements value="2"/>
+ <maxComponentDepth value="1"/>
+ </maxp>
+
+ <OS_2>
+ <!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
+ will be recalculated by the compiler -->
+ <version value="4"/>
+ <xAvgCharWidth value="604"/>
+ <usWeightClass value="400"/>
+ <usWidthClass value="5"/>
+ <fsType value="00000000 00001000"/>
+ <ySubscriptXSize value="650"/>
+ <ySubscriptYSize value="600"/>
+ <ySubscriptXOffset value="0"/>
+ <ySubscriptYOffset value="75"/>
+ <ySuperscriptXSize value="650"/>
+ <ySuperscriptYSize value="600"/>
+ <ySuperscriptXOffset value="0"/>
+ <ySuperscriptYOffset value="350"/>
+ <yStrikeoutSize value="50"/>
+ <yStrikeoutPosition value="300"/>
+ <sFamilyClass value="0"/>
+ <panose>
+ <bFamilyType value="0"/>
+ <bSerifStyle value="0"/>
+ <bWeight value="0"/>
+ <bProportion value="0"/>
+ <bContrast value="0"/>
+ <bStrokeVariation value="0"/>
+ <bArmStyle value="0"/>
+ <bLetterForm value="0"/>
+ <bMidline value="0"/>
+ <bXHeight value="0"/>
+ </panose>
+ <ulUnicodeRange1 value="00000000 00000000 00000000 01000011"/>
+ <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
+ <achVendID value="NONE"/>
+ <fsSelection value="00000000 01000000"/>
+ <usFirstCharIndex value="32"/>
+ <usLastCharIndex value="769"/>
+ <sTypoAscender value="800"/>
+ <sTypoDescender value="-200"/>
+ <sTypoLineGap value="200"/>
+ <usWinAscent value="1000"/>
+ <usWinDescent value="200"/>
+ <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
+ <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
+ <sxHeight value="500"/>
+ <sCapHeight value="700"/>
+ <usDefaultChar value="0"/>
+ <usBreakChar value="32"/>
+ <usMaxContext value="2"/>
+ </OS_2>
+
+ <hmtx>
+ <mtx name=".notdef" width="500" lsb="50"/>
+ <mtx name="A" width="756" lsb="5"/>
+ <mtx name="Aacute" width="756" lsb="5"/>
+ <mtx name="O" width="664" lsb="30"/>
+ <mtx name="V" width="756" lsb="5"/>
+ <mtx name="acutecomb" width="0" lsb="-141"/>
+ <mtx name="dollar" width="600" lsb="29"/>
+ <mtx name="dollar.BRACKET.500" width="600" lsb="29"/>
+ <mtx name="dollar.bold" width="600" lsb="29"/>
+ <mtx name="space" width="200" lsb="0"/>
+ </hmtx>
+
+ <cmap>
+ <tableVersion version="0"/>
+ <cmap_format_4 platformID="0" platEncID="3" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ <cmap_format_4 platformID="3" platEncID="1" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ </cmap>
+
+ <loca>
+ <!-- The 'loca' table will be calculated by the compiler -->
+ </loca>
+
+ <glyf>
+
+ <!-- The xMin, yMin, xMax and yMax values
+ will be recalculated by the compiler. -->
+
+ <TTGlyph name=".notdef" xMin="50" yMin="-200" xMax="450" yMax="800">
+ <contour>
+ <pt x="50" y="-200" on="1"/>
+ <pt x="50" y="800" on="1"/>
+ <pt x="450" y="800" on="1"/>
+ <pt x="450" y="-200" on="1"/>
+ </contour>
+ <contour>
+ <pt x="100" y="-150" on="1"/>
+ <pt x="400" y="-150" on="1"/>
+ <pt x="400" y="750" on="1"/>
+ <pt x="100" y="750" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="A" xMin="5" yMin="0" xMax="751" yMax="700">
+ <contour>
+ <pt x="641" y="0" on="1"/>
+ <pt x="751" y="0" on="1"/>
+ <pt x="433" y="700" on="1"/>
+ <pt x="323" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="5" y="0" on="1"/>
+ <pt x="115" y="0" on="1"/>
+ <pt x="433" y="700" on="1"/>
+ <pt x="323" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="567" y="284" on="1"/>
+ <pt x="152" y="284" on="1"/>
+ <pt x="152" y="204" on="1"/>
+ <pt x="567" y="204" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="Aacute" xMin="5" yMin="0" xMax="751" yMax="915">
+ <component glyphName="A" x="0" y="0" flags="0x204"/>
+ <component glyphName="acutecomb" x="402" y="130" flags="0x4"/>
+ </TTGlyph>
+
+ <TTGlyph name="O" xMin="30" yMin="-10" xMax="634" yMax="710">
+ <contour>
+ <pt x="332" y="-10" on="1"/>
+ <pt x="181" y="-10" on="0"/>
+ <pt x="30" y="169" on="0"/>
+ <pt x="30" y="350" on="1"/>
+ <pt x="30" y="531" on="0"/>
+ <pt x="181" y="710" on="0"/>
+ <pt x="332" y="710" on="1"/>
+ <pt x="484" y="710" on="0"/>
+ <pt x="634" y="531" on="0"/>
+ <pt x="634" y="350" on="1"/>
+ <pt x="634" y="169" on="0"/>
+ <pt x="484" y="-10" on="0"/>
+ </contour>
+ <contour>
+ <pt x="332" y="74" on="1"/>
+ <pt x="438" y="74" on="0"/>
+ <pt x="544" y="212" on="0"/>
+ <pt x="544" y="350" on="1"/>
+ <pt x="544" y="488" on="0"/>
+ <pt x="438" y="626" on="0"/>
+ <pt x="332" y="626" on="1"/>
+ <pt x="226" y="626" on="0"/>
+ <pt x="120" y="488" on="0"/>
+ <pt x="120" y="350" on="1"/>
+ <pt x="120" y="212" on="0"/>
+ <pt x="226" y="74" on="0"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="V" xMin="5" yMin="0" xMax="751" yMax="700">
+ <contour>
+ <pt x="323" y="0" on="1"/>
+ <pt x="641" y="700" on="1"/>
+ <pt x="751" y="700" on="1"/>
+ <pt x="433" y="0" on="1"/>
+ </contour>
+ <contour>
+ <pt x="323" y="0" on="1"/>
+ <pt x="5" y="700" on="1"/>
+ <pt x="115" y="700" on="1"/>
+ <pt x="433" y="0" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="acutecomb" xMin="-141" yMin="630" xMax="125" yMax="785">
+ <contour>
+ <pt x="-118" y="716" on="1"/>
+ <pt x="-141" y="630" on="1"/>
+ <pt x="102" y="699" on="1"/>
+ <pt x="125" y="785" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar" xMin="29" yMin="-68" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="473" y="584" on="0"/>
+ <pt x="398" y="621" on="0"/>
+ <pt x="354" y="627" on="1"/>
+ <pt x="354" y="373" on="1"/>
+ <pt x="467" y="351" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-68" on="1"/>
+ <pt x="264" y="-68" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="123" y="110" on="0"/>
+ <pt x="207" y="73" on="0"/>
+ <pt x="264" y="69" on="1"/>
+ <pt x="264" y="301" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <contour>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="264" y="627" on="1"/>
+ <pt x="203" y="618" on="0"/>
+ <pt x="137" y="553" on="0"/>
+ </contour>
+ <contour>
+ <pt x="354" y="69" on="1"/>
+ <pt x="423" y="76" on="0"/>
+ <pt x="486" y="135" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="211" on="0"/>
+ <pt x="462" y="250" on="0"/>
+ <pt x="405" y="275" on="0"/>
+ <pt x="354" y="285" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.BRACKET.500" xMin="29" yMin="-76" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="464" y="592" on="0"/>
+ <pt x="370" y="630" on="0"/>
+ <pt x="308" y="630" on="1"/>
+ <pt x="226" y="630" on="0"/>
+ <pt x="137" y="562" on="0"/>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="360" y="372" on="1"/>
+ <pt x="469" y="350" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-76" on="1"/>
+ <pt x="264" y="-76" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="115" y="118" on="0"/>
+ <pt x="180" y="83" on="0"/>
+ <pt x="259" y="67" on="0"/>
+ <pt x="310" y="67" on="1"/>
+ <pt x="403" y="67" on="0"/>
+ <pt x="486" y="128" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="212" on="0"/>
+ <pt x="461" y="251" on="0"/>
+ <pt x="401" y="277" on="0"/>
+ <pt x="348" y="286" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.bold" xMin="29" yMin="-76" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="464" y="592" on="0"/>
+ <pt x="370" y="630" on="0"/>
+ <pt x="308" y="630" on="1"/>
+ <pt x="226" y="630" on="0"/>
+ <pt x="137" y="562" on="0"/>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="360" y="372" on="1"/>
+ <pt x="469" y="350" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-76" on="1"/>
+ <pt x="264" y="-76" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="115" y="118" on="0"/>
+ <pt x="180" y="83" on="0"/>
+ <pt x="259" y="67" on="0"/>
+ <pt x="310" y="67" on="1"/>
+ <pt x="403" y="67" on="0"/>
+ <pt x="486" y="128" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="212" on="0"/>
+ <pt x="461" y="251" on="0"/>
+ <pt x="401" y="277" on="0"/>
+ <pt x="348" y="286" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="space"/><!-- contains no outline data -->
+
+ </glyf>
+
+ <name>
+ <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis
+ </namerecord>
+ <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
+ Regular
+ </namerecord>
+ <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
+ 1.000;NONE;SimpleTwoAxis-Regular
+ </namerecord>
+ <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis Regular
+ </namerecord>
+ <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
+ Version 1.000
+ </namerecord>
+ <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
+ SimpleTwoAxis-Regular
+ </namerecord>
+ </name>
+
+ <post>
+ <formatType value="2.0"/>
+ <italicAngle value="0.0"/>
+ <underlinePosition value="-100"/>
+ <underlineThickness value="50"/>
+ <isFixedPitch value="0"/>
+ <minMemType42 value="0"/>
+ <maxMemType42 value="0"/>
+ <minMemType1 value="0"/>
+ <maxMemType1 value="0"/>
+ <psNames>
+ <!-- This file uses unique glyph names based on the information
+ found in the 'post' table. Since these names might not be unique,
+ we have to invent artificial names in case of clashes. In order to
+ be able to retain the original information, we need a name to
+ ps name mapping for those cases where they differ. That's what
+ you see below.
+ -->
+ </psNames>
+ <extraNames>
+ <!-- following are the name that are not taken from the standard Mac glyph order -->
+ <psName name="dollar.bold"/>
+ <psName name="acutecomb"/>
+ <psName name="dollar.BRACKET.500"/>
+ </extraNames>
+ </post>
+
+ <GDEF>
+ <Version value="0x00010000"/>
+ <GlyphClassDef>
+ <ClassDef glyph="A" class="1"/>
+ <ClassDef glyph="Aacute" class="1"/>
+ <ClassDef glyph="acutecomb" class="3"/>
+ </GlyphClassDef>
+ </GDEF>
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=1 -->
+ <ScriptRecord index="0">
+ <ScriptTag value="DFLT"/>
+ <Script>
+ <DefaultLangSys>
+ <ReqFeatureIndex value="65535"/>
+ <!-- FeatureCount=2 -->
+ <FeatureIndex index="0" value="0"/>
+ <FeatureIndex index="1" value="1"/>
+ </DefaultLangSys>
+ <!-- LangSysCount=0 -->
+ </Script>
+ </ScriptRecord>
+ </ScriptList>
+ <FeatureList>
+ <!-- FeatureCount=2 -->
+ <FeatureRecord index="0">
+ <FeatureTag value="kern"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ <FeatureRecord index="1">
+ <FeatureTag value="mark"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="1"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=2 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="8"/><!-- ignoreMarks -->
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="1">
+ <Coverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ <Glyph value="V"/>
+ </Coverage>
+ <ValueFormat1 value="4"/>
+ <ValueFormat2 value="0"/>
+ <!-- PairSetCount=3 -->
+ <PairSet index="0">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="1">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="2">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="O"/>
+ <Value1 XAdvance="-20"/>
+ </PairValueRecord>
+ </PairSet>
+ </PairPos>
+ </Lookup>
+ <Lookup index="1">
+ <LookupType value="4"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
+ <MarkBasePos index="0" Format="1">
+ <MarkCoverage>
+ <Glyph value="acutecomb"/>
+ </MarkCoverage>
+ <BaseCoverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ </BaseCoverage>
+ <!-- ClassCount=1 -->
+ <MarkArray>
+ <!-- MarkCount=1 -->
+ <MarkRecord index="0">
+ <Class value="0"/>
+ <MarkAnchor Format="1">
+ <XCoordinate value="4"/>
+ <YCoordinate value="623"/>
+ </MarkAnchor>
+ </MarkRecord>
+ </MarkArray>
+ <BaseArray>
+ <!-- BaseCount=2 -->
+ <BaseRecord index="0">
+ <BaseAnchor index="0" Format="1">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ <BaseRecord index="1">
+ <BaseAnchor index="0" Format="1">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ </BaseArray>
+ </MarkBasePos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/varLib/data/master_incompatible_features/IncompatibleFeatures-Bold.ttx b/Tests/varLib/data/master_incompatible_features/IncompatibleFeatures-Bold.ttx
new file mode 100644
index 0000000..18aee9f
--- /dev/null
+++ b/Tests/varLib/data/master_incompatible_features/IncompatibleFeatures-Bold.ttx
@@ -0,0 +1,578 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <GlyphOrder>
+ <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
+ <GlyphID id="0" name=".notdef"/>
+ <GlyphID id="1" name="A"/>
+ <GlyphID id="2" name="Aacute"/>
+ <GlyphID id="3" name="O"/>
+ <GlyphID id="4" name="V"/>
+ <GlyphID id="5" name="space"/>
+ <GlyphID id="6" name="dollar"/>
+ <GlyphID id="7" name="dollar.bold"/>
+ <GlyphID id="8" name="acutecomb"/>
+ <GlyphID id="9" name="dollar.BRACKET.500"/>
+ </GlyphOrder>
+
+ <head>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="1.0"/>
+ <fontRevision value="1.0"/>
+ <checkSumAdjustment value="0x10cb3f3"/>
+ <magicNumber value="0x5f0f3cf5"/>
+ <flags value="00000000 00000011"/>
+ <unitsPerEm value="1000"/>
+ <created value="Fri Jan 15 14:37:13 2021"/>
+ <modified value="Mon Mar 15 12:57:03 2021"/>
+ <xMin value="-141"/>
+ <yMin value="-200"/>
+ <xMax value="906"/>
+ <yMax value="949"/>
+ <macStyle value="00000000 00000001"/>
+ <lowestRecPPEM value="6"/>
+ <fontDirectionHint value="2"/>
+ <indexToLocFormat value="0"/>
+ <glyphDataFormat value="0"/>
+ </head>
+
+ <hhea>
+ <tableVersion value="0x00010000"/>
+ <ascent value="1000"/>
+ <descent value="-200"/>
+ <lineGap value="0"/>
+ <advanceWidthMax value="911"/>
+ <minLeftSideBearing value="-141"/>
+ <minRightSideBearing value="-125"/>
+ <xMaxExtent value="906"/>
+ <caretSlopeRise value="1"/>
+ <caretSlopeRun value="0"/>
+ <caretOffset value="0"/>
+ <reserved0 value="0"/>
+ <reserved1 value="0"/>
+ <reserved2 value="0"/>
+ <reserved3 value="0"/>
+ <metricDataFormat value="0"/>
+ <numberOfHMetrics value="10"/>
+ </hhea>
+
+ <maxp>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="0x10000"/>
+ <numGlyphs value="10"/>
+ <maxPoints value="52"/>
+ <maxContours value="3"/>
+ <maxCompositePoints value="16"/>
+ <maxCompositeContours value="4"/>
+ <maxZones value="1"/>
+ <maxTwilightPoints value="0"/>
+ <maxStorage value="0"/>
+ <maxFunctionDefs value="0"/>
+ <maxInstructionDefs value="0"/>
+ <maxStackElements value="0"/>
+ <maxSizeOfInstructions value="0"/>
+ <maxComponentElements value="2"/>
+ <maxComponentDepth value="1"/>
+ </maxp>
+
+ <OS_2>
+ <!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
+ will be recalculated by the compiler -->
+ <version value="4"/>
+ <xAvgCharWidth value="672"/>
+ <usWeightClass value="400"/>
+ <usWidthClass value="5"/>
+ <fsType value="00000000 00001000"/>
+ <ySubscriptXSize value="650"/>
+ <ySubscriptYSize value="600"/>
+ <ySubscriptXOffset value="0"/>
+ <ySubscriptYOffset value="75"/>
+ <ySuperscriptXSize value="650"/>
+ <ySuperscriptYSize value="600"/>
+ <ySuperscriptXOffset value="0"/>
+ <ySuperscriptYOffset value="350"/>
+ <yStrikeoutSize value="50"/>
+ <yStrikeoutPosition value="300"/>
+ <sFamilyClass value="0"/>
+ <panose>
+ <bFamilyType value="0"/>
+ <bSerifStyle value="0"/>
+ <bWeight value="0"/>
+ <bProportion value="0"/>
+ <bContrast value="0"/>
+ <bStrokeVariation value="0"/>
+ <bArmStyle value="0"/>
+ <bLetterForm value="0"/>
+ <bMidline value="0"/>
+ <bXHeight value="0"/>
+ </panose>
+ <ulUnicodeRange1 value="00000000 00000000 00000000 01000011"/>
+ <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
+ <achVendID value="NONE"/>
+ <fsSelection value="00000000 00100000"/>
+ <usFirstCharIndex value="32"/>
+ <usLastCharIndex value="769"/>
+ <sTypoAscender value="800"/>
+ <sTypoDescender value="-200"/>
+ <sTypoLineGap value="200"/>
+ <usWinAscent value="1000"/>
+ <usWinDescent value="200"/>
+ <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
+ <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
+ <sxHeight value="500"/>
+ <sCapHeight value="700"/>
+ <usDefaultChar value="0"/>
+ <usBreakChar value="32"/>
+ <usMaxContext value="2"/>
+ </OS_2>
+
+ <hmtx>
+ <mtx name=".notdef" width="500" lsb="50"/>
+ <mtx name="A" width="911" lsb="5"/>
+ <mtx name="Aacute" width="911" lsb="5"/>
+ <mtx name="O" width="715" lsb="15"/>
+ <mtx name="V" width="911" lsb="5"/>
+ <mtx name="acutecomb" width="0" lsb="-141"/>
+ <mtx name="dollar" width="600" lsb="1"/>
+ <mtx name="dollar.BRACKET.500" width="600" lsb="1"/>
+ <mtx name="dollar.bold" width="600" lsb="1"/>
+ <mtx name="space" width="300" lsb="0"/>
+ </hmtx>
+
+ <cmap>
+ <tableVersion version="0"/>
+ <cmap_format_4 platformID="0" platEncID="3" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ <cmap_format_4 platformID="3" platEncID="1" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ </cmap>
+
+ <loca>
+ <!-- The 'loca' table will be calculated by the compiler -->
+ </loca>
+
+ <glyf>
+
+ <!-- The xMin, yMin, xMax and yMax values
+ will be recalculated by the compiler. -->
+
+ <TTGlyph name=".notdef" xMin="50" yMin="-200" xMax="450" yMax="800">
+ <contour>
+ <pt x="50" y="-200" on="1"/>
+ <pt x="50" y="800" on="1"/>
+ <pt x="450" y="800" on="1"/>
+ <pt x="450" y="-200" on="1"/>
+ </contour>
+ <contour>
+ <pt x="100" y="-150" on="1"/>
+ <pt x="400" y="-150" on="1"/>
+ <pt x="400" y="750" on="1"/>
+ <pt x="100" y="750" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="A" xMin="5" yMin="0" xMax="906" yMax="700">
+ <contour>
+ <pt x="705" y="0" on="1"/>
+ <pt x="906" y="0" on="1"/>
+ <pt x="556" y="700" on="1"/>
+ <pt x="355" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="5" y="0" on="1"/>
+ <pt x="206" y="0" on="1"/>
+ <pt x="556" y="700" on="1"/>
+ <pt x="355" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="640" y="311" on="1"/>
+ <pt x="190" y="311" on="1"/>
+ <pt x="190" y="191" on="1"/>
+ <pt x="640" y="191" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="Aacute" xMin="5" yMin="0" xMax="906" yMax="949">
+ <component glyphName="A" x="0" y="0" flags="0x204"/>
+ <component glyphName="acutecomb" x="479" y="124" flags="0x4"/>
+ </TTGlyph>
+
+ <TTGlyph name="O" xMin="15" yMin="-10" xMax="670" yMax="710">
+ <contour>
+ <pt x="342" y="-10" on="1"/>
+ <pt x="172" y="-10" on="0"/>
+ <pt x="15" y="163" on="0"/>
+ <pt x="15" y="350" on="1"/>
+ <pt x="15" y="538" on="0"/>
+ <pt x="172" y="710" on="0"/>
+ <pt x="342" y="710" on="1"/>
+ <pt x="513" y="710" on="0"/>
+ <pt x="670" y="538" on="0"/>
+ <pt x="670" y="350" on="1"/>
+ <pt x="670" y="163" on="0"/>
+ <pt x="513" y="-10" on="0"/>
+ </contour>
+ <contour>
+ <pt x="342" y="153" on="1"/>
+ <pt x="419" y="153" on="0"/>
+ <pt x="490" y="247" on="0"/>
+ <pt x="490" y="350" on="1"/>
+ <pt x="490" y="453" on="0"/>
+ <pt x="419" y="547" on="0"/>
+ <pt x="342" y="547" on="1"/>
+ <pt x="266" y="547" on="0"/>
+ <pt x="195" y="453" on="0"/>
+ <pt x="195" y="350" on="1"/>
+ <pt x="195" y="247" on="0"/>
+ <pt x="266" y="153" on="0"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="V" xMin="5" yMin="0" xMax="906" yMax="700">
+ <contour>
+ <pt x="355" y="0" on="1"/>
+ <pt x="705" y="700" on="1"/>
+ <pt x="906" y="700" on="1"/>
+ <pt x="556" y="0" on="1"/>
+ </contour>
+ <contour>
+ <pt x="355" y="0" on="1"/>
+ <pt x="5" y="700" on="1"/>
+ <pt x="206" y="700" on="1"/>
+ <pt x="556" y="0" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="acutecomb" xMin="-141" yMin="630" xMax="125" yMax="825">
+ <contour>
+ <pt x="-118" y="756" on="1"/>
+ <pt x="-141" y="630" on="1"/>
+ <pt x="102" y="699" on="1"/>
+ <pt x="125" y="825" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="479" y="549" on="0"/>
+ <pt x="411" y="588" on="0"/>
+ <pt x="369" y="595" on="1"/>
+ <pt x="369" y="400" on="1"/>
+ <pt x="476" y="378" on="0"/>
+ <pt x="595" y="278" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="118" y="144" on="0"/>
+ <pt x="195" y="106" on="0"/>
+ <pt x="249" y="100" on="1"/>
+ <pt x="249" y="273" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="294" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <contour>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="480" on="0"/>
+ <pt x="166" y="453" on="0"/>
+ <pt x="208" y="434" on="0"/>
+ <pt x="249" y="424" on="1"/>
+ <pt x="249" y="595" on="1"/>
+ <pt x="199" y="587" on="0"/>
+ <pt x="152" y="538" on="0"/>
+ </contour>
+ <contour>
+ <pt x="369" y="100" on="1"/>
+ <pt x="426" y="107" on="0"/>
+ <pt x="471" y="150" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="201" on="0"/>
+ <pt x="456" y="225" on="0"/>
+ <pt x="412" y="243" on="0"/>
+ <pt x="369" y="252" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.BRACKET.500" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="468" y="560" on="0"/>
+ <pt x="374" y="600" on="0"/>
+ <pt x="308" y="600" on="1"/>
+ <pt x="227" y="600" on="0"/>
+ <pt x="152" y="548" on="0"/>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="479" on="0"/>
+ <pt x="168" y="450" on="0"/>
+ <pt x="217" y="431" on="0"/>
+ <pt x="264" y="421" on="1"/>
+ <pt x="363" y="401" on="1"/>
+ <pt x="473" y="379" on="0"/>
+ <pt x="595" y="279" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="112" y="150" on="0"/>
+ <pt x="176" y="114" on="0"/>
+ <pt x="256" y="97" on="0"/>
+ <pt x="310" y="97" on="1"/>
+ <pt x="402" y="97" on="0"/>
+ <pt x="471" y="143" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="203" on="0"/>
+ <pt x="453" y="228" on="0"/>
+ <pt x="399" y="247" on="0"/>
+ <pt x="345" y="256" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="293" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.bold" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="468" y="560" on="0"/>
+ <pt x="374" y="600" on="0"/>
+ <pt x="308" y="600" on="1"/>
+ <pt x="227" y="600" on="0"/>
+ <pt x="152" y="548" on="0"/>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="479" on="0"/>
+ <pt x="168" y="450" on="0"/>
+ <pt x="217" y="431" on="0"/>
+ <pt x="264" y="421" on="1"/>
+ <pt x="363" y="401" on="1"/>
+ <pt x="473" y="379" on="0"/>
+ <pt x="595" y="279" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="112" y="150" on="0"/>
+ <pt x="176" y="114" on="0"/>
+ <pt x="256" y="97" on="0"/>
+ <pt x="310" y="97" on="1"/>
+ <pt x="402" y="97" on="0"/>
+ <pt x="471" y="143" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="203" on="0"/>
+ <pt x="453" y="228" on="0"/>
+ <pt x="399" y="247" on="0"/>
+ <pt x="345" y="256" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="293" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="space"/><!-- contains no outline data -->
+
+ </glyf>
+
+ <name>
+ <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis
+ </namerecord>
+ <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
+ Bold
+ </namerecord>
+ <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
+ 1.000;NONE;SimpleTwoAxis-Bold
+ </namerecord>
+ <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis Bold
+ </namerecord>
+ <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
+ Version 1.000
+ </namerecord>
+ <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
+ SimpleTwoAxis-Bold
+ </namerecord>
+ </name>
+
+ <post>
+ <formatType value="2.0"/>
+ <italicAngle value="0.0"/>
+ <underlinePosition value="-100"/>
+ <underlineThickness value="50"/>
+ <isFixedPitch value="0"/>
+ <minMemType42 value="0"/>
+ <maxMemType42 value="0"/>
+ <minMemType1 value="0"/>
+ <maxMemType1 value="0"/>
+ <psNames>
+ <!-- This file uses unique glyph names based on the information
+ found in the 'post' table. Since these names might not be unique,
+ we have to invent artificial names in case of clashes. In order to
+ be able to retain the original information, we need a name to
+ ps name mapping for those cases where they differ. That's what
+ you see below.
+ -->
+ </psNames>
+ <extraNames>
+ <!-- following are the name that are not taken from the standard Mac glyph order -->
+ <psName name="dollar.bold"/>
+ <psName name="acutecomb"/>
+ <psName name="dollar.BRACKET.500"/>
+ </extraNames>
+ </post>
+
+ <GDEF>
+ <Version value="0x00010000"/>
+ <GlyphClassDef>
+ <ClassDef glyph="A" class="1"/>
+ <ClassDef glyph="Aacute" class="1"/>
+ <ClassDef glyph="acutecomb" class="3"/>
+ </GlyphClassDef>
+ </GDEF>
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=1 -->
+ <ScriptRecord index="0">
+ <ScriptTag value="DFLT"/>
+ <Script>
+ <DefaultLangSys>
+ <ReqFeatureIndex value="65535"/>
+ <!-- FeatureCount=2 -->
+ <FeatureIndex index="0" value="0"/>
+ </DefaultLangSys>
+ <!-- LangSysCount=0 -->
+ </Script>
+ </ScriptRecord>
+ </ScriptList>
+ <FeatureList>
+ <!-- FeatureCount=2 -->
+ <FeatureRecord index="0">
+ <FeatureTag value="kern"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=2 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="8"/><!-- ignoreMarks -->
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="1">
+ <Coverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ <Glyph value="V"/>
+ </Coverage>
+ <ValueFormat1 value="4"/>
+ <ValueFormat2 value="0"/>
+ <!-- PairSetCount=3 -->
+ <PairSet index="0">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-120"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="1">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-120"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="2">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="O"/>
+ <Value1 XAdvance="-20"/>
+ </PairValueRecord>
+ </PairSet>
+ </PairPos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/varLib/data/master_incompatible_features/IncompatibleFeatures-Regular.ttx b/Tests/varLib/data/master_incompatible_features/IncompatibleFeatures-Regular.ttx
new file mode 100644
index 0000000..cabb69a
--- /dev/null
+++ b/Tests/varLib/data/master_incompatible_features/IncompatibleFeatures-Regular.ttx
@@ -0,0 +1,626 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <GlyphOrder>
+ <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
+ <GlyphID id="0" name=".notdef"/>
+ <GlyphID id="1" name="A"/>
+ <GlyphID id="2" name="Aacute"/>
+ <GlyphID id="3" name="O"/>
+ <GlyphID id="4" name="V"/>
+ <GlyphID id="5" name="space"/>
+ <GlyphID id="6" name="dollar"/>
+ <GlyphID id="7" name="dollar.bold"/>
+ <GlyphID id="8" name="acutecomb"/>
+ <GlyphID id="9" name="dollar.BRACKET.500"/>
+ </GlyphOrder>
+
+ <head>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="1.0"/>
+ <fontRevision value="1.0"/>
+ <checkSumAdjustment value="0x3c7bc79b"/>
+ <magicNumber value="0x5f0f3cf5"/>
+ <flags value="00000000 00000011"/>
+ <unitsPerEm value="1000"/>
+ <created value="Fri Jan 15 14:37:13 2021"/>
+ <modified value="Mon Mar 15 12:57:03 2021"/>
+ <xMin value="-141"/>
+ <yMin value="-200"/>
+ <xMax value="751"/>
+ <yMax value="915"/>
+ <macStyle value="00000000 00000000"/>
+ <lowestRecPPEM value="6"/>
+ <fontDirectionHint value="2"/>
+ <indexToLocFormat value="0"/>
+ <glyphDataFormat value="0"/>
+ </head>
+
+ <hhea>
+ <tableVersion value="0x00010000"/>
+ <ascent value="1000"/>
+ <descent value="-200"/>
+ <lineGap value="0"/>
+ <advanceWidthMax value="756"/>
+ <minLeftSideBearing value="-141"/>
+ <minRightSideBearing value="-125"/>
+ <xMaxExtent value="751"/>
+ <caretSlopeRise value="1"/>
+ <caretSlopeRun value="0"/>
+ <caretOffset value="0"/>
+ <reserved0 value="0"/>
+ <reserved1 value="0"/>
+ <reserved2 value="0"/>
+ <reserved3 value="0"/>
+ <metricDataFormat value="0"/>
+ <numberOfHMetrics value="10"/>
+ </hhea>
+
+ <maxp>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="0x10000"/>
+ <numGlyphs value="10"/>
+ <maxPoints value="52"/>
+ <maxContours value="3"/>
+ <maxCompositePoints value="16"/>
+ <maxCompositeContours value="4"/>
+ <maxZones value="1"/>
+ <maxTwilightPoints value="0"/>
+ <maxStorage value="0"/>
+ <maxFunctionDefs value="0"/>
+ <maxInstructionDefs value="0"/>
+ <maxStackElements value="0"/>
+ <maxSizeOfInstructions value="0"/>
+ <maxComponentElements value="2"/>
+ <maxComponentDepth value="1"/>
+ </maxp>
+
+ <OS_2>
+ <!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
+ will be recalculated by the compiler -->
+ <version value="4"/>
+ <xAvgCharWidth value="604"/>
+ <usWeightClass value="400"/>
+ <usWidthClass value="5"/>
+ <fsType value="00000000 00001000"/>
+ <ySubscriptXSize value="650"/>
+ <ySubscriptYSize value="600"/>
+ <ySubscriptXOffset value="0"/>
+ <ySubscriptYOffset value="75"/>
+ <ySuperscriptXSize value="650"/>
+ <ySuperscriptYSize value="600"/>
+ <ySuperscriptXOffset value="0"/>
+ <ySuperscriptYOffset value="350"/>
+ <yStrikeoutSize value="50"/>
+ <yStrikeoutPosition value="300"/>
+ <sFamilyClass value="0"/>
+ <panose>
+ <bFamilyType value="0"/>
+ <bSerifStyle value="0"/>
+ <bWeight value="0"/>
+ <bProportion value="0"/>
+ <bContrast value="0"/>
+ <bStrokeVariation value="0"/>
+ <bArmStyle value="0"/>
+ <bLetterForm value="0"/>
+ <bMidline value="0"/>
+ <bXHeight value="0"/>
+ </panose>
+ <ulUnicodeRange1 value="00000000 00000000 00000000 01000011"/>
+ <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
+ <achVendID value="NONE"/>
+ <fsSelection value="00000000 01000000"/>
+ <usFirstCharIndex value="32"/>
+ <usLastCharIndex value="769"/>
+ <sTypoAscender value="800"/>
+ <sTypoDescender value="-200"/>
+ <sTypoLineGap value="200"/>
+ <usWinAscent value="1000"/>
+ <usWinDescent value="200"/>
+ <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
+ <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
+ <sxHeight value="500"/>
+ <sCapHeight value="700"/>
+ <usDefaultChar value="0"/>
+ <usBreakChar value="32"/>
+ <usMaxContext value="2"/>
+ </OS_2>
+
+ <hmtx>
+ <mtx name=".notdef" width="500" lsb="50"/>
+ <mtx name="A" width="756" lsb="5"/>
+ <mtx name="Aacute" width="756" lsb="5"/>
+ <mtx name="O" width="664" lsb="30"/>
+ <mtx name="V" width="756" lsb="5"/>
+ <mtx name="acutecomb" width="0" lsb="-141"/>
+ <mtx name="dollar" width="600" lsb="29"/>
+ <mtx name="dollar.BRACKET.500" width="600" lsb="29"/>
+ <mtx name="dollar.bold" width="600" lsb="29"/>
+ <mtx name="space" width="200" lsb="0"/>
+ </hmtx>
+
+ <cmap>
+ <tableVersion version="0"/>
+ <cmap_format_4 platformID="0" platEncID="3" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ <cmap_format_4 platformID="3" platEncID="1" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ </cmap>
+
+ <loca>
+ <!-- The 'loca' table will be calculated by the compiler -->
+ </loca>
+
+ <glyf>
+
+ <!-- The xMin, yMin, xMax and yMax values
+ will be recalculated by the compiler. -->
+
+ <TTGlyph name=".notdef" xMin="50" yMin="-200" xMax="450" yMax="800">
+ <contour>
+ <pt x="50" y="-200" on="1"/>
+ <pt x="50" y="800" on="1"/>
+ <pt x="450" y="800" on="1"/>
+ <pt x="450" y="-200" on="1"/>
+ </contour>
+ <contour>
+ <pt x="100" y="-150" on="1"/>
+ <pt x="400" y="-150" on="1"/>
+ <pt x="400" y="750" on="1"/>
+ <pt x="100" y="750" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="A" xMin="5" yMin="0" xMax="751" yMax="700">
+ <contour>
+ <pt x="641" y="0" on="1"/>
+ <pt x="751" y="0" on="1"/>
+ <pt x="433" y="700" on="1"/>
+ <pt x="323" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="5" y="0" on="1"/>
+ <pt x="115" y="0" on="1"/>
+ <pt x="433" y="700" on="1"/>
+ <pt x="323" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="567" y="284" on="1"/>
+ <pt x="152" y="284" on="1"/>
+ <pt x="152" y="204" on="1"/>
+ <pt x="567" y="204" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="Aacute" xMin="5" yMin="0" xMax="751" yMax="915">
+ <component glyphName="A" x="0" y="0" flags="0x204"/>
+ <component glyphName="acutecomb" x="402" y="130" flags="0x4"/>
+ </TTGlyph>
+
+ <TTGlyph name="O" xMin="30" yMin="-10" xMax="634" yMax="710">
+ <contour>
+ <pt x="332" y="-10" on="1"/>
+ <pt x="181" y="-10" on="0"/>
+ <pt x="30" y="169" on="0"/>
+ <pt x="30" y="350" on="1"/>
+ <pt x="30" y="531" on="0"/>
+ <pt x="181" y="710" on="0"/>
+ <pt x="332" y="710" on="1"/>
+ <pt x="484" y="710" on="0"/>
+ <pt x="634" y="531" on="0"/>
+ <pt x="634" y="350" on="1"/>
+ <pt x="634" y="169" on="0"/>
+ <pt x="484" y="-10" on="0"/>
+ </contour>
+ <contour>
+ <pt x="332" y="74" on="1"/>
+ <pt x="438" y="74" on="0"/>
+ <pt x="544" y="212" on="0"/>
+ <pt x="544" y="350" on="1"/>
+ <pt x="544" y="488" on="0"/>
+ <pt x="438" y="626" on="0"/>
+ <pt x="332" y="626" on="1"/>
+ <pt x="226" y="626" on="0"/>
+ <pt x="120" y="488" on="0"/>
+ <pt x="120" y="350" on="1"/>
+ <pt x="120" y="212" on="0"/>
+ <pt x="226" y="74" on="0"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="V" xMin="5" yMin="0" xMax="751" yMax="700">
+ <contour>
+ <pt x="323" y="0" on="1"/>
+ <pt x="641" y="700" on="1"/>
+ <pt x="751" y="700" on="1"/>
+ <pt x="433" y="0" on="1"/>
+ </contour>
+ <contour>
+ <pt x="323" y="0" on="1"/>
+ <pt x="5" y="700" on="1"/>
+ <pt x="115" y="700" on="1"/>
+ <pt x="433" y="0" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="acutecomb" xMin="-141" yMin="630" xMax="125" yMax="785">
+ <contour>
+ <pt x="-118" y="716" on="1"/>
+ <pt x="-141" y="630" on="1"/>
+ <pt x="102" y="699" on="1"/>
+ <pt x="125" y="785" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar" xMin="29" yMin="-68" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="473" y="584" on="0"/>
+ <pt x="398" y="621" on="0"/>
+ <pt x="354" y="627" on="1"/>
+ <pt x="354" y="373" on="1"/>
+ <pt x="467" y="351" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-68" on="1"/>
+ <pt x="264" y="-68" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="123" y="110" on="0"/>
+ <pt x="207" y="73" on="0"/>
+ <pt x="264" y="69" on="1"/>
+ <pt x="264" y="301" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <contour>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="264" y="627" on="1"/>
+ <pt x="203" y="618" on="0"/>
+ <pt x="137" y="553" on="0"/>
+ </contour>
+ <contour>
+ <pt x="354" y="69" on="1"/>
+ <pt x="423" y="76" on="0"/>
+ <pt x="486" y="135" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="211" on="0"/>
+ <pt x="462" y="250" on="0"/>
+ <pt x="405" y="275" on="0"/>
+ <pt x="354" y="285" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.BRACKET.500" xMin="29" yMin="-76" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="464" y="592" on="0"/>
+ <pt x="370" y="630" on="0"/>
+ <pt x="308" y="630" on="1"/>
+ <pt x="226" y="630" on="0"/>
+ <pt x="137" y="562" on="0"/>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="360" y="372" on="1"/>
+ <pt x="469" y="350" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-76" on="1"/>
+ <pt x="264" y="-76" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="115" y="118" on="0"/>
+ <pt x="180" y="83" on="0"/>
+ <pt x="259" y="67" on="0"/>
+ <pt x="310" y="67" on="1"/>
+ <pt x="403" y="67" on="0"/>
+ <pt x="486" y="128" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="212" on="0"/>
+ <pt x="461" y="251" on="0"/>
+ <pt x="401" y="277" on="0"/>
+ <pt x="348" y="286" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.bold" xMin="29" yMin="-76" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="464" y="592" on="0"/>
+ <pt x="370" y="630" on="0"/>
+ <pt x="308" y="630" on="1"/>
+ <pt x="226" y="630" on="0"/>
+ <pt x="137" y="562" on="0"/>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="360" y="372" on="1"/>
+ <pt x="469" y="350" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-76" on="1"/>
+ <pt x="264" y="-76" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="115" y="118" on="0"/>
+ <pt x="180" y="83" on="0"/>
+ <pt x="259" y="67" on="0"/>
+ <pt x="310" y="67" on="1"/>
+ <pt x="403" y="67" on="0"/>
+ <pt x="486" y="128" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="212" on="0"/>
+ <pt x="461" y="251" on="0"/>
+ <pt x="401" y="277" on="0"/>
+ <pt x="348" y="286" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="space"/><!-- contains no outline data -->
+
+ </glyf>
+
+ <name>
+ <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis
+ </namerecord>
+ <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
+ Regular
+ </namerecord>
+ <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
+ 1.000;NONE;SimpleTwoAxis-Regular
+ </namerecord>
+ <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis Regular
+ </namerecord>
+ <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
+ Version 1.000
+ </namerecord>
+ <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
+ SimpleTwoAxis-Regular
+ </namerecord>
+ </name>
+
+ <post>
+ <formatType value="2.0"/>
+ <italicAngle value="0.0"/>
+ <underlinePosition value="-100"/>
+ <underlineThickness value="50"/>
+ <isFixedPitch value="0"/>
+ <minMemType42 value="0"/>
+ <maxMemType42 value="0"/>
+ <minMemType1 value="0"/>
+ <maxMemType1 value="0"/>
+ <psNames>
+ <!-- This file uses unique glyph names based on the information
+ found in the 'post' table. Since these names might not be unique,
+ we have to invent artificial names in case of clashes. In order to
+ be able to retain the original information, we need a name to
+ ps name mapping for those cases where they differ. That's what
+ you see below.
+ -->
+ </psNames>
+ <extraNames>
+ <!-- following are the name that are not taken from the standard Mac glyph order -->
+ <psName name="dollar.bold"/>
+ <psName name="acutecomb"/>
+ <psName name="dollar.BRACKET.500"/>
+ </extraNames>
+ </post>
+
+ <GDEF>
+ <Version value="0x00010000"/>
+ <GlyphClassDef>
+ <ClassDef glyph="A" class="1"/>
+ <ClassDef glyph="Aacute" class="1"/>
+ <ClassDef glyph="acutecomb" class="3"/>
+ </GlyphClassDef>
+ </GDEF>
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=1 -->
+ <ScriptRecord index="0">
+ <ScriptTag value="DFLT"/>
+ <Script>
+ <DefaultLangSys>
+ <ReqFeatureIndex value="65535"/>
+ <!-- FeatureCount=2 -->
+ <FeatureIndex index="0" value="0"/>
+ <FeatureIndex index="1" value="1"/>
+ </DefaultLangSys>
+ <!-- LangSysCount=0 -->
+ </Script>
+ </ScriptRecord>
+ </ScriptList>
+ <FeatureList>
+ <!-- FeatureCount=2 -->
+ <FeatureRecord index="0">
+ <FeatureTag value="kern"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ <FeatureRecord index="1">
+ <FeatureTag value="mark"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="1"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=2 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="8"/><!-- ignoreMarks -->
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="1">
+ <Coverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ <Glyph value="V"/>
+ </Coverage>
+ <ValueFormat1 value="4"/>
+ <ValueFormat2 value="0"/>
+ <!-- PairSetCount=3 -->
+ <PairSet index="0">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="1">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="2">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="O"/>
+ <Value1 XAdvance="-20"/>
+ </PairValueRecord>
+ </PairSet>
+ </PairPos>
+ </Lookup>
+ <Lookup index="1">
+ <LookupType value="4"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
+ <MarkBasePos index="0" Format="1">
+ <MarkCoverage>
+ <Glyph value="acutecomb"/>
+ </MarkCoverage>
+ <BaseCoverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ </BaseCoverage>
+ <!-- ClassCount=1 -->
+ <MarkArray>
+ <!-- MarkCount=1 -->
+ <MarkRecord index="0">
+ <Class value="0"/>
+ <MarkAnchor Format="1">
+ <XCoordinate value="4"/>
+ <YCoordinate value="623"/>
+ </MarkAnchor>
+ </MarkRecord>
+ </MarkArray>
+ <BaseArray>
+ <!-- BaseCount=2 -->
+ <BaseRecord index="0">
+ <BaseAnchor index="0" Format="1">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ <BaseRecord index="1">
+ <BaseAnchor index="0" Format="1">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ </BaseArray>
+ </MarkBasePos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/varLib/data/master_incompatible_lookup_types/IncompatibleLookupTypes-Bold.ttx b/Tests/varLib/data/master_incompatible_lookup_types/IncompatibleLookupTypes-Bold.ttx
new file mode 100644
index 0000000..6a28223
--- /dev/null
+++ b/Tests/varLib/data/master_incompatible_lookup_types/IncompatibleLookupTypes-Bold.ttx
@@ -0,0 +1,622 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <GlyphOrder>
+ <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
+ <GlyphID id="0" name=".notdef"/>
+ <GlyphID id="1" name="A"/>
+ <GlyphID id="2" name="Aacute"/>
+ <GlyphID id="3" name="O"/>
+ <GlyphID id="4" name="V"/>
+ <GlyphID id="5" name="space"/>
+ <GlyphID id="6" name="dollar"/>
+ <GlyphID id="7" name="dollar.bold"/>
+ <GlyphID id="8" name="acutecomb"/>
+ <GlyphID id="9" name="dollar.BRACKET.500"/>
+ </GlyphOrder>
+
+ <head>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="1.0"/>
+ <fontRevision value="1.0"/>
+ <checkSumAdjustment value="0x10cb3f3"/>
+ <magicNumber value="0x5f0f3cf5"/>
+ <flags value="00000000 00000011"/>
+ <unitsPerEm value="1000"/>
+ <created value="Fri Jan 15 14:37:13 2021"/>
+ <modified value="Mon Mar 15 12:57:03 2021"/>
+ <xMin value="-141"/>
+ <yMin value="-200"/>
+ <xMax value="906"/>
+ <yMax value="949"/>
+ <macStyle value="00000000 00000001"/>
+ <lowestRecPPEM value="6"/>
+ <fontDirectionHint value="2"/>
+ <indexToLocFormat value="0"/>
+ <glyphDataFormat value="0"/>
+ </head>
+
+ <hhea>
+ <tableVersion value="0x00010000"/>
+ <ascent value="1000"/>
+ <descent value="-200"/>
+ <lineGap value="0"/>
+ <advanceWidthMax value="911"/>
+ <minLeftSideBearing value="-141"/>
+ <minRightSideBearing value="-125"/>
+ <xMaxExtent value="906"/>
+ <caretSlopeRise value="1"/>
+ <caretSlopeRun value="0"/>
+ <caretOffset value="0"/>
+ <reserved0 value="0"/>
+ <reserved1 value="0"/>
+ <reserved2 value="0"/>
+ <reserved3 value="0"/>
+ <metricDataFormat value="0"/>
+ <numberOfHMetrics value="10"/>
+ </hhea>
+
+ <maxp>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="0x10000"/>
+ <numGlyphs value="10"/>
+ <maxPoints value="52"/>
+ <maxContours value="3"/>
+ <maxCompositePoints value="16"/>
+ <maxCompositeContours value="4"/>
+ <maxZones value="1"/>
+ <maxTwilightPoints value="0"/>
+ <maxStorage value="0"/>
+ <maxFunctionDefs value="0"/>
+ <maxInstructionDefs value="0"/>
+ <maxStackElements value="0"/>
+ <maxSizeOfInstructions value="0"/>
+ <maxComponentElements value="2"/>
+ <maxComponentDepth value="1"/>
+ </maxp>
+
+ <OS_2>
+ <!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
+ will be recalculated by the compiler -->
+ <version value="4"/>
+ <xAvgCharWidth value="672"/>
+ <usWeightClass value="400"/>
+ <usWidthClass value="5"/>
+ <fsType value="00000000 00001000"/>
+ <ySubscriptXSize value="650"/>
+ <ySubscriptYSize value="600"/>
+ <ySubscriptXOffset value="0"/>
+ <ySubscriptYOffset value="75"/>
+ <ySuperscriptXSize value="650"/>
+ <ySuperscriptYSize value="600"/>
+ <ySuperscriptXOffset value="0"/>
+ <ySuperscriptYOffset value="350"/>
+ <yStrikeoutSize value="50"/>
+ <yStrikeoutPosition value="300"/>
+ <sFamilyClass value="0"/>
+ <panose>
+ <bFamilyType value="0"/>
+ <bSerifStyle value="0"/>
+ <bWeight value="0"/>
+ <bProportion value="0"/>
+ <bContrast value="0"/>
+ <bStrokeVariation value="0"/>
+ <bArmStyle value="0"/>
+ <bLetterForm value="0"/>
+ <bMidline value="0"/>
+ <bXHeight value="0"/>
+ </panose>
+ <ulUnicodeRange1 value="00000000 00000000 00000000 01000011"/>
+ <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
+ <achVendID value="NONE"/>
+ <fsSelection value="00000000 00100000"/>
+ <usFirstCharIndex value="32"/>
+ <usLastCharIndex value="769"/>
+ <sTypoAscender value="800"/>
+ <sTypoDescender value="-200"/>
+ <sTypoLineGap value="200"/>
+ <usWinAscent value="1000"/>
+ <usWinDescent value="200"/>
+ <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
+ <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
+ <sxHeight value="500"/>
+ <sCapHeight value="700"/>
+ <usDefaultChar value="0"/>
+ <usBreakChar value="32"/>
+ <usMaxContext value="2"/>
+ </OS_2>
+
+ <hmtx>
+ <mtx name=".notdef" width="500" lsb="50"/>
+ <mtx name="A" width="911" lsb="5"/>
+ <mtx name="Aacute" width="911" lsb="5"/>
+ <mtx name="O" width="715" lsb="15"/>
+ <mtx name="V" width="911" lsb="5"/>
+ <mtx name="acutecomb" width="0" lsb="-141"/>
+ <mtx name="dollar" width="600" lsb="1"/>
+ <mtx name="dollar.BRACKET.500" width="600" lsb="1"/>
+ <mtx name="dollar.bold" width="600" lsb="1"/>
+ <mtx name="space" width="300" lsb="0"/>
+ </hmtx>
+
+ <cmap>
+ <tableVersion version="0"/>
+ <cmap_format_4 platformID="0" platEncID="3" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ <cmap_format_4 platformID="3" platEncID="1" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ </cmap>
+
+ <loca>
+ <!-- The 'loca' table will be calculated by the compiler -->
+ </loca>
+
+ <glyf>
+
+ <!-- The xMin, yMin, xMax and yMax values
+ will be recalculated by the compiler. -->
+
+ <TTGlyph name=".notdef" xMin="50" yMin="-200" xMax="450" yMax="800">
+ <contour>
+ <pt x="50" y="-200" on="1"/>
+ <pt x="50" y="800" on="1"/>
+ <pt x="450" y="800" on="1"/>
+ <pt x="450" y="-200" on="1"/>
+ </contour>
+ <contour>
+ <pt x="100" y="-150" on="1"/>
+ <pt x="400" y="-150" on="1"/>
+ <pt x="400" y="750" on="1"/>
+ <pt x="100" y="750" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="A" xMin="5" yMin="0" xMax="906" yMax="700">
+ <contour>
+ <pt x="705" y="0" on="1"/>
+ <pt x="906" y="0" on="1"/>
+ <pt x="556" y="700" on="1"/>
+ <pt x="355" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="5" y="0" on="1"/>
+ <pt x="206" y="0" on="1"/>
+ <pt x="556" y="700" on="1"/>
+ <pt x="355" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="640" y="311" on="1"/>
+ <pt x="190" y="311" on="1"/>
+ <pt x="190" y="191" on="1"/>
+ <pt x="640" y="191" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="Aacute" xMin="5" yMin="0" xMax="906" yMax="949">
+ <component glyphName="A" x="0" y="0" flags="0x204"/>
+ <component glyphName="acutecomb" x="479" y="124" flags="0x4"/>
+ </TTGlyph>
+
+ <TTGlyph name="O" xMin="15" yMin="-10" xMax="670" yMax="710">
+ <contour>
+ <pt x="342" y="-10" on="1"/>
+ <pt x="172" y="-10" on="0"/>
+ <pt x="15" y="163" on="0"/>
+ <pt x="15" y="350" on="1"/>
+ <pt x="15" y="538" on="0"/>
+ <pt x="172" y="710" on="0"/>
+ <pt x="342" y="710" on="1"/>
+ <pt x="513" y="710" on="0"/>
+ <pt x="670" y="538" on="0"/>
+ <pt x="670" y="350" on="1"/>
+ <pt x="670" y="163" on="0"/>
+ <pt x="513" y="-10" on="0"/>
+ </contour>
+ <contour>
+ <pt x="342" y="153" on="1"/>
+ <pt x="419" y="153" on="0"/>
+ <pt x="490" y="247" on="0"/>
+ <pt x="490" y="350" on="1"/>
+ <pt x="490" y="453" on="0"/>
+ <pt x="419" y="547" on="0"/>
+ <pt x="342" y="547" on="1"/>
+ <pt x="266" y="547" on="0"/>
+ <pt x="195" y="453" on="0"/>
+ <pt x="195" y="350" on="1"/>
+ <pt x="195" y="247" on="0"/>
+ <pt x="266" y="153" on="0"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="V" xMin="5" yMin="0" xMax="906" yMax="700">
+ <contour>
+ <pt x="355" y="0" on="1"/>
+ <pt x="705" y="700" on="1"/>
+ <pt x="906" y="700" on="1"/>
+ <pt x="556" y="0" on="1"/>
+ </contour>
+ <contour>
+ <pt x="355" y="0" on="1"/>
+ <pt x="5" y="700" on="1"/>
+ <pt x="206" y="700" on="1"/>
+ <pt x="556" y="0" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="acutecomb" xMin="-141" yMin="630" xMax="125" yMax="825">
+ <contour>
+ <pt x="-118" y="756" on="1"/>
+ <pt x="-141" y="630" on="1"/>
+ <pt x="102" y="699" on="1"/>
+ <pt x="125" y="825" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="479" y="549" on="0"/>
+ <pt x="411" y="588" on="0"/>
+ <pt x="369" y="595" on="1"/>
+ <pt x="369" y="400" on="1"/>
+ <pt x="476" y="378" on="0"/>
+ <pt x="595" y="278" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="118" y="144" on="0"/>
+ <pt x="195" y="106" on="0"/>
+ <pt x="249" y="100" on="1"/>
+ <pt x="249" y="273" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="294" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <contour>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="480" on="0"/>
+ <pt x="166" y="453" on="0"/>
+ <pt x="208" y="434" on="0"/>
+ <pt x="249" y="424" on="1"/>
+ <pt x="249" y="595" on="1"/>
+ <pt x="199" y="587" on="0"/>
+ <pt x="152" y="538" on="0"/>
+ </contour>
+ <contour>
+ <pt x="369" y="100" on="1"/>
+ <pt x="426" y="107" on="0"/>
+ <pt x="471" y="150" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="201" on="0"/>
+ <pt x="456" y="225" on="0"/>
+ <pt x="412" y="243" on="0"/>
+ <pt x="369" y="252" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.BRACKET.500" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="468" y="560" on="0"/>
+ <pt x="374" y="600" on="0"/>
+ <pt x="308" y="600" on="1"/>
+ <pt x="227" y="600" on="0"/>
+ <pt x="152" y="548" on="0"/>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="479" on="0"/>
+ <pt x="168" y="450" on="0"/>
+ <pt x="217" y="431" on="0"/>
+ <pt x="264" y="421" on="1"/>
+ <pt x="363" y="401" on="1"/>
+ <pt x="473" y="379" on="0"/>
+ <pt x="595" y="279" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="112" y="150" on="0"/>
+ <pt x="176" y="114" on="0"/>
+ <pt x="256" y="97" on="0"/>
+ <pt x="310" y="97" on="1"/>
+ <pt x="402" y="97" on="0"/>
+ <pt x="471" y="143" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="203" on="0"/>
+ <pt x="453" y="228" on="0"/>
+ <pt x="399" y="247" on="0"/>
+ <pt x="345" y="256" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="293" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.bold" xMin="1" yMin="-98" xMax="595" yMax="789">
+ <contour>
+ <pt x="249" y="789" on="1"/>
+ <pt x="369" y="789" on="1"/>
+ <pt x="369" y="743" on="1"/>
+ <pt x="427" y="735" on="0"/>
+ <pt x="537" y="681" on="0"/>
+ <pt x="590" y="623" on="1"/>
+ <pt x="510" y="515" on="1"/>
+ <pt x="468" y="560" on="0"/>
+ <pt x="374" y="600" on="0"/>
+ <pt x="308" y="600" on="1"/>
+ <pt x="227" y="600" on="0"/>
+ <pt x="152" y="548" on="0"/>
+ <pt x="152" y="502" on="1"/>
+ <pt x="152" y="479" on="0"/>
+ <pt x="168" y="450" on="0"/>
+ <pt x="217" y="431" on="0"/>
+ <pt x="264" y="421" on="1"/>
+ <pt x="363" y="401" on="1"/>
+ <pt x="473" y="379" on="0"/>
+ <pt x="595" y="279" on="0"/>
+ <pt x="595" y="184" on="1"/>
+ <pt x="595" y="93" on="0"/>
+ <pt x="474" y="-32" on="0"/>
+ <pt x="369" y="-46" on="1"/>
+ <pt x="369" y="-98" on="1"/>
+ <pt x="249" y="-98" on="1"/>
+ <pt x="249" y="-47" on="1"/>
+ <pt x="176" y="-39" on="0"/>
+ <pt x="52" y="17" on="0"/>
+ <pt x="1" y="69" on="1"/>
+ <pt x="80" y="179" on="1"/>
+ <pt x="112" y="150" on="0"/>
+ <pt x="176" y="114" on="0"/>
+ <pt x="256" y="97" on="0"/>
+ <pt x="310" y="97" on="1"/>
+ <pt x="402" y="97" on="0"/>
+ <pt x="471" y="143" on="0"/>
+ <pt x="471" y="183" on="1"/>
+ <pt x="471" y="203" on="0"/>
+ <pt x="453" y="228" on="0"/>
+ <pt x="399" y="247" on="0"/>
+ <pt x="345" y="256" on="1"/>
+ <pt x="246" y="274" on="1"/>
+ <pt x="144" y="293" on="0"/>
+ <pt x="28" y="405" on="0"/>
+ <pt x="28" y="502" on="1"/>
+ <pt x="28" y="567" on="0"/>
+ <pt x="84" y="667" on="0"/>
+ <pt x="184" y="732" on="0"/>
+ <pt x="249" y="742" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="space"/><!-- contains no outline data -->
+
+ </glyf>
+
+ <name>
+ <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis
+ </namerecord>
+ <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
+ Bold
+ </namerecord>
+ <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
+ 1.000;NONE;SimpleTwoAxis-Bold
+ </namerecord>
+ <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis Bold
+ </namerecord>
+ <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
+ Version 1.000
+ </namerecord>
+ <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
+ SimpleTwoAxis-Bold
+ </namerecord>
+ </name>
+
+ <post>
+ <formatType value="2.0"/>
+ <italicAngle value="0.0"/>
+ <underlinePosition value="-100"/>
+ <underlineThickness value="50"/>
+ <isFixedPitch value="0"/>
+ <minMemType42 value="0"/>
+ <maxMemType42 value="0"/>
+ <minMemType1 value="0"/>
+ <maxMemType1 value="0"/>
+ <psNames>
+ <!-- This file uses unique glyph names based on the information
+ found in the 'post' table. Since these names might not be unique,
+ we have to invent artificial names in case of clashes. In order to
+ be able to retain the original information, we need a name to
+ ps name mapping for those cases where they differ. That's what
+ you see below.
+ -->
+ </psNames>
+ <extraNames>
+ <!-- following are the name that are not taken from the standard Mac glyph order -->
+ <psName name="dollar.bold"/>
+ <psName name="acutecomb"/>
+ <psName name="dollar.BRACKET.500"/>
+ </extraNames>
+ </post>
+
+ <GDEF>
+ <Version value="0x00010000"/>
+ <GlyphClassDef>
+ <ClassDef glyph="A" class="1"/>
+ <ClassDef glyph="Aacute" class="1"/>
+ <ClassDef glyph="acutecomb" class="3"/>
+ </GlyphClassDef>
+ </GDEF>
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=1 -->
+ <ScriptRecord index="0">
+ <ScriptTag value="DFLT"/>
+ <Script>
+ <DefaultLangSys>
+ <ReqFeatureIndex value="65535"/>
+ <!-- FeatureCount=2 -->
+ <FeatureIndex index="0" value="0"/>
+ <FeatureIndex index="1" value="1"/>
+ </DefaultLangSys>
+ <!-- LangSysCount=0 -->
+ </Script>
+ </ScriptRecord>
+ </ScriptList>
+ <FeatureList>
+ <!-- FeatureCount=2 -->
+ <FeatureRecord index="0">
+ <FeatureTag value="kern"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ <FeatureRecord index="1">
+ <FeatureTag value="mark"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="1"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=2 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="8"/><!-- ignoreMarks -->
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="1">
+ <Coverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ <Glyph value="V"/>
+ </Coverage>
+ <ValueFormat1 value="4"/>
+ <ValueFormat2 value="0"/>
+ <!-- PairSetCount=3 -->
+ <PairSet index="0">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="1">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="2">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="O"/>
+ <Value1 XAdvance="-20"/>
+ </PairValueRecord>
+ </PairSet>
+ </PairPos>
+ </Lookup>
+ <Lookup index="1">
+ <LookupType value="4"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="1">
+ <Coverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ <Glyph value="V"/>
+ </Coverage>
+ <ValueFormat1 value="4"/>
+ <ValueFormat2 value="0"/>
+ <!-- PairSetCount=3 -->
+ <PairSet index="0">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="1">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="2">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="O"/>
+ <Value1 XAdvance="-20"/>
+ </PairValueRecord>
+ </PairSet>
+ </PairPos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/varLib/data/master_incompatible_lookup_types/IncompatibleLookupTypes-Regular.ttx b/Tests/varLib/data/master_incompatible_lookup_types/IncompatibleLookupTypes-Regular.ttx
new file mode 100644
index 0000000..dc6eb17
--- /dev/null
+++ b/Tests/varLib/data/master_incompatible_lookup_types/IncompatibleLookupTypes-Regular.ttx
@@ -0,0 +1,626 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.20">
+
+ <GlyphOrder>
+ <!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
+ <GlyphID id="0" name=".notdef"/>
+ <GlyphID id="1" name="A"/>
+ <GlyphID id="2" name="Aacute"/>
+ <GlyphID id="3" name="O"/>
+ <GlyphID id="4" name="V"/>
+ <GlyphID id="5" name="space"/>
+ <GlyphID id="6" name="dollar"/>
+ <GlyphID id="7" name="dollar.bold"/>
+ <GlyphID id="8" name="acutecomb"/>
+ <GlyphID id="9" name="dollar.BRACKET.500"/>
+ </GlyphOrder>
+
+ <head>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="1.0"/>
+ <fontRevision value="1.0"/>
+ <checkSumAdjustment value="0x3c7bc79b"/>
+ <magicNumber value="0x5f0f3cf5"/>
+ <flags value="00000000 00000011"/>
+ <unitsPerEm value="1000"/>
+ <created value="Fri Jan 15 14:37:13 2021"/>
+ <modified value="Mon Mar 15 12:57:03 2021"/>
+ <xMin value="-141"/>
+ <yMin value="-200"/>
+ <xMax value="751"/>
+ <yMax value="915"/>
+ <macStyle value="00000000 00000000"/>
+ <lowestRecPPEM value="6"/>
+ <fontDirectionHint value="2"/>
+ <indexToLocFormat value="0"/>
+ <glyphDataFormat value="0"/>
+ </head>
+
+ <hhea>
+ <tableVersion value="0x00010000"/>
+ <ascent value="1000"/>
+ <descent value="-200"/>
+ <lineGap value="0"/>
+ <advanceWidthMax value="756"/>
+ <minLeftSideBearing value="-141"/>
+ <minRightSideBearing value="-125"/>
+ <xMaxExtent value="751"/>
+ <caretSlopeRise value="1"/>
+ <caretSlopeRun value="0"/>
+ <caretOffset value="0"/>
+ <reserved0 value="0"/>
+ <reserved1 value="0"/>
+ <reserved2 value="0"/>
+ <reserved3 value="0"/>
+ <metricDataFormat value="0"/>
+ <numberOfHMetrics value="10"/>
+ </hhea>
+
+ <maxp>
+ <!-- Most of this table will be recalculated by the compiler -->
+ <tableVersion value="0x10000"/>
+ <numGlyphs value="10"/>
+ <maxPoints value="52"/>
+ <maxContours value="3"/>
+ <maxCompositePoints value="16"/>
+ <maxCompositeContours value="4"/>
+ <maxZones value="1"/>
+ <maxTwilightPoints value="0"/>
+ <maxStorage value="0"/>
+ <maxFunctionDefs value="0"/>
+ <maxInstructionDefs value="0"/>
+ <maxStackElements value="0"/>
+ <maxSizeOfInstructions value="0"/>
+ <maxComponentElements value="2"/>
+ <maxComponentDepth value="1"/>
+ </maxp>
+
+ <OS_2>
+ <!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
+ will be recalculated by the compiler -->
+ <version value="4"/>
+ <xAvgCharWidth value="604"/>
+ <usWeightClass value="400"/>
+ <usWidthClass value="5"/>
+ <fsType value="00000000 00001000"/>
+ <ySubscriptXSize value="650"/>
+ <ySubscriptYSize value="600"/>
+ <ySubscriptXOffset value="0"/>
+ <ySubscriptYOffset value="75"/>
+ <ySuperscriptXSize value="650"/>
+ <ySuperscriptYSize value="600"/>
+ <ySuperscriptXOffset value="0"/>
+ <ySuperscriptYOffset value="350"/>
+ <yStrikeoutSize value="50"/>
+ <yStrikeoutPosition value="300"/>
+ <sFamilyClass value="0"/>
+ <panose>
+ <bFamilyType value="0"/>
+ <bSerifStyle value="0"/>
+ <bWeight value="0"/>
+ <bProportion value="0"/>
+ <bContrast value="0"/>
+ <bStrokeVariation value="0"/>
+ <bArmStyle value="0"/>
+ <bLetterForm value="0"/>
+ <bMidline value="0"/>
+ <bXHeight value="0"/>
+ </panose>
+ <ulUnicodeRange1 value="00000000 00000000 00000000 01000011"/>
+ <ulUnicodeRange2 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange3 value="00000000 00000000 00000000 00000000"/>
+ <ulUnicodeRange4 value="00000000 00000000 00000000 00000000"/>
+ <achVendID value="NONE"/>
+ <fsSelection value="00000000 01000000"/>
+ <usFirstCharIndex value="32"/>
+ <usLastCharIndex value="769"/>
+ <sTypoAscender value="800"/>
+ <sTypoDescender value="-200"/>
+ <sTypoLineGap value="200"/>
+ <usWinAscent value="1000"/>
+ <usWinDescent value="200"/>
+ <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
+ <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>
+ <sxHeight value="500"/>
+ <sCapHeight value="700"/>
+ <usDefaultChar value="0"/>
+ <usBreakChar value="32"/>
+ <usMaxContext value="2"/>
+ </OS_2>
+
+ <hmtx>
+ <mtx name=".notdef" width="500" lsb="50"/>
+ <mtx name="A" width="756" lsb="5"/>
+ <mtx name="Aacute" width="756" lsb="5"/>
+ <mtx name="O" width="664" lsb="30"/>
+ <mtx name="V" width="756" lsb="5"/>
+ <mtx name="acutecomb" width="0" lsb="-141"/>
+ <mtx name="dollar" width="600" lsb="29"/>
+ <mtx name="dollar.BRACKET.500" width="600" lsb="29"/>
+ <mtx name="dollar.bold" width="600" lsb="29"/>
+ <mtx name="space" width="200" lsb="0"/>
+ </hmtx>
+
+ <cmap>
+ <tableVersion version="0"/>
+ <cmap_format_4 platformID="0" platEncID="3" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ <cmap_format_4 platformID="3" platEncID="1" language="0">
+ <map code="0x20" name="space"/><!-- SPACE -->
+ <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
+ <map code="0x41" name="A"/><!-- LATIN CAPITAL LETTER A -->
+ <map code="0x4f" name="O"/><!-- LATIN CAPITAL LETTER O -->
+ <map code="0x56" name="V"/><!-- LATIN CAPITAL LETTER V -->
+ <map code="0xc1" name="Aacute"/><!-- LATIN CAPITAL LETTER A WITH ACUTE -->
+ <map code="0x301" name="acutecomb"/><!-- COMBINING ACUTE ACCENT -->
+ </cmap_format_4>
+ </cmap>
+
+ <loca>
+ <!-- The 'loca' table will be calculated by the compiler -->
+ </loca>
+
+ <glyf>
+
+ <!-- The xMin, yMin, xMax and yMax values
+ will be recalculated by the compiler. -->
+
+ <TTGlyph name=".notdef" xMin="50" yMin="-200" xMax="450" yMax="800">
+ <contour>
+ <pt x="50" y="-200" on="1"/>
+ <pt x="50" y="800" on="1"/>
+ <pt x="450" y="800" on="1"/>
+ <pt x="450" y="-200" on="1"/>
+ </contour>
+ <contour>
+ <pt x="100" y="-150" on="1"/>
+ <pt x="400" y="-150" on="1"/>
+ <pt x="400" y="750" on="1"/>
+ <pt x="100" y="750" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="A" xMin="5" yMin="0" xMax="751" yMax="700">
+ <contour>
+ <pt x="641" y="0" on="1"/>
+ <pt x="751" y="0" on="1"/>
+ <pt x="433" y="700" on="1"/>
+ <pt x="323" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="5" y="0" on="1"/>
+ <pt x="115" y="0" on="1"/>
+ <pt x="433" y="700" on="1"/>
+ <pt x="323" y="700" on="1"/>
+ </contour>
+ <contour>
+ <pt x="567" y="284" on="1"/>
+ <pt x="152" y="284" on="1"/>
+ <pt x="152" y="204" on="1"/>
+ <pt x="567" y="204" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="Aacute" xMin="5" yMin="0" xMax="751" yMax="915">
+ <component glyphName="A" x="0" y="0" flags="0x204"/>
+ <component glyphName="acutecomb" x="402" y="130" flags="0x4"/>
+ </TTGlyph>
+
+ <TTGlyph name="O" xMin="30" yMin="-10" xMax="634" yMax="710">
+ <contour>
+ <pt x="332" y="-10" on="1"/>
+ <pt x="181" y="-10" on="0"/>
+ <pt x="30" y="169" on="0"/>
+ <pt x="30" y="350" on="1"/>
+ <pt x="30" y="531" on="0"/>
+ <pt x="181" y="710" on="0"/>
+ <pt x="332" y="710" on="1"/>
+ <pt x="484" y="710" on="0"/>
+ <pt x="634" y="531" on="0"/>
+ <pt x="634" y="350" on="1"/>
+ <pt x="634" y="169" on="0"/>
+ <pt x="484" y="-10" on="0"/>
+ </contour>
+ <contour>
+ <pt x="332" y="74" on="1"/>
+ <pt x="438" y="74" on="0"/>
+ <pt x="544" y="212" on="0"/>
+ <pt x="544" y="350" on="1"/>
+ <pt x="544" y="488" on="0"/>
+ <pt x="438" y="626" on="0"/>
+ <pt x="332" y="626" on="1"/>
+ <pt x="226" y="626" on="0"/>
+ <pt x="120" y="488" on="0"/>
+ <pt x="120" y="350" on="1"/>
+ <pt x="120" y="212" on="0"/>
+ <pt x="226" y="74" on="0"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="V" xMin="5" yMin="0" xMax="751" yMax="700">
+ <contour>
+ <pt x="323" y="0" on="1"/>
+ <pt x="641" y="700" on="1"/>
+ <pt x="751" y="700" on="1"/>
+ <pt x="433" y="0" on="1"/>
+ </contour>
+ <contour>
+ <pt x="323" y="0" on="1"/>
+ <pt x="5" y="700" on="1"/>
+ <pt x="115" y="700" on="1"/>
+ <pt x="433" y="0" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="acutecomb" xMin="-141" yMin="630" xMax="125" yMax="785">
+ <contour>
+ <pt x="-118" y="716" on="1"/>
+ <pt x="-141" y="630" on="1"/>
+ <pt x="102" y="699" on="1"/>
+ <pt x="125" y="785" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar" xMin="29" yMin="-68" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="473" y="584" on="0"/>
+ <pt x="398" y="621" on="0"/>
+ <pt x="354" y="627" on="1"/>
+ <pt x="354" y="373" on="1"/>
+ <pt x="467" y="351" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-68" on="1"/>
+ <pt x="264" y="-68" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="123" y="110" on="0"/>
+ <pt x="207" y="73" on="0"/>
+ <pt x="264" y="69" on="1"/>
+ <pt x="264" y="301" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <contour>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="264" y="627" on="1"/>
+ <pt x="203" y="618" on="0"/>
+ <pt x="137" y="553" on="0"/>
+ </contour>
+ <contour>
+ <pt x="354" y="69" on="1"/>
+ <pt x="423" y="76" on="0"/>
+ <pt x="486" y="135" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="211" on="0"/>
+ <pt x="462" y="250" on="0"/>
+ <pt x="405" y="275" on="0"/>
+ <pt x="354" y="285" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.BRACKET.500" xMin="29" yMin="-76" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="464" y="592" on="0"/>
+ <pt x="370" y="630" on="0"/>
+ <pt x="308" y="630" on="1"/>
+ <pt x="226" y="630" on="0"/>
+ <pt x="137" y="562" on="0"/>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="360" y="372" on="1"/>
+ <pt x="469" y="350" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-76" on="1"/>
+ <pt x="264" y="-76" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="115" y="118" on="0"/>
+ <pt x="180" y="83" on="0"/>
+ <pt x="259" y="67" on="0"/>
+ <pt x="310" y="67" on="1"/>
+ <pt x="403" y="67" on="0"/>
+ <pt x="486" y="128" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="212" on="0"/>
+ <pt x="461" y="251" on="0"/>
+ <pt x="401" y="277" on="0"/>
+ <pt x="348" y="286" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="dollar.bold" xMin="29" yMin="-76" xMax="580" yMax="759">
+ <contour>
+ <pt x="264" y="759" on="1"/>
+ <pt x="354" y="759" on="1"/>
+ <pt x="354" y="715" on="1"/>
+ <pt x="415" y="709" on="0"/>
+ <pt x="519" y="662" on="0"/>
+ <pt x="562" y="620" on="1"/>
+ <pt x="509" y="548" on="1"/>
+ <pt x="464" y="592" on="0"/>
+ <pt x="370" y="630" on="0"/>
+ <pt x="308" y="630" on="1"/>
+ <pt x="226" y="630" on="0"/>
+ <pt x="137" y="562" on="0"/>
+ <pt x="137" y="502" on="1"/>
+ <pt x="137" y="470" on="0"/>
+ <pt x="160" y="428" on="0"/>
+ <pt x="214" y="402" on="0"/>
+ <pt x="261" y="392" on="1"/>
+ <pt x="360" y="372" on="1"/>
+ <pt x="469" y="350" on="0"/>
+ <pt x="580" y="263" on="0"/>
+ <pt x="580" y="184" on="1"/>
+ <pt x="580" y="102" on="0"/>
+ <pt x="459" y="-8" on="0"/>
+ <pt x="354" y="-18" on="1"/>
+ <pt x="354" y="-76" on="1"/>
+ <pt x="264" y="-76" on="1"/>
+ <pt x="264" y="-18" on="1"/>
+ <pt x="192" y="-12" on="0"/>
+ <pt x="72" y="34" on="0"/>
+ <pt x="29" y="74" on="1"/>
+ <pt x="81" y="146" on="1"/>
+ <pt x="115" y="118" on="0"/>
+ <pt x="180" y="83" on="0"/>
+ <pt x="259" y="67" on="0"/>
+ <pt x="310" y="67" on="1"/>
+ <pt x="403" y="67" on="0"/>
+ <pt x="486" y="128" on="0"/>
+ <pt x="486" y="183" on="1"/>
+ <pt x="486" y="212" on="0"/>
+ <pt x="461" y="251" on="0"/>
+ <pt x="401" y="277" on="0"/>
+ <pt x="348" y="286" on="1"/>
+ <pt x="249" y="304" on="1"/>
+ <pt x="148" y="323" on="0"/>
+ <pt x="43" y="420" on="0"/>
+ <pt x="43" y="502" on="1"/>
+ <pt x="43" y="559" on="0"/>
+ <pt x="99" y="650" on="0"/>
+ <pt x="199" y="707" on="0"/>
+ <pt x="264" y="715" on="1"/>
+ </contour>
+ <instructions/>
+ </TTGlyph>
+
+ <TTGlyph name="space"/><!-- contains no outline data -->
+
+ </glyf>
+
+ <name>
+ <namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis
+ </namerecord>
+ <namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
+ Regular
+ </namerecord>
+ <namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
+ 1.000;NONE;SimpleTwoAxis-Regular
+ </namerecord>
+ <namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
+ Simple Two Axis Regular
+ </namerecord>
+ <namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
+ Version 1.000
+ </namerecord>
+ <namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
+ SimpleTwoAxis-Regular
+ </namerecord>
+ </name>
+
+ <post>
+ <formatType value="2.0"/>
+ <italicAngle value="0.0"/>
+ <underlinePosition value="-100"/>
+ <underlineThickness value="50"/>
+ <isFixedPitch value="0"/>
+ <minMemType42 value="0"/>
+ <maxMemType42 value="0"/>
+ <minMemType1 value="0"/>
+ <maxMemType1 value="0"/>
+ <psNames>
+ <!-- This file uses unique glyph names based on the information
+ found in the 'post' table. Since these names might not be unique,
+ we have to invent artificial names in case of clashes. In order to
+ be able to retain the original information, we need a name to
+ ps name mapping for those cases where they differ. That's what
+ you see below.
+ -->
+ </psNames>
+ <extraNames>
+ <!-- following are the name that are not taken from the standard Mac glyph order -->
+ <psName name="dollar.bold"/>
+ <psName name="acutecomb"/>
+ <psName name="dollar.BRACKET.500"/>
+ </extraNames>
+ </post>
+
+ <GDEF>
+ <Version value="0x00010000"/>
+ <GlyphClassDef>
+ <ClassDef glyph="A" class="1"/>
+ <ClassDef glyph="Aacute" class="1"/>
+ <ClassDef glyph="acutecomb" class="3"/>
+ </GlyphClassDef>
+ </GDEF>
+
+ <GPOS>
+ <Version value="0x00010000"/>
+ <ScriptList>
+ <!-- ScriptCount=1 -->
+ <ScriptRecord index="0">
+ <ScriptTag value="DFLT"/>
+ <Script>
+ <DefaultLangSys>
+ <ReqFeatureIndex value="65535"/>
+ <!-- FeatureCount=2 -->
+ <FeatureIndex index="0" value="0"/>
+ <FeatureIndex index="1" value="1"/>
+ </DefaultLangSys>
+ <!-- LangSysCount=0 -->
+ </Script>
+ </ScriptRecord>
+ </ScriptList>
+ <FeatureList>
+ <!-- FeatureCount=2 -->
+ <FeatureRecord index="0">
+ <FeatureTag value="kern"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="0"/>
+ </Feature>
+ </FeatureRecord>
+ <FeatureRecord index="1">
+ <FeatureTag value="mark"/>
+ <Feature>
+ <!-- LookupCount=1 -->
+ <LookupListIndex index="0" value="1"/>
+ </Feature>
+ </FeatureRecord>
+ </FeatureList>
+ <LookupList>
+ <!-- LookupCount=2 -->
+ <Lookup index="0">
+ <LookupType value="2"/>
+ <LookupFlag value="8"/><!-- ignoreMarks -->
+ <!-- SubTableCount=1 -->
+ <PairPos index="0" Format="1">
+ <Coverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ <Glyph value="V"/>
+ </Coverage>
+ <ValueFormat1 value="4"/>
+ <ValueFormat2 value="0"/>
+ <!-- PairSetCount=3 -->
+ <PairSet index="0">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="1">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="V"/>
+ <Value1 XAdvance="-80"/>
+ </PairValueRecord>
+ </PairSet>
+ <PairSet index="2">
+ <!-- PairValueCount=1 -->
+ <PairValueRecord index="0">
+ <SecondGlyph value="O"/>
+ <Value1 XAdvance="-20"/>
+ </PairValueRecord>
+ </PairSet>
+ </PairPos>
+ </Lookup>
+ <Lookup index="1">
+ <LookupType value="4"/>
+ <LookupFlag value="0"/>
+ <!-- SubTableCount=1 -->
+ <MarkBasePos index="0" Format="1">
+ <MarkCoverage>
+ <Glyph value="acutecomb"/>
+ </MarkCoverage>
+ <BaseCoverage>
+ <Glyph value="A"/>
+ <Glyph value="Aacute"/>
+ </BaseCoverage>
+ <!-- ClassCount=1 -->
+ <MarkArray>
+ <!-- MarkCount=1 -->
+ <MarkRecord index="0">
+ <Class value="0"/>
+ <MarkAnchor Format="1">
+ <XCoordinate value="4"/>
+ <YCoordinate value="623"/>
+ </MarkAnchor>
+ </MarkRecord>
+ </MarkArray>
+ <BaseArray>
+ <!-- BaseCount=2 -->
+ <BaseRecord index="0">
+ <BaseAnchor index="0" Format="3">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ <BaseRecord index="1">
+ <BaseAnchor index="0" Format="1">
+ <XCoordinate value="406"/>
+ <YCoordinate value="753"/>
+ </BaseAnchor>
+ </BaseRecord>
+ </BaseArray>
+ </MarkBasePos>
+ </Lookup>
+ </LookupList>
+ </GPOS>
+
+</ttFont>
diff --git a/Tests/varLib/data/master_kerning_merging/0.ttx b/Tests/varLib/data/master_kerning_merging/0.ttx
index 1bc52ae..1ca22f6 100644
--- a/Tests/varLib/data/master_kerning_merging/0.ttx
+++ b/Tests/varLib/data/master_kerning_merging/0.ttx
@@ -266,16 +266,16 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="B"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="A" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="C" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/varLib/data/master_kerning_merging/1.ttx b/Tests/varLib/data/master_kerning_merging/1.ttx
index ea7c353..9f6756d 100644
--- a/Tests/varLib/data/master_kerning_merging/1.ttx
+++ b/Tests/varLib/data/master_kerning_merging/1.ttx
@@ -260,14 +260,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="B" class="2"/>
<ClassDef glyph="D" class="1"/>
</ClassDef2>
diff --git a/Tests/varLib/data/master_kerning_merging/2.ttx b/Tests/varLib/data/master_kerning_merging/2.ttx
index caf4275..b8302e8 100644
--- a/Tests/varLib/data/master_kerning_merging/2.ttx
+++ b/Tests/varLib/data/master_kerning_merging/2.ttx
@@ -266,16 +266,16 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="B"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="A" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="D" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/varLib/data/master_ttx_interpolatable_otf/TestFamily2-Master0.ttx b/Tests/varLib/data/master_ttx_interpolatable_otf/TestFamily2-Master0.ttx
index a6a8e00..157043f 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_otf/TestFamily2-Master0.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_otf/TestFamily2-Master0.ttx
@@ -766,7 +766,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="A" out="A.sc"/>
</SingleSubst>
</Lookup>
@@ -774,7 +774,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="a" out="a.alt"/>
</SingleSubst>
</Lookup>
@@ -782,7 +782,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="ampersand" out="a,n,d"/>
</MultipleSubst>
</Lookup>
@@ -790,7 +790,7 @@
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <AlternateSubst index="0" Format="1">
+ <AlternateSubst index="0">
<AlternateSet glyph="a">
<Alternate glyph="a.alt"/>
<Alternate glyph="A.sc"/>
@@ -801,7 +801,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="f">
<Ligature components="t" glyph="f_t"/>
</LigatureSet>
@@ -814,11 +814,11 @@
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=0 -->
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="a"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="t"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Bold.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Bold.ttx
index 55d686e..cf4b5da 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Bold.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Bold.ttx
@@ -305,7 +305,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="dotabovecomb" class="3"/>
<ClassDef glyph="e" class="1"/>
</GlyphClassDef>
@@ -344,10 +344,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="dotabovecomb"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="e"/>
</BaseCoverage>
<!-- ClassCount=1 -->
@@ -407,7 +407,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="a">
<Ligature components="e,s,s" glyph="s"/>
</LigatureSet>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Regular.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Regular.ttx
index e013e0b..c93da2a 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Regular.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/SparseMasters-Regular.ttx
@@ -305,7 +305,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="dotabovecomb" class="3"/>
<ClassDef glyph="e" class="1"/>
</GlyphClassDef>
@@ -344,10 +344,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="dotabovecomb"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="e"/>
</BaseCoverage>
<!-- ClassCount=1 -->
@@ -407,7 +407,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="a">
<Ligature components="e,s,s" glyph="s"/>
</LigatureSet>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master0.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master0.ttx
index 6054e4b..ca5a2e1 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master0.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master0.ttx
@@ -519,7 +519,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master1.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master1.ttx
index afd61de..9076cf7 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master1.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master1.ttx
@@ -519,7 +519,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master2.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master2.ttx
index 0ed2f4a..9bec8c0 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master2.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master2.ttx
@@ -503,7 +503,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master3.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master3.ttx
index 5666541..1cfdfd9 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master3.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master3.ttx
@@ -503,7 +503,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master4.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master4.ttx
index 8738187..1ae5d47 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master4.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily-Master4.ttx
@@ -503,7 +503,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily2-Master0.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily2-Master0.ttx
index 13d48e7..d1a3393 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily2-Master0.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily2-Master0.ttx
@@ -1081,7 +1081,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="A" out="A.sc"/>
</SingleSubst>
</Lookup>
@@ -1089,7 +1089,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="a" out="a.alt"/>
</SingleSubst>
</Lookup>
@@ -1097,7 +1097,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="ampersand" out="a,n,d"/>
</MultipleSubst>
</Lookup>
@@ -1105,7 +1105,7 @@
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <AlternateSubst index="0" Format="1">
+ <AlternateSubst index="0">
<AlternateSet glyph="a">
<Alternate glyph="a.alt"/>
<Alternate glyph="A.sc"/>
@@ -1116,7 +1116,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="f">
<Ligature components="t" glyph="f_t"/>
</LigatureSet>
@@ -1129,11 +1129,11 @@
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=0 -->
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="a"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="t"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Bold.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Bold.ttx
index 53e0dda..0f9e97a 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Bold.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Bold.ttx
@@ -480,14 +480,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Condensed.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Condensed.ttx
index 9b64f61..f8ff987 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Condensed.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Condensed.ttx
@@ -486,14 +486,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedBold.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedBold.ttx
index 5412599..2b7264d 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedBold.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedBold.ttx
@@ -486,14 +486,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedLight.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedLight.ttx
index 4315c6c..d03abf5 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedLight.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedLight.ttx
@@ -486,14 +486,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedSemiBold.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedSemiBold.ttx
index 526eb44..1189220 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedSemiBold.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-CondensedSemiBold.ttx
@@ -486,14 +486,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Light.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Light.ttx
index ddba5e4..3583c0d 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Light.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Light.ttx
@@ -486,14 +486,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Regular.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Regular.ttx
index 07f9c15..bf68b16 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Regular.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-Regular.ttx
@@ -480,14 +480,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-SemiBold.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-SemiBold.ttx
index 3674082..96badb3 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-SemiBold.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily3-SemiBold.ttx
@@ -486,14 +486,14 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="T"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="T" class="4"/>
<ClassDef glyph="n" class="3"/>
<ClassDef glyph="o" class="2"/>
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Italic15.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Italic15.ttx
index 6df0a83..ab5789e 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Italic15.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Italic15.ttx
@@ -455,7 +455,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="N" class="1"/>
<ClassDef glyph="O" class="1"/>
<ClassDef glyph="Odieresis" class="1"/>
@@ -467,7 +467,7 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="uni0308"/>
</Coverage>
</MarkGlyphSetsDef>
@@ -545,7 +545,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="N"/>
<Glyph value="O"/>
<Glyph value="Odieresis"/>
@@ -559,10 +559,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0308"/>
</MarkCoverage>
- <BaseCoverage Format="2">
+ <BaseCoverage>
<Glyph value="N"/>
<Glyph value="O"/>
<Glyph value="Odieresis"/>
@@ -627,10 +627,10 @@
<LookupFlag value="16"/><!-- useMarkFilteringSet -->
<!-- SubTableCount=1 -->
<MarkMarkPos index="0" Format="1">
- <Mark1Coverage Format="1">
+ <Mark1Coverage>
<Glyph value="uni0308"/>
</Mark1Coverage>
- <Mark2Coverage Format="1">
+ <Mark2Coverage>
<Glyph value="uni0308"/>
</Mark2Coverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Regular.ttx b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Regular.ttx
index ff7a52d..0b7063f 100644
--- a/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Regular.ttx
+++ b/Tests/varLib/data/master_ttx_interpolatable_ttf/TestFamily4-Regular.ttx
@@ -449,7 +449,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="N" class="1"/>
<ClassDef glyph="O" class="1"/>
<ClassDef glyph="Odieresis" class="1"/>
@@ -461,7 +461,7 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=1 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
<Glyph value="uni0308"/>
</Coverage>
</MarkGlyphSetsDef>
@@ -539,7 +539,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="N"/>
<Glyph value="O"/>
<Glyph value="Odieresis"/>
@@ -553,10 +553,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0308"/>
</MarkCoverage>
- <BaseCoverage Format="2">
+ <BaseCoverage>
<Glyph value="N"/>
<Glyph value="O"/>
<Glyph value="Odieresis"/>
@@ -621,10 +621,10 @@
<LookupFlag value="16"/><!-- useMarkFilteringSet -->
<!-- SubTableCount=1 -->
<MarkMarkPos index="0" Format="1">
- <Mark1Coverage Format="1">
+ <Mark1Coverage>
<Glyph value="uni0308"/>
</Mark1Coverage>
- <Mark2Coverage Format="1">
+ <Mark2Coverage>
<Glyph value="uni0308"/>
</Mark2Coverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/master_ttx_varfont_otf/TestCFF2VF.ttx b/Tests/varLib/data/master_ttx_varfont_otf/TestCFF2VF.ttx
index c2a718e..29c5bb3 100644
--- a/Tests/varLib/data/master_ttx_varfont_otf/TestCFF2VF.ttx
+++ b/Tests/varLib/data/master_ttx_varfont_otf/TestCFF2VF.ttx
@@ -623,7 +623,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="glyph00003"/>
</SingleSubst>
</Lookup>
@@ -631,7 +631,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="dollar" out="glyph00003"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/master_vpal_test/master_vpal_test_0.ttx b/Tests/varLib/data/master_vpal_test/master_vpal_test_0.ttx
index 1fbb45d..cd454b8 100644
--- a/Tests/varLib/data/master_vpal_test/master_vpal_test_0.ttx
+++ b/Tests/varLib/data/master_vpal_test/master_vpal_test_0.ttx
@@ -424,7 +424,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=5 -->
<SinglePos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni3001"/>
<Glyph value="uniFF1A"/>
</Coverage>
@@ -434,7 +434,7 @@
<Value index="1" XPlacement="-250" XAdvance="-500"/>
</SinglePos>
<SinglePos index="1" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni30FB"/>
</Coverage>
<ValueFormat value="7"/>
@@ -442,7 +442,7 @@
<Value index="0" XPlacement="-250" YPlacement="1" XAdvance="-500"/>
</SinglePos>
<SinglePos index="2" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni3073"/>
<Glyph value="uni3074"/>
</Coverage>
@@ -452,7 +452,7 @@
<Value index="1" XAdvance="-30"/>
</SinglePos>
<SinglePos index="3" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni307B"/>
</Coverage>
<ValueFormat value="1"/>
@@ -460,7 +460,7 @@
<Value index="0" XPlacement="11"/>
</SinglePos>
<SinglePos index="4" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uniFF2D"/>
</Coverage>
<ValueFormat value="5"/>
diff --git a/Tests/varLib/data/master_vpal_test/master_vpal_test_1.ttx b/Tests/varLib/data/master_vpal_test/master_vpal_test_1.ttx
index bb43958..e1b77c8 100644
--- a/Tests/varLib/data/master_vpal_test/master_vpal_test_1.ttx
+++ b/Tests/varLib/data/master_vpal_test/master_vpal_test_1.ttx
@@ -424,7 +424,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=3 -->
<SinglePos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni3001"/>
<Glyph value="uni30FB"/>
<Glyph value="uniFF1A"/>
@@ -436,7 +436,7 @@
<Value index="2" XPlacement="-250" XAdvance="-500"/>
</SinglePos>
<SinglePos index="1" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni3073"/>
<Glyph value="uni3074"/>
</Coverage>
@@ -446,7 +446,7 @@
<Value index="1" XAdvance="-30"/>
</SinglePos>
<SinglePos index="2" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uniFF2D"/>
<Glyph value="uni307B"/>
</Coverage>
diff --git a/Tests/varLib/data/master_vvar_cff2/TestVVAR.0.ttx b/Tests/varLib/data/master_vvar_cff2/TestVVAR.0.ttx
index 7383c17..d956d8c 100644
--- a/Tests/varLib/data/master_vvar_cff2/TestVVAR.0.ttx
+++ b/Tests/varLib/data/master_vvar_cff2/TestVVAR.0.ttx
@@ -705,7 +705,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni3042" out="c30843"/>
<Substitution in="uni56FD" out="c32051"/>
<Substitution in="uni6280" out="c31621"/>
@@ -718,7 +718,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni3042" out="c30843"/>
<Substitution in="uni56FD" out="c32051"/>
<Substitution in="uni6280" out="c31621"/>
diff --git a/Tests/varLib/data/master_vvar_cff2/TestVVAR.1.ttx b/Tests/varLib/data/master_vvar_cff2/TestVVAR.1.ttx
index f602097..9f67749 100644
--- a/Tests/varLib/data/master_vvar_cff2/TestVVAR.1.ttx
+++ b/Tests/varLib/data/master_vvar_cff2/TestVVAR.1.ttx
@@ -705,7 +705,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni3042" out="c30843"/>
<Substitution in="uni56FD" out="c32051"/>
<Substitution in="uni6280" out="c31621"/>
@@ -718,7 +718,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni3042" out="c30843"/>
<Substitution in="uni56FD" out="c32051"/>
<Substitution in="uni6280" out="c31621"/>
diff --git a/Tests/varLib/data/test_results/Build.ttx b/Tests/varLib/data/test_results/Build.ttx
index 5a406c8..c802bf3 100644
--- a/Tests/varLib/data/test_results/Build.ttx
+++ b/Tests/varLib/data/test_results/Build.ttx
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/test_results/BuildMain.ttx b/Tests/varLib/data/test_results/BuildMain.ttx
index 20add49..27d02d1 100644
--- a/Tests/varLib/data/test_results/BuildMain.ttx
+++ b/Tests/varLib/data/test_results/BuildMain.ttx
@@ -615,7 +615,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/test_results/BuildTestCFF2.ttx b/Tests/varLib/data/test_results/BuildTestCFF2.ttx
index 9f7d638..c4b9377 100644
--- a/Tests/varLib/data/test_results/BuildTestCFF2.ttx
+++ b/Tests/varLib/data/test_results/BuildTestCFF2.ttx
@@ -91,6 +91,8 @@
<StdVW>
<blend value="85 -51 87"/>
</StdVW>
+ <LanguageGroup value="0"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
</FDArray>
diff --git a/Tests/varLib/data/test_results/FeatureVars.ttx b/Tests/varLib/data/test_results/FeatureVars.ttx
index 18d90aa..ca24f41 100644
--- a/Tests/varLib/data/test_results/FeatureVars.ttx
+++ b/Tests/varLib/data/test_results/FeatureVars.ttx
@@ -55,7 +55,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0024" out="uni0024.nostroke"/>
</SingleSubst>
</Lookup>
@@ -63,7 +63,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0041" out="uni0061"/>
</SingleSubst>
</Lookup>
@@ -71,7 +71,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0061" out="uni0041"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/test_results/FeatureVarsCustomTag.ttx b/Tests/varLib/data/test_results/FeatureVarsCustomTag.ttx
index f50ef78..3f9e1e0 100644
--- a/Tests/varLib/data/test_results/FeatureVarsCustomTag.ttx
+++ b/Tests/varLib/data/test_results/FeatureVarsCustomTag.ttx
@@ -55,7 +55,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0024" out="uni0024.nostroke"/>
</SingleSubst>
</Lookup>
@@ -63,7 +63,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0041" out="uni0061"/>
</SingleSubst>
</Lookup>
@@ -71,7 +71,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0061" out="uni0041"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/test_results/FeatureVarsWholeRange.ttx b/Tests/varLib/data/test_results/FeatureVarsWholeRange.ttx
index 8e098b9..8ae64da 100644
--- a/Tests/varLib/data/test_results/FeatureVarsWholeRange.ttx
+++ b/Tests/varLib/data/test_results/FeatureVarsWholeRange.ttx
@@ -45,7 +45,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0024" out="uni0024.nostroke"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/test_results/FeatureVars_rclt.ttx b/Tests/varLib/data/test_results/FeatureVars_rclt.ttx
index a9a998f..b889f3a 100644
--- a/Tests/varLib/data/test_results/FeatureVars_rclt.ttx
+++ b/Tests/varLib/data/test_results/FeatureVars_rclt.ttx
@@ -71,7 +71,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0041" out="uni0061"/>
</SingleSubst>
</Lookup>
@@ -79,7 +79,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0041" out="uni0061"/>
</SingleSubst>
</Lookup>
@@ -87,7 +87,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0024" out="uni0024.nostroke"/>
</SingleSubst>
</Lookup>
@@ -95,7 +95,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0041" out="uni0061"/>
</SingleSubst>
</Lookup>
@@ -103,7 +103,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="uni0061" out="uni0041"/>
</SingleSubst>
</Lookup>
diff --git a/Tests/varLib/data/test_results/InterpolateLayout.ttx b/Tests/varLib/data/test_results/InterpolateLayout.ttx
index b1ea1e9..81e50fb 100644
--- a/Tests/varLib/data/test_results/InterpolateLayout.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayout.ttx
@@ -93,7 +93,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="A" out="A.sc"/>
</SingleSubst>
</Lookup>
@@ -101,7 +101,7 @@
<LookupType value="1"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <SingleSubst index="0" Format="1">
+ <SingleSubst index="0">
<Substitution in="a" out="a.alt"/>
</SingleSubst>
</Lookup>
@@ -109,7 +109,7 @@
<LookupType value="2"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <MultipleSubst index="0" Format="1">
+ <MultipleSubst index="0">
<Substitution in="ampersand" out="a,n,d"/>
</MultipleSubst>
</Lookup>
@@ -117,7 +117,7 @@
<LookupType value="3"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <AlternateSubst index="0" Format="1">
+ <AlternateSubst index="0">
<AlternateSet glyph="a">
<Alternate glyph="a.alt"/>
<Alternate glyph="A.sc"/>
@@ -128,7 +128,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="f">
<Ligature components="t" glyph="f_t"/>
</LigatureSet>
@@ -141,11 +141,11 @@
<ChainContextSubst index="0" Format="3">
<!-- BacktrackGlyphCount=0 -->
<!-- InputGlyphCount=1 -->
- <InputCoverage index="0" Format="1">
+ <InputCoverage index="0">
<Glyph value="a"/>
</InputCoverage>
<!-- LookAheadGlyphCount=1 -->
- <LookAheadCoverage index="0" Format="1">
+ <LookAheadCoverage index="0">
<Glyph value="t"/>
</LookAheadCoverage>
<!-- SubstCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff.ttx
index 74e9cc5..4180a33 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat value="5"/>
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff2.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff2.ttx
index 2e21b26..44a7558 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff2.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_diff2.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="a"/>
</Coverage>
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_same.ttx
index a61e75f..83407c1 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_1_same.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<SinglePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat value="5"/>
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff.ttx
index 4f94c37..0aeb497 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff.ttx
@@ -34,14 +34,14 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="a" class="1"/>
</ClassDef2>
<!-- Class1Count=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff2.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff2.ttx
index 811ed58..f00c4c3 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff2.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_diff2.ttx
@@ -34,16 +34,16 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="a"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="a" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="a" class="1"/>
</ClassDef2>
<!-- Class1Count=2 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_same.ttx
index 9872533..3656964 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_class_same.ttx
@@ -34,14 +34,14 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="2">
+ <ClassDef1>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="a" class="1"/>
</ClassDef2>
<!-- Class1Count=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff.ttx
index 113bd0b..f85985b 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff2.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff2.ttx
index efc5ee5..b085109 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff2.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_diff2.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="a"/>
</Coverage>
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_same.ttx
index 014c1ec..2a2a546 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_2_spec_same.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_diff.ttx
index 65d77f9..993e0a6 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_diff.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="a"/>
</Coverage>
<!-- EntryExitCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_same.ttx
index b7c8a25..1d5ebcd 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_3_same.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<CursivePos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="a"/>
</Coverage>
<!-- EntryExitCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_diff.ttx
index 72a8ccf..7c50f96 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_diff.ttx
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0303"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_same.ttx
index 9b41519..ab96180 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_4_same.ttx
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0303"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_diff.ttx
index 28480e7..28b5f91 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_diff.ttx
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkLigPos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0330"/>
</MarkCoverage>
- <LigatureCoverage Format="1">
+ <LigatureCoverage>
<Glyph value="f_t"/>
</LigatureCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_same.ttx
index 4830f9a..0df08c0 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_5_same.ttx
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkLigPos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0330"/>
</MarkCoverage>
- <LigatureCoverage Format="1">
+ <LigatureCoverage>
<Glyph value="f_t"/>
</LigatureCoverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_diff.ttx
index 38d6437..667d4f1 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_diff.ttx
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkMarkPos index="0" Format="1">
- <Mark1Coverage Format="1">
+ <Mark1Coverage>
<Glyph value="uni0303"/>
</Mark1Coverage>
- <Mark2Coverage Format="1">
+ <Mark2Coverage>
<Glyph value="uni0308"/>
</Mark2Coverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_same.ttx
index 05e4b51..34d0bff 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_6_same.ttx
@@ -34,10 +34,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkMarkPos index="0" Format="1">
- <Mark1Coverage Format="1">
+ <Mark1Coverage>
<Glyph value="uni0303"/>
</Mark1Coverage>
- <Mark2Coverage Format="1">
+ <Mark2Coverage>
<Glyph value="uni0308"/>
</Mark2Coverage>
<!-- ClassCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_diff.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_diff.ttx
index ea1fa7e..14e1209 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_diff.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_diff.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
@@ -54,10 +54,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0303"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
@@ -87,7 +87,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_same.ttx b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_same.ttx
index 1ad8118..eff24fc 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_same.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutGPOS_7_same.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<PairPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<ValueFormat1 value="4"/>
@@ -54,10 +54,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="uni0303"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="a"/>
</BaseCoverage>
<!-- ClassCount=1 -->
@@ -87,7 +87,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<ContextPos index="0" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
</Coverage>
<!-- PosRuleSetCount=1 -->
diff --git a/Tests/varLib/data/test_results/InterpolateLayoutMain.ttx b/Tests/varLib/data/test_results/InterpolateLayoutMain.ttx
index 6a0635d..49d491f 100644
--- a/Tests/varLib/data/test_results/InterpolateLayoutMain.ttx
+++ b/Tests/varLib/data/test_results/InterpolateLayoutMain.ttx
@@ -498,7 +498,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/test_results/InterpolateTestCFF2VF.ttx b/Tests/varLib/data/test_results/InterpolateTestCFF2VF.ttx
index e2d0f71..949e6da 100644
--- a/Tests/varLib/data/test_results/InterpolateTestCFF2VF.ttx
+++ b/Tests/varLib/data/test_results/InterpolateTestCFF2VF.ttx
@@ -24,6 +24,8 @@
<BlueFuzz value="0"/>
<StdHW value="28"/>
<StdVW value="34"/>
+ <LanguageGroup value="0"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
</FDArray>
diff --git a/Tests/varLib/data/test_results/Mutator.ttx b/Tests/varLib/data/test_results/Mutator.ttx
index 75a0879..71e5f28 100644
--- a/Tests/varLib/data/test_results/Mutator.ttx
+++ b/Tests/varLib/data/test_results/Mutator.ttx
@@ -498,7 +498,7 @@
<GDEF>
<Version value="0x00010000"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/test_results/SingleMaster.ttx b/Tests/varLib/data/test_results/SingleMaster.ttx
index 999f500..02cfe32 100644
--- a/Tests/varLib/data/test_results/SingleMaster.ttx
+++ b/Tests/varLib/data/test_results/SingleMaster.ttx
@@ -3,7 +3,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="2">
+ <GlyphClassDef>
<ClassDef glyph="uni0024" class="1"/>
<ClassDef glyph="uni0024.nostroke" class="1"/>
<ClassDef glyph="uni0041" class="1"/>
diff --git a/Tests/varLib/data/test_results/SparseMasters.ttx b/Tests/varLib/data/test_results/SparseMasters.ttx
index fb9cb46..a3f8e61 100644
--- a/Tests/varLib/data/test_results/SparseMasters.ttx
+++ b/Tests/varLib/data/test_results/SparseMasters.ttx
@@ -290,7 +290,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="dotabovecomb" class="3"/>
<ClassDef glyph="e" class="1"/>
</GlyphClassDef>
@@ -352,10 +352,10 @@
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
<MarkBasePos index="0" Format="1">
- <MarkCoverage Format="1">
+ <MarkCoverage>
<Glyph value="dotabovecomb"/>
</MarkCoverage>
- <BaseCoverage Format="1">
+ <BaseCoverage>
<Glyph value="e"/>
</BaseCoverage>
<!-- ClassCount=1 -->
@@ -425,7 +425,7 @@
<LookupType value="4"/>
<LookupFlag value="0"/>
<!-- SubTableCount=1 -->
- <LigatureSubst index="0" Format="1">
+ <LigatureSubst index="0">
<LigatureSet glyph="a">
<Ligature components="e,s,s" glyph="s"/>
</LigatureSet>
diff --git a/Tests/varLib/data/test_results/TestNonMarkingCFF2.ttx b/Tests/varLib/data/test_results/TestNonMarkingCFF2.ttx
index 26bd7ba..a78e6a6 100644
--- a/Tests/varLib/data/test_results/TestNonMarkingCFF2.ttx
+++ b/Tests/varLib/data/test_results/TestNonMarkingCFF2.ttx
@@ -36,6 +36,8 @@
<StdVW>
<blend value="34 51"/>
</StdVW>
+ <LanguageGroup value="0"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
</FDArray>
diff --git a/Tests/varLib/data/test_results/TestSparseCFF2VF.ttx b/Tests/varLib/data/test_results/TestSparseCFF2VF.ttx
index f05f62f..264a3d4 100644
--- a/Tests/varLib/data/test_results/TestSparseCFF2VF.ttx
+++ b/Tests/varLib/data/test_results/TestSparseCFF2VF.ttx
@@ -138,6 +138,8 @@
<BlueFuzz value="0"/>
<StdHW value="1"/>
<StdVW value="1"/>
+ <LanguageGroup value="1"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
<FontDict index="1">
@@ -148,6 +150,8 @@
<BlueFuzz value="0"/>
<StdHW value="1"/>
<StdVW value="1"/>
+ <LanguageGroup value="1"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
<FontDict index="2">
@@ -156,6 +160,8 @@
<BlueScale value="0.039625"/>
<BlueShift value="7"/>
<BlueFuzz value="1"/>
+ <LanguageGroup value="0"/>
+ <ExpansionFactor value="0.06"/>
</Private>
</FontDict>
</FDArray>
@@ -290,7 +296,7 @@
</CharString>
<CharString name="cid06449" fdSelectIndex="1">
2 vsindex
- -60 30 203 30 -9 9 67 7 -7 14 -14 30 -20 20 80 30 59 30 121 30 18 93 -30 30 -30 108 -23 0 -26 67 2 76 -98 -2 -111 42 0 47 -13 0 -14 13 0 14 -33 0 -37 11 0 13 -11 0 -13 8 0 9 -7 0 -8 53 0 60 -32 0 -36 32 0 36 -52 0 -59 57 1 65 -33 0 -38 53 0 60 -83 -1 -93 54 0 60 -6 -19 -24 33 19 55 -76 -1 -86 76 1 86 -76 -1 -86 59 1 67 26 blend
+ -60 30 203 30 -9 9 67 7 -7 14 -14 30 -20 20 80 30 59 30 121 30 18 93 -30 30 -30 108 -23 0 -26 67 2 76 -98 -2 -111 42 0 47 -13 0 -14 13 0 14 -33 0 -37 11 0 13 -11 0 -13 8 0 8 -8 0 -8 53 0 60 -32 0 -36 32 0 36 -52 0 -59 57 1 65 -33 0 -38 53 0 60 -83 -1 -93 54 0 60 -6 -19 -24 33 19 55 -76 -1 -86 76 1 86 -76 -1 -86 59 1 67 26 blend
hstemhm
77 30 42 30 139 30 23 30 71 10 74 30 15 30 16 30 158 30 28 30 -4 29 -14 0 -16 88 1 99 -82 -1 -92 87 1 98 -130 -1 -146 102 1 114 -73 -1 -82 74 2 84 -112 -2 -126 27 0 30 13 0 15 90 1 101 -126 -1 -142 75 1 84 -68 -1 -76 102 1 115 -144 -1 -162 94 1 105 -79 -1 -88 95 1 106 -81 -1 -91 74 1 83 22 blend
vstemhm
diff --git a/Tests/varLib/data/test_results/test_vpal.ttx b/Tests/varLib/data/test_results/test_vpal.ttx
index 334ced5..be61293 100644
--- a/Tests/varLib/data/test_results/test_vpal.ttx
+++ b/Tests/varLib/data/test_results/test_vpal.ttx
@@ -34,7 +34,7 @@
<LookupFlag value="0"/>
<!-- SubTableCount=6 -->
<SinglePos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uniFF1A"/>
<Glyph value="uni3074"/>
</Coverage>
@@ -44,7 +44,7 @@
<Value index="1" XPlacement="0" YPlacement="0" XAdvance="-30"/>
</SinglePos>
<SinglePos index="1" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni3001"/>
</Coverage>
<ValueFormat value="23"/>
@@ -57,7 +57,7 @@
</Value>
</SinglePos>
<SinglePos index="2" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni30FB"/>
</Coverage>
<ValueFormat value="39"/>
@@ -70,7 +70,7 @@
</Value>
</SinglePos>
<SinglePos index="3" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uniFF2D"/>
</Coverage>
<ValueFormat value="87"/>
@@ -88,7 +88,7 @@
</Value>
</SinglePos>
<SinglePos index="4" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni3073"/>
</Coverage>
<ValueFormat value="71"/>
@@ -101,7 +101,7 @@
</Value>
</SinglePos>
<SinglePos index="5" Format="1">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="uni307B"/>
</Coverage>
<ValueFormat value="23"/>
diff --git a/Tests/varLib/featureVars_test.py b/Tests/varLib/featureVars_test.py
index 8422886..89675af 100644
--- a/Tests/varLib/featureVars_test.py
+++ b/Tests/varLib/featureVars_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.varLib.featureVars import (
overlayFeatureVariations)
diff --git a/Tests/varLib/instancer/conftest.py b/Tests/varLib/instancer/conftest.py
new file mode 100644
index 0000000..0ac8091
--- /dev/null
+++ b/Tests/varLib/instancer/conftest.py
@@ -0,0 +1,13 @@
+import os
+from fontTools import ttLib
+import pytest
+
+
+TESTDATA = os.path.join(os.path.dirname(__file__), "data")
+
+
+@pytest.fixture
+def varfont():
+ f = ttLib.TTFont()
+ f.importXML(os.path.join(TESTDATA, "PartialInstancerTest-VF.ttx"))
+ return f
diff --git a/Tests/varLib/data/PartialInstancerTest-VF.ttx b/Tests/varLib/instancer/data/PartialInstancerTest-VF.ttx
similarity index 98%
rename from Tests/varLib/data/PartialInstancerTest-VF.ttx
rename to Tests/varLib/instancer/data/PartialInstancerTest-VF.ttx
index 92540e0..268b506 100644
--- a/Tests/varLib/data/PartialInstancerTest-VF.ttx
+++ b/Tests/varLib/instancer/data/PartialInstancerTest-VF.ttx
@@ -479,6 +479,9 @@
<namerecord nameID="296" platformID="3" platEncID="1" langID="0x409">
TestVariableFont-XCdBd
</namerecord>
+ <namerecord nameID="297" platformID="3" platEncID="1" langID="0x409">
+ Normal
+ </namerecord>
</name>
<post>
@@ -764,6 +767,15 @@
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
+ <AxisValue index="3" Format="4">
+ <!-- AxisCount=1 -->
+ <Flags value="2"/>
+ <ValueNameID value="297"/> <!-- Normal -->
+ <AxisValueRecord index="0">
+ <AxisIndex value="1"/>
+ <Value value="100.0"/>
+ </AxisValueRecord>
+ </AxisValue>
</AxisValueArray>
<ElidedFallbackNameID value="2"/> <!-- Regular -->
</STAT>
diff --git a/Tests/varLib/data/PartialInstancerTest2-VF.ttx b/Tests/varLib/instancer/data/PartialInstancerTest2-VF.ttx
similarity index 99%
rename from Tests/varLib/data/PartialInstancerTest2-VF.ttx
rename to Tests/varLib/instancer/data/PartialInstancerTest2-VF.ttx
index 6caef1b..cd7ffa0 100644
--- a/Tests/varLib/data/PartialInstancerTest2-VF.ttx
+++ b/Tests/varLib/instancer/data/PartialInstancerTest2-VF.ttx
@@ -539,7 +539,7 @@
<GDEF>
<Version value="0x00010003"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="1"/>
@@ -547,13 +547,13 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
</Coverage>
</MarkGlyphSetsDef>
<VarStore Format="1">
@@ -652,19 +652,19 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="T"/>
<Glyph value="Agrave"/>
</Coverage>
<ValueFormat1 value="68"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
diff --git a/Tests/varLib/data/PartialInstancerTest3-VF.ttx b/Tests/varLib/instancer/data/PartialInstancerTest3-VF.ttx
similarity index 100%
rename from Tests/varLib/data/PartialInstancerTest3-VF.ttx
rename to Tests/varLib/instancer/data/PartialInstancerTest3-VF.ttx
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-100,100.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-100,100.ttx
similarity index 97%
rename from Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-100,100.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-100,100.ttx
index 5e1107c..776a92f 100644
--- a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-100,100.ttx
+++ b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-100,100.ttx
@@ -335,7 +335,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="1"/>
@@ -343,13 +343,13 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
</Coverage>
</MarkGlyphSetsDef>
</GDEF>
@@ -420,17 +420,17 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="T"/>
<Glyph value="Agrave"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="T" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
@@ -531,7 +531,7 @@
</AxisValue>
<AxisValue index="1" Format="2">
<AxisIndex value="1"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Regular -->
<NominalValue value="100.0"/>
<RangeMinValue value="93.75"/>
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-100,62.5.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-100,62.5.ttx
similarity index 98%
rename from Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-100,62.5.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-100,62.5.ttx
index 146e863..61bc41c 100644
--- a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-100,62.5.ttx
+++ b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-100,62.5.ttx
@@ -335,7 +335,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="1"/>
@@ -343,13 +343,13 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
</Coverage>
</MarkGlyphSetsDef>
</GDEF>
@@ -420,17 +420,17 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="T"/>
<Glyph value="Agrave"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="T" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-400,100.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-400,100.ttx
similarity index 97%
rename from Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-400,100.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-400,100.ttx
index add86a6..c2d2057 100644
--- a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-400,100.ttx
+++ b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-400,100.ttx
@@ -329,7 +329,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="1"/>
@@ -337,13 +337,13 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
</Coverage>
</MarkGlyphSetsDef>
</GDEF>
@@ -414,17 +414,17 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="T"/>
<Glyph value="Agrave"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="T" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
@@ -519,14 +519,14 @@
<AxisValueArray>
<AxisValue index="0" Format="3">
<AxisIndex value="0"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Regular -->
<Value value="400.0"/>
<LinkedValue value="700.0"/>
</AxisValue>
<AxisValue index="1" Format="2">
<AxisIndex value="1"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Regular -->
<NominalValue value="100.0"/>
<RangeMinValue value="93.75"/>
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-400,62.5.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-400,62.5.ttx
similarity index 97%
rename from Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-400,62.5.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-400,62.5.ttx
index 1405904..63eeb0e 100644
--- a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-400,62.5.ttx
+++ b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-400,62.5.ttx
@@ -335,7 +335,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="1"/>
@@ -343,13 +343,13 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
</Coverage>
</MarkGlyphSetsDef>
</GDEF>
@@ -420,17 +420,17 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="T"/>
<Glyph value="Agrave"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="T" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
@@ -525,7 +525,7 @@
<AxisValueArray>
<AxisValue index="0" Format="3">
<AxisIndex value="0"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Regular -->
<Value value="400.0"/>
<LinkedValue value="700.0"/>
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-900,100.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-900,100.ttx
similarity index 97%
rename from Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-900,100.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-900,100.ttx
index e48936a..013ba1e 100644
--- a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-900,100.ttx
+++ b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-900,100.ttx
@@ -335,7 +335,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="1"/>
@@ -343,13 +343,13 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
</Coverage>
</MarkGlyphSetsDef>
</GDEF>
@@ -420,17 +420,17 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="T"/>
<Glyph value="Agrave"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="T" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
@@ -531,7 +531,7 @@
</AxisValue>
<AxisValue index="1" Format="2">
<AxisIndex value="1"/>
- <Flags value="2"/>
+ <Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="261"/> <!-- Regular -->
<NominalValue value="100.0"/>
<RangeMinValue value="93.75"/>
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-900,62.5.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-900,62.5.ttx
similarity index 98%
rename from Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-900,62.5.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-900,62.5.ttx
index 62bd722..45e34cb 100644
--- a/Tests/varLib/data/test_results/PartialInstancerTest2-VF-instance-900,62.5.ttx
+++ b/Tests/varLib/instancer/data/test_results/PartialInstancerTest2-VF-instance-900,62.5.ttx
@@ -335,7 +335,7 @@
<GDEF>
<Version value="0x00010002"/>
- <GlyphClassDef Format="1">
+ <GlyphClassDef>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="1"/>
@@ -343,13 +343,13 @@
<MarkGlyphSetsDef>
<MarkSetTableFormat value="1"/>
<!-- MarkSetCount=4 -->
- <Coverage index="0" Format="1">
+ <Coverage index="0">
</Coverage>
- <Coverage index="1" Format="1">
+ <Coverage index="1">
</Coverage>
- <Coverage index="2" Format="1">
+ <Coverage index="2">
</Coverage>
- <Coverage index="3" Format="1">
+ <Coverage index="3">
</Coverage>
</MarkGlyphSetsDef>
</GDEF>
@@ -420,17 +420,17 @@
<LookupFlag value="8"/><!-- ignoreMarks -->
<!-- SubTableCount=1 -->
<PairPos index="0" Format="2">
- <Coverage Format="1">
+ <Coverage>
<Glyph value="A"/>
<Glyph value="T"/>
<Glyph value="Agrave"/>
</Coverage>
<ValueFormat1 value="4"/>
<ValueFormat2 value="0"/>
- <ClassDef1 Format="1">
+ <ClassDef1>
<ClassDef glyph="T" class="1"/>
</ClassDef1>
- <ClassDef2 Format="1">
+ <ClassDef2>
<ClassDef glyph="A" class="1"/>
<ClassDef glyph="Agrave" class="1"/>
<ClassDef glyph="T" class="2"/>
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlap-flags.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlap-flags.ttx
similarity index 100%
rename from Tests/varLib/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlap-flags.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlap-flags.ttx
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlaps.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlaps.ttx
similarity index 100%
rename from Tests/varLib/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlaps.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest3-VF-instance-400-no-overlaps.ttx
diff --git a/Tests/varLib/data/test_results/PartialInstancerTest3-VF-instance-700-no-overlaps.ttx b/Tests/varLib/instancer/data/test_results/PartialInstancerTest3-VF-instance-700-no-overlaps.ttx
similarity index 100%
rename from Tests/varLib/data/test_results/PartialInstancerTest3-VF-instance-700-no-overlaps.ttx
rename to Tests/varLib/instancer/data/test_results/PartialInstancerTest3-VF-instance-700-no-overlaps.ttx
diff --git a/Tests/varLib/instancer_test.py b/Tests/varLib/instancer/instancer_test.py
similarity index 98%
rename from Tests/varLib/instancer_test.py
rename to Tests/varLib/instancer/instancer_test.py
index 5e999dc..cb7e854 100644
--- a/Tests/varLib/instancer_test.py
+++ b/Tests/varLib/instancer/instancer_test.py
@@ -1,4 +1,4 @@
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import Tag
from fontTools.misc.fixedTools import floatToFixedToFloat
from fontTools import ttLib
from fontTools import designspaceLib
@@ -14,22 +14,19 @@
from fontTools.varLib import models
import collections
from copy import deepcopy
+from io import BytesIO, StringIO
import logging
import os
import re
+from types import SimpleNamespace
import pytest
+# see Tests/varLib/instancer/conftest.py for "varfont" fixture definition
+
TESTDATA = os.path.join(os.path.dirname(__file__), "data")
-@pytest.fixture
-def varfont():
- f = ttLib.TTFont()
- f.importXML(os.path.join(TESTDATA, "PartialInstancerTest-VF.ttx"))
- return f
-
-
@pytest.fixture(params=[True, False], ids=["optimize", "no-optimize"])
def optimize(request):
return request.param
@@ -144,7 +141,7 @@
assert "gvar" not in varfont
def test_composite_glyph_not_in_gvar(self, varfont):
- """ The 'minus' glyph is a composite glyph, which references 'hyphen' as a
+ """The 'minus' glyph is a composite glyph, which references 'hyphen' as a
component, but has no tuple variations in gvar table, so the component offset
and the phantom points do not change; however the sidebearings and bounding box
do change as a result of the parent glyph 'hyphen' changing.
@@ -1209,8 +1206,8 @@
@pytest.mark.parametrize(
"location, expected",
[
- ({"wght": 400}, ["Regular", "Condensed", "Upright"]),
- ({"wdth": 100}, ["Thin", "Regular", "Black", "Upright"]),
+ ({"wght": 400}, ["Regular", "Condensed", "Upright", "Normal"]),
+ ({"wdth": 100}, ["Thin", "Regular", "Black", "Upright", "Normal"]),
],
)
def test_pin_and_drop_axis(self, varfont, location, expected):
@@ -1341,30 +1338,6 @@
assert axisValue in varfont2["STAT"].table.AxisValueArray.AxisValue
-def test_pruningUnusedNames(varfont):
- varNameIDs = instancer.getVariationNameIDs(varfont)
-
- assert varNameIDs == set(range(256, 296 + 1))
-
- fvar = varfont["fvar"]
- stat = varfont["STAT"].table
-
- with instancer.pruningUnusedNames(varfont):
- del fvar.axes[0] # Weight (nameID=256)
- del fvar.instances[0] # Thin (nameID=258)
- del stat.DesignAxisRecord.Axis[0] # Weight (nameID=256)
- del stat.AxisValueArray.AxisValue[0] # Thin (nameID=258)
-
- assert not any(n for n in varfont["name"].names if n.nameID in {256, 258})
-
- with instancer.pruningUnusedNames(varfont):
- del varfont["fvar"]
- del varfont["STAT"]
-
- assert not any(n for n in varfont["name"].names if n.nameID in varNameIDs)
- assert "ltag" not in varfont
-
-
def test_setMacOverlapFlags():
flagOverlapCompound = _g_l_y_f.OVERLAP_COMPOUND
flagOverlapSimple = _g_l_y_f.flagOverlapSimple
diff --git a/Tests/varLib/instancer/names_test.py b/Tests/varLib/instancer/names_test.py
new file mode 100644
index 0000000..9774458
--- /dev/null
+++ b/Tests/varLib/instancer/names_test.py
@@ -0,0 +1,322 @@
+from fontTools.ttLib.tables import otTables
+from fontTools.otlLib.builder import buildStatTable
+from fontTools.varLib import instancer
+
+import pytest
+
+
+def test_pruningUnusedNames(varfont):
+ varNameIDs = instancer.names.getVariationNameIDs(varfont)
+
+ assert varNameIDs == set(range(256, 297 + 1))
+
+ fvar = varfont["fvar"]
+ stat = varfont["STAT"].table
+
+ with instancer.names.pruningUnusedNames(varfont):
+ del fvar.axes[0] # Weight (nameID=256)
+ del fvar.instances[0] # Thin (nameID=258)
+ del stat.DesignAxisRecord.Axis[0] # Weight (nameID=256)
+ del stat.AxisValueArray.AxisValue[0] # Thin (nameID=258)
+
+ assert not any(n for n in varfont["name"].names if n.nameID in {256, 258})
+
+ with instancer.names.pruningUnusedNames(varfont):
+ del varfont["fvar"]
+ del varfont["STAT"]
+
+ assert not any(n for n in varfont["name"].names if n.nameID in varNameIDs)
+ assert "ltag" not in varfont
+
+
+def _test_name_records(varfont, expected, isNonRIBBI, platforms=[0x409]):
+ nametable = varfont["name"]
+ font_names = {
+ (r.nameID, r.platformID, r.platEncID, r.langID): r.toUnicode()
+ for r in nametable.names
+ }
+ for k in expected:
+ if k[-1] not in platforms:
+ continue
+ assert font_names[k] == expected[k]
+
+ font_nameids = set(i[0] for i in font_names)
+ if isNonRIBBI:
+ assert 16 in font_nameids
+ assert 17 in font_nameids
+
+ if "fvar" not in varfont:
+ assert 25 not in font_nameids
+
+
+@pytest.mark.parametrize(
+ "limits, expected, isNonRIBBI",
+ [
+ # Regular
+ (
+ {"wght": 400},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font",
+ (2, 3, 1, 0x409): "Regular",
+ (3, 3, 1, 0x409): "2.001;GOOG;TestVariableFont-Regular",
+ (6, 3, 1, 0x409): "TestVariableFont-Regular",
+ },
+ False,
+ ),
+ # Regular Normal (width axis Normal isn't included since it is elided)
+ (
+ {"wght": 400, "wdth": 100},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font",
+ (2, 3, 1, 0x409): "Regular",
+ (3, 3, 1, 0x409): "2.001;GOOG;TestVariableFont-Regular",
+ (6, 3, 1, 0x409): "TestVariableFont-Regular",
+ },
+ False,
+ ),
+ # Black
+ (
+ {"wght": 900},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font Black",
+ (2, 3, 1, 0x409): "Regular",
+ (3, 3, 1, 0x409): "2.001;GOOG;TestVariableFont-Black",
+ (6, 3, 1, 0x409): "TestVariableFont-Black",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Black",
+ },
+ True,
+ ),
+ # Thin
+ (
+ {"wght": 100},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font Thin",
+ (2, 3, 1, 0x409): "Regular",
+ (3, 3, 1, 0x409): "2.001;GOOG;TestVariableFont-Thin",
+ (6, 3, 1, 0x409): "TestVariableFont-Thin",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Thin",
+ },
+ True,
+ ),
+ # Thin Condensed
+ (
+ {"wght": 100, "wdth": 79},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font Thin Condensed",
+ (2, 3, 1, 0x409): "Regular",
+ (3, 3, 1, 0x409): "2.001;GOOG;TestVariableFont-ThinCondensed",
+ (6, 3, 1, 0x409): "TestVariableFont-ThinCondensed",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Thin Condensed",
+ },
+ True,
+ ),
+ # Condensed with unpinned weights
+ (
+ {"wdth": 79, "wght": instancer.AxisRange(400, 900)},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font Condensed",
+ (2, 3, 1, 0x409): "Regular",
+ (3, 3, 1, 0x409): "2.001;GOOG;TestVariableFont-Condensed",
+ (6, 3, 1, 0x409): "TestVariableFont-Condensed",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Condensed",
+ },
+ True,
+ ),
+ ],
+)
+def test_updateNameTable_with_registered_axes_ribbi(
+ varfont, limits, expected, isNonRIBBI
+):
+ instancer.names.updateNameTable(varfont, limits)
+ _test_name_records(varfont, expected, isNonRIBBI)
+
+
+def test_updatetNameTable_axis_order(varfont):
+ axes = [
+ dict(
+ tag="wght",
+ name="Weight",
+ values=[
+ dict(value=400, name="Regular"),
+ ],
+ ),
+ dict(
+ tag="wdth",
+ name="Width",
+ values=[
+ dict(value=75, name="Condensed"),
+ ],
+ ),
+ ]
+ nametable = varfont["name"]
+ buildStatTable(varfont, axes)
+ instancer.names.updateNameTable(varfont, {"wdth": 75, "wght": 400})
+ assert nametable.getName(17, 3, 1, 0x409).toUnicode() == "Regular Condensed"
+
+ # Swap the axes so the names get swapped
+ axes[0], axes[1] = axes[1], axes[0]
+
+ buildStatTable(varfont, axes)
+ instancer.names.updateNameTable(varfont, {"wdth": 75, "wght": 400})
+ assert nametable.getName(17, 3, 1, 0x409).toUnicode() == "Condensed Regular"
+
+
+@pytest.mark.parametrize(
+ "limits, expected, isNonRIBBI",
+ [
+ # Regular | Normal
+ (
+ {"wght": 400},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font",
+ (2, 3, 1, 0x409): "Normal",
+ },
+ False,
+ ),
+ # Black | Negreta
+ (
+ {"wght": 900},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font Negreta",
+ (2, 3, 1, 0x409): "Normal",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Negreta",
+ },
+ True,
+ ),
+ # Black Condensed | Negreta Zhuštěné
+ (
+ {"wght": 900, "wdth": 79},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font Negreta Zhuštěné",
+ (2, 3, 1, 0x409): "Normal",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Negreta Zhuštěné",
+ },
+ True,
+ ),
+ ],
+)
+def test_updateNameTable_with_multilingual_names(varfont, limits, expected, isNonRIBBI):
+ name = varfont["name"]
+ # langID 0x405 is the Czech Windows langID
+ name.setName("Test Variable Font", 1, 3, 1, 0x405)
+ name.setName("Normal", 2, 3, 1, 0x405)
+ name.setName("Normal", 261, 3, 1, 0x405) # nameID 261=Regular STAT entry
+ name.setName("Negreta", 266, 3, 1, 0x405) # nameID 266=Black STAT entry
+ name.setName("Zhuštěné", 279, 3, 1, 0x405) # nameID 279=Condensed STAT entry
+
+ instancer.names.updateNameTable(varfont, limits)
+ _test_name_records(varfont, expected, isNonRIBBI, platforms=[0x405])
+
+
+def test_updateNameTable_missing_axisValues(varfont):
+ with pytest.raises(ValueError, match="Cannot find Axis Values \['wght=200'\]"):
+ instancer.names.updateNameTable(varfont, {"wght": 200})
+
+
+def test_updateNameTable_missing_stat(varfont):
+ del varfont["STAT"]
+ with pytest.raises(
+ ValueError, match="Cannot update name table since there is no STAT table."
+ ):
+ instancer.names.updateNameTable(varfont, {"wght": 400})
+
+
+@pytest.mark.parametrize(
+ "limits, expected, isNonRIBBI",
+ [
+ # Regular | Normal
+ (
+ {"wght": 400},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font",
+ (2, 3, 1, 0x409): "Italic",
+ (6, 3, 1, 0x409): "TestVariableFont-Italic",
+ },
+ False,
+ ),
+ # Black Condensed Italic
+ (
+ {"wght": 900, "wdth": 79},
+ {
+ (1, 3, 1, 0x409): "Test Variable Font Black Condensed",
+ (2, 3, 1, 0x409): "Italic",
+ (6, 3, 1, 0x409): "TestVariableFont-BlackCondensedItalic",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Black Condensed Italic",
+ },
+ True,
+ ),
+ ],
+)
+def test_updateNameTable_vf_with_italic_attribute(
+ varfont, limits, expected, isNonRIBBI
+):
+ font_link_axisValue = varfont["STAT"].table.AxisValueArray.AxisValue[4]
+ # Unset ELIDABLE_AXIS_VALUE_NAME flag
+ font_link_axisValue.Flags &= ~instancer.names.ELIDABLE_AXIS_VALUE_NAME
+ font_link_axisValue.ValueNameID = 294 # Roman --> Italic
+
+ instancer.names.updateNameTable(varfont, limits)
+ _test_name_records(varfont, expected, isNonRIBBI)
+
+
+def test_updateNameTable_format4_axisValues(varfont):
+ # format 4 axisValues should dominate the other axisValues
+ stat = varfont["STAT"].table
+
+ axisValue = otTables.AxisValue()
+ axisValue.Format = 4
+ axisValue.Flags = 0
+ varfont["name"].setName("Dominant Value", 297, 3, 1, 0x409)
+ axisValue.ValueNameID = 297
+ axisValue.AxisValueRecord = []
+ for tag, value in (("wght", 900), ("wdth", 79)):
+ rec = otTables.AxisValueRecord()
+ rec.AxisIndex = next(
+ i for i, a in enumerate(stat.DesignAxisRecord.Axis) if a.AxisTag == tag
+ )
+ rec.Value = value
+ axisValue.AxisValueRecord.append(rec)
+ stat.AxisValueArray.AxisValue.append(axisValue)
+
+ instancer.names.updateNameTable(varfont, {"wdth": 79, "wght": 900})
+ expected = {
+ (1, 3, 1, 0x409): "Test Variable Font Dominant Value",
+ (2, 3, 1, 0x409): "Regular",
+ (16, 3, 1, 0x409): "Test Variable Font",
+ (17, 3, 1, 0x409): "Dominant Value",
+ }
+ _test_name_records(varfont, expected, isNonRIBBI=True)
+
+
+def test_updateNameTable_elided_axisValues(varfont):
+ stat = varfont["STAT"].table
+ # set ELIDABLE_AXIS_VALUE_NAME flag for all axisValues
+ for axisValue in stat.AxisValueArray.AxisValue:
+ axisValue.Flags |= instancer.names.ELIDABLE_AXIS_VALUE_NAME
+
+ stat.ElidedFallbackNameID = 266 # Regular --> Black
+ instancer.names.updateNameTable(varfont, {"wght": 400})
+ # Since all axis values are elided, the elided fallback name
+ # must be used to construct the style names. Since we
+ # changed it to Black, we need both a typoSubFamilyName and
+ # the subFamilyName set so it conforms to the RIBBI model.
+ expected = {(2, 3, 1, 0x409): "Regular", (17, 3, 1, 0x409): "Black"}
+ _test_name_records(varfont, expected, isNonRIBBI=True)
+
+
+def test_updateNameTable_existing_subfamily_name_is_not_regular(varfont):
+ # Check the subFamily name will be set to Regular when we update a name
+ # table to a non-RIBBI style and the current subFamily name is a RIBBI
+ # style which isn't Regular.
+ varfont["name"].setName("Bold", 2, 3, 1, 0x409) # subFamily Regular --> Bold
+
+ instancer.names.updateNameTable(varfont, {"wght": 100})
+ expected = {(2, 3, 1, 0x409): "Regular", (17, 3, 1, 0x409): "Thin"}
+ _test_name_records(varfont, expected, isNonRIBBI=True)
diff --git a/Tests/varLib/interpolatable_test.py b/Tests/varLib/interpolatable_test.py
index d6bc6ce..a30be71 100644
--- a/Tests/varLib/interpolatable_test.py
+++ b/Tests/varLib/interpolatable_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.varLib.interpolatable import main as interpolatable_main
import os
diff --git a/Tests/varLib/interpolate_layout_test.py b/Tests/varLib/interpolate_layout_test.py
index 8fdf60f..d7134d7 100644
--- a/Tests/varLib/interpolate_layout_test.py
+++ b/Tests/varLib/interpolate_layout_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.varLib import build
from fontTools.varLib.interpolate_layout import interpolate_layout
diff --git a/Tests/varLib/models_test.py b/Tests/varLib/models_test.py
index 1027f29..c220d3d 100644
--- a/Tests/varLib/models_test.py
+++ b/Tests/varLib/models_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.varLib.models import (
normalizeLocation, supportScalar, VariationModel, VariationModelError)
import pytest
diff --git a/Tests/varLib/mutator_test.py b/Tests/varLib/mutator_test.py
index 010ab5d..abe5d02 100644
--- a/Tests/varLib/mutator_test.py
+++ b/Tests/varLib/mutator_test.py
@@ -1,4 +1,3 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.varLib import build
from fontTools.varLib.mutator import main as mutator
diff --git a/Tests/varLib/varLib_test.py b/Tests/varLib/varLib_test.py
index da1f94f..b8e7183 100644
--- a/Tests/varLib/varLib_test.py
+++ b/Tests/varLib/varLib_test.py
@@ -1,7 +1,7 @@
-from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont, newTable
from fontTools.varLib import build, load_designspace
from fontTools.varLib.errors import VarLibValidationError
+import fontTools.varLib.errors as varLibErrors
from fontTools.varLib.mutator import instantiateVariableFont
from fontTools.varLib import main as varLib_main, load_masters
from fontTools.varLib import set_default_weight_width_slant
@@ -10,6 +10,7 @@
)
from fontTools.feaLib.builder import addOpenTypeFeaturesFromString
import difflib
+from io import BytesIO
import os
import shutil
import sys
@@ -813,6 +814,62 @@
assert ds_loaded.instances[0].location == {"weight": 0, "width": 50}
+ def test_varlib_build_incompatible_features(self):
+ with pytest.raises(
+ varLibErrors.ShouldBeConstant,
+ match = """
+
+Couldn't merge the fonts, because some values were different, but should have
+been the same. This happened while performing the following operation:
+GPOS.table.FeatureList.FeatureCount
+
+The problem is likely to be in Simple Two Axis Bold:
+
+Incompatible features between masters.
+Expected: kern, mark.
+Got: kern.
+"""):
+
+ self._run_varlib_build_test(
+ designspace_name="IncompatibleFeatures",
+ font_name="IncompatibleFeatures",
+ tables=["GPOS"],
+ expected_ttx_name="IncompatibleFeatures",
+ save_before_dump=True,
+ )
+
+ def test_varlib_build_incompatible_lookup_types(self):
+ with pytest.raises(
+ varLibErrors.MismatchedTypes,
+ match = r"MarkBasePos, instead saw PairPos"
+ ):
+ self._run_varlib_build_test(
+ designspace_name="IncompatibleLookupTypes",
+ font_name="IncompatibleLookupTypes",
+ tables=["GPOS"],
+ expected_ttx_name="IncompatibleLookupTypes",
+ save_before_dump=True,
+ )
+
+ def test_varlib_build_incompatible_arrays(self):
+ with pytest.raises(
+ varLibErrors.ShouldBeConstant,
+ match = """
+
+Couldn't merge the fonts, because some values were different, but should have
+been the same. This happened while performing the following operation:
+GPOS.table.ScriptList.ScriptCount
+
+The problem is likely to be in Simple Two Axis Bold:
+Expected to see .ScriptCount==1, instead saw 0"""
+ ):
+ self._run_varlib_build_test(
+ designspace_name="IncompatibleArrays",
+ font_name="IncompatibleArrays",
+ tables=["GPOS"],
+ expected_ttx_name="IncompatibleArrays",
+ save_before_dump=True,
+ )
def test_load_masters_layerName_without_required_font():
ds = DesignSpaceDocument()
diff --git a/Tests/voltLib/parser_test.py b/Tests/voltLib/parser_test.py
index 92080a8..0e0191f 100644
--- a/Tests/voltLib/parser_test.py
+++ b/Tests/voltLib/parser_test.py
@@ -1,7 +1,7 @@
-from fontTools.misc.py23 import *
from fontTools.voltLib import ast
from fontTools.voltLib.error import VoltLibError
from fontTools.voltLib.parser import Parser
+from io import StringIO
import unittest
@@ -1223,12 +1223,12 @@
'\nDEF_GLYPH ".notdef" ID 0 TYPE BASE END_GLYPH END\n')
def parse_(self, text):
- return Parser(UnicodeIO(text)).parse()
+ return Parser(StringIO(text)).parse()
def parse(self, text):
doc = self.parse_(text)
self.assertEqual('\n'.join(str(s) for s in doc.statements), text)
- return Parser(UnicodeIO(text)).parse()
+ return Parser(StringIO(text)).parse()
if __name__ == "__main__":
import sys
diff --git a/run-tests.sh b/run-tests.sh
deleted file mode 100755
index f10c1b0..0000000
--- a/run-tests.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# exit if any subcommand return non-zero status
-set -e
-
-# Choose python version
-if test "x$1" = x-3; then
- PYTHON=py3
- shift
-elif test "x$1" = x-2; then
- PYTHON=py2
- shift
-fi
-test "x$PYTHON" = x && PYTHON=py
-
-# Find tests
-FILTERS=
-for arg in "$@"; do
- test "x$FILTERS" != x && FILTERS="$FILTERS or "
- FILTERS="$FILTERS$arg"
-done
-
-# Run tests
-if [ -z "$FILTERS" ]; then
- tox --develop -e $PYTHON
-else
- tox --develop -e $PYTHON -- -k "$FILTERS"
-fi
diff --git a/setup.cfg b/setup.cfg
index 75ddb71..230175c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 4.20.0
+current_version = 4.22.0
commit = True
tag = False
tag_name = {new_version}
diff --git a/setup.py b/setup.py
index e3e7b52..d1c5a4f 100755
--- a/setup.py
+++ b/setup.py
@@ -441,7 +441,7 @@
setup_params = dict(
name="fonttools",
- version="4.20.0",
+ version="4.22.0",
description="Tools to manipulate font files",
author="Just van Rossum",
author_email="just@letterror.com",