fonttools 4.57.0__cp312-cp312-win_amd64.whl → 4.58.0__cp312-cp312-win_amd64.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 (58) hide show
  1. fontTools/__init__.py +1 -1
  2. fontTools/cffLib/__init__.py +61 -26
  3. fontTools/cu2qu/cu2qu.c +15345 -14829
  4. fontTools/cu2qu/cu2qu.cp312-win_amd64.pyd +0 -0
  5. fontTools/designspaceLib/statNames.py +14 -7
  6. fontTools/feaLib/ast.py +84 -10
  7. fontTools/feaLib/builder.py +20 -4
  8. fontTools/feaLib/lexer.c +17143 -17986
  9. fontTools/feaLib/lexer.cp312-win_amd64.pyd +0 -0
  10. fontTools/feaLib/parser.py +1 -39
  11. fontTools/fontBuilder.py +6 -0
  12. fontTools/misc/bezierTools.c +39936 -41831
  13. fontTools/misc/bezierTools.cp312-win_amd64.pyd +0 -0
  14. fontTools/misc/etree.py +4 -27
  15. fontTools/mtiLib/__init__.py +0 -2
  16. fontTools/otlLib/builder.py +195 -145
  17. fontTools/otlLib/optimize/gpos.py +42 -62
  18. fontTools/pens/momentsPen.c +13266 -13448
  19. fontTools/pens/momentsPen.cp312-win_amd64.pyd +0 -0
  20. fontTools/pens/pointPen.py +21 -12
  21. fontTools/qu2cu/qu2cu.c +16538 -16269
  22. fontTools/qu2cu/qu2cu.cp312-win_amd64.pyd +0 -0
  23. fontTools/subset/__init__.py +11 -0
  24. fontTools/ttLib/tables/G_V_A_R_.py +5 -0
  25. fontTools/ttLib/tables/T_S_I__0.py +14 -3
  26. fontTools/ttLib/tables/T_S_I__5.py +16 -5
  27. fontTools/ttLib/tables/__init__.py +1 -0
  28. fontTools/ttLib/tables/_c_v_t.py +2 -0
  29. fontTools/ttLib/tables/_f_p_g_m.py +3 -1
  30. fontTools/ttLib/tables/_g_l_y_f.py +2 -6
  31. fontTools/ttLib/tables/_g_v_a_r.py +58 -15
  32. fontTools/ttLib/tables/_p_o_s_t.py +5 -2
  33. fontTools/ttLib/tables/otBase.py +1 -0
  34. fontTools/ufoLib/__init__.py +2 -2
  35. fontTools/ufoLib/converters.py +89 -25
  36. fontTools/ufoLib/errors.py +8 -0
  37. fontTools/ufoLib/etree.py +1 -1
  38. fontTools/ufoLib/filenames.py +155 -100
  39. fontTools/ufoLib/glifLib.py +9 -2
  40. fontTools/ufoLib/kerning.py +66 -36
  41. fontTools/ufoLib/utils.py +5 -2
  42. fontTools/unicodedata/Mirrored.py +446 -0
  43. fontTools/unicodedata/__init__.py +6 -2
  44. fontTools/varLib/__init__.py +2 -0
  45. fontTools/varLib/iup.c +19630 -19154
  46. fontTools/varLib/iup.cp312-win_amd64.pyd +0 -0
  47. fontTools/voltLib/__main__.py +206 -0
  48. fontTools/voltLib/ast.py +4 -0
  49. fontTools/voltLib/parser.py +16 -8
  50. fontTools/voltLib/voltToFea.py +347 -166
  51. {fonttools-4.57.0.dist-info → fonttools-4.58.0.dist-info}/METADATA +45 -11
  52. {fonttools-4.57.0.dist-info → fonttools-4.58.0.dist-info}/RECORD +58 -54
  53. {fonttools-4.57.0.dist-info → fonttools-4.58.0.dist-info}/WHEEL +1 -1
  54. fonttools-4.58.0.dist-info/licenses/LICENSE.external +359 -0
  55. {fonttools-4.57.0.data → fonttools-4.58.0.data}/data/share/man/man1/ttx.1 +0 -0
  56. {fonttools-4.57.0.dist-info → fonttools-4.58.0.dist-info}/entry_points.txt +0 -0
  57. {fonttools-4.57.0.dist-info → fonttools-4.58.0.dist-info}/licenses/LICENSE +0 -0
  58. {fonttools-4.57.0.dist-info → fonttools-4.58.0.dist-info}/top_level.txt +0 -0
Binary file
@@ -1613,7 +1613,7 @@ class Parser(object):
1613
1613
  "HorizAxis.BaseScriptList",
1614
1614
  "VertAxis.BaseScriptList",
1615
1615
  ), self.cur_token_
1616
- scripts = [(self.parse_base_script_record_(count))]
1616
+ scripts = [self.parse_base_script_record_(count)]
1617
1617
  while self.next_token_ == ",":
1618
1618
  self.expect_symbol_(",")
1619
1619
  scripts.append(self.parse_base_script_record_(count))
@@ -2062,44 +2062,6 @@ class Parser(object):
2062
2062
  )
2063
2063
  self.expect_symbol_(";")
2064
2064
 
2065
- # A multiple substitution may have a single destination, in which case
2066
- # it will look just like a single substitution. So if there are both
2067
- # multiple and single substitutions, upgrade all the single ones to
2068
- # multiple substitutions.
2069
-
2070
- # Check if we have a mix of non-contextual singles and multiples.
2071
- has_single = False
2072
- has_multiple = False
2073
- for s in statements:
2074
- if isinstance(s, self.ast.SingleSubstStatement):
2075
- has_single = not any([s.prefix, s.suffix, s.forceChain])
2076
- elif isinstance(s, self.ast.MultipleSubstStatement):
2077
- has_multiple = not any([s.prefix, s.suffix, s.forceChain])
2078
-
2079
- # Upgrade all single substitutions to multiple substitutions.
2080
- if has_single and has_multiple:
2081
- statements = []
2082
- for s in block.statements:
2083
- if isinstance(s, self.ast.SingleSubstStatement):
2084
- glyphs = s.glyphs[0].glyphSet()
2085
- replacements = s.replacements[0].glyphSet()
2086
- if len(replacements) == 1:
2087
- replacements *= len(glyphs)
2088
- for i, glyph in enumerate(glyphs):
2089
- statements.append(
2090
- self.ast.MultipleSubstStatement(
2091
- s.prefix,
2092
- glyph,
2093
- s.suffix,
2094
- [replacements[i]],
2095
- s.forceChain,
2096
- location=s.location,
2097
- )
2098
- )
2099
- else:
2100
- statements.append(s)
2101
- block.statements = statements
2102
-
2103
2065
  def is_cur_keyword_(self, k):
2104
2066
  if self.cur_token_type_ is Lexer.NAME:
2105
2067
  if isinstance(k, type("")): # basestring is gone in Python3
fontTools/fontBuilder.py CHANGED
@@ -714,6 +714,12 @@ class FontBuilder(object):
714
714
  gvar.reserved = 0
715
715
  gvar.variations = variations
716
716
 
717
+ def setupGVAR(self, variations):
718
+ gvar = self.font["GVAR"] = newTable("GVAR")
719
+ gvar.version = 1
720
+ gvar.reserved = 0
721
+ gvar.variations = variations
722
+
717
723
  def calcGlyphBounds(self):
718
724
  """Calculate the bounding boxes of all glyphs in the `glyf` table.
719
725
  This is usually not called explicitly by client code.