Optimize the shape of rounded e (#2424). (#2425)

This commit is contained in:
Belleve 2024-07-21 10:33:47 -10:00 committed by GitHub
parent 114ee00679
commit 6977550b8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 16 deletions

1
changes/30.4.0.md Normal file
View file

@ -0,0 +1 @@
* Optimize the shape of rounded `e` (#2424).

View file

@ -75,19 +75,15 @@ glyph-block Letter-Latin-Lower-E : begin
glyph-block-export SmallERoundedShape glyph-block-export SmallERoundedShape
define [SmallERoundedShape] : with-params [df top stroke barpos tailSlab schwaTail] : glyph-proc define [SmallERoundedShape] : with-params [df top stroke barpos tailSlab schwaTail] : glyph-proc
local barbottom : top * [fallback barpos : if para.isItalic 0.500 0.475] - (stroke / 2) local barbottom : top * [fallback barpos : if para.isItalic 0.500 0.475] - (stroke / 2)
local pBarRight : 0.475 - TanSlope * 0.5
local pArcRight : if para.isItalic (0.425 - TanSlope * 0.25) (ArchDepthA / (ArchDepthA + ArchDepthB))
local xStart : df.leftSB + [HSwToV : 0.125 * stroke] local xStart : df.leftSB + [HSwToV : 0.125 * stroke]
local pfIt : if para.isItalic 1 0 local pfIt : if para.isItalic 1 0
local path : include : dispiro local path : include : dispiro
widths.lhs stroke widths.lhs stroke
[if para.isItalic g2 flat] xStart (barbottom - pfIt * [StrokeWidthBlend 2 3] * O) [if para.isItalic g2 flat] xStart (barbottom + 0.1 * pfIt * (top - barbottom))
if para.isItalic [alsoThru.g2 0.5 0.8] [list] if para.isItalic [alsoThru.g2 0.5 0.8] [list]
[if para.isItalic g2 curl] [mix (xStart + pfIt * [HSwToV : 0.25 * stroke]) df.rightSB pBarRight] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O) [if para.isItalic g2.right.mid flat] [mix xStart df.rightSB 0.475] barbottom
if para.isItalic {} [archv] archv
g4 (df.rightSB - OX) [mix barbottom top pArcRight] g4 (df.rightSB - OX) [YSmoothMidR top barbottom]
arch.lhs top (sw -- stroke) arch.lhs top (sw -- stroke)
flat (df.leftSB + OX) (top - [df.archDepthA SmallArchDepth]) flat (df.leftSB + OX) (top - [df.archDepthA SmallArchDepth])
curl (df.leftSB + OX) (0 + [df.archDepthB SmallArchDepth]) curl (df.leftSB + OX) (0 + [df.archDepthB SmallArchDepth])
@ -100,19 +96,15 @@ glyph-block Letter-Latin-Lower-E : begin
glyph-block-export RevSmallERoundedShape glyph-block-export RevSmallERoundedShape
define [RevSmallERoundedShape] : with-params [df top stroke barpos] : glyph-proc define [RevSmallERoundedShape] : with-params [df top stroke barpos] : glyph-proc
local barbottom : top * [fallback barpos : if para.isItalic 0.500 0.475] - (stroke / 2) local barbottom : top * [fallback barpos : if para.isItalic 0.500 0.475] - (stroke / 2)
local pBarRight : 0.475 - TanSlope * 0.5
local pArcRight : if para.isItalic (0.425 + TanSlope * 0.25) (ArchDepthB / (ArchDepthA + ArchDepthB))
local xStart : df.rightSB - [HSwToV : 0.125 * stroke] local xStart : df.rightSB - [HSwToV : 0.125 * stroke]
local pfIt : if para.isItalic 1 0 local pfIt : if para.isItalic 1 0
include : dispiro include : dispiro
widths.rhs stroke widths.rhs stroke
[if para.isItalic g2 flat] xStart (barbottom - pfIt * [StrokeWidthBlend 2 3] * O) [if para.isItalic g2 flat] xStart (barbottom + 0.1 * pfIt * (top - barbottom))
if para.isItalic [alsoThru.g2 0.5 0.8] [list] if para.isItalic [alsoThru.g2 0.5 0.8] [list]
[if para.isItalic g2 curl] [mix (xStart - pfIt * [HSwToV : 0.25 * stroke]) df.leftSB pBarRight] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O) [if para.isItalic g2.left.mid curl] [mix xStart df.leftSB 0.475] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O)
if para.isItalic {} [archv] archv
g4 (df.leftSB + OX) [mix barbottom top pArcRight] g4 (df.leftSB + OX) [YSmoothMidL top barbottom]
arch.rhs top (sw -- stroke) arch.rhs top (sw -- stroke)
flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth])
curl (df.rightSB - OX) (0 + [df.archDepthA SmallArchDepth]) curl (df.rightSB - OX) (0 + [df.archDepthA SmallArchDepth])