Skip to content

Commit

Permalink
Merge pull request #178 from googlefonts/ps-name
Browse files Browse the repository at this point in the history
build_fvar: add fvar instance ps names
  • Loading branch information
m4rc1e authored Aug 8, 2024
2 parents df518d4 + de5aa28 commit ba2291b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/axisregistry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ def build_fvar_instances(ttFont, axis_dflts={}):

def gen_instances(is_italic):
results = []
family_name = name_table.getBestFamilyName()
for fallback in wght_fallbacks:
name = fallback.name if not is_italic else f"{fallback.name} Italic".strip()
name = name.replace("Regular Italic", "Italic")
Expand All @@ -426,6 +427,9 @@ def gen_instances(is_italic):

inst = NamedInstance()
inst.subfamilyNameID = name_table.addName(name)
inst.postscriptNameID = name_table.addName(
f"{family_name}-{name}".replace(" ", "")
)
inst.coordinates = coordinates
log.debug(f"Adding fvar instance: {name}: {coordinates}")
results.append(inst)
Expand Down

0 comments on commit ba2291b

Please sign in to comment.