justvanrossum / fontgoggles

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

Please update ufo2ft package #432

Closed BoldMonday closed 1 month ago

BoldMonday commented 1 month ago

Current version of FG (1.8.1) includes ufo2ft v3.2.5 which contains a bug that prevents certain UFO files from compiling.

Some of our UFO files contain definitions for the GDEF table in their feature code. When trying to view these UFO files in FG the following error occurs:

Traceback (most recent call last):
  File "fontgoggles/compile/ufoCompiler.pyc", line 52, in compileUFOToFont
  File "ufo2ft/featureCompiler.pyc", line 148, in compile
  File "ufo2ft/featureCompiler.pyc", line 315, in setupFeatures
  File "ufo2ft/featureWriters/baseFeatureWriter.pyc", line 154, in write
  File "ufo2ft/featureWriters/kernFeatureWriter.pyc", line 283, in _write
  File "ufo2ft/featureWriters/kernFeatureWriter.pyc", line 643, in _makeKerningLookups
  File "ufo2ft/featureWriters/kernFeatureWriter.pyc", line 724, in _makeSplitScriptKernLookups
  File "ufo2ft/featureWriters/kernFeatureWriter.pyc", line 606, in _makeKerningLookup
  File "ufo2ft/featureWriters/kernFeatureWriter.pyc", line 594, in _filterSpacingMarks
AttributeError: 'MinimalGlyphObject' object has no attribute 'width'

When compiling the UFO with the most recent version of ufo2ft (v.3.2.8) this error does not occur.

justvanrossum commented 1 month ago

I'm afraid that upgrading ufo2ft will not fix this problem. The MinimalGlyphObject class is a FontGoggles class, and needs to be upgraded to also provide the width attribute, which ufo2ft previously did not require.

If possible, if you could share a UFO that triggers this bug privately, that would be very helpful.

BoldMonday commented 1 month ago

No problem. Will send the file by email!

justvanrossum commented 1 month ago

https://github.com/justvanrossum/fontgoggles/releases/tag/v1.8.2