Remove slnt/ital VF axis

This removes the slant/italic variable axis and breaks up the font in two: roman and italic. This change will allow diverging designs for italic (for example single-storey a). It also addresses the fact that most software, including web browsers, doesn't handle VFs with slnt or ital well.
This commit is contained in:
Rasmus Andersson 2022-09-26 17:09:36 -07:00
parent 17875920ea
commit 3f174fcef6
7700 changed files with 955523 additions and 1364688 deletions

View file

@ -24,14 +24,23 @@ def update_version(ufo):
ufo.info.openTypeNameUniqueID = "%s-%s:%d:%s" % (psFamily, psStyle, now.year, buildtag)
ufo.info.openTypeHeadCreated = now.strftime("%Y/%m/%d %H:%M:%S")
def fix_opsz_maximum(designspace):
def fix_opsz_range(designspace):
# TODO: find extremes by looking at the source
for a in designspace.axes:
if a.tag == "opsz":
# TODO: find maximum by looking at the source
a.minimum = 14
a.maximum = 32
break
return designspace
def fix_wght_range(designspace):
for a in designspace.axes:
if a.tag == "wght":
a.minimum = 100
a.maximum = 900
break
return designspace
def should_decompose_glyph(g):
# A trivial glyph is one that does not use components or where component transformation
# does not include mirroring (i.e. "flipped").
@ -83,7 +92,8 @@ def update_sources(designspace):
def main(argv):
designspace_file = argv[1]
designspace = DesignSpaceDocument.fromfile(designspace_file)
designspace = fix_opsz_maximum(designspace)
designspace = fix_opsz_range(designspace)
designspace = fix_wght_range(designspace)
designspace = update_sources(designspace)
designspace.write(designspace_file)