fonttools 4.55.4__cp313-cp313-macosx_10_13_universal2.whl → 4.55.6__cp313-cp313-macosx_10_13_universal2.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.

Potentially problematic release.


This version of fonttools might be problematic. Click here for more details.

fontTools/__init__.py CHANGED
@@ -3,6 +3,6 @@ from fontTools.misc.loggingTools import configLogger
3
3
 
4
4
  log = logging.getLogger(__name__)
5
5
 
6
- version = __version__ = "4.55.4"
6
+ version = __version__ = "4.55.6"
7
7
 
8
8
  __all__ = ["version", "log", "configLogger"]
Binary file
@@ -1106,7 +1106,13 @@ class Builder(object):
1106
1106
  if (language == "dflt" or include_default) and lookups:
1107
1107
  self.features_[key] = lookups[:]
1108
1108
  else:
1109
- self.features_[key] = []
1109
+ # if we aren't including default we need to manually remove the
1110
+ # default lookups, which were added to all declared langsystems
1111
+ # as they were encountered (we don't remove all lookups because
1112
+ # we want to allow duplicate script/lang statements;
1113
+ # see https://github.com/fonttools/fonttools/issues/3748
1114
+ cur_lookups = self.features_.get(key, [])
1115
+ self.features_[key] = [x for x in cur_lookups if x not in lookups]
1110
1116
  self.language_systems = frozenset([(self.script_, language)])
1111
1117
 
1112
1118
  if required:
Binary file
@@ -1187,7 +1187,7 @@ class Glyph(object):
1187
1187
  ):
1188
1188
  return
1189
1189
  try:
1190
- coords, endPts, flags = self.getCoordinates(glyfTable)
1190
+ coords, endPts, flags = self.getCoordinates(glyfTable, round=otRound)
1191
1191
  self.xMin, self.yMin, self.xMax, self.yMax = coords.calcIntBounds()
1192
1192
  except NotImplementedError:
1193
1193
  pass
@@ -1206,9 +1206,7 @@ class Glyph(object):
1206
1206
  Return True if bounds were calculated, False otherwise.
1207
1207
  """
1208
1208
  for compo in self.components:
1209
- if hasattr(compo, "firstPt") or hasattr(compo, "transform"):
1210
- return False
1211
- if not float(compo.x).is_integer() or not float(compo.y).is_integer():
1209
+ if not compo._hasOnlyIntegerTranslate():
1212
1210
  return False
1213
1211
 
1214
1212
  # All components are untransformed and have an integer x/y translate
@@ -1241,7 +1239,7 @@ class Glyph(object):
1241
1239
  else:
1242
1240
  return self.numberOfContours == -1
1243
1241
 
1244
- def getCoordinates(self, glyfTable):
1242
+ def getCoordinates(self, glyfTable, *, round=noRound):
1245
1243
  """Return the coordinates, end points and flags
1246
1244
 
1247
1245
  This method returns three values: A :py:class:`GlyphCoordinates` object,
@@ -1267,13 +1265,27 @@ class Glyph(object):
1267
1265
  for compo in self.components:
1268
1266
  g = glyfTable[compo.glyphName]
1269
1267
  try:
1270
- coordinates, endPts, flags = g.getCoordinates(glyfTable)
1268
+ coordinates, endPts, flags = g.getCoordinates(
1269
+ glyfTable, round=round
1270
+ )
1271
1271
  except RecursionError:
1272
1272
  raise ttLib.TTLibError(
1273
1273
  "glyph '%s' contains a recursive component reference"
1274
1274
  % compo.glyphName
1275
1275
  )
1276
1276
  coordinates = GlyphCoordinates(coordinates)
1277
+ # if asked to round e.g. while computing bboxes, it's important we
1278
+ # do it immediately before a component transform is applied to a
1279
+ # simple glyph's coordinates in case these might still contain floats;
1280
+ # however, if the referenced component glyph is another composite, we
1281
+ # must not round here but only at the end, after all the nested
1282
+ # transforms have been applied, or else rounding errors will compound.
1283
+ if (
1284
+ round is not noRound
1285
+ and g.numberOfContours > 0
1286
+ and not compo._hasOnlyIntegerTranslate()
1287
+ ):
1288
+ coordinates.toInt(round=round)
1277
1289
  if hasattr(compo, "firstPt"):
1278
1290
  # component uses two reference points: we apply the transform _before_
1279
1291
  # computing the offset between the points
@@ -1930,6 +1942,18 @@ class GlyphComponent(object):
1930
1942
  result = self.__eq__(other)
1931
1943
  return result if result is NotImplemented else not result
1932
1944
 
1945
+ def _hasOnlyIntegerTranslate(self):
1946
+ """Return True if it's a 'simple' component.
1947
+
1948
+ That is, it has no anchor points and no transform other than integer translate.
1949
+ """
1950
+ return (
1951
+ not hasattr(self, "firstPt")
1952
+ and not hasattr(self, "transform")
1953
+ and float(self.x).is_integer()
1954
+ and float(self.y).is_integer()
1955
+ )
1956
+
1933
1957
 
1934
1958
  class GlyphCoordinates(object):
1935
1959
  """A list of glyph coordinates.
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fonttools
3
- Version: 4.55.4
3
+ Version: 4.55.6
4
4
  Summary: Tools to manipulate font files
5
5
  Home-page: http://github.com/fonttools/fonttools
6
6
  Author: Just van Rossum
@@ -389,6 +389,17 @@ Have fun!
389
389
  Changelog
390
390
  ~~~~~~~~~
391
391
 
392
+ 4.55.6 (released 2025-01-24)
393
+ ----------------------------
394
+
395
+ - [glyf] Fixed regression introduced in 4.55.5 when computing bounds of nested composite glyphs with transformed components (#3752).
396
+
397
+ 4.55.5 (released 2025-01-23)
398
+ ----------------------------
399
+
400
+ - [glyf] Fixed recalcBounds of transformed components with unrounded coordinates (#3750).
401
+ - [feaLib] Allow duplicate script/language statements (#3749).
402
+
392
403
  4.55.4 (released 2025-01-21)
393
404
  ----------------------------
394
405
 
@@ -1,13 +1,8 @@
1
- fonttools-4.55.4.dist-info/RECORD,,
2
- fonttools-4.55.4.dist-info/LICENSE,sha256=Z4cgj4P2Wcy8IiOy_elS_6b36KymLxqKK_W8UbsbI4M,1072
3
- fonttools-4.55.4.dist-info/WHEEL,sha256=orpCz_JJFAUeF0-kUBwYoTzNk-BPTKxnNHa4kLcp-uI,115
4
- fonttools-4.55.4.dist-info/entry_points.txt,sha256=8kVHddxfFWA44FSD4mBpmC-4uCynQnkoz_9aNJb227Y,147
5
- fonttools-4.55.4.dist-info/top_level.txt,sha256=rRgRylrXzekqWOsrhygzib12pQ7WILf7UGjqEwkIFDM,10
6
- fonttools-4.55.4.dist-info/METADATA,sha256=7kkr7Xc937Q2FFzm3FwNI8CRwUkvSuNl6s7prRAuc80,165667
1
+ fonttools-4.55.6.data/data/share/man/man1/ttx.1,sha256=cLbm_pOOj1C76T2QXvDxzwDj9gk-GTd5RztvTMsouFw,5377
7
2
  fontTools/ttx.py,sha256=XCerBn2ySMc5Bn54io4j5U5cW228GFREYvEeuvp0ZfM,16652
8
3
  fontTools/fontBuilder.py,sha256=ntG0lXnhXNcHK-C7bp0nGNQ68OutFA-84TNNpzntTcE,33952
9
4
  fontTools/unicode.py,sha256=ZZ7OMmWvIyV1IL1k6ioTzaRAh3tUvm6gvK7QgFbOIHY,1237
10
- fontTools/__init__.py,sha256=_Q4qhB3PMUa2enWbOt-YeWxDlVufbXDuUwEHTTzzirI,183
5
+ fontTools/__init__.py,sha256=DxxZT_7Dukh-9b99tImAS_ifGPG3Gxr_h3DKNFZ58a4,183
11
6
  fontTools/tfmLib.py,sha256=UMbkM73JXRJVS9t2B-BJc13rSjImaWBuzCoehLwHFhs,14270
12
7
  fontTools/afmLib.py,sha256=1MagIItOzRV4vV5kKPxeDZbPJsfxLB3wdHLFkQvl0uk,13164
13
8
  fontTools/agl.py,sha256=05bm8Uq45uVWW8nPbP6xbNgmFyxQr8sWhYAiP0VSjnI,112975
@@ -20,7 +15,7 @@ fontTools/encodings/StandardEncoding.py,sha256=Eo3AGE8FE_p-IVYYuV097KouSsF3UrXoR
20
15
  fontTools/qu2cu/benchmark.py,sha256=GMcr_4r7L6K9SmJ13itt-_XKhnKqSVUDPlXUG6IZmmM,1400
21
16
  fontTools/qu2cu/__init__.py,sha256=Jfm1JljXbt91w4gyvZn6jzEmVnhRx50sh2fDongrOsE,618
22
17
  fontTools/qu2cu/qu2cu.py,sha256=IYtpkwHdfKOXJr65Y_pJ9Lrt_MgJaISAKGMAs5ilFSM,12288
23
- fontTools/qu2cu/qu2cu.cpython-313-darwin.so,sha256=EFaRIB5l2h2m_EbljJ3WYfrToAnd4oQiXewELkNicJs,328240
18
+ fontTools/qu2cu/qu2cu.cpython-313-darwin.so,sha256=1ofdqZCni6GNmBGu3tv8ZyZw9u6pzakwBejo89ZFVno,328240
24
19
  fontTools/qu2cu/cli.py,sha256=U2rooYnVVEalGRAWGFHk-Kp6Okys8wtzdaWLjw1bngY,3714
25
20
  fontTools/qu2cu/qu2cu.c,sha256=D7PGICR2s0JVhpLKrsS8siKXR_MAiCMIQErp-54RcLU,654934
26
21
  fontTools/qu2cu/__main__.py,sha256=9FWf6SIZaRaC8SiL0LhjAWC2yIdY9N_9wlRko8m1l2Q,93
@@ -32,7 +27,7 @@ fontTools/misc/psLib.py,sha256=ioIPm5x3MHkBXF2vzNkC4iVZYobrkWcyvFhmYsjOrPY,12099
32
27
  fontTools/misc/timeTools.py,sha256=e9h5pgzL04tBDXmCv_8eRGB4boFV8GKXlS6dq3ggEpw,2234
33
28
  fontTools/misc/configTools.py,sha256=YXBE_vL2dMWCnK4oY3vtU15B79q82DtKp7h7XRqJc1Q,11188
34
29
  fontTools/misc/sstruct.py,sha256=HuXwoRr9-mAbBxI3gJ3n34ML7NAGSHsAAazaaloWQB4,7158
35
- fontTools/misc/bezierTools.cpython-313-darwin.so,sha256=-bZkmUZRNT7jNwPyGmAIC1UDwHbZU_t4K6EwRI2ThmI,1060136
30
+ fontTools/misc/bezierTools.cpython-313-darwin.so,sha256=gWqseLRai5uG1WbuR2XrA-qVpBPCeJQpVogjGrE6xXg,1060136
36
31
  fontTools/misc/classifyTools.py,sha256=zcg3EM4GOerBW9c063ljaLllgeeZ772EpFZjp9CdgLI,5613
37
32
  fontTools/misc/symfont.py,sha256=SJtc3-9VdhT6fokx5Vvzs7YErqRib1u-rItNqXI0rTM,6991
38
33
  fontTools/misc/roundTools.py,sha256=1RSXZ0gyi1qW42tz6WSBMJD1FlPdtgqKfWixVN9bd78,3173
@@ -68,7 +63,7 @@ fontTools/cu2qu/cu2qu.c,sha256=zvMRDcmpgT7WY6HSX9N97fVaSdEA9LZJYBKfE40hoK0,58943
68
63
  fontTools/cu2qu/__init__.py,sha256=Cuc7Uglb0nSgaraTxXY5J8bReznH5wApW0uakN7MycY,618
69
64
  fontTools/cu2qu/ufo.py,sha256=qZR70uWdCia19Ff8GLn5NeItscvvn69DegjDZVF4eNI,11794
70
65
  fontTools/cu2qu/cli.py,sha256=MbAQnOpZwrUFe_tjAP3Tgf6uLdOgHlONUcPNeTXwH0Y,6076
71
- fontTools/cu2qu/cu2qu.cpython-313-darwin.so,sha256=K6ch-VIRrfdlKC-h-yk1pV4ePFLpsQfLSsQRZQ40q-A,306944
66
+ fontTools/cu2qu/cu2qu.cpython-313-darwin.so,sha256=3XopC7ziPxAAZyhRs4B9yHoIxAEQMyNlvnw7mnKQKJE,306944
72
67
  fontTools/cu2qu/errors.py,sha256=PyJNMy8lHDtKpfFkc0nkM8F4jNLZAC4lPQCN1Km4bpg,2441
73
68
  fontTools/cu2qu/cu2qu.py,sha256=GGNdNWT4xgrvxeZTczIj9Nxi6vN-5lb90KyVmB95W0Y,16439
74
69
  fontTools/cu2qu/__main__.py,sha256=kTUI-jczsHeelULLlory74QEeFjZWp9zigCc7PrdVQY,92
@@ -117,7 +112,7 @@ fontTools/varLib/interpolatable.py,sha256=Bhlq_LhEZ-sXfLNY8aFEChFrsKuT2kzmnuMfG5
117
112
  fontTools/varLib/avarPlanner.py,sha256=uLMGsL6cBbEMq5YItwABG_vXlXV3bxquM93WGDJ1brA,27358
118
113
  fontTools/varLib/mvar.py,sha256=LTV77vH_3Ecg_qKBO5xQzjLOlJir_ppEr7mPVZRgad8,2449
119
114
  fontTools/varLib/errors.py,sha256=dMo8eGj76I7H4hrBEiNbYrGs2J1K1SwdsUyTHpkVOrQ,6934
120
- fontTools/varLib/iup.cpython-313-darwin.so,sha256=8q4PRgcHAxSewpsTZ8hOpfw104V_-Ax_uUCQOEurdc8,412256
115
+ fontTools/varLib/iup.cpython-313-darwin.so,sha256=845WgqDrqXYz-T8ZK7zT1PSMzpAgYBI7p4J58zPBOsQ,412256
121
116
  fontTools/varLib/__main__.py,sha256=wbdYC5bPjWCxA0I4SKcLO88gl-UMtsYS8MxdW9ySTkY,95
122
117
  fontTools/varLib/featureVars.py,sha256=BCOBGjGUv2Rw_z0rlVi1ZYkTDcCMh0LyAUzDVJ2PYm4,25448
123
118
  fontTools/varLib/interpolate_layout.py,sha256=22VjGZuV2YiAe2MpdTf0xPVz1x2G84bcOL0vOeBpGQM,3689
@@ -143,7 +138,7 @@ fontTools/pens/teePen.py,sha256=P1ARJOCMJ6MxK-PB1yZ-ips3CUfnadWYnQ_do6VIasQ,1290
143
138
  fontTools/pens/basePen.py,sha256=eIGSKrKm6w4LLHuG6XJoQZ3eObtoKV5P6aF4gT4sk7U,17073
144
139
  fontTools/pens/pointInsidePen.py,sha256=noEUvBQIeAheDMJwzvvfnEiKhmwbS1i0RQE9jik6Gl4,6355
145
140
  fontTools/pens/cu2quPen.py,sha256=gMUwFUsm_-WzBlDjTMQiNnEuI2heomGeOJBX81zYXPo,13007
146
- fontTools/pens/momentsPen.cpython-313-darwin.so,sha256=1MnT6qMfteXdqHRKiIOhmQ7o1iEZeUSrUjljqvwqg-4,272552
141
+ fontTools/pens/momentsPen.cpython-313-darwin.so,sha256=yb7ywR24SpoCrcIcx0b75jMQLz4_waz5RjxjGHoB7eA,272552
147
142
  fontTools/pens/momentsPen.c,sha256=ObZVy0eAslCcXxpf9enZD1RtKpdikXt26VetwzqTyB0,530416
148
143
  fontTools/pens/perimeterPen.py,sha256=lr6NzrIWxi4TXBJPbcJsKzqABWfQeil2Bgm9BgUD3N4,2153
149
144
  fontTools/pens/__init__.py,sha256=DJBWmoX_Haau7qlgmvWyfbhSzrX2qL636Rns7CG01pk,75
@@ -194,12 +189,12 @@ fontTools/feaLib/variableScalar.py,sha256=Xu8tpDlQbfIfjnKnYDEf43EqVdyIJUy8_1ROVP
194
189
  fontTools/feaLib/lexer.c,sha256=vQ4myMvJqvp8rdY6YeEQJHM2Crw_eFajkHWefik884Q,750756
195
190
  fontTools/feaLib/__init__.py,sha256=jlIru2ghxvb1HhC5Je2BCXjFJmFQlYKpruorPoz3BvQ,213
196
191
  fontTools/feaLib/lookupDebugInfo.py,sha256=gVRr5-APWfT_a5-25hRuawSVX8fEvXVsOSLWkH91T2w,304
197
- fontTools/feaLib/builder.py,sha256=JTNF8AvveJmU0NDs0TV9wnUFjDkh9fdn3E6SPhtatvs,70578
192
+ fontTools/feaLib/builder.py,sha256=y7t8_q0-PiPoLpXZCfThx1SmvF-ZpDDyVe8605FzaL4,71036
198
193
  fontTools/feaLib/parser.py,sha256=wbfG_-rqrn2RWMRQMlR3-uaiM9k4_mzCVF-wPLr00rQ,98466
199
194
  fontTools/feaLib/location.py,sha256=JXzHqGV56EHdcq823AwA5oaK05hf_1ySWpScbo3zGC0,234
200
195
  fontTools/feaLib/lexer.py,sha256=emyMPmRoqNZkzxnJyI6JRCCtXrbCOFofwa9O6ABGLiw,11121
201
196
  fontTools/feaLib/ast.py,sha256=3DU5NKXesyNCVu5wcebGlnvwdMf0_NKrPgOvS0FrWSg,73800
202
- fontTools/feaLib/lexer.cpython-313-darwin.so,sha256=lkMzl-WOF_SjqjBSoPGsTyyLTaGiava2pCkL0LoF-4g,394560
197
+ fontTools/feaLib/lexer.cpython-313-darwin.so,sha256=MqV3czOGzORiaQS8VtqrV1zeMm_MMmKCPCfwr1zWF1o,394560
203
198
  fontTools/feaLib/__main__.py,sha256=Df2PA6LXwna98lSXiL7R4as_ZEdWCIk3egSM5w7GpvM,2240
204
199
  fontTools/ttLib/sfnt.py,sha256=rkznKfteU_Rn9P65WSjFaiwQgpEAoh-TrQpvkQhdIlo,22832
205
200
  fontTools/ttLib/macUtils.py,sha256=lj3oeFpyjV7ko_JqnluneITmAtlc119J-vwTTg2s73A,1737
@@ -256,7 +251,7 @@ fontTools/ttLib/tables/otTraverse.py,sha256=oTr7nA7u7kEltLAhl4Kfl1RPD8O2_bKaoXa5
256
251
  fontTools/ttLib/tables/_m_o_r_x.py,sha256=OwamVpIO7REDnFr95HuFPoY_0U6i9zQPb11K1sFTvDY,548
257
252
  fontTools/ttLib/tables/_l_t_a_g.py,sha256=9YpApjI-rZ4e3HeT8Pj-osiHl3uALD9JXg5O7pqk9L0,2552
258
253
  fontTools/ttLib/tables/D_S_I_G_.py,sha256=AgQPM9Cdro1P-ehJjTfsC9mRTTtSc16At0nnpb1XOGI,5517
259
- fontTools/ttLib/tables/_g_l_y_f.py,sha256=nO1wO9P2aC7sgJrBGkr2bOc_mhagCtF8HW2SGRBtFwk,84531
254
+ fontTools/ttLib/tables/_g_l_y_f.py,sha256=R0WuModxptcPfoBTZxvs5xDTnA9olAVf67blh-k-tmM,85631
260
255
  fontTools/ttLib/tables/T_S_I_S_.py,sha256=tVBnl63vyZUIq93oM6dEjHCXvPn9vt5vvL3jG59b0Lg,341
261
256
  fontTools/ttLib/tables/T_S_I_D_.py,sha256=TsdX-G2xxVQO9sSE1wE_xDRx-gor5YiXTHeUthMwCPY,341
262
257
  fontTools/ttLib/tables/B_A_S_E_.py,sha256=H71A9pJ850mvjbrWHqy8iFI2Dxg7102YRtAkfdCooig,369
@@ -326,4 +321,9 @@ fontTools/colorLib/builder.py,sha256=kmO7OuudQQb3fEOS7aLzgTDVjqS9i2xIQmk9p1uBe8A
326
321
  fontTools/colorLib/geometry.py,sha256=3ScySrR2YDJa7d5K5_xM5Yt1-3NCV-ry8ikYA5VwVbI,5518
327
322
  fontTools/colorLib/errors.py,sha256=CsaviiRxxrpgVX4blm7KCyK8553ljwL44xkJOeC5U7U,41
328
323
  fontTools/colorLib/unbuilder.py,sha256=iW-E5I39WsV82K3NgCO4Cjzwm1WqzGrtypHt8epwbHM,2142
329
- fonttools-4.55.4.data/data/share/man/man1/ttx.1,sha256=cLbm_pOOj1C76T2QXvDxzwDj9gk-GTd5RztvTMsouFw,5377
324
+ fonttools-4.55.6.dist-info/RECORD,,
325
+ fonttools-4.55.6.dist-info/LICENSE,sha256=Z4cgj4P2Wcy8IiOy_elS_6b36KymLxqKK_W8UbsbI4M,1072
326
+ fonttools-4.55.6.dist-info/WHEEL,sha256=orpCz_JJFAUeF0-kUBwYoTzNk-BPTKxnNHa4kLcp-uI,115
327
+ fonttools-4.55.6.dist-info/entry_points.txt,sha256=8kVHddxfFWA44FSD4mBpmC-4uCynQnkoz_9aNJb227Y,147
328
+ fonttools-4.55.6.dist-info/top_level.txt,sha256=rRgRylrXzekqWOsrhygzib12pQ7WILf7UGjqEwkIFDM,10
329
+ fonttools-4.55.6.dist-info/METADATA,sha256=GcD2y8KE7yKQbFGQyPNPCQVQHvYSGs07zMFLQUrW3n8,166074