fonttools 4.57.0__cp313-cp313-macosx_10_13_universal2.whl → 4.58.1__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.

Files changed (67) hide show
  1. fontTools/__init__.py +1 -1
  2. fontTools/cffLib/__init__.py +61 -26
  3. fontTools/cffLib/specializer.py +4 -1
  4. fontTools/cu2qu/cu2qu.c +4578 -4050
  5. fontTools/cu2qu/cu2qu.cpython-313-darwin.so +0 -0
  6. fontTools/designspaceLib/statNames.py +14 -7
  7. fontTools/feaLib/ast.py +12 -9
  8. fontTools/feaLib/builder.py +75 -49
  9. fontTools/feaLib/lexer.c +6290 -7116
  10. fontTools/feaLib/lexer.cpython-313-darwin.so +0 -0
  11. fontTools/feaLib/parser.py +1 -39
  12. fontTools/fontBuilder.py +6 -0
  13. fontTools/merge/cmap.py +33 -1
  14. fontTools/merge/tables.py +12 -1
  15. fontTools/misc/bezierTools.c +13668 -15551
  16. fontTools/misc/bezierTools.cpython-313-darwin.so +0 -0
  17. fontTools/misc/etree.py +4 -27
  18. fontTools/misc/loggingTools.py +1 -1
  19. fontTools/misc/symfont.py +6 -8
  20. fontTools/mtiLib/__init__.py +1 -3
  21. fontTools/otlLib/builder.py +359 -145
  22. fontTools/otlLib/optimize/gpos.py +42 -62
  23. fontTools/pens/momentsPen.c +4509 -4674
  24. fontTools/pens/momentsPen.cpython-313-darwin.so +0 -0
  25. fontTools/pens/pointPen.py +21 -12
  26. fontTools/pens/t2CharStringPen.py +31 -11
  27. fontTools/qu2cu/qu2cu.c +5746 -5465
  28. fontTools/qu2cu/qu2cu.cpython-313-darwin.so +0 -0
  29. fontTools/subset/__init__.py +12 -1
  30. fontTools/ttLib/tables/G_V_A_R_.py +5 -0
  31. fontTools/ttLib/tables/T_S_I__0.py +14 -3
  32. fontTools/ttLib/tables/T_S_I__5.py +16 -5
  33. fontTools/ttLib/tables/__init__.py +1 -0
  34. fontTools/ttLib/tables/_c_v_t.py +2 -0
  35. fontTools/ttLib/tables/_f_p_g_m.py +3 -1
  36. fontTools/ttLib/tables/_g_l_y_f.py +2 -6
  37. fontTools/ttLib/tables/_g_v_a_r.py +58 -15
  38. fontTools/ttLib/tables/_p_o_s_t.py +5 -2
  39. fontTools/ttLib/tables/otBase.py +1 -0
  40. fontTools/ufoLib/__init__.py +3 -3
  41. fontTools/ufoLib/converters.py +89 -25
  42. fontTools/ufoLib/errors.py +8 -0
  43. fontTools/ufoLib/etree.py +1 -1
  44. fontTools/ufoLib/filenames.py +155 -100
  45. fontTools/ufoLib/glifLib.py +9 -2
  46. fontTools/ufoLib/kerning.py +66 -36
  47. fontTools/ufoLib/utils.py +5 -2
  48. fontTools/unicodedata/Mirrored.py +446 -0
  49. fontTools/unicodedata/__init__.py +6 -2
  50. fontTools/varLib/__init__.py +20 -6
  51. fontTools/varLib/featureVars.py +13 -7
  52. fontTools/varLib/hvar.py +1 -1
  53. fontTools/varLib/instancer/__init__.py +14 -5
  54. fontTools/varLib/iup.c +6851 -6363
  55. fontTools/varLib/iup.cpython-313-darwin.so +0 -0
  56. fontTools/voltLib/__main__.py +206 -0
  57. fontTools/voltLib/ast.py +4 -0
  58. fontTools/voltLib/parser.py +16 -8
  59. fontTools/voltLib/voltToFea.py +347 -166
  60. {fonttools-4.57.0.dist-info → fonttools-4.58.1.dist-info}/METADATA +64 -11
  61. {fonttools-4.57.0.dist-info → fonttools-4.58.1.dist-info}/RECORD +67 -63
  62. {fonttools-4.57.0.dist-info → fonttools-4.58.1.dist-info}/WHEEL +1 -1
  63. fonttools-4.58.1.dist-info/licenses/LICENSE.external +359 -0
  64. {fonttools-4.57.0.data → fonttools-4.58.1.data}/data/share/man/man1/ttx.1 +0 -0
  65. {fonttools-4.57.0.dist-info → fonttools-4.58.1.dist-info}/entry_points.txt +0 -0
  66. {fonttools-4.57.0.dist-info → fonttools-4.58.1.dist-info}/licenses/LICENSE +0 -0
  67. {fonttools-4.57.0.dist-info → fonttools-4.58.1.dist-info}/top_level.txt +0 -0
fontTools/misc/etree.py CHANGED
@@ -56,21 +56,7 @@ except ImportError:
56
56
  from xml.etree.ElementTree import *
57
57
  _have_lxml = False
58
58
 
59
- import sys
60
-
61
- # dict is always ordered in python >= 3.6 and on pypy
62
- PY36 = sys.version_info >= (3, 6)
63
- try:
64
- import __pypy__
65
- except ImportError:
66
- __pypy__ = None
67
- _dict_is_ordered = bool(PY36 or __pypy__)
68
- del PY36, __pypy__
69
-
70
- if _dict_is_ordered:
71
- _Attrib = dict
72
- else:
73
- from collections import OrderedDict as _Attrib
59
+ _Attrib = dict
74
60
 
75
61
  if isinstance(Element, type):
76
62
  _Element = Element
@@ -221,18 +207,9 @@ except ImportError:
221
207
  # characters, the surrogate blocks, FFFE, and FFFF:
222
208
  # Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
223
209
  # Here we reversed the pattern to match only the invalid characters.
224
- # For the 'narrow' python builds supporting only UCS-2, which represent
225
- # characters beyond BMP as UTF-16 surrogate pairs, we need to pass through
226
- # the surrogate block. I haven't found a more elegant solution...
227
- UCS2 = sys.maxunicode < 0x10FFFF
228
- if UCS2:
229
- _invalid_xml_string = re.compile(
230
- "[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]"
231
- )
232
- else:
233
- _invalid_xml_string = re.compile(
234
- "[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]"
235
- )
210
+ _invalid_xml_string = re.compile(
211
+ "[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]"
212
+ )
236
213
 
237
214
  def _tounicode(s):
238
215
  """Test if a string is valid user input and decode it to unicode string
@@ -284,7 +284,7 @@ class Timer(object):
284
284
  """
285
285
 
286
286
  # timeit.default_timer choses the most accurate clock for each platform
287
- _time = timeit.default_timer
287
+ _time: Callable[[], float] = staticmethod(timeit.default_timer)
288
288
  default_msg = "elapsed time: %(time).3fs"
289
289
  default_format = "Took %(time).3fs to %(msg)s"
290
290
 
fontTools/misc/symfont.py CHANGED
@@ -234,11 +234,9 @@ if __name__ == '__main__':
234
234
 
235
235
 
236
236
  if __name__ == "__main__":
237
- pen = AreaPen()
238
- pen.moveTo((100, 100))
239
- pen.lineTo((100, 200))
240
- pen.lineTo((200, 200))
241
- pen.curveTo((200, 250), (300, 300), (250, 350))
242
- pen.lineTo((200, 100))
243
- pen.closePath()
244
- print(pen.value)
237
+ import sys
238
+
239
+ if sys.argv[1:]:
240
+ penName = sys.argv[1]
241
+ funcs = [(name, eval(f)) for name, f in zip(sys.argv[2::2], sys.argv[3::2])]
242
+ printGreenPen(penName, funcs, file=sys.stdout)
@@ -1,5 +1,3 @@
1
- #!/usr/bin/python
2
-
3
1
  # FontDame-to-FontTools for OpenType Layout tables
4
2
  #
5
3
  # Source language spec is available at:
@@ -1377,7 +1375,7 @@ def main(args=None, font=None):
1377
1375
 
1378
1376
  for f in args.inputs:
1379
1377
  log.debug("Processing %s", f)
1380
- with open(f, "rt", encoding="utf-8") as f:
1378
+ with open(f, "rt", encoding="utf-8-sig") as f:
1381
1379
  table = build(f, font, tableTag=args.tableTag)
1382
1380
  blob = table.compile(font) # Make sure it compiles
1383
1381
  decompiled = table.__class__()