Skip to content

Commit

Permalink
Merge pull request #61 from NightFurySL2001/patch-1
Browse files Browse the repository at this point in the history
Move fontfeature import statement
  • Loading branch information
typemytype committed Dec 1, 2023
2 parents 7396076 + 810278b commit b330ddf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Lib/extractor/formats/opentype.py
Expand Up @@ -11,7 +11,6 @@
from extractor.exceptions import ExtractorError
from extractor.stream import InstructionStream
from extractor.tools import RelaxedInfo, copyAttr
from fontFeatures.ttLib import unparse


TRUETYPE_INSTRUCTIONS_KEY = "public.truetype.instructions"
Expand Down Expand Up @@ -1067,6 +1066,12 @@ def _extractOpenTypeKerningFromKern(source):


def extractOpenTypeFeatures(source):
return unparse(source).asFea()


try:
from fontFeatures.ttLib import unparse
_haveFontFeatures = True
except ImportError:
_haveFontFeatures = False

if _haveFontFeatures:
return unparse(source).asFea()
return ""

0 comments on commit b330ddf

Please sign in to comment.