Closed ryanbugden closed 6 months ago
It seems there are often lots of redundancies in the unparsed features. In a roundtrip, they cause compile errors. Could these be consolidated?
Test script:
from fontFeatures.ttLib import unparse from fontTools.ttLib import TTFont source = TTFont('SourceSerifPro-Regular.otf') fea = unparse(source).asFea() print(fea)
feature ordn { script latn; language CRT; script latn; language CRT; lookup SingleSubstitution9; } ordn; feature ordn { script latn; language CRT; script latn; language CRT; lookup SingleSubstitution9; } ordn; ... feature sinf { script DFLT; language dflt; script DFLT; language dflt; lookup SingleSubstitution12; } sinf; feature sinf { script DFLT; language dflt; script DFLT; language dflt; lookup SingleSubstitution12; } sinf; ...
It seems there are often lots of redundancies in the unparsed features. In a roundtrip, they cause compile errors. Could these be consolidated?
Test script: