[designspaceLib] Fix check for Upright STAT entry
This commit is contained in:
parent
12d13f0b26
commit
3577728a43
@ -236,10 +236,12 @@ def _getRibbiStyle(
|
||||
# In the "recursive" case where both the Upright has
|
||||
# linkedUserValue pointing the Italic, and the Italic has
|
||||
# linkedUserValue pointing to the Upright, only consider the
|
||||
# first case: Upright (e.g. ital=0, slant=0) has linkedUserValue
|
||||
# pointing to Italic (e.g ital=1, slant=-12, higher than
|
||||
# Upright in absolute value)
|
||||
and abs(upright_label.userValue) < abs(upright_label.linkedUserValue)
|
||||
# first case: Upright (ital=0, slant=0) has linkedUserValue
|
||||
# pointing to Italic (whatever value). The spec says that
|
||||
# for both axes, Upright must be 0, so we check for that.
|
||||
# https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_ital
|
||||
# https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_slnt
|
||||
and upright_label.userValue == 0
|
||||
):
|
||||
regularUserLocation[axis.name] = upright_label.userValue
|
||||
italic = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user