Add support for slope customization (#599, #1165).

This commit is contained in:
be5invis 2021-07-23 21:23:08 -07:00
parent 89bbcd4a17
commit 5d38569238
11 changed files with 232 additions and 177 deletions

View file

@ -990,11 +990,6 @@ from = ["iosevka-aile"]
release = true
from = ["iosevka-etoile"]
[collectConfig]
distinguishWeights = true
distinguishWidths = false
distinguishSlope = false
###################################################################################################
# Weight mappings (style => shape weight, menu weight, CSS weight)
# Shape weight : affects the shape of the glyphs
@ -1048,13 +1043,24 @@ shape = 900
menu = 900
css = 900
# slope mappings (style => CSS)
# NOTE: This mapping does NOT affect the font's metadata, only affects
# the webfont CSS. Change `params/parameters.toml` instead.
[slopes]
upright = "normal"
oblique = "oblique"
italic = "italic"
# slope mappings (style => slope angle, shape slope grade, menu slope, CSS slope)
[slopes.upright]
angle = 0
shape = "upright"
menu = "upright"
css = "normal"
[slopes.oblique]
angle = 9.4
shape = "oblique"
menu = "oblique"
css = "oblique"
[slopes.italic]
angle = 9.4
shape = "italic"
menu = "italic"
css = "italic"
# Width mappings (style => shape width, menu width, CSS stretch)
# Shape width : affects the shape of the glyphs