From 6977550b8d0723a2772e02108c0c140eeaf95866 Mon Sep 17 00:00:00 2001 From: Belleve Date: Sun, 21 Jul 2024 10:33:47 -1000 Subject: [PATCH] Optimize the shape of rounded `e` (#2424). (#2425) --- changes/30.4.0.md | 1 + .../font-glyphs/src/letter/latin/lower-e.ptl | 24 +++++++------------ 2 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 changes/30.4.0.md diff --git a/changes/30.4.0.md b/changes/30.4.0.md new file mode 100644 index 000000000..458746302 --- /dev/null +++ b/changes/30.4.0.md @@ -0,0 +1 @@ +* Optimize the shape of rounded `e` (#2424). diff --git a/packages/font-glyphs/src/letter/latin/lower-e.ptl b/packages/font-glyphs/src/letter/latin/lower-e.ptl index d6aba09f1..253a53489 100644 --- a/packages/font-glyphs/src/letter/latin/lower-e.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-e.ptl @@ -75,19 +75,15 @@ glyph-block Letter-Latin-Lower-E : begin glyph-block-export SmallERoundedShape 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 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 pfIt : if para.isItalic 1 0 local path : include : dispiro 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 g2 curl] [mix (xStart + pfIt * [HSwToV : 0.25 * stroke]) df.rightSB pBarRight] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O) - if para.isItalic {} [archv] - g4 (df.rightSB - OX) [mix barbottom top pArcRight] + [if para.isItalic g2.right.mid flat] [mix xStart df.rightSB 0.475] barbottom + archv + g4 (df.rightSB - OX) [YSmoothMidR top barbottom] arch.lhs top (sw -- stroke) flat (df.leftSB + OX) (top - [df.archDepthA SmallArchDepth]) curl (df.leftSB + OX) (0 + [df.archDepthB SmallArchDepth]) @@ -100,19 +96,15 @@ glyph-block Letter-Latin-Lower-E : begin glyph-block-export RevSmallERoundedShape 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 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 pfIt : if para.isItalic 1 0 include : dispiro 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 g2 curl] [mix (xStart - pfIt * [HSwToV : 0.25 * stroke]) df.leftSB pBarRight] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O) - if para.isItalic {} [archv] - g4 (df.leftSB + OX) [mix barbottom top pArcRight] + [if para.isItalic g2.left.mid curl] [mix xStart df.leftSB 0.475] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O) + archv + g4 (df.leftSB + OX) [YSmoothMidL top barbottom] arch.rhs top (sw -- stroke) flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) curl (df.rightSB - OX) (0 + [df.archDepthA SmallArchDepth])