fonttools 4.55.0__cp39-cp39-win_amd64.whl → 4.55.2__cp39-cp39-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.

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.0"
6
+ version = __version__ = "4.55.2"
7
7
 
8
8
  __all__ = ["version", "log", "configLogger"]
@@ -457,7 +457,12 @@ def remove_unused_subroutines(cff):
457
457
  if subrs == font.GlobalSubrs:
458
458
  if not hasattr(font, "FDArray") and hasattr(font.Private, "Subrs"):
459
459
  local_subrs = font.Private.Subrs
460
- elif hasattr(font, "FDArray") and len(font.FDArray) == 1:
460
+ elif (
461
+ hasattr(font, "FDArray")
462
+ and len(font.FDArray) == 1
463
+ and hasattr(font.FDArray[0].Private, "Subrs")
464
+ ):
465
+ # Technically we shouldn't do this. But I've run into fonts that do it.
461
466
  local_subrs = font.FDArray[0].Private.Subrs
462
467
  else:
463
468
  local_subrs = None