Closed NightFurySL2001 closed 9 months ago
this is not a conditional import, test if the package is available and decide
but the import issues with fontFeatures has been resolved upstream (no need for numpy anymore)
should be something like:
try:
from fontFeatures.ttLib import unparse
_haveFontFeatures = True
except ImportError:
_haveFontFeatures = False
def extractOpenTypeFeatures(source):
if _haveFontFeatures:
return unparse(source).asFea()
return ""
@typemytype if my change to your sample looks good to you, I'll merge and push an update
thanks Ben!!
Fix #56 ?