afdko
afdko copied to clipboard
Investigate issue with converting CFF2 to CFF using tx
Zachary tried this with tx:
cp SourceSerif4Variable-Roman.otf var_font.otf
cp var_font.otf static_font.otf
sfntedit -d CFF2,HVAR,MVAR,STAT,avar,fvar static_font.otf
tx -cff -U 900,60 var_font.otf mytable.cff
sfntedit -a CFF=mytable.cff static_font.otf
Josh looked at it and found:
It sort of works…but ots fails on the result (at least, it does for SourceSerif4Variable-Roman.otf)
>>> import pyots
>>> r = pyots.sanitize(‘static_font.otf’)
ERROR at ../../src/cff_charstring.cc:814 (ExecuteCharStringOperator)
ERROR at ../../src/cff_charstring.cc:898 (ExecuteCharString)
ERROR at ../../src/cff_charstring.cc:1007 (ValidateCFFCharStrings)
ERROR at ../../src/ots.cc:711 (ProcessGeneric)
>>> r.messages
(‘ERROR: CFF: Undefined operator: 0 (0x0)’, ‘ERROR: CFF : Failed validating CharStrings INDEX’, ‘ERROR: CFF : Failed to parse table’, ‘’)
But interestingly, the resulting file opens and seems otherwise okay in OTMaster