justvanrossum / fontgoggles

FontGoggles: Visual OTL Preview and QA
Apache License 2.0
405 stars 43 forks source link

Trouble compiling features when "languagesystem math dflt;" has been defined #406

Closed BoldMonday closed 5 months ago

BoldMonday commented 6 months ago

(I realise this problem might not be FontGoggles-specific but an update will be necessary when this issue has been fixed upstream.)

Working on a UFO file containing features with the following declarations for languagesystems:

languagesystem DFLT dflt;   # Default
languagesystem latn dflt;   # Latin default
languagesystem cyrl dflt;   # Cyrillic default
languagesystem grek dflt;   # Greek default
languagesystem math dflt;

FontGoggles is not able to compile the features, reporting:

Traceback (most recent call last):
  File "fontgoggles/compile/ufoCompiler.pyc", line 52, in compileUFOToFont
  File "ufo2ft/featureCompiler.pyc", line 133, in compile
  File "ufo2ft/featureCompiler.pyc", line 285, in setupFeatures
  File "ufo2ft/featureWriters/baseFeatureWriter.pyc", line 128, in write
  File "ufo2ft/featureWriters/kernFeatureWriter.pyc", line 118, in setContext
  File "ufo2ft/featureWriters/kernFeatureWriter.pyc", line 260, in _groupScriptsByTagAndDirection
  File "fontTools/unicodedata/__init__.pyc", line 204, in script_horizontal_direction
KeyError: 'Zmth'

It appears that the line languagesystem math dflt; is the culprit here. If I remove that line there is no problem.

anthrotype commented 6 months ago

possibly related https://github.com/fonttools/fonttools/issues/3013

anthrotype commented 6 months ago

i think the error you're seeing was fixed in ufo2ft already see https://github.com/googlefonts/ufo2ft/pull/717 (it should be in since v2.31.0 at least)

justvanrossum commented 6 months ago

I will try to release an update with updated dependencies soon.

justvanrossum commented 5 months ago

This should be fixed by #410, part of the 1.8 release: https://github.com/justvanrossum/fontgoggles/releases/tag/v1.8