Refine the shape of Slab S and s to add serifs at both terminals (#800).

This commit is contained in:
be5invis 2021-01-19 02:39:51 -08:00
parent aa825ce784
commit 95fbf456c3
3 changed files with 25 additions and 6 deletions

View file

@ -1,3 +1,4 @@
* Add diagonal-tailed variant of `i`, `j`, `k`, `l`, `t` (#795).
* Fix broken geometry of `K` under ultra-wide (#800).
* Add straight-bar AE (`Æ`), follows variant selector for `A` (#800).
* Add straight-bar AE (`Æ`), follows variant selector for `A` (#800).
* Refine the shape of Slab `S` and `s` to add serifs at both terminals (#800).

View file

@ -10,7 +10,8 @@ glyph-block Letter-Latin-S : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Blackboard : BBS BBD
glyph-block-import Letter-Shared-Shapes : SerifedArcStart_RtlLhs ArcStartSerif
glyph-block-import Letter-Shared-Shapes : SerifedArcStart_RtlLhs SerifedArcEnd_RtlRhs
glyph-block-import Letter-Shared-Shapes : ArcStartSerif ArcEndSerif
define SOBot OX
define [SmallSTensionCoeff stroke] : mix [StrokeWidthBlend 1 0.375 stroke] 1 : clamp 0 1 : Math.pow (Width / (UPM * 0.55)) 0.5
@ -44,8 +45,7 @@ glyph-block Letter-Latin-S : begin
g4 SB (CAP - smooth)
alsoThru.g2 0.5 0.5 [widths.center ess]
g4 (RightSB - SOBot) smooth [widths 0 stroke]
hookend O (sw -- stroke) (swItalicAdj -- Stroke)
g4 (SB + SOBot) Hook
SerifedArcEnd_RtlRhs SB Middle 0 stroke Hook
define [RevSStroke] : begin
local stroke : AdviceStroke2 2 3 CAP
@ -86,8 +86,7 @@ glyph-block Letter-Latin-S : begin
g4 (SB + OX / 8) (XH - smooth)
SNeck (stroke -- ess) (slantCoeff -- -0.02) (dist -- [SmallSDistCoeff]) (tensionCoeff -- [SmallSTensionCoeff stroke])
g4 (RightSB - SOBot) (smooth) [widths 0 stroke]
hookend O (sw -- stroke) (swItalicAdj -- Stroke)
g4 (SB + SOBot) SHook
SerifedArcEnd_RtlRhs SB Middle 0 stroke SHook
glyph-block-export SStrokeAlt
define [SStrokeAlt] : params [top hook swStart swEnd oXLeftTop offsetLT offsetRB offsetC] : begin
@ -143,6 +142,7 @@ glyph-block Letter-Latin-S : begin
create-glyph 'S' 'S' : glyph-proc
include : MarkSet.capital
if SLAB : include : ArcStartSerif RightSB CAP Stroke Hook
if SLAB : include : ArcEndSerif SB 0 Stroke Hook
include : [if SLAB SlabSStroke SStroke]
alias 'cyrl/Dze' 0x405 'S'
@ -150,6 +150,7 @@ glyph-block Letter-Latin-S : begin
create-glyph 's' 's' : glyph-proc
include : MarkSet.e
if SLAB : include : ArcStartSerif RightSB XH [AdviceStroke2 2 3 XH] Hook
if SLAB : include : ArcEndSerif SB 0 [AdviceStroke2 2 3 XH] Hook
include : [if SLAB SlabSmallSStroke SmallSStroke]
alias 'cyrl/dze' 0x455 's'

View file

@ -201,6 +201,19 @@ glyph-block Letter-Shared-Shapes : begin
ShoulderMidKnotLhs cx (cy - O) fine sw (-1) (-1)
archv
glyph-block-export SerifedArcEnd_RtlRhs
define [SerifedArcEnd_RtlRhs sx cx cy sw hook origBar] : begin
local barSw : if origBar sw [ArcStartSerifWidth sw]
local fine : barSw * [mix CThinB (ShoulderFine / Stroke) 0.5]
return : list
arcvh
ShoulderMidKnotRhs cx (cy + O) fine sw (+1) (+1)
archv
g4.up.end
sx + (barSw - fine) * HVContrast
cy + hook - O * 2
widths.rhs.heading fine Upward
glyph-block-export ArcStartSerifWidth
define [ArcStartSerifWidth stroke] : Math.max (stroke * 0.875) [AdviceStroke 3.5]
@ -208,6 +221,10 @@ glyph-block Letter-Shared-Shapes : begin
define [ArcStartSerif cx cy stroke hook] : begin
return : VBarRight cx (cy - hook + O * 2) cy [ArcStartSerifWidth stroke]
glyph-block-export ArcEndSerif
define [ArcEndSerif cx cy stroke hook] : begin
return : VBarLeft cx (cy + hook - O * 2) cy [ArcStartSerifWidth stroke]
glyph-block-export ArcStartHookTop
define [ArcStartHookTop cx cy sw hookX hookY] : union
VBarRight cx (cy - hookY + O * 2) cy sw