Improve shape of "s" under extra wides (#2460) (#2461)

This commit is contained in:
Belleve 2024-08-06 16:18:49 -10:00 committed by GitHub
parent 15a0c47ebc
commit 854b4f71f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 9 deletions

View file

@ -39,6 +39,13 @@ glyph-block Letter-Latin-S : begin
yLoopTop -- 0.333 * XH + 0.125 * fine yLoopTop -- 0.333 * XH + 0.125 * fine
swBefore -- sw swBefore -- sw
define [SNeck df height stroke ess] : begin
local adjustFactor : 0.1 * (df.rightSB - df.leftSB) / height
return : list
~~~ [alsoThru 0.5 (0.7 + adjustFactor)]
g4 [pre@mix@post 0.5] [pre@mix@post 0.5] [widths.center ess]
~~~ [alsoThru 0.5 (0.3 - adjustFactor)]
define [SStrokeImpl df top bot st sb stroke refSwEss] : begin define [SStrokeImpl df top bot st sb stroke refSwEss] : begin
local ess : refSwEss * stroke / Stroke local ess : refSwEss * stroke / Stroke
define archDepth : AdviceSArchDepth (top - bot) (-1) stroke define archDepth : AdviceSArchDepth (top - bot) (-1) stroke
@ -52,7 +59,7 @@ glyph-block Letter-Latin-S : begin
hookstart top (sw -- stroke) hookstart top (sw -- stroke)
g4 df.leftSB (top - archDepth) g4 df.leftSB (top - archDepth)
alsoThru.g2 0.5 0.5 [widths.center ess] ~~~ [SNeck df (top - bot) stroke ess]
g4 (df.rightSB - SOBot) (bot + archDepth) [widths.rhs stroke] g4 (df.rightSB - SOBot) (bot + archDepth) [widths.rhs stroke]
match sb match sb
@ -72,7 +79,7 @@ glyph-block Letter-Latin-S : begin
g4 df.leftSB (CAP - Hook) [widths.rhs stroke] g4 df.leftSB (CAP - Hook) [widths.rhs stroke]
hookstart CAP (sw -- stroke) hookstart CAP (sw -- stroke)
g4 df.rightSB (CAP - archDepth) g4 df.rightSB (CAP - archDepth)
alsoThru.g2 0.5 0.5 [widths.center ess] ~~~ [SNeck df CAP stroke ess]
g4 (df.leftSB + SOBot) archDepth [widths.lhs stroke] g4 (df.leftSB + SOBot) archDepth [widths.lhs stroke]
match sb match sb
[Just SLAB-CLASSICAL] : SerifedArcEnd.LtrLhs df.rightSB 0 stroke Hook [Just SLAB-CLASSICAL] : SerifedArcEnd.LtrLhs df.rightSB 0 stroke Hook
@ -94,7 +101,7 @@ glyph-block Letter-Latin-S : begin
hookstart XH (sw -- stroke) hookstart XH (sw -- stroke)
g4 (df.leftSB - OX) (XH - archDepth) g4 (df.leftSB - OX) (XH - archDepth)
alsoThru.g2 0.5 0.5 [widths.center ess] ~~~ [SNeck df XH stroke ess]
g4 (df.rightSB + OX - SOBot) (archDepth) [widths.rhs stroke] g4 (df.rightSB + OX - SOBot) (archDepth) [widths.rhs stroke]
match sb match sb
@ -116,10 +123,9 @@ glyph-block Letter-Latin-S : begin
g4 (df.rightSB + OX / 4 - [HSwToV soStart]) (top - hook) g4 (df.rightSB + OX / 4 - [HSwToV soStart]) (top - hook)
hookstart (top - soStart) (sw -- fine) hookstart (top - soStart) (sw -- fine)
g4 (df.leftSB + oXLeftTop + offsetLT.x) (top - archDepth + offsetLT.y) g4 (df.leftSB + oXLeftTop + offsetLT.x) (top - archDepth + offsetLT.y)
g2 ~~~ [virt pre@ (top - archDepth)]
offsetC.x + [mix (df.leftSB + oXLeftTop + offsetLT.x) (df.rightSB - SOBot - offsetRB.x) 0.5] ~~~ [g4 [pre@mix@post 0.5 offsetC.x] [pre@mix@post 0.5 offsetC.y] [widths.center stroke]]
offsetC.y + [mix (top - archDepth) (archDepth) 0.5] ~~~ [virt post@ (archDepth)]
widths.center stroke
g4 (df.rightSB - SOBot - offsetRB.x) (archDepth + offsetRB.y) [widths.rhs fine] g4 (df.rightSB - SOBot - offsetRB.x) (archDepth + offsetRB.y) [widths.rhs fine]
hookend soEnd (sw -- fine) hookend soEnd (sw -- fine)
g4 (df.leftSB + SOBot + [HSwToV soEnd]) (hook) [widths.rhs fine] g4 (df.leftSB + SOBot + [HSwToV soEnd]) (hook) [widths.rhs fine]
@ -136,7 +142,7 @@ glyph-block Letter-Latin-S : begin
g4 df.rightSB (top - Hook) [widths.lhs stroke] g4 df.rightSB (top - Hook) [widths.lhs stroke]
hookstart top (sw -- stroke) hookstart top (sw -- stroke)
g4 df.leftSB (top - archDepth) g4 df.leftSB (top - archDepth)
alsoThru.g2 0.5 0.5 [widths.center ess] ~~~ [SNeck df top stroke ess]
g4 (df.rightSB - SOBot) (archDepth) [widths.rhs stroke] g4 (df.rightSB - SOBot) (archDepth) [widths.rhs stroke]
arcvh arcvh
flat [arch.adjust-x.top df.middle] 0 [widths.rhs Stroke] flat [arch.adjust-x.top df.middle] 0 [widths.rhs Stroke]
@ -152,7 +158,7 @@ glyph-block Letter-Latin-S : begin
g4 (df.leftSB - OX) (XH - SHook) [widths.rhs stroke] g4 (df.leftSB - OX) (XH - SHook) [widths.rhs stroke]
hookstart XH (sw -- stroke) hookstart XH (sw -- stroke)
g4 (df.rightSB + OX) (XH - archDepth) g4 (df.rightSB + OX) (XH - archDepth)
alsoThru.g2 0.5 0.5 [widths.center ess] ~~~ [SNeck df XH stroke ess]
g4 (df.leftSB - OX + SOBot) (archDepth) [widths.lhs stroke] g4 (df.leftSB - OX + SOBot) (archDepth) [widths.lhs stroke]
match sb match sb
[Just SLAB-CLASSICAL] : SerifedArcEnd.LtrLhs df.rightSB 0 stroke SHook [Just SLAB-CLASSICAL] : SerifedArcEnd.LtrLhs df.rightSB 0 stroke SHook

View file

@ -14,6 +14,7 @@ tbalance = 1
tbalance2 = 1 tbalance2 = 1
archDepth = 1 archDepth = 1
smallArchDepth = 1 smallArchDepth = 1
essRatio = 1
# "Grade 9" # "Grade 9"
[shapeWidth.blend.720] [shapeWidth.blend.720]
@ -32,6 +33,7 @@ tbalance = 1.210
tbalance2 = 1.210 tbalance2 = 1.210
archDepth = 1.103 archDepth = 1.103
smallArchDepth = 1.103 smallArchDepth = 1.103
essRatio = 0.953
# "Grade 8" # "Grade 8"
[shapeWidth.blend.657] [shapeWidth.blend.657]
@ -66,6 +68,7 @@ tbalance = 1.100
tbalance2 = 1.100 tbalance2 = 1.100
archDepth = 1.050 archDepth = 1.050
smallArchDepth = 1.050 smallArchDepth = 1.050
essRatio = 1
# "Grade 6" # "Grade 6"
[shapeWidth.blend.547] [shapeWidth.blend.547]
@ -119,6 +122,7 @@ tbalance = 0.909
tbalance2 = 0.909 tbalance2 = 0.909
archDepth = 0.952 archDepth = 0.952
smallArchDepth = 0.952 smallArchDepth = 0.952
essRatio = 1
# Slab correlation # Slab correlation
[shapeWidth-serifs-slab.multiplies.blend.500] [shapeWidth-serifs-slab.multiplies.blend.500]