-
-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Problem description
The feature code for the mark, mkmk, gdef feature for the static fonts causes fontmake to not be able to build the variable font. Error is VarLibMergeError: ((2, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]), 'int', '.LookupCount', 'Feature', '.Feature', 'FeatureRecord', '[0]', 'list', '.FeatureRecord', 'FeatureList', '.FeatureList', 'GPOS', '.table', 'table_G_P_O_S_').
Currently, the mark, mkmk, and gdef features are being built by fontmake for the var font.
Expected behavior
The same OT code can work for both fonts.
To Reproduce
Steps to reproduce the behavior:
To build_variable.py add:
from fontParts.fontshell import RFont as Font to the head of the file
Change line 7 to from utils import getFiles, make_mark_mkmk_gdef_feature
and then add these lines after line 21 (the end of the buildFeatures function)
for ufo in ufos:
font = Font(ufo)
mark_mkmk_gdef = make_mark_mkmk_gdef_feature(font)
font.features.text += mark_mkmk_gdef
font.save(font.path)
print("🏗 Added mark, mkmk, and GDEF to features")
Then run the variable fonts build.
Environment (please complete the following information):
Standard build environment.
Additional context
To pick this apart, the UFOs that are used for the variable fonts should be built with the static OT code (see above to reproduce). Those UFOs should be built with fontmake as TTFs, and then the GPOS tables compared to see where the difference is, along with an examination of the OT code for what might be triggering the issue. So far the OT code seems as though it should be making the same number of lookups in all fonts, but more investigation is needed.