diff --git a/font-src/glyphs/letter/latin/lower-e.ptl b/font-src/glyphs/letter/latin/lower-e.ptl index d4f83d4c5..1950b4044 100644 --- a/font-src/glyphs/letter/latin/lower-e.ptl +++ b/font-src/glyphs/letter/latin/lower-e.ptl @@ -18,7 +18,7 @@ glyph-block Letter-Latin-Lower-E : begin define [xTerminalR df] : df.rightSB - OX * [if para.isItalic 0 0.5] - define [HookHeight top stroke] : Math.min AHook + define [HookHeight top stroke] : Math.min Hook (AHook / XH * top) if para.isItalic top (stroke / 2 + (top - stroke * 3) / 4) define SLAB-NONE 0 @@ -58,7 +58,7 @@ glyph-block Letter-Latin-Lower-E : begin return path.rhsKnots.[path.rhsKnots.length - 1] glyph-block-export RevSmallEShape - define [RevSmallEShape] : with-params [df top stroke barpos tailSlab] : glyph-proc + 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 @@ -73,22 +73,8 @@ glyph-block Letter-Latin-Lower-E : begin archv flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) curl (df.rightSB - OX) [df.archDepthA SmallArchDepth] - - 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) - __ : list - hookend O (sw -- stroke) - g4 [xTerminalR df] [HookHeight top stroke] - - include : 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] - __ : no-shape + hookend O (sw -- stroke) + g4 (df.width - [xTerminalR df]) [HookHeight top stroke] glyph-block-export SmallERoundedShape define [SmallERoundedShape] : with-params [df top stroke barpos] : glyph-proc diff --git a/font-src/support/geometry/spiro-expand.mjs b/font-src/support/geometry/spiro-expand.mjs index 56c9966b0..d1451a4d2 100644 --- a/font-src/support/geometry/spiro-expand.mjs +++ b/font-src/support/geometry/spiro-expand.mjs @@ -118,8 +118,7 @@ class NormalRectifier { if (isTangentValid(d)) { this.m_biKnots[0].origTangent = d; } else { - this.m_biKnots[0].origTangent = { x: 0, y: 0 }; - // throw new Error("NaN angle detected."); + throw new Error("NaN angle detected."); } } if (this.m_biKnots[this.m_nKnotsProcessed]) { @@ -127,8 +126,7 @@ class NormalRectifier { if (isTangentValid(d)) { this.m_biKnots[this.m_nKnotsProcessed].origTangent = d; } else { - this.m_biKnots[this.m_nKnotsProcessed].origTangent = { x: 0, y: 0 }; - // throw new Error("NaN angle detected."); + throw new Error("NaN angle detected."); } } this.m_nKnotsProcessed += 1;