From c8b9e608a3f4d5322ec5df3044f18eacebf65882 Mon Sep 17 00:00:00 2001 From: John McWilliams <37010132+jmcwilliams403@users.noreply.github.com> Date: Sun, 14 Apr 2024 19:59:25 -0400 Subject: [PATCH] Refine tails of Schwa and Reversed Lower E under italics (#2294) * Schwa & Rev-e italic tail refinement. * Use `InwardSlabArcEnd`. * fix heavy. --- changes/29.2.1.md | 1 + packages/font-glyphs/src/common/shapes.ptl | 12 +++---- .../font-glyphs/src/letter/latin/lower-e.ptl | 32 ++++++++----------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/changes/29.2.1.md b/changes/29.2.1.md index fe247a667..9e9819a25 100644 --- a/changes/29.2.1.md +++ b/changes/29.2.1.md @@ -1,4 +1,5 @@ * Refine shape of `U+1CC09`, `U+1CC0A`, `U+1CC10` and `U+1CC11`. +* Refine terminal shape of Schwa and Reversed Lower E (`U+018F`, `U+0258`..`U+025A`, `U+04D8`..`U+04D9`) under italics. * Add characters: - LEFT-FACING SNAKE HEAD WITH OPEN MOUTH (`U+1CC70`) ... DOWN-FACING SNAKE HEAD WITH CLOSED MOUTH (`U+1CC77`) (Proposed for Unicode 16; L2/21-235). - UPPER LEFT QUADRANT FACE WITH OPEN EYES (`U+1CCA6`) ... BOTTOM HALF FORWARD-FACING RUNNER FRAME-4 (`U+1CDF4`) (Proposed for Unicode 16; L2/21-235). diff --git a/packages/font-glyphs/src/common/shapes.ptl b/packages/font-glyphs/src/common/shapes.ptl index 1150891ca..4a017339a 100644 --- a/packages/font-glyphs/src/common/shapes.ptl +++ b/packages/font-glyphs/src/common/shapes.ptl @@ -430,12 +430,12 @@ glyph-block CommonShapes : begin define nHookSegments 12 define [HookShape toStraight toFinish isStart args] : begin - local [object y tight sw swItalicAdj noAdjTerminalY turnSlope isTail suppressSwash] args + local [object y tight sw swItalicAdj noAdjTerminalY turnSlope isTail noSwash] args local atBottom : toStraight.y > y local ltr : if isStart (toFinish.x < toStraight.x) (toFinish.x > toStraight.x) local dtu : if isStart (y > toFinish.y) (y < toFinish.y) - local doSwash : !suppressSwash && !tight && !isStart && atBottom && (para.isItalic || isTail) && [if (para.slopeAngle >= 0) ltr [not ltr]] + local doSwash : !noSwash && !tight && !isStart && atBottom && (para.isItalic || isTail) && [if (para.slopeAngle >= 0) ltr [not ltr]] local superness : if tight DesignParameters.tightHookSuperness DesignParameters.superness # Adjust terminal's position if necessary @@ -528,9 +528,9 @@ glyph-block CommonShapes : begin local-parameter : noAdjTerminalY -- false local-parameter : turnSlope -- nothing local-parameter : isTail -- false - local-parameter : suppressSwash -- false + local-parameter : noSwash -- false return : Interpolator hookStartBlender - object y tight sw swItalicAdj noAdjTerminalY turnSlope isTail suppressSwash + object y tight sw swItalicAdj noAdjTerminalY turnSlope isTail noSwash glyph-block-export hookend define flex-params [hookend] : begin @@ -541,9 +541,9 @@ glyph-block CommonShapes : begin local-parameter : noAdjTerminalY -- false local-parameter : turnSlope -- nothing local-parameter : isTail -- false - local-parameter : suppressSwash -- false + local-parameter : noSwash -- false return : Interpolator hookEndBlender - object y tight sw swItalicAdj noAdjTerminalY turnSlope isTail suppressSwash + object y tight sw swItalicAdj noAdjTerminalY turnSlope isTail noSwash glyph-block-export Ungizmo define [Ungizmo] : glyph-proc diff --git a/packages/font-glyphs/src/letter/latin/lower-e.ptl b/packages/font-glyphs/src/letter/latin/lower-e.ptl index f81afa589..60198513b 100644 --- a/packages/font-glyphs/src/letter/latin/lower-e.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-e.ptl @@ -10,16 +10,16 @@ glyph-block Letter-Latin-Lower-E : begin glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateSelectorVariants DefineSelectorGlyph CreateTurnedLetter glyph-block-import Letter-Shared-Shapes : FlatHookDepth RetroflexHook - glyph-block-import Letter-Shared-Shapes : SerifedArcEnd ArcEndSerif DToothlessRise + glyph-block-import Letter-Shared-Shapes : SerifedArcEnd InwardSlabArcEnd ArcEndSerif glyph-block-import Mark-Shared-Metrics : markExtend markStroke markStress markFine glyph-block-import Mark-Above : aboveMarkTop aboveMarkBot aboveMarkMid aboveMarkStack glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors glyph-block-import Letter-Latin-C : CConfig - define [xTerminalR df] : df.rightSB - OX * [if para.isItalic 0 0.5] + define [HookHeight top] : Math.min Hook (AHook / XH * top) - define [HookHeight top stroke] : Math.min Hook (AHook / XH * top) - if para.isItalic top (stroke / 2 + (top - stroke * 3) / 4) + define [HookHeightTight top stroke noItalicAdj] : Math.min [HookHeight top] + if (para.isItalic && !noItalicAdj) top (stroke / 2 + (top - stroke * 3) / 4) define SLAB-NONE 0 define SLAB-CLASSICAL 1 @@ -27,18 +27,16 @@ glyph-block Letter-Latin-Lower-E : begin define [SmallESerifedTerminalShape df top stroke tailSlab schwaTail] : match tailSlab [Just SLAB-CLASSICAL] : begin - SerifedArcEnd.LtrLhs df.rightSB df.middle 0 stroke [HookHeight top stroke] - [Just SLAB-INWARD] : list - arcvh - g4 (df.middle + CorrectionOMidX * stroke) O - g4 df.rightSB (DToothlessRise) + SerifedArcEnd.LtrLhs df.rightSB df.middle 0 stroke [HookHeight top] + [Just SLAB-INWARD] : begin + InwardSlabArcEnd.LtrLhs df.rightSB df.middle 0 stroke [HookHeight top] __ : list - hookend O (sw -- stroke) (suppressSwash -- schwaTail) - g4 [xTerminalR df] [HookHeight top stroke] + hookend O (sw -- stroke) (noSwash -- schwaTail) + g4 (df.rightSB - [if (para.isItalic && !schwaTail) 0 0.5] * OX) [HookHeightTight top stroke schwaTail] define [SmallETerminalSerif df top stroke tailSlab schwaTail] : match tailSlab - [Just SLAB-CLASSICAL] : ArcEndSerif.R df.rightSB 0 stroke [HookHeight top stroke] - [Just SLAB-INWARD] : ArcEndSerif.InwardR df.rightSB 0 stroke [HookHeight top stroke] + [Just SLAB-CLASSICAL] : ArcEndSerif.R df.rightSB 0 stroke [HookHeight top] + [Just SLAB-INWARD] : ArcEndSerif.InwardR df.rightSB 0 stroke [HookHeight top] __ : no-shape glyph-block-export SmallEShape @@ -64,8 +62,6 @@ glyph-block Letter-Latin-Lower-E : begin glyph-block-export RevSmallEShape define [RevSmallEShape] : with-params [df top stroke barpos] : glyph-proc local barbottom (top * [fallback barpos DesignParameters.eBarPos] - HalfStroke) - local hookx df.leftSB - local hookmiddle : [mix (df.rightSB - O) hookx 0.55] + CorrectionOMidS include : HBar.b (df.leftSB + (stroke / 2)) (df.rightSB - (stroke / 2)) barbottom stroke include : dispiro @@ -78,7 +74,7 @@ glyph-block Letter-Latin-Lower-E : begin flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) curl (df.rightSB - OX) [df.archDepthA SmallArchDepth] hookend O (sw -- stroke) - g4 (df.width - [xTerminalR df]) [HookHeight top stroke] + g4 (df.leftSB + 0.5 * OX) [HookHeightTight top stroke true] glyph-block-export SmallERoundedShape define [SmallERoundedShape] : with-params [df top stroke barpos tailSlab schwaTail] : glyph-proc @@ -120,7 +116,7 @@ glyph-block Letter-Latin-Lower-E : begin widths.rhs stroke [if para.isItalic g2 flat] xStart (barbottom - pfIt * [StrokeWidthBlend 2 3] * O) if para.isItalic [alsoThru.g2 0.5 0.8] [list] - [if para.isItalic g2 curl] [mix (xStart - [if para.isItalic 0.25 0.0] * [HSwToV stroke]) df.leftSB pBarRight] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O) + [if para.isItalic g2 curl] [mix (xStart - pfIt * 0.25 * [HSwToV stroke]) df.leftSB pBarRight] (barbottom + pfIt * [StrokeWidthBlend 0.25 1] * O) if para.isItalic {} [archv] g4 (df.leftSB + OX) [mix barbottom top pArcRight] arcvh @@ -129,7 +125,7 @@ glyph-block Letter-Latin-Lower-E : begin flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) curl (df.rightSB - OX) (0 + [df.archDepthA SmallArchDepth]) hookend O (sw -- stroke) - g4 (df.width - [xTerminalR df]) [HookHeight top stroke] + g4 (df.leftSB + 0.5 * OX) [HookHeightTight top stroke true] define [AbkCheShape] : with-params [fDesc Body df top tailSlab] : glyph-proc local gap : (df.width - 2 * df.leftSB - 2.5 * df.mvs) * 0.375 - [HSwToV : 0.25 * df.mvs]