googlefonts / fontdiffenator

Font comparison tool
Apache License 2.0
79 stars 13 forks source link

Use static font nameID2 or 17 to set variations #76

Closed m4rc1e closed 4 years ago

m4rc1e commented 4 years ago

Currently, the function DFont.set_variations_from_static attempts to infer the correct instance values by using the static font's filename or its OS/2 values. A better approach is to check whether the VF contains an instance which has the same name as the static font's typographic subfamily name or subfamilyname. If it does, just use this instance, if it doesnt, infer the values.