fonttools 4.55.2__cp311-cp311-musllinux_1_2_aarch64.whl → 4.55.6__cp311-cp311-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.

Potentially problematic release.


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

Files changed (99) hide show
  1. fontTools/__init__.py +1 -1
  2. fontTools/feaLib/ast.py +2 -2
  3. fontTools/feaLib/builder.py +29 -4
  4. fontTools/misc/bezierTools.c +3256 -2972
  5. fontTools/misc/bezierTools.cpython-311-aarch64-linux-musl.so +0 -0
  6. fontTools/misc/bezierTools.py +8 -1
  7. fontTools/misc/transform.py +13 -15
  8. fontTools/otlLib/builder.py +17 -0
  9. fontTools/pens/statisticsPen.py +5 -0
  10. fontTools/ttLib/tables/B_A_S_E_.py +9 -0
  11. fontTools/ttLib/tables/C_B_D_T_.py +10 -0
  12. fontTools/ttLib/tables/C_B_L_C_.py +10 -0
  13. fontTools/ttLib/tables/C_F_F_.py +15 -0
  14. fontTools/ttLib/tables/C_F_F__2.py +13 -0
  15. fontTools/ttLib/tables/C_O_L_R_.py +9 -1
  16. fontTools/ttLib/tables/C_P_A_L_.py +9 -0
  17. fontTools/ttLib/tables/D_S_I_G_.py +7 -0
  18. fontTools/ttLib/tables/E_B_D_T_.py +8 -0
  19. fontTools/ttLib/tables/E_B_L_C_.py +8 -0
  20. fontTools/ttLib/tables/F_F_T_M_.py +10 -0
  21. fontTools/ttLib/tables/F__e_a_t.py +7 -2
  22. fontTools/ttLib/tables/G_D_E_F_.py +8 -0
  23. fontTools/ttLib/tables/G_M_A_P_.py +7 -0
  24. fontTools/ttLib/tables/G_P_K_G_.py +7 -0
  25. fontTools/ttLib/tables/G_P_O_S_.py +9 -0
  26. fontTools/ttLib/tables/G_S_U_B_.py +8 -0
  27. fontTools/ttLib/tables/G__l_a_t.py +3 -2
  28. fontTools/ttLib/tables/G__l_o_c.py +3 -2
  29. fontTools/ttLib/tables/H_V_A_R_.py +8 -0
  30. fontTools/ttLib/tables/J_S_T_F_.py +8 -0
  31. fontTools/ttLib/tables/L_T_S_H_.py +10 -0
  32. fontTools/ttLib/tables/M_A_T_H_.py +8 -0
  33. fontTools/ttLib/tables/M_E_T_A_.py +7 -0
  34. fontTools/ttLib/tables/M_V_A_R_.py +8 -0
  35. fontTools/ttLib/tables/O_S_2f_2.py +8 -1
  36. fontTools/ttLib/tables/S_I_N_G_.py +7 -0
  37. fontTools/ttLib/tables/S_T_A_T_.py +10 -0
  38. fontTools/ttLib/tables/S_V_G_.py +8 -0
  39. fontTools/ttLib/tables/S__i_l_f.py +4 -1
  40. fontTools/ttLib/tables/S__i_l_l.py +5 -0
  41. fontTools/ttLib/tables/T_S_I_B_.py +8 -0
  42. fontTools/ttLib/tables/T_S_I_C_.py +9 -0
  43. fontTools/ttLib/tables/T_S_I_D_.py +8 -0
  44. fontTools/ttLib/tables/T_S_I_J_.py +8 -0
  45. fontTools/ttLib/tables/T_S_I_P_.py +8 -0
  46. fontTools/ttLib/tables/T_S_I_S_.py +8 -0
  47. fontTools/ttLib/tables/T_S_I_V_.py +6 -0
  48. fontTools/ttLib/tables/T_S_I__0.py +2 -0
  49. fontTools/ttLib/tables/T_S_I__1.py +2 -0
  50. fontTools/ttLib/tables/T_S_I__2.py +2 -0
  51. fontTools/ttLib/tables/T_S_I__3.py +2 -0
  52. fontTools/ttLib/tables/T_S_I__5.py +2 -0
  53. fontTools/ttLib/tables/T_T_F_A_.py +9 -0
  54. fontTools/ttLib/tables/V_A_R_C_.py +7 -0
  55. fontTools/ttLib/tables/V_D_M_X_.py +8 -0
  56. fontTools/ttLib/tables/V_O_R_G_.py +8 -1
  57. fontTools/ttLib/tables/V_V_A_R_.py +8 -0
  58. fontTools/ttLib/tables/_a_n_k_r.py +3 -2
  59. fontTools/ttLib/tables/_a_v_a_r.py +3 -1
  60. fontTools/ttLib/tables/_b_s_l_n.py +9 -0
  61. fontTools/ttLib/tables/_c_i_d_g.py +7 -2
  62. fontTools/ttLib/tables/_c_m_a_p.py +2 -0
  63. fontTools/ttLib/tables/_c_v_a_r.py +8 -0
  64. fontTools/ttLib/tables/_c_v_t.py +8 -0
  65. fontTools/ttLib/tables/_f_e_a_t.py +7 -4
  66. fontTools/ttLib/tables/_f_p_g_m.py +11 -0
  67. fontTools/ttLib/tables/_f_v_a_r.py +8 -0
  68. fontTools/ttLib/tables/_g_a_s_p.py +8 -0
  69. fontTools/ttLib/tables/_g_c_i_d.py +7 -0
  70. fontTools/ttLib/tables/_g_l_y_f.py +31 -7
  71. fontTools/ttLib/tables/_g_v_a_r.py +11 -3
  72. fontTools/ttLib/tables/_h_d_m_x.py +8 -0
  73. fontTools/ttLib/tables/_h_e_a_d.py +7 -0
  74. fontTools/ttLib/tables/_h_h_e_a.py +12 -0
  75. fontTools/ttLib/tables/_h_m_t_x.py +9 -0
  76. fontTools/ttLib/tables/_k_e_r_n.py +11 -0
  77. fontTools/ttLib/tables/_l_c_a_r.py +8 -0
  78. fontTools/ttLib/tables/_l_o_c_a.py +8 -0
  79. fontTools/ttLib/tables/_l_t_a_g.py +8 -0
  80. fontTools/ttLib/tables/_m_a_x_p.py +8 -0
  81. fontTools/ttLib/tables/_m_e_t_a.py +8 -0
  82. fontTools/ttLib/tables/_m_o_r_t.py +8 -0
  83. fontTools/ttLib/tables/_m_o_r_x.py +9 -0
  84. fontTools/ttLib/tables/_n_a_m_e.py +15 -13
  85. fontTools/ttLib/tables/_o_p_b_d.py +8 -0
  86. fontTools/ttLib/tables/_p_o_s_t.py +9 -0
  87. fontTools/ttLib/tables/_p_r_e_p.py +9 -0
  88. fontTools/ttLib/tables/_p_r_o_p.py +6 -0
  89. fontTools/ttLib/tables/_s_b_i_x.py +10 -0
  90. fontTools/ttLib/tables/_t_r_a_k.py +7 -0
  91. fontTools/ttLib/tables/_v_h_e_a.py +12 -0
  92. fontTools/ttLib/tables/_v_m_t_x.py +9 -0
  93. {fonttools-4.55.2.dist-info → fonttools-4.55.6.dist-info}/METADATA +38 -3
  94. {fonttools-4.55.2.dist-info → fonttools-4.55.6.dist-info}/RECORD +292 -292
  95. {fonttools-4.55.2.dist-info → fonttools-4.55.6.dist-info}/WHEEL +1 -1
  96. {fonttools-4.55.2.data → fonttools-4.55.6.data}/data/share/man/man1/ttx.1 +0 -0
  97. {fonttools-4.55.2.dist-info → fonttools-4.55.6.dist-info}/LICENSE +0 -0
  98. {fonttools-4.55.2.dist-info → fonttools-4.55.6.dist-info}/entry_points.txt +0 -0
  99. {fonttools-4.55.2.dist-info → fonttools-4.55.6.dist-info}/top_level.txt +0 -0
@@ -2,4 +2,12 @@ from .otBase import BaseTTXConverter
2
2
 
3
3
 
4
4
  class table__l_c_a_r(BaseTTXConverter):
5
+ """Ligature Caret table
6
+
7
+ The AAT ``lcar`` table stores division points within ligatures, which applications
8
+ can use to position carets properly between the logical parts of the ligature.
9
+
10
+ See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6lcar.html
11
+ """
12
+
5
13
  pass
@@ -8,6 +8,14 @@ log = logging.getLogger(__name__)
8
8
 
9
9
 
10
10
  class table__l_o_c_a(DefaultTable.DefaultTable):
11
+ """Index to Location table
12
+
13
+ The ``loca`` table stores the offsets in the ``glyf`` table that correspond
14
+ to the descriptions of each glyph. The glyphs are references by Glyph ID.
15
+
16
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/loca
17
+ """
18
+
11
19
  dependencies = ["glyf"]
12
20
 
13
21
  def decompile(self, data, ttFont):
@@ -6,6 +6,14 @@ import struct
6
6
 
7
7
 
8
8
  class table__l_t_a_g(DefaultTable.DefaultTable):
9
+ """Language Tag table
10
+
11
+ The AAT ``ltag`` table contains mappings between the numeric codes used
12
+ in the language field of the ``name`` table and IETF language tags.
13
+
14
+ See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6ltag.html
15
+ """
16
+
9
17
  def __init__(self, tag=None):
10
18
  DefaultTable.DefaultTable.__init__(self, tag)
11
19
  self.version, self.flags = 1, 0
@@ -27,6 +27,14 @@ maxpFormat_1_0_add = """
27
27
 
28
28
 
29
29
  class table__m_a_x_p(DefaultTable.DefaultTable):
30
+ """Maximum Profile table
31
+
32
+ The ``maxp`` table contains the memory requirements for the data in
33
+ the font.
34
+
35
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/maxp
36
+ """
37
+
30
38
  dependencies = ["glyf"]
31
39
 
32
40
  def decompile(self, data, ttFont):
@@ -24,6 +24,14 @@ DATA_MAP_FORMAT = """
24
24
 
25
25
 
26
26
  class table__m_e_t_a(DefaultTable.DefaultTable):
27
+ """Metadata table
28
+
29
+ The ``meta`` table contains various metadata values for the font. Each
30
+ category of metadata in the table is identified by a four-character tag.
31
+
32
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/meta
33
+ """
34
+
27
35
  def __init__(self, tag=None):
28
36
  DefaultTable.DefaultTable.__init__(self, tag)
29
37
  self.data = {}
@@ -3,4 +3,12 @@ from .otBase import BaseTTXConverter
3
3
 
4
4
  # https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6mort.html
5
5
  class table__m_o_r_t(BaseTTXConverter):
6
+ """The AAT ``mort`` table contains glyph transformations used for script shaping and
7
+ for various other optional smart features.
8
+
9
+ Note: ``mort`` has been deprecated in favor of the newer ``morx`` table.
10
+
11
+ See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6mort.html
12
+ """
13
+
6
14
  pass
@@ -3,4 +3,13 @@ from .otBase import BaseTTXConverter
3
3
 
4
4
  # https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6morx.html
5
5
  class table__m_o_r_x(BaseTTXConverter):
6
+ """The AAT ``morx`` table contains glyph transformations used for script shaping and
7
+ for various other optional smart features, akin to ``GSUB`` and ``GPOS`` features
8
+ in OpenType Layout.
9
+
10
+ Note: ``morx`` is a replacement for the now deprecated ``mort`` table.
11
+
12
+ See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6morx.html
13
+ """
14
+
6
15
  pass
@@ -36,8 +36,22 @@ nameRecordSize = sstruct.calcsize(nameRecordFormat)
36
36
 
37
37
 
38
38
  class table__n_a_m_e(DefaultTable.DefaultTable):
39
+ """Naming table
40
+
41
+ The ``name`` table is used to store a variety of strings that can be
42
+ associated with user-facing font information. Records in the ``name``
43
+ table can be tagged with language tags to support multilingual naming
44
+ and can support platform-specific character-encoding variants.
45
+
46
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/name
47
+ """
48
+
39
49
  dependencies = ["ltag"]
40
50
 
51
+ def __init__(self, tag=None):
52
+ super().__init__(tag)
53
+ self.names = []
54
+
41
55
  def decompile(self, data, ttFont):
42
56
  format, n, stringOffset = struct.unpack(b">HHH", data[:6])
43
57
  expectedStringOffset = 6 + n * nameRecordSize
@@ -68,10 +82,6 @@ class table__n_a_m_e(DefaultTable.DefaultTable):
68
82
  self.names.append(name)
69
83
 
70
84
  def compile(self, ttFont):
71
- if not hasattr(self, "names"):
72
- # only happens when there are NO name table entries read
73
- # from the TTX file
74
- self.names = []
75
85
  names = self.names
76
86
  names.sort() # sort according to the spec; see NameRecord.__lt__()
77
87
  stringData = b""
@@ -98,8 +108,6 @@ class table__n_a_m_e(DefaultTable.DefaultTable):
98
108
  def fromXML(self, name, attrs, content, ttFont):
99
109
  if name != "namerecord":
100
110
  return # ignore unknown tags
101
- if not hasattr(self, "names"):
102
- self.names = []
103
111
  name = NameRecord()
104
112
  self.names.append(name)
105
113
  name.fromXML(name, attrs, content, ttFont)
@@ -184,8 +192,6 @@ class table__n_a_m_e(DefaultTable.DefaultTable):
184
192
  identified by the (platformID, platEncID, langID) triplet. A warning is issued
185
193
  to prevent unexpected results.
186
194
  """
187
- if not hasattr(self, "names"):
188
- self.names = []
189
195
  if not isinstance(string, str):
190
196
  if isinstance(string, bytes):
191
197
  log.warning(
@@ -252,7 +258,7 @@ class table__n_a_m_e(DefaultTable.DefaultTable):
252
258
  The nameID is assigned in the range between 'minNameID' and 32767 (inclusive),
253
259
  following the last nameID in the name table.
254
260
  """
255
- names = getattr(self, "names", [])
261
+ names = self.names
256
262
  nameID = 1 + max([n.nameID for n in names] + [minNameID - 1])
257
263
  if nameID > 32767:
258
264
  raise ValueError("nameID must be less than 32768")
@@ -349,8 +355,6 @@ class table__n_a_m_e(DefaultTable.DefaultTable):
349
355
  If the 'nameID' argument is None, the created nameID will not
350
356
  be less than the 'minNameID' argument.
351
357
  """
352
- if not hasattr(self, "names"):
353
- self.names = []
354
358
  if nameID is None:
355
359
  # Reuse nameID if possible
356
360
  nameID = self.findMultilingualName(
@@ -394,8 +398,6 @@ class table__n_a_m_e(DefaultTable.DefaultTable):
394
398
  assert (
395
399
  len(platforms) > 0
396
400
  ), "'platforms' must contain at least one (platformID, platEncID, langID) tuple"
397
- if not hasattr(self, "names"):
398
- self.names = []
399
401
  if not isinstance(string, str):
400
402
  raise TypeError(
401
403
  "expected str, found %s: %r" % (type(string).__name__, string)
@@ -3,4 +3,12 @@ from .otBase import BaseTTXConverter
3
3
 
4
4
  # https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6opbd.html
5
5
  class table__o_p_b_d(BaseTTXConverter):
6
+ """Optical Bounds table
7
+
8
+ The AAT ``opbd`` table contains optical boundary points for glyphs, which
9
+ applications can use for the visual alignment of lines of text.
10
+
11
+ See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6opbd.html
12
+ """
13
+
6
14
  pass
@@ -27,6 +27,15 @@ postFormatSize = sstruct.calcsize(postFormat)
27
27
 
28
28
 
29
29
  class table__p_o_s_t(DefaultTable.DefaultTable):
30
+ """PostScript table
31
+
32
+ The ``post`` table contains information needed to use the font on
33
+ PostScript printers, including the PostScript names of glyphs and
34
+ data that was stored in the ``FontInfo`` dictionary for Type 1 fonts.
35
+
36
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/post
37
+ """
38
+
30
39
  def decompile(self, data, ttFont):
31
40
  sstruct.unpack(postFormat, data[:postFormatSize], self)
32
41
  data = data[postFormatSize:]
@@ -4,4 +4,13 @@ superclass = ttLib.getTableClass("fpgm")
4
4
 
5
5
 
6
6
  class table__p_r_e_p(superclass):
7
+ """Control Value Program table
8
+
9
+ The ``prep`` table contains TrueType instructions that can makee font-wide
10
+ alterations to the Control Value Table. It may potentially be executed
11
+ before any glyph is processed.
12
+
13
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/prep
14
+ """
15
+
7
16
  pass
@@ -3,4 +3,10 @@ from .otBase import BaseTTXConverter
3
3
 
4
4
  # https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6prop.html
5
5
  class table__p_r_o_p(BaseTTXConverter):
6
+ """The AAT ``prop`` table can store a variety of per-glyph properties, such as
7
+ Unicode directionality or whether glyphs are non-spacing marks.
8
+
9
+ See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6prop.html
10
+ """
11
+
6
12
  pass
@@ -28,6 +28,16 @@ sbixStrikeOffsetFormatSize = sstruct.calcsize(sbixStrikeOffsetFormat)
28
28
 
29
29
 
30
30
  class table__s_b_i_x(DefaultTable.DefaultTable):
31
+ """Standard Bitmap Graphics table
32
+
33
+ The ``sbix`` table stores bitmap image data in standard graphics formats
34
+ like JPEG, PNG, or TIFF. The glyphs for which the ``sbix`` table provides
35
+ data are indexed by Glyph ID. For each such glyph, the ``sbix`` table can
36
+ hold different data for different sizes, called "strikes."
37
+
38
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/sbix
39
+ """
40
+
31
41
  def __init__(self, tag=None):
32
42
  DefaultTable.DefaultTable.__init__(self, tag)
33
43
  self.version = 1
@@ -58,6 +58,13 @@ PER_SIZE_VALUE_FORMAT_SIZE = struct.calcsize(PER_SIZE_VALUE_FORMAT)
58
58
 
59
59
 
60
60
  class table__t_r_a_k(DefaultTable.DefaultTable):
61
+ """The AAT ``trak`` table can store per-size adjustments to each glyph's
62
+ sidebearings to make when tracking is enabled, which applications can
63
+ use to provide more visually balanced line spacing.
64
+
65
+ See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6trak.html
66
+ """
67
+
61
68
  dependencies = ["name"]
62
69
 
63
70
  def compile(self, ttFont):
@@ -31,6 +31,18 @@ vheaFormat = """
31
31
 
32
32
 
33
33
  class table__v_h_e_a(DefaultTable.DefaultTable):
34
+ """Vertical Header table
35
+
36
+ The ``vhea`` table contains information needed during vertical
37
+ text layout.
38
+
39
+ .. note::
40
+ This converter class is kept in sync with the :class:`._h_h_e_a.table__h_h_e_a`
41
+ table constructor.
42
+
43
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/vhea
44
+ """
45
+
34
46
  # Note: Keep in sync with table__h_h_e_a
35
47
 
36
48
  dependencies = ["vmtx", "glyf", "CFF ", "CFF2"]
@@ -4,6 +4,15 @@ superclass = ttLib.getTableClass("hmtx")
4
4
 
5
5
 
6
6
  class table__v_m_t_x(superclass):
7
+ """Vertical Metrics table
8
+
9
+ The ``vmtx`` table contains per-glyph metrics for the glyphs in a
10
+ ``glyf``, ``CFF ``, or ``CFF2`` table, as needed for vertical text
11
+ layout.
12
+
13
+ See also https://learn.microsoft.com/en-us/typography/opentype/spec/vmtx
14
+ """
15
+
7
16
  headerTag = "vhea"
8
17
  advanceName = "height"
9
18
  sideBearingName = "tsb"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: fonttools
3
- Version: 4.55.2
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
@@ -72,6 +72,18 @@ Requires-Dist: sympy; extra == "all"
72
72
  Requires-Dist: xattr; sys_platform == "darwin" and extra == "all"
73
73
  Requires-Dist: skia-pathops>=0.5.0; extra == "all"
74
74
  Requires-Dist: uharfbuzz>=0.23.0; extra == "all"
75
+ Dynamic: author
76
+ Dynamic: author-email
77
+ Dynamic: classifier
78
+ Dynamic: description
79
+ Dynamic: home-page
80
+ Dynamic: license
81
+ Dynamic: maintainer
82
+ Dynamic: maintainer-email
83
+ Dynamic: platform
84
+ Dynamic: provides-extra
85
+ Dynamic: requires-python
86
+ Dynamic: summary
75
87
 
76
88
  |CI Build Status| |Coverage Status| |PyPI| |Gitter Chat|
77
89
 
@@ -377,6 +389,30 @@ Have fun!
377
389
  Changelog
378
390
  ~~~~~~~~~
379
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
+
403
+ 4.55.4 (released 2025-01-21)
404
+ ----------------------------
405
+
406
+ - [bezierTools] Fixed ``splitCubicAtT`` sometimes not returning identical start/end points as result of numerical precision (#3742, #3743).
407
+ - [feaLib/ast] Fixed docstring of ``AlternateSubstStatement`` (#3735).
408
+ - [transform] Typing fixes (#3734).
409
+
410
+ 4.55.3 (released 2024-12-10)
411
+ ----------------------------
412
+
413
+ - [Docs] fill out ttLib table section [#3716]
414
+ - [feaLib] More efficient inline format 4 lookups [#3726]
415
+
380
416
  4.55.2 (released 2024-12-05)
381
417
  ----------------------------
382
418
 
@@ -396,7 +432,6 @@ Changelog
396
432
  4.55.0 (released 2024-11-14)
397
433
  ----------------------------
398
434
 
399
-
400
435
  - [cffLib.specializer] Adjust stack use calculation (#3689)
401
436
  - [varLib] Lets not add mac names if the rest of name doesn't have them (#3688)
402
437
  - [ttLib.reorderGlyphs] Update CFF table charstrings and charset (#3682)