We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7396076 + 810278b commit b330ddfCopy full SHA for b330ddf
Lib/extractor/formats/opentype.py
@@ -11,7 +11,6 @@
11
from extractor.exceptions import ExtractorError
12
from extractor.stream import InstructionStream
13
from extractor.tools import RelaxedInfo, copyAttr
14
-from fontFeatures.ttLib import unparse
15
16
17
TRUETYPE_INSTRUCTIONS_KEY = "public.truetype.instructions"
@@ -1067,6 +1066,12 @@ def _extractOpenTypeKerningFromKern(source):
1067
1066
1068
1069
def extractOpenTypeFeatures(source):
1070
- return unparse(source).asFea()
1071
-
1072
+ try:
+ from fontFeatures.ttLib import unparse
+ _haveFontFeatures = True
+ except ImportError:
1073
+ _haveFontFeatures = False
1074
+
1075
+ if _haveFontFeatures:
1076
+ return unparse(source).asFea()
1077
+ return ""
0 commit comments