fonttools 4.55.4__cp38-cp38-macosx_10_9_x86_64.whl → 4.55.6__cp38-cp38-macosx_10_9_x86_64.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
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.1
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
@@ -377,6 +377,17 @@ Have fun!
377
377
  Changelog
378
378
  ~~~~~~~~~
379
379
 
380
+ 4.55.6 (released 2025-01-24)
381
+ ----------------------------
382
+
383
+ - [glyf] Fixed regression introduced in 4.55.5 when computing bounds of nested composite glyphs with transformed components (#3752).
384
+
385
+ 4.55.5 (released 2025-01-23)
386
+ ----------------------------
387
+
388
+ - [glyf] Fixed recalcBounds of transformed components with unrounded coordinates (#3750).
389
+ - [feaLib] Allow duplicate script/language statements (#3749).
390
+
380
391
  4.55.4 (released 2025-01-21)
381
392
  ----------------------------
382
393
 
@@ -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=w6_R5zToL4dhiDH-J5jk0JB_efQ_6KdbwveuTVp2z9A,108
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=wnoPrKsxsrNJpIpXa5N4BEAaKMBLU3E7EJgeZlrmKxM,165494
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
@@ -17,7 +12,7 @@ fontTools/encodings/codecs.py,sha256=u50ruwz9fcRsrUrRGpR17Cr55Ovn1fvCHCKrElVumDE
17
12
  fontTools/encodings/__init__.py,sha256=DJBWmoX_Haau7qlgmvWyfbhSzrX2qL636Rns7CG01pk,75
18
13
  fontTools/encodings/MacRoman.py,sha256=4vEooUDm2gLCG8KIIDhRxm5-A64w7XrhP9cjDRr2Eo0,3576
19
14
  fontTools/encodings/StandardEncoding.py,sha256=Eo3AGE8FE_p-IVYYuV097KouSsF3UrXoRRN0XyvYbrs,3581
20
- fontTools/qu2cu/qu2cu.cpython-38-darwin.so,sha256=HR86AQ2mP3H2Oqt20RNibZRPwBOa2ba09FLoWIEVIwk,168288
15
+ fontTools/qu2cu/qu2cu.cpython-38-darwin.so,sha256=619XTIV8JuZkjY0CvEdg2ss7NK0lehaJqKTDXoOVw8Y,168288
21
16
  fontTools/qu2cu/benchmark.py,sha256=GMcr_4r7L6K9SmJ13itt-_XKhnKqSVUDPlXUG6IZmmM,1400
22
17
  fontTools/qu2cu/__init__.py,sha256=Jfm1JljXbt91w4gyvZn6jzEmVnhRx50sh2fDongrOsE,618
23
18
  fontTools/qu2cu/qu2cu.py,sha256=IYtpkwHdfKOXJr65Y_pJ9Lrt_MgJaISAKGMAs5ilFSM,12288
@@ -55,7 +50,7 @@ fontTools/misc/etree.py,sha256=EPldipUNNMvbPimNX7qOUwKkbpJMY4uyElhe-wqKWkM,17079
55
50
  fontTools/misc/xmlReader.py,sha256=igut4_d13RT4WarliqVvuuPybO1uSXVeoBOeW4j0_e4,6580
56
51
  fontTools/misc/bezierTools.c,sha256=tIJLZkz3M1Lsc_dg1ApLWmdOezdsNt2tXpuk3c3Dclo,1814052
57
52
  fontTools/misc/dictTools.py,sha256=VxjarsGJuk_wa3z29FSCtKZNCFfXtMBiNEu0RPAlpDk,2417
58
- fontTools/misc/bezierTools.cpython-38-darwin.so,sha256=CvLp-pRru0xufr0QD3asKqrvZkawrAzKTfWFfIqgkvA,557656
53
+ fontTools/misc/bezierTools.cpython-38-darwin.so,sha256=SvsnrOaXzz2B11aqX9FEME1hTlswgujUpfjq5FKjIpA,557656
59
54
  fontTools/misc/bezierTools.py,sha256=OmR3pzCGExNvZyTPrByH7gQHpAJsYOl1cmvfYQIVfQA,45038
60
55
  fontTools/misc/eexec.py,sha256=GNn2OCRvO1HbbIeDPxk9i0glO7cux_AQaoVMXhBR8y8,3331
61
56
  fontTools/misc/xmlWriter.py,sha256=CA1c-Ov5vFTF9tT4bGk-f3yBvaX7lVmSdLPYygUqlAE,6046
@@ -65,7 +60,7 @@ fontTools/misc/plistlib/__init__.py,sha256=1HfhHPt3As6u2eRSlFfl6XdnXv_ypQImeQdWI
65
60
  fontTools/misc/plistlib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
61
  fontTools/cu2qu/benchmark.py,sha256=wasPJmf8q9k9UHjpHChC3WQAGbBAyHN9PvJzXvWC0Fw,1296
67
62
  fontTools/cu2qu/cu2qu.c,sha256=zvMRDcmpgT7WY6HSX9N97fVaSdEA9LZJYBKfE40hoK0,589430
68
- fontTools/cu2qu/cu2qu.cpython-38-darwin.so,sha256=oK45nZWEHUT2VtaWoVYRTCHpph1DPNmCEh0uBS3SR-8,145224
63
+ fontTools/cu2qu/cu2qu.cpython-38-darwin.so,sha256=EKcqZfoSTASIs6j0V5mFTKD-AmDmIPMIGRHUSUVkLXM,145224
69
64
  fontTools/cu2qu/__init__.py,sha256=Cuc7Uglb0nSgaraTxXY5J8bReznH5wApW0uakN7MycY,618
70
65
  fontTools/cu2qu/ufo.py,sha256=qZR70uWdCia19Ff8GLn5NeItscvvn69DegjDZVF4eNI,11794
71
66
  fontTools/cu2qu/cli.py,sha256=MbAQnOpZwrUFe_tjAP3Tgf6uLdOgHlONUcPNeTXwH0Y,6076
@@ -109,7 +104,7 @@ fontTools/varLib/__init__.py,sha256=RGQ1bNPr9UcGeJ3mSAwctZbJJ-avZL1brjeAukRljEA,
109
104
  fontTools/varLib/mutator.py,sha256=YJkKFFWjwpYZ1MrC7UZYJ1BuYTGiwgi7jHnpqNpKfKg,19278
110
105
  fontTools/varLib/interpolatablePlot.py,sha256=w393P6mGLRhYkIjSxMww3qyoYxAUZzCXlmPBbI_84C0,44375
111
106
  fontTools/varLib/builder.py,sha256=mSKOCcnnw-WzmZs15FayoqCDh77Ts7o9Tre9psh8CUc,6609
112
- fontTools/varLib/iup.cpython-38-darwin.so,sha256=SejL8IyV7GO2w0qQZuFiK3v9n4TdNhltmv43OHQBS_M,206000
107
+ fontTools/varLib/iup.cpython-38-darwin.so,sha256=wtz5657NaV98ZlF8FRtezVzQf9At_o1vkLpr11JSfDU,206000
113
108
  fontTools/varLib/stat.py,sha256=XuNKKZxGlBrl4OGFDAwVXhpBwJi23U3BdHmNTKoJnvE,4811
114
109
  fontTools/varLib/interpolatableHelpers.py,sha256=lXd7kwfIVl-4opd-vxCDhf48RnJ7IQKv_uuFQM_6vaU,11496
115
110
  fontTools/varLib/interpolatableTestStartingPoint.py,sha256=K6OYKBspim6BXc91pfLTbGLyi5XZukfMuBc6hRpENG8,4296
@@ -150,7 +145,7 @@ fontTools/pens/ttGlyphPen.py,sha256=yLtB-E5pTQR59OKVYySttWBu1xC2vR8ezSaRhIMtVwg,
150
145
  fontTools/pens/statisticsPen.py,sha256=piWK6NjjWqk9MLROjeE2-4EsxVYMyNU7UQFGD_trE9g,9808
151
146
  fontTools/pens/cairoPen.py,sha256=wuuOJ1qQDSt_K3zscM2nukRyHZTZMwMzzCXCirfq_qQ,592
152
147
  fontTools/pens/wxPen.py,sha256=W9RRHlBWHp-CVC4Exvk3ytBmRaB4-LgJPP5Bv7o9BA0,680
153
- fontTools/pens/momentsPen.cpython-38-darwin.so,sha256=gicfabhr2MTDt_diIJZ3d3DXLaTFgyqJJo7YIb_NCro,143728
148
+ fontTools/pens/momentsPen.cpython-38-darwin.so,sha256=vxGhyy778AHV73Qam-TQsFjZh5QchQxxpXQDRMw9V94,143728
154
149
  fontTools/pens/boundsPen.py,sha256=wE3owOQA8DfhH-zBGC3lJvnVwp-oyIt0KZrEqXbmS9I,3129
155
150
  fontTools/pens/recordingPen.py,sha256=VgFZ4NMhnZt1qSTzFEU0cma-gw3kBe47bfSxPYH73rs,12489
156
151
  fontTools/pens/momentsPen.py,sha256=kjLVXhGe55Abl__Yr1gob0bl0dHe7fPSwyr7TRJnbug,25658
@@ -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-38-darwin.so,sha256=p350RdFiU_ZmI802ghUY-pSJzdUVSPJ_49p2gBOqxTk,214488
197
+ fontTools/feaLib/lexer.cpython-38-darwin.so,sha256=9TDE2k9JUJe4yTQx4bjLMSG2VXAE5gfEReZQFKIcx3c,214488
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=w6_R5zToL4dhiDH-J5jk0JB_efQ_6KdbwveuTVp2z9A,108
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=HSOACH-wJetRAVDxvHtCWdby6x_sgQTopEnUMHaJnGQ,165901