[cffLib.transforms] Handle case of one FD in remove_unused_subrs
This commit is contained in:
parent
2225c84a1b
commit
4360969baa
@ -457,6 +457,8 @@ def remove_unused_subroutines(cff):
|
|||||||
if subrs == font.GlobalSubrs:
|
if subrs == font.GlobalSubrs:
|
||||||
if not hasattr(font, "FDArray") and hasattr(font.Private, "Subrs"):
|
if not hasattr(font, "FDArray") and hasattr(font.Private, "Subrs"):
|
||||||
local_subrs = font.Private.Subrs
|
local_subrs = font.Private.Subrs
|
||||||
|
elif hasattr(font, "FDArray") and len(font.FDArray) == 1:
|
||||||
|
local_subrs = font.FDArray[0].Private.Subrs
|
||||||
else:
|
else:
|
||||||
local_subrs = None
|
local_subrs = None
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user