change default opsz axis value to "text" (14)
This commit is contained in:
parent
a52cfc4fb7
commit
0f3e57eaf1
2 changed files with 11 additions and 10 deletions
|
|
@ -28,10 +28,11 @@ from fontTools.otlLib.builder import buildStatTable
|
||||||
# stat_axes_format_2 is used for making a STAT table with format 1 & 2 records
|
# stat_axes_format_2 is used for making a STAT table with format 1 & 2 records
|
||||||
def stat_axes_format_2(is_italic):
|
def stat_axes_format_2(is_italic):
|
||||||
return [
|
return [
|
||||||
{ "name": "Optical Size", "tag": "opsz", "ordering": 0, "values": [
|
dict(name="Optical Size", tag="opsz", ordering=0, values=[
|
||||||
dict(nominalValue=14, rangeMinValue=14, rangeMaxValue=21, name="14pt"),
|
dict(nominalValue=14, rangeMinValue=14, rangeMaxValue=21, name="Text",
|
||||||
dict(nominalValue=28, rangeMinValue=21, rangeMaxValue=28, name="28pt"),
|
flags=0x2, linkedValue=28),
|
||||||
] },
|
dict(nominalValue=28, rangeMinValue=21, rangeMaxValue=28, name="Display"),
|
||||||
|
]),
|
||||||
{ "name": "Weight", "tag": "wght", "ordering": 1, "values": [
|
{ "name": "Weight", "tag": "wght", "ordering": 1, "values": [
|
||||||
dict(nominalValue=100, rangeMinValue=100, rangeMaxValue=150, name="Thin"),
|
dict(nominalValue=100, rangeMinValue=100, rangeMaxValue=150, name="Thin"),
|
||||||
dict(nominalValue=200, rangeMinValue=150, rangeMaxValue=250, name="ExtraLight"),
|
dict(nominalValue=200, rangeMinValue=150, rangeMaxValue=250, name="ExtraLight"),
|
||||||
|
|
|
||||||
|
|
@ -60,11 +60,11 @@ def fixup_instances(designspace):
|
||||||
del designspace.instances[i]
|
del designspace.instances[i]
|
||||||
|
|
||||||
|
|
||||||
def fixup_axes_defaults(designspace):
|
# def fixup_axes_defaults(designspace):
|
||||||
for a in designspace.axes:
|
# for a in designspace.axes:
|
||||||
if a.tag == "opsz":
|
# if a.tag == "opsz":
|
||||||
a.default = a.maximum
|
# a.default = a.maximum
|
||||||
break
|
# break
|
||||||
|
|
||||||
|
|
||||||
def fixup_sources(designspace):
|
def fixup_sources(designspace):
|
||||||
|
|
@ -93,7 +93,7 @@ def main(argv):
|
||||||
designspace = DesignSpaceDocument.fromfile(args.input_designspace)
|
designspace = DesignSpaceDocument.fromfile(args.input_designspace)
|
||||||
|
|
||||||
fixup_instances(designspace)
|
fixup_instances(designspace)
|
||||||
fixup_axes_defaults(designspace)
|
# fixup_axes_defaults(designspace)
|
||||||
fixup_sources(designspace)
|
fixup_sources(designspace)
|
||||||
|
|
||||||
designspace.write(args.output_designspace)
|
designspace.write(args.output_designspace)
|
||||||
|
|
|
||||||
Reference in a new issue