fonttools 4.55.4__cp313-cp313-musllinux_1_2_aarch64.whl → 4.61.1__cp313-cp313-musllinux_1_2_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fontTools/__init__.py +1 -1
- fontTools/annotations.py +30 -0
- fontTools/cffLib/CFF2ToCFF.py +65 -10
- fontTools/cffLib/__init__.py +61 -26
- fontTools/cffLib/specializer.py +4 -1
- fontTools/cffLib/transforms.py +11 -6
- fontTools/config/__init__.py +15 -0
- fontTools/cu2qu/cu2qu.c +6567 -5579
- fontTools/cu2qu/cu2qu.cpython-313-aarch64-linux-musl.so +0 -0
- fontTools/cu2qu/cu2qu.py +36 -4
- fontTools/cu2qu/ufo.py +14 -0
- fontTools/designspaceLib/__init__.py +8 -3
- fontTools/designspaceLib/statNames.py +14 -7
- fontTools/feaLib/ast.py +24 -15
- fontTools/feaLib/builder.py +139 -66
- fontTools/feaLib/error.py +1 -1
- fontTools/feaLib/lexer.c +7038 -7995
- fontTools/feaLib/lexer.cpython-313-aarch64-linux-musl.so +0 -0
- fontTools/feaLib/parser.py +75 -40
- fontTools/feaLib/variableScalar.py +6 -1
- fontTools/fontBuilder.py +50 -44
- fontTools/merge/__init__.py +1 -1
- fontTools/merge/cmap.py +33 -1
- fontTools/merge/tables.py +12 -1
- fontTools/misc/bezierTools.c +14913 -17013
- fontTools/misc/bezierTools.cpython-313-aarch64-linux-musl.so +0 -0
- fontTools/misc/bezierTools.py +4 -1
- fontTools/misc/configTools.py +3 -1
- fontTools/misc/enumTools.py +23 -0
- fontTools/misc/etree.py +4 -27
- fontTools/misc/filesystem/__init__.py +68 -0
- fontTools/misc/filesystem/_base.py +134 -0
- fontTools/misc/filesystem/_copy.py +45 -0
- fontTools/misc/filesystem/_errors.py +54 -0
- fontTools/misc/filesystem/_info.py +75 -0
- fontTools/misc/filesystem/_osfs.py +164 -0
- fontTools/misc/filesystem/_path.py +67 -0
- fontTools/misc/filesystem/_subfs.py +92 -0
- fontTools/misc/filesystem/_tempfs.py +34 -0
- fontTools/misc/filesystem/_tools.py +34 -0
- fontTools/misc/filesystem/_walk.py +55 -0
- fontTools/misc/filesystem/_zipfs.py +204 -0
- fontTools/misc/fixedTools.py +1 -1
- fontTools/misc/loggingTools.py +1 -1
- fontTools/misc/psCharStrings.py +17 -2
- fontTools/misc/sstruct.py +2 -6
- fontTools/misc/symfont.py +6 -8
- fontTools/misc/testTools.py +5 -1
- fontTools/misc/textTools.py +4 -2
- fontTools/misc/visitor.py +32 -16
- fontTools/misc/xmlWriter.py +44 -8
- fontTools/mtiLib/__init__.py +1 -3
- fontTools/otlLib/builder.py +402 -155
- fontTools/otlLib/optimize/gpos.py +49 -63
- fontTools/pens/filterPen.py +218 -26
- fontTools/pens/momentsPen.c +5514 -5584
- fontTools/pens/momentsPen.cpython-313-aarch64-linux-musl.so +0 -0
- fontTools/pens/pointPen.py +61 -18
- fontTools/pens/roundingPen.py +2 -2
- fontTools/pens/t2CharStringPen.py +31 -11
- fontTools/qu2cu/qu2cu.c +6581 -6168
- fontTools/qu2cu/qu2cu.cpython-313-aarch64-linux-musl.so +0 -0
- fontTools/subset/__init__.py +283 -25
- fontTools/subset/svg.py +2 -3
- fontTools/ttLib/__init__.py +4 -0
- fontTools/ttLib/__main__.py +47 -8
- fontTools/ttLib/removeOverlaps.py +7 -5
- fontTools/ttLib/reorderGlyphs.py +8 -7
- fontTools/ttLib/sfnt.py +11 -9
- fontTools/ttLib/tables/D__e_b_g.py +20 -2
- fontTools/ttLib/tables/G_V_A_R_.py +5 -0
- fontTools/ttLib/tables/S__i_l_f.py +2 -2
- fontTools/ttLib/tables/T_S_I__0.py +14 -3
- fontTools/ttLib/tables/T_S_I__1.py +2 -5
- fontTools/ttLib/tables/T_S_I__5.py +18 -7
- fontTools/ttLib/tables/__init__.py +1 -0
- fontTools/ttLib/tables/_a_v_a_r.py +12 -3
- fontTools/ttLib/tables/_c_m_a_p.py +20 -7
- fontTools/ttLib/tables/_c_v_t.py +3 -2
- fontTools/ttLib/tables/_f_p_g_m.py +3 -1
- fontTools/ttLib/tables/_g_l_y_f.py +45 -21
- fontTools/ttLib/tables/_g_v_a_r.py +67 -19
- fontTools/ttLib/tables/_h_d_m_x.py +4 -4
- fontTools/ttLib/tables/_h_m_t_x.py +7 -3
- fontTools/ttLib/tables/_l_o_c_a.py +2 -2
- fontTools/ttLib/tables/_n_a_m_e.py +11 -6
- fontTools/ttLib/tables/_p_o_s_t.py +9 -7
- fontTools/ttLib/tables/otBase.py +5 -12
- fontTools/ttLib/tables/otConverters.py +5 -2
- fontTools/ttLib/tables/otData.py +1 -1
- fontTools/ttLib/tables/otTables.py +33 -30
- fontTools/ttLib/tables/otTraverse.py +2 -1
- fontTools/ttLib/tables/sbixStrike.py +3 -3
- fontTools/ttLib/ttFont.py +666 -120
- fontTools/ttLib/ttGlyphSet.py +0 -10
- fontTools/ttLib/woff2.py +10 -13
- fontTools/ttx.py +13 -1
- fontTools/ufoLib/__init__.py +300 -202
- fontTools/ufoLib/converters.py +103 -30
- fontTools/ufoLib/errors.py +8 -0
- fontTools/ufoLib/etree.py +1 -1
- fontTools/ufoLib/filenames.py +171 -106
- fontTools/ufoLib/glifLib.py +303 -205
- fontTools/ufoLib/kerning.py +98 -48
- fontTools/ufoLib/utils.py +46 -15
- fontTools/ufoLib/validators.py +121 -99
- fontTools/unicodedata/Blocks.py +35 -20
- fontTools/unicodedata/Mirrored.py +446 -0
- fontTools/unicodedata/ScriptExtensions.py +63 -37
- fontTools/unicodedata/Scripts.py +173 -152
- fontTools/unicodedata/__init__.py +10 -2
- fontTools/varLib/__init__.py +198 -109
- fontTools/varLib/avar/__init__.py +0 -0
- fontTools/varLib/avar/__main__.py +72 -0
- fontTools/varLib/avar/build.py +79 -0
- fontTools/varLib/avar/map.py +108 -0
- fontTools/varLib/avar/plan.py +1004 -0
- fontTools/varLib/{avar.py → avar/unbuild.py} +70 -59
- fontTools/varLib/avarPlanner.py +3 -999
- fontTools/varLib/featureVars.py +21 -7
- fontTools/varLib/hvar.py +113 -0
- fontTools/varLib/instancer/__init__.py +180 -65
- fontTools/varLib/interpolatableHelpers.py +3 -0
- fontTools/varLib/iup.c +7564 -6903
- fontTools/varLib/iup.cpython-313-aarch64-linux-musl.so +0 -0
- fontTools/varLib/models.py +17 -2
- fontTools/varLib/mutator.py +11 -0
- fontTools/varLib/varStore.py +10 -38
- fontTools/voltLib/__main__.py +206 -0
- fontTools/voltLib/ast.py +4 -0
- fontTools/voltLib/parser.py +16 -8
- fontTools/voltLib/voltToFea.py +347 -166
- {fonttools-4.55.4.dist-info → fonttools-4.61.1.dist-info}/METADATA +269 -1410
- {fonttools-4.55.4.dist-info → fonttools-4.61.1.dist-info}/RECORD +318 -294
- {fonttools-4.55.4.dist-info → fonttools-4.61.1.dist-info}/WHEEL +1 -1
- fonttools-4.61.1.dist-info/licenses/LICENSE.external +388 -0
- {fonttools-4.55.4.data → fonttools-4.61.1.data}/data/share/man/man1/ttx.1 +0 -0
- {fonttools-4.55.4.dist-info → fonttools-4.61.1.dist-info}/entry_points.txt +0 -0
- {fonttools-4.55.4.dist-info → fonttools-4.61.1.dist-info/licenses}/LICENSE +0 -0
- {fonttools-4.55.4.dist-info → fonttools-4.61.1.dist-info}/top_level.txt +0 -0
fontTools/ttLib/ttGlyphSet.py
CHANGED
|
@@ -104,16 +104,6 @@ class _TTGlyphSetGlyf(_TTGlyphSet):
|
|
|
104
104
|
return _TTGlyphGlyf(self, glyphName, recalcBounds=self.recalcBounds)
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
class _TTGlyphSetGlyf(_TTGlyphSet):
|
|
108
|
-
def __init__(self, font, location, recalcBounds=True):
|
|
109
|
-
self.glyfTable = font["glyf"]
|
|
110
|
-
super().__init__(font, location, self.glyfTable, recalcBounds=recalcBounds)
|
|
111
|
-
self.gvarTable = font.get("gvar")
|
|
112
|
-
|
|
113
|
-
def __getitem__(self, glyphName):
|
|
114
|
-
return _TTGlyphGlyf(self, glyphName, recalcBounds=self.recalcBounds)
|
|
115
|
-
|
|
116
|
-
|
|
117
107
|
class _TTGlyphSetCFF(_TTGlyphSet):
|
|
118
108
|
def __init__(self, font, location):
|
|
119
109
|
tableTag = "CFF2" if "CFF2" in font else "CFF "
|
fontTools/ttLib/woff2.py
CHANGED
|
@@ -394,10 +394,9 @@ class WOFF2Writer(SFNTWriter):
|
|
|
394
394
|
|
|
395
395
|
def _calcMasterChecksum(self):
|
|
396
396
|
"""Calculate checkSumAdjustment."""
|
|
397
|
-
tags = list(self.tables.keys())
|
|
398
397
|
checksums = []
|
|
399
|
-
for
|
|
400
|
-
checksums.append(self.tables[
|
|
398
|
+
for tag in self.tables.keys():
|
|
399
|
+
checksums.append(self.tables[tag].checkSum)
|
|
401
400
|
|
|
402
401
|
# Create a SFNT directory for checksum calculation purposes
|
|
403
402
|
self.searchRange, self.entrySelector, self.rangeShift = getSearchRange(
|
|
@@ -642,10 +641,10 @@ woff2OverlapSimpleBitmapFlag = 0x0001
|
|
|
642
641
|
|
|
643
642
|
def getKnownTagIndex(tag):
|
|
644
643
|
"""Return index of 'tag' in woff2KnownTags list. Return 63 if not found."""
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
644
|
+
try:
|
|
645
|
+
return woff2KnownTags.index(tag)
|
|
646
|
+
except ValueError:
|
|
647
|
+
return woff2UnknownTagIndex
|
|
649
648
|
|
|
650
649
|
|
|
651
650
|
class WOFF2DirectoryEntry(DirectoryEntry):
|
|
@@ -747,8 +746,8 @@ class WOFF2LocaTable(getTableClass("loca")):
|
|
|
747
746
|
"indexFormat is 0 but local offsets not multiples of 2"
|
|
748
747
|
)
|
|
749
748
|
locations = array.array("H")
|
|
750
|
-
for
|
|
751
|
-
locations.append(
|
|
749
|
+
for location in self.locations:
|
|
750
|
+
locations.append(location // 2)
|
|
752
751
|
else:
|
|
753
752
|
locations = array.array("I", self.locations)
|
|
754
753
|
if sys.byteorder != "big":
|
|
@@ -1026,11 +1025,10 @@ class WOFF2GlyfTable(getTableClass("glyf")):
|
|
|
1026
1025
|
lastcomponent = len(glyph.components) - 1
|
|
1027
1026
|
more = 1
|
|
1028
1027
|
haveInstructions = 0
|
|
1029
|
-
for i in
|
|
1028
|
+
for i, component in enumerate(glyph.components):
|
|
1030
1029
|
if i == lastcomponent:
|
|
1031
1030
|
haveInstructions = hasattr(glyph, "program")
|
|
1032
1031
|
more = 0
|
|
1033
|
-
component = glyph.components[i]
|
|
1034
1032
|
self.compositeStream += component.compile(more, haveInstructions, self)
|
|
1035
1033
|
if haveInstructions:
|
|
1036
1034
|
self._encodeInstructions(glyph)
|
|
@@ -1078,9 +1076,8 @@ class WOFF2GlyfTable(getTableClass("glyf")):
|
|
|
1078
1076
|
|
|
1079
1077
|
flags = array.array("B")
|
|
1080
1078
|
triplets = array.array("B")
|
|
1081
|
-
for i in
|
|
1079
|
+
for i, (x, y) in enumerate(coordinates):
|
|
1082
1080
|
onCurve = glyph.flags[i] & _g_l_y_f.flagOnCurve
|
|
1083
|
-
x, y = coordinates[i]
|
|
1084
1081
|
absX = abs(x)
|
|
1085
1082
|
absY = abs(y)
|
|
1086
1083
|
onCurveBit = 0 if onCurve else 128
|
fontTools/ttx.py
CHANGED
|
@@ -101,9 +101,15 @@ Compile options
|
|
|
101
101
|
--with-zopfli
|
|
102
102
|
Use Zopfli instead of Zlib to compress WOFF. The Python
|
|
103
103
|
extension is available at https://pypi.python.org/pypi/zopfli
|
|
104
|
+
--optimize-font-speed
|
|
105
|
+
Enable optimizations that prioritize speed over file size.
|
|
106
|
+
This mainly affects how glyf t able and gvar / VARC tables are
|
|
107
|
+
compiled. The produced fonts will be larger, but rendering
|
|
108
|
+
performance will be improved with HarfBuzz and other text
|
|
109
|
+
layout engines.
|
|
104
110
|
"""
|
|
105
111
|
|
|
106
|
-
from fontTools.ttLib import TTFont, TTLibError
|
|
112
|
+
from fontTools.ttLib import OPTIMIZE_FONT_SPEED, TTFont, TTLibError
|
|
107
113
|
from fontTools.misc.macCreatorType import getMacCreatorAndType
|
|
108
114
|
from fontTools.unicode import setUnicodeData
|
|
109
115
|
from fontTools.misc.textTools import Tag, tostr
|
|
@@ -141,6 +147,7 @@ class Options(object):
|
|
|
141
147
|
recalcTimestamp = None
|
|
142
148
|
flavor = None
|
|
143
149
|
useZopfli = False
|
|
150
|
+
optimizeFontSpeed = False
|
|
144
151
|
|
|
145
152
|
def __init__(self, rawOptions, numFiles):
|
|
146
153
|
self.onlyTables = []
|
|
@@ -229,6 +236,8 @@ class Options(object):
|
|
|
229
236
|
self.flavor = value
|
|
230
237
|
elif option == "--with-zopfli":
|
|
231
238
|
self.useZopfli = True
|
|
239
|
+
elif option == "--optimize-font-speed":
|
|
240
|
+
self.optimizeFontSpeed = True
|
|
232
241
|
if self.verbose and self.quiet:
|
|
233
242
|
raise getopt.GetoptError("-q and -v options are mutually exclusive")
|
|
234
243
|
if self.verbose:
|
|
@@ -324,6 +333,8 @@ def ttCompile(input, output, options):
|
|
|
324
333
|
recalcBBoxes=options.recalcBBoxes,
|
|
325
334
|
recalcTimestamp=options.recalcTimestamp,
|
|
326
335
|
)
|
|
336
|
+
if options.optimizeFontSpeed:
|
|
337
|
+
ttf.cfg[OPTIMIZE_FONT_SPEED] = options.optimizeFontSpeed
|
|
327
338
|
ttf.importXML(input)
|
|
328
339
|
|
|
329
340
|
if options.recalcTimestamp is None and "head" in ttf and input is not sys.stdin:
|
|
@@ -386,6 +397,7 @@ def parseOptions(args):
|
|
|
386
397
|
"version",
|
|
387
398
|
"with-zopfli",
|
|
388
399
|
"newline=",
|
|
400
|
+
"optimize-font-speed",
|
|
389
401
|
],
|
|
390
402
|
)
|
|
391
403
|
|