Skip to content

Commit

Permalink
Merge pull request #8531 from google/YEXT-pull
Browse files Browse the repository at this point in the history
Subtree pull Axis Registry introducing `YEXT`
  • Loading branch information
m4rc1e authored Nov 22, 2024
2 parents 77895b2 + b46896e commit 6c9809a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 149 deletions.
146 changes: 0 additions & 146 deletions axisregistry/CHANGELOG.md

This file was deleted.

4 changes: 4 additions & 0 deletions axisregistry/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
7 changes: 4 additions & 3 deletions axisregistry/Lib/axisregistry/data/slant.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fallback {
fallback_only: false
illustration_url: "slant.svg"
description:
"Adjust the style from upright to slanted, also known to typographers"
" as an 'oblique' style. Rarely, slant can work in the other direction,"
" called a 'backslanted' or 'reverse oblique' style."
"Adjust the style from upright to slanted. Negative values produce"
" right-leaning forms, also known to typographers as an 'oblique' style."
" Positive values produce left-leaning forms, also called a 'backslanted'"
" or 'reverse oblique' style."
16 changes: 16 additions & 0 deletions axisregistry/Lib/axisregistry/data/y_vertical_extension.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# YEXT based on https://github.com/TypeTogether/Playwrite
tag: "YEXT"
display_name: "Vertical Extension"
min_value: 0
default_value: 0
max_value: 100
precision: 0
fallback {
name: "Default"
value: 0
}
fallback_only: false
description: "The axis extends glyphs in the Y dimension, such as the "
"Cap Height, Ascender and Descender lengths. This is a relative axis, "
"starting at 0% and going to the typeface's individual maximum "
"extent at 100%."

0 comments on commit 6c9809a

Please sign in to comment.