fonttools 4.55.3__cp39-cp39-macosx_10_9_universal2.whl → 4.55.7__cp39-cp39-macosx_10_9_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.3"
6
+ version = __version__ = "4.55.7"
7
7
 
8
8
  __all__ = ["version", "log", "configLogger"]
Binary file
fontTools/feaLib/ast.py CHANGED
@@ -595,8 +595,8 @@ class MarkClassDefinition(Statement):
595
595
  class AlternateSubstStatement(Statement):
596
596
  """A ``sub ... from ...`` statement.
597
597
 
598
- ``prefix``, ``glyph``, ``suffix`` and ``replacement`` should be lists of
599
- `glyph-containing objects`_. ``glyph`` should be a `one element list`."""
598
+ ``glyph`` and ``replacement`` should be `glyph-containing objects`_.
599
+ ``prefix`` and ``suffix`` should be lists of `glyph-containing objects`_."""
600
600
 
601
601
  def __init__(self, prefix, glyph, suffix, replacement, location=None):
602
602
  Statement.__init__(self, location)
@@ -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