diff --git a/changes/30.0.2.md b/changes/30.1.0.md similarity index 100% rename from changes/30.0.2.md rename to changes/30.1.0.md diff --git a/packages/font-glyphs/src/common/shapes.ptl b/packages/font-glyphs/src/common/shapes.ptl index dcb9216d8..cb4142e67 100644 --- a/packages/font-glyphs/src/common/shapes.ptl +++ b/packages/font-glyphs/src/common/shapes.ptl @@ -1,6 +1,6 @@ $$include '../meta/macros.ptl' -import [mix linreg clamp fallback] from "@iosevka/util" +import [mix linreg clamp fallback boole boolePn] from "@iosevka/util" import [Transform] from "@iosevka/geometry/transform" import [Interpolator] from "@iosevka/geometry/spiro-control" import [Radical] from "@iosevka/glyph/relation" @@ -21,32 +21,6 @@ glyph-block CommonShapes : begin set this.ctxTag t return ret - glyph-block-export KnotAdj - define KnotAdj : namespace - define [BowlYAdjImpl sign y w] : y + sign * TanSlope * SmoothAdjust * w / Width - - export : define [BowlLeft] : with-params [ty x y af [width Width]] - ty x [BowlYAdjImpl (+1) y width] af - set BowlLeft.yOf : function : with-params [y [width Width]] : BowlYAdjImpl (+1) y width - set BowlLeft.o : function : with-params [ty x y af [width Width]] - ty (x + OX) [BowlYAdjImpl (+1) y width] af - - export : define [BowlRight] : with-params [ty x y af [width Width]] - ty x [BowlYAdjImpl (-1) y width] af - set BowlRight.yOf : function : with-params [y [width Width]] : BowlYAdjImpl (-1) y width - set BowlRight.o : function : with-params [ty x y af [width Width]] - ty (x - OX) [BowlYAdjImpl (-1) y width] af - - export : define [ArchTop] : with-params [x y af [ty g4] [sw Stroke]] - ty (x - CorrectionOMidX * sw) y af - set ArchTop.o : function : with-params [x y af [ty g4] [sw Stroke]] - ty (x - CorrectionOMidX * sw) (y - O) af - - export : define [ArchBot] : with-params [x y af [ty g4] [sw Stroke]] - ty (x + CorrectionOMidX * sw) y af - set ArchBot.o : function : with-params [x y af [ty g4] [sw Stroke]] - ty (x + CorrectionOMidX * sw) (y + O) af - glyph-block-export Rect define [Rect u d l r transformShiftOnly] : glyph-proc local giz currentGlyph.gizmo @@ -195,20 +169,22 @@ glyph-block CommonShapes : begin glyph-block-export OShapeT define [OShapeT sink u d l r _width _ada _adb] : begin + if (l > r) : throw : new Error "OShapeT: l > r" + if (d > u) : throw : new Error "OShapeT: d > u" + local middle : (l + r) / 2 local width : fallback _width Stroke local ada : fallback _ada SmallArchDepthA local adb : fallback _adb SmallArchDepthB - local mc : CorrectionOMidX * width if (u - d > ada + adb) : then : begin return : sink widths width 0 - g4 (middle - mc) (u - O) + arch.lhs.centerAt.rtl.t middle u (sw -- width) archv flat (l + OX) (u - ada) curl (l + OX) (d + adb) arcvh - g4 (middle + mc) (d + O) + arch.lhs.centerAt.ltr.b middle d (sw -- width) archv flat (r - OX) (d + ada) curl (r - OX) (u - adb) @@ -219,11 +195,11 @@ glyph-block CommonShapes : begin local ymiddleb : mix d u (ada / (ada + adb)) return : sink widths width 0 - g4 (middle - mc) (u - O) + arch.lhs.centerAt.rtl.t middle u (sw -- width) archv g4 (l + OX) ymiddlea arcvh - g4 (middle + mc) (d + O) + arch.lhs.centerAt.ltr.b middle d (sw -- width) archv g4 (r - OX) ymiddleb arcvh @@ -243,39 +219,39 @@ glyph-block CommonShapes : begin local width : fallback _width Stroke local ada : fallback _ada SmallArchDepthA local adb : fallback _adb SmallArchDepthB - local mc : CorrectionOMidX * width if (u - d > ada + adb) : then : begin include : dispiro - flat (middle - mc) (u - O) [widths.lhs width] - curl (middle - mc - gap / 2) (u - O) + widths.lhs width + arch.lhs.centerAt.rtl.t middle u (sw -- width) (knot-ty -- flat) + arch.lhs.centerAt.rtl.t (middle - gap / 2) u (sw -- width) (knot-ty -- curl) archv flat (l + OX) (u - ada) curl (l + OX) (d + adb) arcvh - flat (middle + mc - gap / 2) (d + O) - curl (middle + mc + gap / 2) (d + O) + arch.lhs.centerAt.ltr.b (middle - gap / 2) d (sw -- width) (knot-ty -- flat) + arch.lhs.centerAt.ltr.b (middle + gap / 2) d (sw -- width) (knot-ty -- curl) archv flat (r - OX) (d + ada) curl (r - OX) (u - adb) arcvh - flat (middle - mc + gap / 2) (u - O) - curl (middle - mc) (u - O) + arch.lhs.centerAt.rtl.t (middle - gap / 2) u (sw -- width) (knot-ty -- flat) + arch.lhs.centerAt.rtl.t middle u (sw -- width) (knot-ty -- curl) : else : begin local ymiddlea : mix d u (adb / (ada + adb)) local ymiddleb : mix d u (ada / (ada + adb)) include : dispiro - flat (middle - mc) (u - O) [widths.lhs width] - curl (middle - mc - gap / 2) (u - O) + arch.lhs.centerAt.rtl.t middle u (sw -- width) (knot-ty -- flat) + arch.lhs.centerAt.rtl.t (middle - gap / 2) u (sw -- width) (knot-ty -- curl) archv g4 (l + OX) ymiddlea arcvh - flat (middle + mc - gap / 2) (d + O) - curl (middle + mc + gap / 2) (d + O) + arch.lhs.centerAt.ltr.b (middle - gap / 2) d (sw -- width) (knot-ty -- flat) + arch.lhs.centerAt.ltr.b (middle + gap / 2) d (sw -- width) (knot-ty -- curl) archv g4 (r - OX) ymiddleb arcvh - flat (middle - mc + gap / 2) (u - O) - curl (middle - mc) (u - O) + arch.lhs.centerAt.rtl.t (middle - gap / 2) u (sw -- width) (knot-ty -- flat) + arch.lhs.centerAt.rtl.t middle u (sw -- width) (knot-ty -- curl) glyph-block-export HSerif define HSerif : namespace @@ -537,6 +513,95 @@ glyph-block CommonShapes : begin return : Interpolator hookEndBlender object y sw swTerminal isTail noSwash + glyph-block-export arch + define arch : namespace + export : define adjust-x : namespace + export : define flex-params [top] : begin + local-parameter : x + local-parameter : sw -- Stroke + return : x - CorrectionOMidX * sw + export : define flex-params [bot] : begin + local-parameter : x + local-parameter : sw -- Stroke + return : x + CorrectionOMidX * sw + + + define [impl args] : begin + local doAdj : not args.compact + + local skew : HVContrast * (args.swAfter - args.swBefore) / (2 * args.sw) + local heading : object + x : [boolePn args.rtl] * ([boolePn args.lhs] * skew + [boole doAdj] * TanSlope) + y : [boolePn args.lhs] * [boolePn args.atBot] * 1 + + local italicAdj : [boole doAdj] * [boolePn args.atBot] * CorrectionOMidX * args.sw + local overshoot : [boolePn args.atBot] * args.o + + local af : if args.lhs + widths.lhs.heading args.sw heading + widths.rhs.heading args.sw heading + + local knotType : fallback args.knot-ty : if args.compact + if args.rtl g4.left.mid g4.right.mid + if args.rtl g2.left.mid g2.right.mid + return : knotType (args.x + italicAdj) (args.y + overshoot) af + + define [archBlender before after args] : begin + set args.x : mix before.x after.x args.p + set args.rtl : before.x > after.x + set args.atBot : args.y < before.y && args.y < after.y + + return : list + if args.noBlendPre [list] [arcvh] + impl args + if args.noBlendPost [list] [archv] + + export : define flex-params [lhs] : begin + local-parameter : y + local-parameter : p -- 0.5 + local-parameter : sw -- Stroke + local-parameter : compact -- false + local-parameter : o -- O + local-parameter : swBefore -- sw + local-parameter : swAfter -- sw + local-parameter : noBlendPre -- false + local-parameter : noBlendPost -- false + return : Interpolator archBlender + object [lhs true] y p sw compact o swBefore swAfter noBlendPre noBlendPost + + export : define flex-params [rhs] : begin + local-parameter : y + local-parameter : p -- 0.5 + local-parameter : sw -- Stroke + local-parameter : compact -- false + local-parameter : o -- O + local-parameter : swBefore -- sw + local-parameter : swAfter -- sw + local-parameter : noBlendPre -- false + local-parameter : noBlendPost -- false + return : Interpolator archBlender + object [lhs false] y p sw compact o swBefore swAfter noBlendPre noBlendPost + + foreach side {lhs rhs} : begin + set side.centerAt : object + foreach dir {"ltr" "rtl"} : begin + set side.centerAt.(dir) : object + foreach ydir {"t" "b"} : let [side] [dir] [ydir] : do + define flex-params [f] : begin + local-parameter : x + local-parameter : y + local-parameter : sw -- Stroke + local-parameter : compact -- false + local-parameter : knot-ty -- nothing + local-parameter : o -- O + local-parameter : swBefore -- sw + local-parameter : swAfter -- sw + return : impl : object x y sw compact knot-ty o swBefore swAfter + lhs : side == lhs + rtl : dir == "rtl" + atBot : ydir == "b" + set side.centerAt.(dir).(ydir) f + glyph-block-export Ungizmo define [Ungizmo] : glyph-proc include [this.gizmo.inverse] diff --git a/packages/font-glyphs/src/letter/cyrillic/abk-ha.ptl b/packages/font-glyphs/src/letter/cyrillic/abk-ha.ptl index 46a6d1a42..996877296 100644 --- a/packages/font-glyphs/src/letter/cyrillic/abk-ha.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/abk-ha.ptl @@ -16,17 +16,13 @@ glyph-block Letter-Cyrillic-Abkhasian-Ha : begin local xm : df.middle - [HSwToV : 0.5 * df.mvs] local y2 : top * 0.75 return : dispiro - g4.left.start (df.middle - CorrectionOMidX * df.mvs) (top - O) [widths.lhs df.mvs] + arch.lhs.centerAt.rtl.t df.middle top (sw -- df.mvs) (knot-ty -- g4.left.start) archv flat (df.leftSB + OX) (top - ada) curl (df.leftSB + OX) adb - arcvh - g4 (df.middle + CorrectionOMidX * df.mvs) O - archv + arch.lhs 0 (sw -- df.mvs) straight.up.mid (df.rightSB - OX) [YSmoothMidR (y2 + df.mvs / 2) 0 ada2 adb2] - arcvh - g4 ([mix xm df.rightSB 0.5] - CorrectionOMidX * df.mvs) y2 - archv + arch.lhs y2 (sw -- df.mvs) straight.down.mid xm [YSmoothMidL (y2 + df.mvs / 2) 0 ada2 adb2] arcvh g4 (df.rightSB - O) O diff --git a/packages/font-glyphs/src/letter/cyrillic/che.ptl b/packages/font-glyphs/src/letter/cyrillic/che.ptl index 52818d8b9..7b266a777 100644 --- a/packages/font-glyphs/src/letter/cyrillic/che.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/che.ptl @@ -38,7 +38,7 @@ glyph-block Letter-Cyrillic-Che : begin widths.lhs sw flat df.leftSB top [heading Downward] curl df.leftSB (bar - DToothlessRise + ArchDepthB - HalfStroke) - g4 (df.middle + CorrectionOMidS) (bar - DToothlessRise - HalfStroke) + arch.lhs.centerAt.ltr.b df.middle (bar - DToothlessRise - HalfStroke) g4 (df.rightSB - 1 / 16) (bar - HalfStroke) [heading Rightward] local sf : SerifFrame.fromDf df top 0 diff --git a/packages/font-glyphs/src/letter/cyrillic/de.ptl b/packages/font-glyphs/src/letter/cyrillic/de.ptl index d7d040701..9dacd8a68 100644 --- a/packages/font-glyphs/src/letter/cyrillic/de.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/de.ptl @@ -130,23 +130,19 @@ glyph-block Letter-Cyrillic-De : begin local middle : mix left right 0.5 local sw : fallback _sw df.mvs - local ada : df.archDepthA SmallArchDepth - local adb : df.archDepthB SmallArchDepth + local yRingTop : Math.min (XH + O) (XH - Stroke * 0.25) + local ada : df.archDepthA (SmallArchDepth * yRingTop / XH) + local adb : df.archDepthB (SmallArchDepth * yRingTop / XH) return : sink - widths.lhs (sw * CThinB) - flat (right - OX - [HSwToV sw] * (1 - CThinB)) ada - curl (right - OX - [HSwToV sw] * (1 - CThinB)) (XH - adb) - arcvh - g4 (middle - CorrectionOMidX * df.mvs) (Ascender * 0.7 - O) [widths.lhs sw] - archv - flat (left + OX) (XH - ada) + widths.lhs ShoulderFine + straight.up.start (right - OX - [HSwToV (sw - ShoulderFine)]) (yRingTop - adb) + arch.lhs yRingTop (sw -- sw) (swBefore -- ShoulderFine) + flat (left + OX) (yRingTop - ada) curl (left + OX) adb - arcvh - g4 (middle + CorrectionOMidX * sw) O - archv + arch.lhs 0 (sw -- sw) flat (right - OX) ada - curl (right - OX) (XH - adb) + curl (right - OX) (yRingTop - adb) quadControls 0 0.8 g4 (left + sw * 1.1) Ascender diff --git a/packages/font-glyphs/src/letter/cyrillic/lower-be.ptl b/packages/font-glyphs/src/letter/cyrillic/lower-be.ptl index cf528a1a6..206bb69b2 100644 --- a/packages/font-glyphs/src/letter/cyrillic/lower-be.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/lower-be.ptl @@ -9,21 +9,20 @@ glyph-block Letter-Cyrillic-Lower-Be : begin glyph-block-import Common-Derivatives create-glyph 'cyrl/be' 0x431 : glyph-proc - local yRingTop : Math.min (XH + O) (XH - Stroke * 0.25) include : MarkSet.b + + local yRingTop : Math.min (XH + O) (XH - Stroke * 0.25) + local ada : [DivFrame 1].archDepthA (SmallArchDepth * yRingTop / XH) + local adb : [DivFrame 1].archDepthB (SmallArchDepth * yRingTop / XH) + include : dispiro - widths.rhs (Stroke * CThinB) - flat (SB + OX + Stroke * (1 - CThinB) * HVContrast) SmallArchDepthB - curl (SB + OX + Stroke * (1 - CThinB) * HVContrast) (yRingTop - SmallArchDepthA) - arcvh - g4 (Middle - CorrectionOMidS) (yRingTop - O) [widths.rhs Stroke] - archv - flat (RightSB - OX) (yRingTop - SmallArchDepthB) - curl (RightSB - OX) SmallArchDepthA - arcvh - g4 (Middle + CorrectionOMidS) O - archv - flat (SB + OX) SmallArchDepthB - curl (SB + OX) (yRingTop - SmallArchDepthA) + widths.rhs ShoulderFine + straight.up.start (SB + OX + [HSwToV (Stroke - ShoulderFine)]) (yRingTop - ada) + arch.rhs yRingTop (swBefore -- ShoulderFine) + flat (RightSB - OX) (yRingTop - adb) + curl (RightSB - OX) ada + arch.rhs 0 + flat (SB + OX) adb + curl (SB + OX) (yRingTop - ada) alsoThruThem [list {0.3 0.85} {0.65 0.925}] important g4 g4 (RightSB - (1 / 16) * [HSwToV Stroke]) Ascender [heading Rightward] diff --git a/packages/font-glyphs/src/letter/cyrillic/lower-uk.ptl b/packages/font-glyphs/src/letter/cyrillic/lower-uk.ptl index 7208aefda..813d1f208 100644 --- a/packages/font-glyphs/src/letter/cyrillic/lower-uk.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/lower-uk.ptl @@ -29,9 +29,7 @@ glyph-block Letter-Cyrillic-Lower-Blended-Uk : begin g4.down.start [mix Middle SB kLeftX] [mix 0 Ascender kLeftY] [widths.lhs.heading stress Downward] g4 Middle yCross [widths.center stress] g4 (Middle + smallRingRadius - OX) ada [widths.rhs fine] - arcvh - g4 (Middle + CorrectionOMidX * fine) O - archv + arch.rhs 0 (sw -- fine) g4 (Middle - smallRingRadius + OX) adb g4 Middle yCross [widths.center stress] g4.up.mid [mix Middle RightSB kRightX] [mix 0 Ascender kRightY] [widths.lhs.heading stress Upward] diff --git a/packages/font-glyphs/src/letter/cyrillic/omega.ptl b/packages/font-glyphs/src/letter/cyrillic/omega.ptl index a69400a9b..915441da5 100644 --- a/packages/font-glyphs/src/letter/cyrillic/omega.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/omega.ptl @@ -22,9 +22,12 @@ glyph-block Letter-Cyrillic-Omega : begin local y3 : top * p1 local y4 : top * p2 + local xOpenL : Math.max [mix df.leftSB xMidBarRight 0.5] (df.leftSB + [HSwToV fine] + minHookDepth) + local xOpenR : Math.min [mix df.rightSB xMidBarLeft 0.5] (df.rightSB - [HSwToV fine] - minHookDepth) + include : dispiro widths.lhs fine - g4.left.start ([Math.max [mix df.leftSB xMidBarRight 0.5] (df.leftSB + [HSwToV fine] + minHookDepth)] - CorrectionOMidX * fine) top + g4.left.start [arch.adjust-x.top xOpenL (sw -- fine)] top archv 8 flat df.leftSB (top - ArchDepthA) curl df.leftSB ArchDepthB @@ -35,7 +38,7 @@ glyph-block Letter-Cyrillic-Omega : begin curl xMidBarCoRight y4 [heading Upward] include : dispiro widths.rhs fine - g4.right.start ([Math.min [mix df.rightSB xMidBarLeft 0.5] (df.rightSB - [HSwToV fine] - minHookDepth)] - CorrectionOMidX * fine) top + g4.right.start [arch.adjust-x.top xOpenR (sw -- fine)] top archv 8 flat df.rightSB (top - ArchDepthB) curl df.rightSB ArchDepthA diff --git a/packages/font-glyphs/src/letter/cyrillic/yeri.ptl b/packages/font-glyphs/src/letter/cyrillic/yeri.ptl index f3b523e1f..4eba80107 100644 --- a/packages/font-glyphs/src/letter/cyrillic/yeri.ptl +++ b/packages/font-glyphs/src/letter/cyrillic/yeri.ptl @@ -8,7 +8,7 @@ glyph-block Letter-Cyrillic-Yeri : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Letter-Shared-Metrics : BowlXDepth - glyph-block-import Letter-Shared-Shapes : ShoulderMidKnotLhsRev RightwardTailedBar + glyph-block-import Letter-Shared-Shapes : RightwardTailedBar glyph-block-import Letter-Shared-Shapes : LetterBarOverlay UpwardHookShape VerticalHook SerifFrame define DefaultBarPos 0.55 @@ -36,11 +36,11 @@ glyph-block Letter-Cyrillic-Yeri : begin dispiro widths.lhs stroke flat (left + Stroke * 0.2) 0 [heading Rightward] - curl ([Math.max (left + stroke * TanSlope) (right - turnRadius)] + CorrectionOMidX * stroke) 0 + curl [arch.adjust-x.bot [Math.max (left + stroke * TanSlope) (right - turnRadius)] (sw -- stroke)] 0 archv 8 g4 (right - OX) yTurnBottomR arcvh 8 - flat ([Math.max (left + stroke * TanSlope) (right - turnRadius)] - CorrectionOMidX * stroke) bowl + flat [arch.adjust-x.top [Math.max (left + stroke * TanSlope) (right - turnRadius)] (sw -- stroke)] bowl curl (left + Stroke * 0.2) bowl [heading Leftward] VBar.l left 0 yStart stroke @@ -89,12 +89,10 @@ glyph-block Letter-Cyrillic-Yeri : begin include : dispiro flat left [Math.max yStart (yTurnBottomL + 0.1)] [widths.lhs.heading stroke Downward] curl left yTurnBottomL - arcvh - g4 ([mix left right 0.5] + CorrectionOMidX * stroke) O - archv + arch.lhs 0 (sw -- stroke) g4 (right - OX) yTurnBottomR arcvh - flat ([mix left right 0.5] - CorrectionOMidX * stroke) bowl + flat [arch.adjust-x.top [mix left right 0.5] (sw -- stroke)] bowl curl (left + Stroke * 0.2) bowl [heading Leftward] if SLAB : begin @@ -105,7 +103,7 @@ glyph-block Letter-Cyrillic-Yeri : begin local turnRadius : BowlXDepth bowl 0 left right stroke local ada : ArchDepthAOf ArchDepth (right - left + SB * 2) local adb : ArchDepthBOf ArchDepth (right - left + SB * 2) - local fine : stroke * CThinB + local fine ShoulderFine local yTurnBottomL : YSmoothMidL bowl 0 ada adb local yTurnBottomR : YSmoothMidR bowl 0 ada adb @@ -113,14 +111,10 @@ glyph-block Letter-Cyrillic-Yeri : begin include : dispiro flat left [Math.max yStart (yTurnBottomL + 0.1)] [widths.lhs.heading stroke Downward] curl left yTurnBottomL - arcvh - g4 ([mix left right 0.5] + CorrectionOMidX * stroke) O - archv + arch.lhs 0 (sw -- stroke) g4 (right - OX) yTurnBottomR - arcvh - ShoulderMidKnotLhsRev [mix left right 0.5] bowl fine stroke (-1) (-1) - archv - g4.down.end (left + (stroke - fine) * HVContrast) yTurnBottomL [widths.lhs.heading fine Downward] + arch.lhs bowl (sw -- stroke) (swAfter -- fine) + g4.down.end (left + [HSwToV (stroke - fine)]) yTurnBottomL [widths.lhs.heading fine Downward] if SLAB : begin include : tagged 'serifYeriLT' : HSerif.lt left top (jut - [HSwToV : 0.5 * stroke]) stroke @@ -134,11 +128,11 @@ glyph-block Letter-Cyrillic-Yeri : begin include : dispiro widths.rhs stroke flat (right - Stroke * 0.2) 0 [heading Leftward] - curl (left + turnRadius * trShrink + CorrectionOMidX * stroke) 0 + curl [arch.adjust-x.bot (left + turnRadius * trShrink) stroke] 0 archv g4 (left + O) turnbottom arcvh - flat (left + turnRadius * trShrink - CorrectionOMidX * stroke) bowl + flat [arch.adjust-x.top (left + turnRadius * trShrink) stroke] bowl curl (right - Stroke * 0.2) bowl [heading Rightward] include : VBar.r right 0 top stroke if SLAB : begin @@ -160,12 +154,10 @@ glyph-block Letter-Cyrillic-Yeri : begin include : dispiro flat right [Math.max yStart (yTurnBottomR + 0.1)] [widths.rhs.heading stroke Downward] curl right yTurnBottomR - arcvh - g4 ([mix left right 0.5] + CorrectionOMidX * stroke) O - archv + arch.rhs 0 (sw -- stroke) g4 (left + OX) yTurnBottomL arcvh - flat ([mix left right 0.5] - CorrectionOMidX * stroke) bowl + flat [arch.adjust-x.top [mix left right 0.5] stroke] bowl curl (right - Stroke * 0.2) bowl [heading Rightward] define flex-params [CyrBackYerShape Base top left right [stroke Stroke] [jut Jut] [pBar DefaultBarPos]] : glyph-proc diff --git a/packages/font-glyphs/src/letter/greek/lower-delta.ptl b/packages/font-glyphs/src/letter/greek/lower-delta.ptl index 4930b5736..bc5046b68 100644 --- a/packages/font-glyphs/src/letter/greek/lower-delta.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-delta.ptl @@ -28,9 +28,7 @@ glyph-block Letter-Greek-Lower-Delta : begin alsoThruThem : list {0.25 0.05} {0.5 0.13} flat (RightSB - OX) (yRingTop - SmallArchDepthB) curl (RightSB - OX) SmallArchDepthA - arcvh - g4.left.mid (Middle + CorrectionOMidS) O - archv + arch.rhs 0 flat (SB + OX) SmallArchDepthB curl (SB + OX) (yRingTop - SmallArchDepthA) arcvh @@ -39,7 +37,7 @@ glyph-block Letter-Greek-Lower-Delta : begin create-glyph 'grek/delta.flatTop' : glyph-proc include : MarkSet.b - local fine : Stroke * CThin + local fine ShoulderFine local coFine : mix fine Stroke 0.5 local yTop : Ascender - Stroke local yMid : Stroke * 0.25 + [mix 0 XH (7 / 8)] @@ -50,20 +48,16 @@ glyph-block Letter-Greek-Lower-Delta : begin include : HBar.t SB RightSB Ascender include : intersection [MaskBelow yTop] : dispiro - g4.right.start (Middle + CorrectionOMidS - TanSlope * (Stroke - fine)) (O + Stroke - fine + 1/16) [widths.lhs fine] - flat (RightSB - OX - (1 - CThin) * [HSwToV Stroke]) SmallArchDepthA - curl (RightSB - OX - (1 - CThin) * [HSwToV Stroke]) (yMid - SmallArchDepthB) - arcvh - g4 (Middle - CorrectionOMidS) (yMid - O) [widths.lhs] - archv + widths.lhs fine + flat (RightSB - OX - [HSwToV (Stroke - fine)]) SmallArchDepthA + curl (RightSB - OX - [HSwToV (Stroke - fine)]) (yMid - SmallArchDepthB) + arch.lhs yMid (swBefore -- fine) flat (SB + OX) (yMid - SmallArchDepthA) curl (SB + OX) SmallArchDepthB - arcvh - g4 (Middle + CorrectionOMidS) O - archv - flat (RightSB - OX) SmallArchDepthA [widths.lhs coFine] + arch.lhs 0 + flat (RightSB - OX) SmallArchDepthA curl (RightSB - OX) yMid2 - flat [mix Width SB pStraightBarStart] [mix yMockBarStart yTop pStraightBarStart] [widths.lhs] + flat [mix Width SB pStraightBarStart] [mix yMockBarStart yTop pStraightBarStart] curl [mix Width SB 1] [mix yMockBarStart yTop 1] [widths.rhs] select-variant 'grek/delta' 0x3B4 diff --git a/packages/font-glyphs/src/letter/greek/lower-epsilon.ptl b/packages/font-glyphs/src/letter/greek/lower-epsilon.ptl index 1bd0ece80..6825b4ae8 100644 --- a/packages/font-glyphs/src/letter/greek/lower-epsilon.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-epsilon.ptl @@ -56,9 +56,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin ([Just CLOSED-CIRCLE] || [Just CLOSED-ROUND]) : list flat (RightSB - [if (slabTop === CLOSED-CIRCLE) OX 0]) midy [widths.lhs stroke] curl (RightSB - [if (slabTop === CLOSED-CIRCLE) OX 0]) (top - adb2) - arcvh - g4 (Middle - CorrectionOMidX * stroke) (top - O) - archv + arch.lhs top (sw -- stroke) [Just CLOSED-STEM] : OBarRight.arcStart top SB RightSB stroke stemFine ada2 adb2 midy __ : list [g4 (RightSB + O) (top - hook) [widths.lhs]] [hookstart (top - O) (sw -- stroke)] g4 SB [YSmoothMidL top (midy - stroke / 2)] @@ -78,9 +76,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin [Just SLAB-INWARD] : InwardSlabArcEnd.LtrLhs RightSB Middle bot stroke hook [Just OPEN-VERTICAL] : straight.down.end (SB + OX * 2) bot [heading Downward] ([Just CLOSED-CIRCLE] || [Just CLOSED-ROUND]) : list - arcvh - g4 (Middle + CorrectionOMidX * stroke) (bot + O) - archv + arch.lhs bot (sw -- stroke) flat (RightSB - [if (slabBot === CLOSED-CIRCLE) OX 0]) (bot + adb2) curl (RightSB - [if (slabBot === CLOSED-CIRCLE) OX 0]) midy [Just CLOSED-STEM] : OBarRight.arcEnd bot SB RightSB stroke stemFine ada2 adb2 midy @@ -128,14 +124,12 @@ glyph-block Letter-Greek-Lower-Epsilon : begin [Just SLAB-INWARD] : InwardSlabArcStart.LtrRhs left middle top stroke hook [Just FLAT-CONNECTION] : list flat (left - xo) top [widths.rhs.heading stroke Rightward] - curl (middle - CorrectionOMidX * stroke) top [heading Rightward] + curl [arch.adjust-x.top middle stroke] top [heading Rightward] [Just OPEN-VERTICAL] : straight.down.start right top [widths.rhs.heading stroke Downward] ([Just CLOSED-CIRCLE] || [Just CLOSED-ROUND]) : list flat (left + [if (slabTop === CLOSED-CIRCLE) xo 0]) midy [widths.rhs stroke] curl (left + [if (slabTop === CLOSED-CIRCLE) xo 0]) (top - ada2) - arcvh - g4 (middle - CorrectionOMidX * stroke) (top - O) - archv + arch.rhs top (sw -- stroke) [Just CLOSED-STEM] : OBarLeft.arcStart top left right stroke stemFine ada2 adb2 midy __ : list [g4 (left - xo) (top - hook) : widths.rhs stroke] [hookstart (top - O) (sw -- stroke)] g4 right [YSmoothMidR top (midy - stroke / 2)] @@ -159,9 +153,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin [Just OPEN-HALF] : list [Just OPEN-VERTICAL] : straight.down.end (right - xo * 2) bot [heading Downward] ([Just CLOSED-CIRCLE] || [Just CLOSED-ROUND]) : list - arcvh - g4 (middle + CorrectionOMidX * stroke) (bot + O) - archv + arch.rhs bot (sw -- stroke) flat (left + [if (slabBot === CLOSED-CIRCLE) xo 0]) (bot + adb2) curl (left + [if (slabBot === CLOSED-CIRCLE) xo 0]) midy [Just CLOSED-STEM] : OBarLeft.arcEnd bot left right stroke stemFine ada2 adb2 midy @@ -180,7 +172,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin archv g4.up.mid (left + [HSwToV HalfStroke]) [mix Descender Stroke 0.5] [widths.center.heading Stroke Upward] arcvh - g4 (middle + CorrectionOMidS) 0 [widths.lhs] + g4 [arch.adjust-x.bot middle] 0 [widths.lhs] archv g4 (right - OX * 2) (bot + ada) arcvh diff --git a/packages/font-glyphs/src/letter/greek/lower-omega.ptl b/packages/font-glyphs/src/letter/greek/lower-omega.ptl index 0e1fbff40..94b169462 100644 --- a/packages/font-glyphs/src/letter/greek/lower-omega.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-omega.ptl @@ -22,18 +22,14 @@ glyph-block Letter-Greek-Lower-Omega : begin widths.lhs fine g4 x0 y0 g4 x1 (top / 2) - arcvh 8 - g4 [mix x1 (df.middle + [HSwToV : 0.5 * fine]) 0.5] O [heading Rightward] - archv 8 + arch.lhs 0 (sw -- fine) (swAfter -- mfine) flat (df.middle + (mfine - fine / 2) * HVContrast) y3 [widths.heading mfine 0 Upward] curl (df.middle + (mfine - fine / 2) * HVContrast) y4 [heading Upward] include : dispiro widths.rhs fine g4 (df.width - x0) y0 g4 (df.width - x1) (top / 2) - arcvh 8 - g4 [mix (df.width - x1) (df.middle - [HSwToV : 0.5 * fine]) 0.5] O [heading Leftward] - archv 8 + arch.rhs 0 (sw -- fine) (swAfter -- mfine) flat (df.middle - (mfine - fine / 2) * HVContrast) y3 [widths.heading 0 mfine Upward] curl (df.middle - (mfine - fine / 2) * HVContrast) y4 [heading Upward] @@ -57,7 +53,6 @@ glyph-block Letter-Greek-Lower-Omega : begin include : [DivFrame df.div].markSet.e local fine : AdviceStroke 3 local mfine : fine * CThin - local x0 : df.middle - CorrectionOMidS local y0 : XH - O local y1 : mix 0 XH 0.45 local x1 : df.leftSB + OX @@ -67,17 +62,11 @@ glyph-block Letter-Greek-Lower-Omega : begin widths.rhs mfine flat (df.middle + (mfine - fine / 2) * HVContrast) y4 [heading Downward] curl (df.middle + (mfine - fine / 2) * HVContrast) y3 [heading Downward] - arcvh 8 - g4 [mix x1 (df.middle + [HSwToV : 0.5 * fine]) 0.5] O [widths.heading 0 fine Leftward] - archv 8 + arch.rhs 0 (sw -- fine) (swBefore -- mfine) g4 x1 y1 - arcvh - g4 x0 y0 - archv + arch.rhs y0 (sw -- fine) g4 (df.width - x1) y1 - arcvh 8 - g4 [mix (df.width - x1) (df.middle - [HSwToV : 0.5 * fine]) 0.5] O [heading Leftward] - archv 8 + arch.rhs 0 (sw -- fine) (swAfter -- mfine) flat (df.middle - (mfine - fine / 2) * HVContrast) y3 [widths.heading 0 mfine Upward] curl (df.middle - (mfine - fine / 2) * HVContrast) y4 [heading Upward] diff --git a/packages/font-glyphs/src/letter/greek/lower-phi.ptl b/packages/font-glyphs/src/letter/greek/lower-phi.ptl index fd80e39c2..421129c4e 100644 --- a/packages/font-glyphs/src/letter/greek/lower-phi.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-phi.ptl @@ -21,9 +21,7 @@ glyph-block Letter-Greek-Lower-Phi : begin widths.lhs df.mvs g4 x0 XH g4 x1 (XH * 0.55) - arcvh - g4 (df.middle + CorrectionOMidS) O - archv + arch.lhs 0 (sw -- df.mvs) g4 (df.width - x1) (XH * 0.55) arcvh 8 g4.left.mid [mix (df.width - x1) (df.middle - [HSwToV : 0.5 * df.mvs]) 0.525] XH [heading Leftward] diff --git a/packages/font-glyphs/src/letter/greek/lower-rho-symbol.ptl b/packages/font-glyphs/src/letter/greek/lower-rho-symbol.ptl index ba23f9da7..18d91b61f 100644 --- a/packages/font-glyphs/src/letter/greek/lower-rho-symbol.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-rho-symbol.ptl @@ -19,6 +19,6 @@ glyph-block Letter-Greek-Lower-Rho-Symbol : begin flat SB (XH - SmallArchDepthA) curl SB (Descender + SmallArchDepthB) arcvh - g4 (Middle + CorrectionOMidS) (Descender + O) - g4 ([mix SB RightSB 0.75] + CorrectionOMidS) (Descender - 0.5 * O) [heading Rightward] - g4 (RightSB + CorrectionOMidS) (Descender + 0.5 * O) [heading Rightward] + g4 [arch.adjust-x.bot Middle] (Descender + O) + g4 [arch.adjust-x.bot : mix SB RightSB 0.75] (Descender - 0.5 * O) [heading Rightward] + g4 [arch.adjust-x.bot RightSB] (Descender + 0.5 * O) [heading Rightward] diff --git a/packages/font-glyphs/src/letter/greek/lower-sigma-final.ptl b/packages/font-glyphs/src/letter/greek/lower-sigma-final.ptl index 26645b76b..a878a1c79 100644 --- a/packages/font-glyphs/src/letter/greek/lower-sigma-final.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-sigma-final.ptl @@ -12,7 +12,7 @@ glyph-block Letter-Greek-Lower-Sigma-Final : begin define [SignaFinalEndingKnots] : list curl (SB + OX) SmallArchDepthB arcvh - g4 (Middle + CorrectionOMidS) 0 + g4 [arch.adjust-x.bot Middle] 0 alsoThru 0.5 0.1353 g4.down.mid (RightSB - [HSwToV Stroke] + OX) [mix Descender Stroke : StrokeWidthBlend 0.5 0.49] [heading Downward] arcvh @@ -34,8 +34,8 @@ glyph-block Letter-Greek-Lower-Sigma-Final : begin include : dispiro widths.lhs fine straight.down.start (RightSB - [HSwToV fine]) (XH + 0.25 * Hook) [heading Downward] - g2 [mix (Middle - CorrectionOMidS) (RightSB - [HSwToV fine]) 0.5] (XH - O - Hook * [StrokeWidthBlend 0.05 0.025]) [widths.lhs.heading Stroke Leftward] - g4 (Middle - CorrectionOMidS) (XH - O) + g2 [mix [arch.adjust-x.top Middle] (RightSB - [HSwToV fine]) 0.5] (XH - O - Hook * [StrokeWidthBlend 0.05 0.025]) [widths.lhs.heading Stroke Leftward] + g4 [arch.adjust-x.top Middle] (XH - O) archv 16 flat (SB + OX) (XH - SmallArchDepthA) SignaFinalEndingKnots @@ -51,7 +51,7 @@ glyph-block Letter-Greek-Lower-Sigma-Final : begin flat (SB + OX) (CAP - ArchDepthA) curl (SB + OX) (yAttach + ArchDepthB) arcvh - g4 (Middle + CorrectionOMidS) (yAttach + O) + g4 [arch.adjust-x.bot Middle] (yAttach + O) archv g4 [mix Middle RightSB 2] (yAttach + Hook * 2) [heading Upward] Rect (yAttach + Hook * 2 - O) Descender (Middle + [HSwToV HalfStroke]) (2 * Width) diff --git a/packages/font-glyphs/src/letter/greek/lower-sigma.ptl b/packages/font-glyphs/src/letter/greek/lower-sigma.ptl index 34318f5a2..30385b701 100644 --- a/packages/font-glyphs/src/letter/greek/lower-sigma.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-sigma.ptl @@ -19,9 +19,7 @@ glyph-block Letter-Greek-Lower-Sigma : begin archv flat (SB + OX) (XH - SmallArchDepthA) curl (SB + OX) SmallArchDepthB - arcvh - g4 (Middle + CorrectionOMidS) O - archv + arch.lhs 0 flat RightSB SmallArchDepthA curl RightSB (XH - SmallArchDepthB) arcvh diff --git a/packages/font-glyphs/src/letter/greek/lower-theta.ptl b/packages/font-glyphs/src/letter/greek/lower-theta.ptl index 78fc3aa20..69ced3bbf 100644 --- a/packages/font-glyphs/src/letter/greek/lower-theta.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-theta.ptl @@ -19,26 +19,23 @@ glyph-block Letter-Greek-Lower-Theta-Var : begin glyph-block-import Common-Derivatives create-glyph 'grek/thetaSymbol' 0x03D1 : glyph-proc + include : MarkSet.b + define pXTopLeft 0.2 define xTopLeft : mix SB RightSB pXTopLeft define coXTopLeft : mix SB RightSB (2 - pXTopLeft) define topSMA : ArchDepthAOf (SmallArchDepth * (1 - pXTopLeft)) (Width * (1 - pXTopLeft)) define topSMB : ArchDepthBOf (SmallArchDepth * (1 - pXTopLeft)) (Width * (1 - pXTopLeft)) - define sw : AdviceStroke2 3 3 Ascender - include : MarkSet.b - include : intersection - Rect (Ascender * 2) Descender (-Width) [mix RightSB Width 0.5] - dispiro - flat (SB + OX) (0.45 * Ascender) [widths.lhs.heading sw Downward] - curl (SB + OX) SmallArchDepthB - arcvh - g4 (Middle + CorrectionOMidX * sw) O - archv - flat (RightSB - OX) SmallArchDepthA - curl (RightSB - OX) (Ascender - topSMB) - arcvh - g4 ([mix xTopLeft RightSB 0.5] - CorrectionOMidX * sw) (Ascender - O) - g4 xTopLeft (Ascender - topSMA) - g4 [mix xTopLeft RightSB 0.5] [mix (Ascender - topSMA) (Ascender / 2 - HalfStroke) 0.9] - g4 [mix RightSB Width 0.5] (Ascender / 2 - HalfStroke) - g4 coXTopLeft (Ascender - topSMA) + define fine : AdviceStroke2 3 3 Ascender + include : intersection [MaskLeft : mix RightSB Width 0.5] : dispiro + widths.lhs + flat (SB + OX) (0.45 * Ascender) [heading Downward] + curl (SB + OX) SmallArchDepthB + arch.lhs 0 + flat (RightSB - OX) SmallArchDepthA + curl (RightSB - OX) (Ascender - topSMB) + arch.lhs Ascender (swAfter -- fine) (noBlendPost -- true) + g4 xTopLeft (Ascender - topSMA) [widths.lhs fine] + g4 [mix xTopLeft RightSB 0.5] [mix (Ascender - topSMA) (Ascender / 2 - HalfStroke) 0.9] + g4 [mix RightSB Width 0.5] (Ascender / 2 - HalfStroke) + g4 coXTopLeft (Ascender - topSMA) diff --git a/packages/font-glyphs/src/letter/greek/lower-upsilon.ptl b/packages/font-glyphs/src/letter/greek/lower-upsilon.ptl index b77cf35bc..cdba65572 100644 --- a/packages/font-glyphs/src/letter/greek/lower-upsilon.ptl +++ b/packages/font-glyphs/src/letter/greek/lower-upsilon.ptl @@ -18,9 +18,7 @@ glyph-block Letter-Greek-Lower-Upsilon : begin widths.lhs sw flat SB top [heading Downward] curl SB adb - arcvh - g4 ([mix SB RightSB k] + CorrectionOMidX * sw) O - archv + arch.lhs 0 (p -- k) (sw -- sw) g4 xArcRight yArcRight g4 xArcEnd yArcEnd diff --git a/packages/font-glyphs/src/letter/greek/upper-omega.ptl b/packages/font-glyphs/src/letter/greek/upper-omega.ptl index b16f30512..cd8d6631e 100644 --- a/packages/font-glyphs/src/letter/greek/upper-omega.ptl +++ b/packages/font-glyphs/src/letter/greek/upper-omega.ptl @@ -16,13 +16,11 @@ glyph-block Letter-Greek-Upper-Omega : begin local x2 (Width - x1) local yattach : top * extend + Stroke include : dispiro - g4 x1 (yattach - fine) [widths.heading 0 fine Leftward] + g4 x1 (yattach - fine) [widths.rhs.heading fine Leftward] archv flat SB (yattach - Stroke + adb) [widths.rhs Stroke] curl SB (top - ada) - arcvh - g4 (Middle - CorrectionOMidS) (top - O) - archv + arch.rhs top flat RightSB (top - adb) curl RightSB (yattach - Stroke + ada) arcvh diff --git a/packages/font-glyphs/src/letter/latin-ext/eszet.ptl b/packages/font-glyphs/src/letter/latin-ext/eszet.ptl index e577f5535..9f0904229 100644 --- a/packages/font-glyphs/src/letter/latin-ext/eszet.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/eszet.ptl @@ -84,21 +84,22 @@ glyph-block Letter-Latin-Lower-Eszet : begin define xMiddle : Math.max xFinal (SB + [HSwToV : 1.2 * Stroke]) (RightSB - ymiddle / 2 - Stroke * 0.75) define xMiddleBot : Math.max xMiddle (xFinal + 0.01 + TanSlope * Stroke) + define ada : ArchDepthAOf (0.75 * ArchDepth) (0.5 * Width) + define adb : ArchDepthBOf (0.75 * ArchDepth) (0.5 * Width) + include : MarkSet.b include : dispiro widths.rhs flat SB 0 [heading Upward] curl SB XH - arcvh - g4 (Middle - CorrectionOMidS) (Ascender - O) - archv - g4 (RightSB + O * 2) [YSmoothMidR ymiddle Ascender] + arch.rhs Ascender + g4 (RightSB + O * 2) [YSmoothMidR ymiddle Ascender ada adb] g4.left.end xMiddle ymiddle [heading Leftward] include : dispiro widths.rhs g4.right.start xMiddle (ymiddle + Stroke) [heading Rightward] archv - g4 (RightSB - O) [YSmoothMidR (ymiddle + Stroke) 0] + g4 (RightSB - O) [YSmoothMidR (ymiddle + Stroke) 0 ada adb] arcvh flat xMiddleBot 0 [heading Leftward] curl xFinal 0 [heading Leftward] @@ -134,16 +135,17 @@ glyph-block Letter-Latin-Lower-Eszet : begin widths.rhs swOuter flat SB 0 [heading Upward] curl SB (Ascender - archDepthATop) - arcvh - g4 ([mix SB sTopHookX 0.52] - CorrectionOMidX * swOuter) (Ascender - O) [widths.rhs : mix swOuter swInner 0.5] - archv + arch.rhs Ascender + sw -- [mix swOuter swInner 0.5] + swBefore -- swOuter + swAfter -- swInner g4.down.mid sTopHookX (Ascender - archDepthBTop + TanSlope * swInner) [widths.rhs.heading swInner Downward] alsoThru.g2 0.5 0.50 [widths.center swInner] g4 sTurnX [mix innerSmoothB (Ascender - archDepthBTop) 0.5] [widths.lhs.heading swInner Downward] alsoThru.g2 0.5 0.50 [widths.center swInner] g4 (RightSB - OX) (innerSmoothB - 2 * TanSlope * swInner) [widths.rhs.heading swInner Downward] arcvh - flat ([Math.max (sEndX + 0.1 + TanSlope * swInner) : Math.min (RightSB - innerSmoothB) [mix sEndX RightSB 0.375]] + CorrectionOMidX * swInner / 2 + TanSlope * swInner ) 0 + flat [arch.adjust-x.bot ([Math.max (sEndX + 0.1 + TanSlope * swInner) : Math.min (RightSB - innerSmoothB) [mix sEndX RightSB 0.375]] + TanSlope * swInner) (swInner / 2)] 0 curl sEndX 0 [heading Leftward] include : EszetSerifs [DivFrame 1] false slab diff --git a/packages/font-glyphs/src/letter/latin-ext/eth.ptl b/packages/font-glyphs/src/letter/latin-ext/eth.ptl index 7ff4280a4..c336a0c12 100644 --- a/packages/font-glyphs/src/letter/latin-ext/eth.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/eth.ptl @@ -9,24 +9,20 @@ glyph-block Letter-Latin-Eth : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - define fine : Stroke * CThin - define coFine : mix fine Stroke 0.5 + define fine ShoulderFine define yMid : Ascender * 0.6 - define yMid2 : mix yMid [YSmoothMidR yMid 0 SmallArchDepthA SmallArchDepthB] 0.875 + define yMid2 : YSmoothMidR yMid 0 SmallArchDepthA SmallArchDepthB + define yMid3 : mix yMid yMid2 0.875 define [ArcStartKnots] : list - g4.right.start (Middle + CorrectionOMidS - TanSlope * (Stroke - fine)) (O + Stroke - fine + 1/16) [widths.lhs fine] - straight.up.mid (RightSB - OX - (1 - CThin) * [HSwToV Stroke]) [YSmoothMidR yMid 0 SmallArchDepthA SmallArchDepthB] - arcvh - g4 (Middle - CorrectionOMidS) (yMid - O) [widths.lhs] - archv + widths.lhs fine + straight.up.mid (RightSB - OX - [HSwToV (Stroke - fine)]) yMid2 + arch.lhs yMid (swBefore -- fine) g4 (SB + OX) [YSmoothMidL yMid 0 SmallArchDepthA SmallArchDepthB] - arcvh - g4 (Middle + CorrectionOMidS) O - archv - flat (RightSB - OX) [YSmoothMidR yMid 0 SmallArchDepthA SmallArchDepthB] [widths.lhs coFine] - curl (RightSB - OX) yMid2 + arch.lhs 0 + flat (RightSB - OX) yMid2 + curl (RightSB - OX) yMid3 create-glyph 'dInsular.curly-bar' : glyph-proc include : MarkSet.b @@ -63,17 +59,15 @@ glyph-block Letter-Latin-Eth : begin include : union dispiro flat (df.middle + Stroke * TanSlope - O) (top - cofine) [widths.lhs fine] - curl (df.middle - CorrectionOMidX * fine) (top - cofine) + curl [arch.adjust-x.top df.middle (sw -- fine)] (top - cofine) archv flat df.leftSB (CAP - ArchDepthA) [widths.lhs Stroke] curl df.leftSB ArchDepthB - arcvh - g4 (df.middle + CorrectionOMidS) 0 - archv + arch.lhs 0 flat df.rightSB ArchDepthA curl df.rightSB (CAP - ArchDepthB) arcvh - straight.left.end (df.middle - CorrectionOMidS) top + straight.left.end [arch.adjust-x.top df.middle] top dispiro - flat (df.middle + CorrectionOMidS) top [widths.lhs : AdviceStroke 3] + flat [arch.adjust-x.top df.middle] top [widths.lhs : AdviceStroke 3] curl [mix 0 df.leftSB 0.5] top diff --git a/packages/font-glyphs/src/letter/latin-ext/ezh.ptl b/packages/font-glyphs/src/letter/latin-ext/ezh.ptl index 225157afd..780ab066d 100644 --- a/packages/font-glyphs/src/letter/latin-ext/ezh.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/ezh.ptl @@ -90,7 +90,7 @@ glyph-block Letter-Latin-Ezh : begin dispiro widths.rhs sw flat ezhLeft yMidBar [heading Rightward] - curl (df.middle - CorrectionOMidS) yMidBar + curl [arch.adjust-x.top df.middle] yMidBar archv terminalShape df top bot yMidBar sw @@ -243,7 +243,7 @@ glyph-block Letter-Latin-Ezh : begin include : dispiro widths.lhs flat ezhRight yMidBar [heading Leftward] - curl (Middle + CorrectionOMidS) yMidBar + curl [arch.adjust-x.bot Middle] yMidBar archv if hookless : then : list diff --git a/packages/font-glyphs/src/letter/latin-ext/insular-g.ptl b/packages/font-glyphs/src/letter/latin-ext/insular-g.ptl index 8ecf6534b..9d4186365 100644 --- a/packages/font-glyphs/src/letter/latin-ext/insular-g.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/insular-g.ptl @@ -35,11 +35,11 @@ glyph-block Letter-Latin-Insular-G : begin alsoThruThem fallArcShape g4.down.mid (RightSB - O) yBottomRingRight [widths.rhs] arcvh - g4.left.mid (Middle + CorrectionOMidS) (bot + O) + arch.rhs.centerAt.rtl.b Middle bot include : difference dispiro - g4.left.mid (Middle + CorrectionOMidS) (bot + O) [widths.rhs] + arch.rhs.centerAt.rtl.b Middle bot archv g4.up.mid (SB + O) yBottomRingLeft g4 (Width - xIntersection) yIntersection [widths.center fine] diff --git a/packages/font-glyphs/src/letter/latin-ext/middle-welsh-v.ptl b/packages/font-glyphs/src/letter/latin-ext/middle-welsh-v.ptl index 3a6eeb098..bee75c404 100644 --- a/packages/font-glyphs/src/letter/latin-ext/middle-welsh-v.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/middle-welsh-v.ptl @@ -15,9 +15,7 @@ glyph-block Letter-Latin-Middle-Welsh-V : begin widths.lhs g4 Middle (top - O / 2) g4.down.mid (SB + O) [mix 0 top (pL * SmallArchDepthB / (SmallArchDepthA + SmallArchDepthB))] - arcvh - g4 (Middle + CorrectionOMidS) O - archv + arch.lhs 0 g4 (RightSB - O) [mix 0 top (pR * SmallArchDepthA / (SmallArchDepthA + SmallArchDepthB))] g4 [mix SB RightSB 0.75] [mix 0 top pR] diff --git a/packages/font-glyphs/src/letter/latin-ext/ou.ptl b/packages/font-glyphs/src/letter/latin-ext/ou.ptl index 7c9bf3594..c44254573 100644 --- a/packages/font-glyphs/src/letter/latin-ext/ou.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/ou.ptl @@ -16,15 +16,13 @@ glyph-block Letter-Latin-OU : begin local d : 0.25 * TanSlope * (RightSB - SB) include : dispiro widths.lhs - g4.left.start (xLeft - CorrectionOMidS) (top - gapL) + g4.left.start [arch.adjust-x.top xLeft] (top - gapL) archv g4.down.mid SB ([mix (yBar - HalfStroke) (top - gapL) 0.5] + d) - arcvh - g4 (Middle + CorrectionOMidS) (yBar - O - HalfStroke + (Stroke * (1 - CThin))) [widths.lhs (Stroke * CThin)] - archv + arch.lhs (yBar - HalfStroke + (Stroke * (1 - CThin))) (sw -- (Stroke * CThin)) g4.up.mid RightSB ([mix (yBar - HalfStroke) (top - gapR) 0.5] - d) [widths.lhs] arcvh - g4.left.end (Width - xLeft - CorrectionOMidS) (top - gapR) + g4.left.end [arch.adjust-x.top (Width - xLeft)] (top - gapR) create-glyph 'OU' 0x222 : glyph-proc include : MarkSet.capital diff --git a/packages/font-glyphs/src/letter/latin-ext/rams-horn.ptl b/packages/font-glyphs/src/letter/latin-ext/rams-horn.ptl index 85c176d2b..2d304a505 100644 --- a/packages/font-glyphs/src/letter/latin-ext/rams-horn.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/rams-horn.ptl @@ -19,10 +19,8 @@ glyph-block Letter-Latin-Rams-Horn : begin g4 (SB + [HSwToV HalfStroke] + O) top [heading Downward] quadControls 1 0.7 16 g4 (Middle + d - hf) (bottom + d * (1 - TanSlope * 0.5)) [widths.center : 2 * hf] - arcvh - g4 (Middle + CorrectionOMidX * hf * 2) (bottom + hf) - archv - g4 (Middle - d + hf) (bottom + d * (1 + TanSlope * 0.5)) + arch.rhs bottom (sw -- 2 * hf) + g4 (Middle - d + hf) (bottom + d * (1 + TanSlope * 0.5)) [widths.center : 2 * hf] quadControls 0 0.3 16 g4 (RightSB - [HSwToV HalfStroke] - O) top [widths.heading HalfStroke HalfStroke Upward] @@ -57,9 +55,7 @@ glyph-block Letter-Latin-Rams-Horn : begin straight.right.start SB top [heading Rightward] g4 Middle [mix top bottom kIntersection] [widths.rhs coFine] g4.down.mid [mix Middle RightSB k1] ([mix top bottom k2] - d) [widths.rhs fine] - arcvh - g4.left.mid (Middle + CorrectionOMidX * fine) (bottom + O) - archv + arch.rhs bottom (sw -- fine) g4.up.mid [mix Middle SB k1] ([mix top bottom k2] + d) g4 Middle [mix top bottom kIntersection] [widths.rhs coFine] straight.right.end RightSB top [widths.rhs.heading sw Rightward] @@ -67,7 +63,7 @@ glyph-block Letter-Latin-Rams-Horn : begin then : spiro-outline corner Middle ([mix top bottom kIntersection] - fillOffset) g4.down.mid ([mix Middle RightSB k1] - fillOffset) ([mix top bottom k2] - d) - g4.left.mid (Middle + CorrectionOMidX * fine) (bottom + fillOffset) + g4.left.mid [arch.adjust-x.bot Middle (sw -- fine)] (bottom + fillOffset) g4.up.mid ([mix Middle SB k1] + fillOffset) ([mix top bottom k2] + d) close else : no-shape diff --git a/packages/font-glyphs/src/letter/latin-ext/thorn.ptl b/packages/font-glyphs/src/letter/latin-ext/thorn.ptl index 9269e4469..197d10738 100644 --- a/packages/font-glyphs/src/letter/latin-ext/thorn.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/thorn.ptl @@ -29,11 +29,11 @@ glyph-block Letter-Latin-Thorn : begin include : dispiro widths.rhs flat xThornLeftStroke yBowlTop [heading Rightward] - curl (RightSB - turnRadius - CorrectionOMidS) yBowlTop + curl [arch.adjust-x.top (RightSB - turnRadius)] yBowlTop archv g4 (RightSB - O) turn arcvh - flat (RightSB - turnRadius + CorrectionOMidS) yBowlBot + flat [arch.adjust-x.bot (RightSB - turnRadius)] yBowlBot curl xThornLeftStroke yBowlBot [heading Leftward] include : VBar.l xThornLeftStroke 0 top diff --git a/packages/font-glyphs/src/letter/latin-ext/yogh.ptl b/packages/font-glyphs/src/letter/latin-ext/yogh.ptl index 76f10c24a..f8ef5cf4c 100644 --- a/packages/font-glyphs/src/letter/latin-ext/yogh.ptl +++ b/packages/font-glyphs/src/letter/latin-ext/yogh.ptl @@ -34,7 +34,7 @@ glyph-block Letter-Latin-Yogh : begin local pyb : mix bot [TopYOfLowerHalf top bot] 0.2 return : sink - g4 (Middle - CorrectionOMidS) pyt [widths.rhs] + arch.rhs.centerAt.ltr.t Middle pyt archv g4 RightSB [YSmoothMidR pyt pyb] alsoThruThem {{0.25 [StrokeWidthBlend 0.63 0.66]} {0.5 [StrokeWidthBlend 0.84 0.85]}} important diff --git a/packages/font-glyphs/src/letter/latin/c.ptl b/packages/font-glyphs/src/letter/latin/c.ptl index 5b36d1f76..ee3219d1d 100644 --- a/packages/font-glyphs/src/letter/latin/c.ptl +++ b/packages/font-glyphs/src/letter/latin/c.ptl @@ -31,7 +31,7 @@ glyph-block Letter-Latin-C : begin [Just SLAB-INWARD] : InwardSlabArcStart.RtlLhs (df.rightSB - offset) df.middle top sw [Just FLAT-CONNECTION] : list flat (df.width - offset) (top - offset) - curl (df.middle - CorrectionOMidX * sw) (top - offset) + curl [arch.adjust-x.top df.middle (sw -- sw)] (top - offset) archv _ : list g4 (df.rightSB - offset) (top - [fallback hook Hook]) @@ -45,7 +45,7 @@ glyph-block Letter-Latin-C : begin [Just SLAB-INWARD] : InwardSlabArcEnd.LtrLhs (df.rightSB - offset) df.middle bot sw [Just FLAT-CONNECTION] : list arcvh - flat (df.middle + CorrectionOMidX * sw) (bot + O + offset) + flat [arch.adjust-x.bot df.middle (sw -- sw)] (bot + O + offset) curl (df.width - offset) (bot + O + offset) _ : list hookend (bot + O + offset) (sw -- sw) @@ -58,7 +58,7 @@ glyph-block Letter-Latin-C : begin [Just SLAB-INWARD] : InwardSlabArcStart.LtrRhs (df.leftSB + offset) df.middle top sw [Just FLAT-CONNECTION] : list flat (0 + offset) (top - offset) - curl (df.middle - CorrectionOMidX * sw) (top - offset) + curl [arch.adjust-x.top df.middle (sw -- sw)] (top - offset) archv _ : list g4 (df.leftSB + offset) (top - [fallback hook Hook]) @@ -72,7 +72,7 @@ glyph-block Letter-Latin-C : begin [Just SLAB-INWARD] : InwardSlabArcEnd.RtlRhs (df.leftSB + offset) df.middle bot sw [Just FLAT-CONNECTION] : list arcvh - flat (df.middle + CorrectionOMidX * sw) (bot + O + offset) + flat [arch.adjust-x.bot df.middle (sw -- sw)] (bot + O + offset) curl (0 + offset) (bot + O + offset) _ : list hookend (bot + O + offset) (sw -- sw) diff --git a/packages/font-glyphs/src/letter/latin/k.ptl b/packages/font-glyphs/src/letter/latin/k.ptl index a1b1ab58e..311053c27 100644 --- a/packages/font-glyphs/src/letter/latin/k.ptl +++ b/packages/font-glyphs/src/letter/latin/k.ptl @@ -242,7 +242,7 @@ glyph-block Letter-Latin-K : begin define kshRight : right + [KBalanceRight slabLegs true] define Ok : KO slabLegs true top stroke - define arcFine : stroke * CThin + define arcFine ShoulderFine define arcStroke : AdviceStroke2 2 3 top define arcTerminalFine : AdviceStroke2 3 4 top define expansion : Width / (UPM / 2) - 1 @@ -251,14 +251,13 @@ glyph-block Letter-Latin-K : begin define pArcTopX : 0.625 - 0.05 * (arcStroke / Width) - 0 * expansion * (arcStroke / UPM) define pArcRightX : 0.925 - TanSlope * 0.25 + ([if SLAB 0 0.05] + 0.75 * TanSlope) * (arcStroke / Width) define pArcRightY : 0.575 - 0.625 * (arcStroke / Width) - 0.5 * expansion * (arcStroke / UPM) - define pArcTerminalX : 0.15 - 0.5 * (arcStroke / Width) - define pArcBottomX : 0.15 + 0.5 * (arcStroke / Width) + define pArcTerminalX : 0.2 - 2.25 * (arcStroke / Width) + define pArcBottomX : 0.15 + 0.0 * (arcStroke / Width) define pArcBottomY : 0.45 + 0.5 * (arcStroke / Width) define arcRightSlope : 0.05 + 0.2 * (arcStroke / Width) + 1 * expansion * (arcStroke / UPM) - define arcTopSkew : shoulderMidSkew arcFine arcStroke - define arcStartX : kshLeft + HVContrast * (stroke - arcFine) + define arcStartX : kshLeft + [HSwToV (stroke - arcFine)] define arcStartY : top * pArcStartY define arcTerminalX : mix arcStartX kshRight pArcTerminalX define arcBottomX : mix arcStartX kshRight pArcBottomX @@ -266,19 +265,19 @@ glyph-block Letter-Latin-K : begin define arcTerminalY : arcBottomY + arcStroke * 0.125 - O define arcRightX : kshRight * pArcRightX + [HSwToV : 0.2 * stroke] define arcRightY : mix arcBottomY top pArcRightY - define arcTopX : mix arcStartX arcRightX pArcTopX - define arcTopY : top - O - return : object Ok arcStartX arcStartY arcFine arcRightX arcRightY arcRightSlope arcTopX arcTopY arcStroke arcTopSkew arcBottomX arcBottomY arcTerminalX arcTerminalY arcTerminalFine kshLeft kshRight + return : object Ok arcStartX arcStartY arcFine arcRightX arcRightY arcRightSlope arcStroke arcBottomX arcBottomY arcTerminalX arcTerminalY arcTerminalFine kshLeft kshRight pArcTopX define [CursiveLoopT sink offset left right stroke top slabLT slabLegs] : begin define dim : CursiveDimen left right top stroke slabLT slabLegs return : sink g4.up.start (dim.arcStartX + offset) dim.arcStartY [widths.rhs.heading dim.arcFine Upward] - arcvh 8 - g4 dim.arcTopX (dim.arcTopY - offset) - widths.rhs.heading dim.arcStroke {.y (+1) .x dim.arcTopSkew} - archv 8 2.0 + arch.rhs (top - offset) + sw -- dim.arcStroke + swBefore -- dim.arcFine + swAfter -- dim.arcStroke + p -- dim.pArcTopX + g4.down.mid (dim.arcRightX - offset) (dim.arcRightY - 0.5 * dim.arcRightSlope * [HSwToV dim.arcStroke]) heading {.y dim.arcRightSlope .x HVContrast} arcvh diff --git a/packages/font-glyphs/src/letter/latin/lower-a.ptl b/packages/font-glyphs/src/letter/latin/lower-a.ptl index ec0d5ba90..4b288c7b3 100644 --- a/packages/font-glyphs/src/letter/latin/lower-a.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-a.ptl @@ -53,10 +53,8 @@ glyph-block Letter-Latin-Lower-A : begin local bartop : XH * OverlayPos * 1.02 + stroke * 0.425 local bowlArcY1 : YSmoothMidL 0 bartop SmallArchDepthA SmallArchDepthB local bowlArcY2 : YSmoothMidR 0 bartop SmallArchDepthA SmallArchDepthB - local lowSkew : shoulderMidSkew ShoulderFine nothing local leftSlopeS : 0.1 * (df.width / HalfUPM) local leftSlope : leftSlopeS - TanSlope - local lowMiddle : mix (df.leftSB + OX) (df.rightSB - [HSwToV : 0.5 * stroke]) [linreg 72 0.51 126 0.58 stroke] local barSmooth : mix df.leftSB df.rightSB 0.55 include : sink widths.lhs stroke @@ -64,19 +62,16 @@ glyph-block Letter-Latin-Lower-A : begin curl barSmooth bartop archv g4 (df.leftSB + OX) (bowlArcY1 - [HSwToV Stroke] * leftSlope) [heading {.x HVContrast .y leftSlope}] - arcvh match kind 0 : list - g4 (lowMiddle + (-lowSkew) * stroke + CorrectionOMidX * stroke * 0.5) O [heading {.y 1 .x lowSkew}] - archv 16 + arch.lhs 0 (sw -- stroke) (swAfter -- ShoulderFine) straight.up.end (df.rightSB - [HSwToV stroke] + [HSwToV ShoulderFine]) (SmallArchDepthB * 0.9) [widths.lhs ShoulderFine] if [not isMask] {} {[ corner (df.rightSB - [HSwToV stroke] + [HSwToV ShoulderFine]) bartop ]} 1 : list - g4 (df.middle + CorrectionOMidX * stroke) O + arch.lhs 0 (sw -- stroke) (noBlendPost -- true) g4 df.rightSB rise 2 : list - g4 (df.middle + CorrectionOMidX * stroke) O - archv + arch.lhs 0 (sw -- stroke) flat df.rightSB bowlArcY2 curl df.rightSB ([Math.max bowlArcY2 rise] + stroke * TanSlope + 1) [heading Upward] @@ -157,12 +152,12 @@ glyph-block Letter-Latin-Lower-A : begin widths.rhs fine g4 (RightSB - OX * 1.75) XH [heading Downward] bezControls k1 k2 k3 1 6 - g4.left.mid (middle + CorrectionOMidS) O [widths.rhs Stroke] + arch.rhs.centerAt.rtl.b middle 0 archv flat (SB + OX * 2) SmallArchDepthB curl (SB + OX * 2) (XH - SmallArchDepthA) arcvh - g4.right.mid (middle - CorrectionOMidS) (XH - O) [widths.rhs Stroke] + arch.rhs.centerAt.ltr.t middle XH bezControls (1 - k3) 0 (1 - k1) (1 - k2) 6 g4 (RightSB - OX * 2) 0 [widths.heading 0 fine Downward] diff --git a/packages/font-glyphs/src/letter/latin/lower-b.ptl b/packages/font-glyphs/src/letter/latin/lower-b.ptl index 7fc8b9b59..dd614f632 100644 --- a/packages/font-glyphs/src/letter/latin/lower-b.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-b.ptl @@ -81,7 +81,7 @@ glyph-block Letter-Latin-Lower-B : begin select-variant 'latn/be' 0x183 (follow -- 'b') derive-composites 'bPalatalHook' 0x1D80 'b' : PalatalHook.r - x -- [mix (Middle + CorrectionOMidS) RightSB 0.75] + x -- [mix [arch.adjust-x.bot Middle] RightSB 0.75] y -- 0 yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75] diff --git a/packages/font-glyphs/src/letter/latin/lower-e.ptl b/packages/font-glyphs/src/letter/latin/lower-e.ptl index c993b81c1..44284908f 100644 --- a/packages/font-glyphs/src/letter/latin/lower-e.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-e.ptl @@ -48,9 +48,7 @@ glyph-block Letter-Latin-Lower-E : begin widths.lhs stroke flat (df.rightSB - OX) barbottom [heading Upward] curl (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) - arcvh - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.lhs top flat (df.leftSB + OX) (top - [df.archDepthA SmallArchDepth]) curl (df.leftSB + OX) (0 + [df.archDepthB SmallArchDepth]) SmallESerifedTerminalShape df top stroke tailSlab schwaTail @@ -68,9 +66,7 @@ glyph-block Letter-Latin-Lower-E : begin widths.rhs stroke flat (df.leftSB + OX) barbottom [heading Upward] curl (df.leftSB + OX) (top - [df.archDepthA SmallArchDepth]) - arcvh - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.rhs top flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) curl (df.rightSB - OX) (0 + [df.archDepthA SmallArchDepth]) hookend O (sw -- stroke) @@ -92,9 +88,7 @@ glyph-block Letter-Latin-Lower-E : begin [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] - arcvh - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.lhs top flat (df.leftSB + OX) (top - [df.archDepthA SmallArchDepth]) curl (df.leftSB + OX) (0 + [df.archDepthB SmallArchDepth]) SmallESerifedTerminalShape df top stroke tailSlab schwaTail @@ -119,9 +113,7 @@ glyph-block Letter-Latin-Lower-E : begin [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] - arcvh - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.rhs top flat (df.rightSB - OX) (top - [df.archDepthB SmallArchDepth]) curl (df.rightSB - OX) (0 + [df.archDepthA SmallArchDepth]) hookend O (sw -- stroke) diff --git a/packages/font-glyphs/src/letter/latin/lower-g.ptl b/packages/font-glyphs/src/letter/latin/lower-g.ptl index 43072b1a5..ac17c3290 100644 --- a/packages/font-glyphs/src/letter/latin/lower-g.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-g.ptl @@ -37,9 +37,7 @@ glyph-block Letter-Latin-Lower-G : begin curl [mix RightSB SB 0.435] groundy archv 4 g4 grightx [mix (Descender + O) groundy (1.06 * SmallArchDepthA / (SmallArchDepthA + SmallArchDepthB))] - arcvh - g4 (Middle + CorrectionOMidS) (Descender + O) - archv + arch.rhs Descender g4 gleftx [mix (Descender + O) groundy (1.06 * SmallArchDepthB / (SmallArchDepthA + SmallArchDepthB))] arcvh g4 [mix SB RightSB 0.435] groundy [heading Rightward] diff --git a/packages/font-glyphs/src/letter/latin/lower-j.ptl b/packages/font-glyphs/src/letter/latin/lower-j.ptl index a27301d9e..712036b72 100644 --- a/packages/font-glyphs/src/letter/latin/lower-j.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-j.ptl @@ -155,7 +155,7 @@ glyph-block Letter-Latin-Lower-J : begin set-base-anchor 'above' (center - [HSwToV BBS] / 2 - BBD / 2) XH set-base-anchor 'overlay' (center - [HSwToV BBS] / 2 - BBD / 2) (XH / 2) local hookx : center - (Width * 0.5) - [HSwToV BBD] + OXHook - local turn : [mix center hookx 0.5] + CorrectionOMidS + local turn : arch.adjust-x.bot [mix center hookx 0.5] include : dispiro widths.rhs BBS flat center XH [heading Downward] diff --git a/packages/font-glyphs/src/letter/latin/lower-m.ptl b/packages/font-glyphs/src/letter/latin/lower-m.ptl index 1b9b67123..c1e1ecc76 100644 --- a/packages/font-glyphs/src/letter/latin/lower-m.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-m.ptl @@ -157,25 +157,21 @@ glyph-block Letter-Latin-Lower-M : begin define [leftKnots sink offset] : begin local xMidBarRightSide : mid + [HSwToV : 0.5 * df.mvs] - local xArchMid : [mix df.leftSB xMidBarRightSide 0.5] - CorrectionOMidX * df.mvs return : sink widths.rhs df.mvs [if (sink == dispiro) g2 corner] (df.leftSB - offset) (top - DToothlessRise) - g2.right.mid (xArchMid - offset) (top - O) - archv + arch.rhs top (sw -- df.mvs) (noBlendPre -- true) flat (xMidBarRightSide - offset) (top - [SmallMSmooth df]) [heading Downward] [if (sink == dispiro) curl corner] (xMidBarRightSide - offset) mbot [heading Downward] if (sink == spiro-outline) { [corner (df.leftSB - offset) 0 ] } { } define [rightKnots sink] : begin local xMidBarLeftSide : mid - [HSwToV : 0.5 * df.mvs] - local xArchMid : [mix df.rightSB xMidBarLeftSide 0.5] - CorrectionOMidX * df.mvs return : sink widths.rhs df.mvs - g2 [mix xArchMid xMidBarLeftSide 2] (top - 2 * DToothlessRise) + g2 [mix df.rightSB xMidBarLeftSide 1.5] (top - 2 * DToothlessRise) g2 xMidBarLeftSide (top - DToothlessRise) - g2.right.mid xArchMid (top - O) - archv + arch.rhs top (sw -- df.mvs) (noBlendPre -- true) flat df.rightSB (top - [SmallMSmooth df]) [heading Downward] curl df.rightSB rbot [heading Downward] @@ -210,12 +206,11 @@ glyph-block Letter-Latin-Lower-M : begin define [EarlessSingleArchSmallMShape df top lbot mbot rbot _mid] : glyph-proc local mid : fallback _mid df.middle include : tagged 'barL' : VBar.l df.leftSB lbot (top - DToothlessRise) df.mvs - include : tagged 'barM' : VBar.m mid mbot top df.mvs + include : tagged 'barM' : VBar.m mid mbot (top - 0.25 * df.mvs) df.mvs include : dispiro widths.rhs df.mvs g4 df.leftSB (top - DToothlessRise) - g4 (mid - CorrectionOMidX * df.mvs) (top - O) - archv + arch.rhs top (sw -- df.mvs) (noBlendPre -- true) flat df.rightSB [Math.max (top - [SmallMSmooth df]) (rbot + 0.1)] curl df.rightSB rbot [heading Downward] diff --git a/packages/font-glyphs/src/letter/latin/lower-n.ptl b/packages/font-glyphs/src/letter/latin/lower-n.ptl index a31f907d7..301452656 100644 --- a/packages/font-glyphs/src/letter/latin/lower-n.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-n.ptl @@ -60,8 +60,7 @@ glyph-block Letter-Latin-Lower-N : begin include : dispiro widths.rhs sw g4 left (top - DToothlessRise) - g4 ([mix left right 0.5] - CorrectionOMidS) (top - O) - archv + arch.rhs top (noBlendPre -- true) flat right (top - SmallArchDepthB) curl right yBR [heading Downward] @@ -70,9 +69,7 @@ glyph-block Letter-Latin-Lower-N : begin widths.rhs sw flat left 0 [heading Upward] curl left (top - SmallArchDepthA) - arcvh - g4 ([mix left right 0.5] - CorrectionOMidS) (top - O) - archv + arch.rhs top flat right (top - SmallArchDepthB) curl right yBR [heading Downward] diff --git a/packages/font-glyphs/src/letter/latin/lower-p.ptl b/packages/font-glyphs/src/letter/latin/lower-p.ptl index af2b68e50..57b493be5 100644 --- a/packages/font-glyphs/src/letter/latin/lower-p.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-p.ptl @@ -108,7 +108,7 @@ glyph-block Letter-Latin-Lower-P : begin SB + [HSwToV : 0.5 * Stroke] + MidJutSide + tinyGap include : PalatalHook.r - x -- [mix (Middle + CorrectionOMidS) RightSB 0.75] + x -- [mix [arch.adjust-x.bot Middle] RightSB 0.75] y -- 0 yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75] maskOut -- [intersection [MaskBelow 0] [MaskLeft xMask]] diff --git a/packages/font-glyphs/src/letter/latin/lower-t.ptl b/packages/font-glyphs/src/letter/latin/lower-t.ptl index 92472e271..78dd668e3 100644 --- a/packages/font-glyphs/src/letter/latin/lower-t.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-t.ptl @@ -46,7 +46,7 @@ glyph-block Letter-Latin-Lower-T : begin export : define [HookShapeT sink df sym offset top bot sw] : begin local xLeft : BarLeftPos df sym local xHook : XHookTerminal df sym - local xTurn : [mix xLeft xHook 0.5] + CorrectionOMidS + local xTurn : arch.adjust-x.bot [mix xLeft xHook 0.5] local adb : clamp Hook ((xTurn - xLeft) * 1.2) ArchDepthB return : sink @@ -330,8 +330,7 @@ glyph-block Letter-Latin-Lower-T : begin match sb [Just SLAB-CLASSICAL] : SerifedArcEnd.RtlRhs df.leftSB Middle 0 stroke SHook [Just SLAB-INWARD] : list - arcvh - g4 (df.middle + CorrectionOMidX * stroke) O + arch.rhs 0 (sw -- stroke) (noBlendPost -- true) g4 df.leftSB DToothlessRise __ : list hookend O (sw -- stroke) diff --git a/packages/font-glyphs/src/letter/latin/lower-y.ptl b/packages/font-glyphs/src/letter/latin/lower-y.ptl index 51748c355..fec0bed12 100644 --- a/packages/font-glyphs/src/letter/latin/lower-y.ptl +++ b/packages/font-glyphs/src/letter/latin/lower-y.ptl @@ -139,7 +139,7 @@ glyph-block Letter-Latin-Lower-Y : begin local xCenter : mix xLoopLeft joinX 0.5 list ConnectZ me.yshrink - g2.left.mid (xCenter + CorrectionOMidX * fine) bottom [widths.rhs] + g2.left.mid [arch.adjust-x.bot xCenter fine] bottom [widths.rhs] archv g2.up.mid xLoopLeft [mix bottom joinHeight3 0.5] [widths.rhs.heading fine Upward] arcvh diff --git a/packages/font-glyphs/src/letter/latin/o.ptl b/packages/font-glyphs/src/letter/latin/o.ptl index 63161dd4e..c14dd89df 100644 --- a/packages/font-glyphs/src/letter/latin/o.ptl +++ b/packages/font-glyphs/src/letter/latin/o.ptl @@ -211,9 +211,7 @@ glyph-block Letter-Latin-O : begin widths.rhs flat (SB + OX) (XH / 2) [heading Upward] curl (SB + OX) (XH - [Math.min (XH / 2 - 0.1) SmallArchDepthA]) - arcvh - g4 (Middle - CorrectionOMidS) (XH - O) - archv + arch.rhs XH flat (RightSB - OX) (XH - [Math.min (XH / 2 - 0.1) SmallArchDepthB]) curl (RightSB - OX) (XH / 2) [heading Downward] @@ -223,9 +221,7 @@ glyph-block Letter-Latin-O : begin widths.lhs flat (SB + OX) (XH / 2) [heading Downward] curl (SB + OX) [Math.min (XH / 2 - 0.1) SmallArchDepthB] - arcvh - g4 (Middle + CorrectionOMidS) O - archv + arch.lhs 0 flat (RightSB - OX) [Math.min (XH / 2 - 0.1) SmallArchDepthA] curl (RightSB - OX) (XH / 2) [heading Upward] @@ -273,6 +269,6 @@ glyph-block Letter-Latin-O : begin include : VBar.m Middle (-LongJut + 0.5 * Stroke) 0 derive-composites 'oRetroflexHook' 0x1DF1B 'o' : RetroflexHook.l - x -- [mix (Middle + CorrectionOMidS) SB 0.75] + x -- [mix [arch.adjust-x.bot Middle] SB 0.75] y -- 0 yAttach -- [mix O SmallArchDepthB : archv.yFromX 0.75] diff --git a/packages/font-glyphs/src/letter/latin/s.ptl b/packages/font-glyphs/src/letter/latin/s.ptl index c387c83ad..8f1b9d61b 100644 --- a/packages/font-glyphs/src/letter/latin/s.ptl +++ b/packages/font-glyphs/src/letter/latin/s.ptl @@ -144,7 +144,7 @@ glyph-block Letter-Latin-S : begin alsoThru.g2 0.5 0.5 [widths.center ess] g4 (df.rightSB - SOBot) (archDepth) [widths.rhs stroke] arcvh - flat (df.middle - CorrectionOMidS) 0 [widths.rhs Stroke] + flat [arch.adjust-x.top df.middle] 0 [widths.rhs Stroke] curl df.leftSB 0 define [RevSmallSStroke df st sb stroke ess] : begin @@ -359,7 +359,7 @@ glyph-block Letter-Latin-S : begin FlatSlashShape Middle (XH / 2) (OverlayStroke / 2) (-0.2) 0.75 derive-composites 'sPalatalHook' 0x1D8A 's' : PalatalHook.r - x -- [mix (Middle + CorrectionOMidS) DfLower.rightSB 0.75] + x -- [mix [arch.adjust-x.bot Middle] DfLower.rightSB 0.75] y -- 0 yAttach -- [mix O [AdviceSArchDepth XH (-1) [AdviceStroke2 2 3 XH]] : archv.yFromX 0.75] diff --git a/packages/font-glyphs/src/letter/latin/u.ptl b/packages/font-glyphs/src/letter/latin/u.ptl index 3e861834b..611e44da6 100644 --- a/packages/font-glyphs/src/letter/latin/u.ptl +++ b/packages/font-glyphs/src/letter/latin/u.ptl @@ -21,9 +21,7 @@ glyph-block Letter-Latin-U : begin widths.lhs stroke [if (sink == spiro-outline) corner flat] (df.leftSB + offset) top [heading Downward] curl (df.leftSB + offset) (bottom + adb + offset) - arcvh - g4 (df.middle + CorrectionOMidX * stroke) (bottom + O + offset) - archv + arch.lhs (bottom + offset) (sw -- stroke) flat (df.rightSB - offset) (bottom + ada + offset) [if (sink == spiro-outline) corner curl] (df.rightSB - offset) top [heading Upward] @@ -75,9 +73,7 @@ glyph-block Letter-Latin-U : begin widths.rhs sw flat df.leftSB 0 [heading Upward] curl df.leftSB (top - ada) - arcvh - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.rhs top flat df.rightSB (top - adb) curl df.rightSB (TailY + HalfStroke) [heading Downward] include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke) (sw -- sw) @@ -89,8 +85,7 @@ glyph-block Letter-Latin-U : begin include : dispiro widths.rhs sw g4 df.leftSB (top - DToothlessRise) - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.rhs top (noBlendPre -- true) flat df.rightSB (top - adb) curl df.rightSB [if fHookLeft (TailY + HalfStroke) 0] [heading Downward] if fHookLeft : include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke) (sw -- sw) @@ -356,9 +351,7 @@ glyph-block Letter-Latin-U : begin widths.lhs flat df.leftSB top [heading Downward] curl df.leftSB adb - arcvh - g4 (Middle + CorrectionOMidS) O - archv + arch.lhs 0 flat df.rightSB ada curl df.rightSB (top - Hook - HalfStroke) [heading Upward] include : VerticalHook.r @@ -402,9 +395,7 @@ glyph-block Letter-Latin-U : begin spiro-outline corner (SB - O) XH curl (SB - O) SmallArchDepthB - arcvh - g4 (Middle + CorrectionOMidS) (-O) - archv + arch.lhs 0 flat (RightSB + O) SmallArchDepthA corner (RightSB + O) XH if SLAB : begin diff --git a/packages/font-glyphs/src/letter/latin/upper-b.ptl b/packages/font-glyphs/src/letter/latin/upper-b.ptl index 60bc7e222..60c165916 100644 --- a/packages/font-glyphs/src/letter/latin/upper-b.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-b.ptl @@ -10,7 +10,7 @@ glyph-block Letter-Latin-Upper-B : begin glyph-block-import Common-Derivatives glyph-block-import Mark-Adjustment : LeaningAnchor glyph-block-import Letter-Shared-Metrics : BowlXDepth - glyph-block-import Letter-Shared-Shapes : ShoulderMidKnotRhs LetterBarOverlay SerifFrame LeftHook + glyph-block-import Letter-Shared-Shapes : LetterBarOverlay SerifFrame LeftHook glyph-block-import Letter-Blackboard : BBS BBD define BArcMix 0.93 @@ -33,21 +33,21 @@ glyph-block Letter-Latin-Upper-B : begin include : sink widths.rhs stroke flat (barleft - O) (top - offset) [heading Rightward] - curl (curvleftTop - CorrectionOMidX * stroke) (top - offset) + curl [arch.adjust-x.top curvleftTop (sw -- stroke)] (top - offset) archv g4 (xTopArcRight - offset) [YSmoothMidR top (bowl - stroke) adaTop adbTop] arcvh - flat (curvleftTop + CorrectionOMidX * stroke) (bowl - fine + offset) [widths.rhs fine] + flat [arch.adjust-x.bot curvleftTop (sw -- stroke)] (bowl - fine + offset) [widths.rhs fine] curl (barleft - O) (bowl - fine + offset) [heading Leftward] include : sink widths.rhs fine flat (barleft - O) (bowl - stroke + fine - offset) [heading Rightward] - curl (curvleft - CorrectionOMidX * stroke) (bowl - stroke + fine - offset) + curl [arch.adjust-x.top curvleft (sw -- stroke)] (bowl - stroke + fine - offset) archv g4 (RightSB - OX * 2 - offset) [YSmoothMidR bowl 0 ada adb] [widths.rhs stroke] arcvh - flat (curvleft + CorrectionOMidX * stroke) offset + flat [arch.adjust-x.bot curvleft (sw -- stroke)] offset curl (barleft - O) offset [heading Leftward] return : object bowl @@ -217,14 +217,10 @@ glyph-block Letter-Latin-Upper-B : begin curl Middle (midy - (fine - stroke / 2)) [heading Rightward] archv g4 (RightSB - (OX - O)) (top - adb) [widths.lhs stroke] - arcvh - g4 (Middle + stroke * 0.06 - CorrectionOMidS) (top - O) - archv + arch.lhs top flat (SB + O) (top - SmallArchDepthA) curl (SB + O) SmallArchDepthB - arcvh - g4 (Middle + stroke * 0.06 + CorrectionOMidS) O - archv + arch.lhs 0 g4 (RightSB - (OX - O) - O * 2) (ada) arcvh flat Middle (midy + (fine - stroke / 2)) [widths.heading fine 0 Leftward] @@ -246,17 +242,15 @@ glyph-block Letter-Latin-Upper-B : begin define pBar 0.55 define fine : Stroke * CThin define yMiddle : [mix 0 Ascender pBar] - Stroke * 0.7 # Bottom edge - define ada : ArchDepthAOf (ArchDepth * 0.75) Width - define adb : ArchDepthBOf (ArchDepth * 0.75) Width + define ada : ArchDepthAOf (ArchDepth * 0.75) (0.5 * Width) + define adb : ArchDepthBOf (ArchDepth * 0.75) (0.5 * Width) define xMidLeft : mix (SB + [HSwToV Stroke]) (RightSB - [HSwToV Stroke]) 0.3 define xMidArc : Math.max [mix xMidLeft RightSB 0.1] [mix SB RightSB 0.5] include : dispiro widths.rhs flat SB Descender [heading Upward] curl SB (Ascender - SmallArchDepthA) - arcvh - g4 ([mix SB (RightSB - OX + O * 3) 0.5] - CorrectionOMidS) (Ascender - O) - archv + arch.rhs Ascender g4 (RightSB - OX + O * 3) [YSmoothMidR yMiddle Ascender ada adb] arcvh flat xMidArc (yMiddle + Stroke - fine) [widths.rhs.heading fine Leftward] @@ -267,12 +261,8 @@ glyph-block Letter-Latin-Upper-B : begin curl xMidArc (yMiddle + fine) [heading Rightward] archv g4 (RightSB - OX) [YSmoothMidR 0 (yMiddle + Stroke) ada adb] [widths.rhs] - arcvh - ShoulderMidKnotRhs Middle O ShoulderFine Stroke (-1) 1 - archv + arch.rhs 0 (swAfter -- ShoulderFine) g4.up.end (SB + HVContrast * (Stroke - ShoulderFine)) adb [widths.rhs ShoulderFine] - # flat (RightSB - ymiddle / 2 - HalfStroke) 0 - # curl (SB + HalfStroke) 0 [heading Leftward] derive-composites 'latn/beta' 0xA7B5 'grek/beta' if SLAB [SerifFrame.fromDf [DivFrame 1] XH Descender].lb.fullSide [no-shape] @@ -291,28 +281,16 @@ glyph-block Letter-Latin-Upper-B : begin include : dispiro g4 (cx + rx - OX) [YSmoothMidR.cr cyt ry] [widths.lhs fine] - arcvh - g4 (cx - CorrectionOMidX * fine) (cyt + ry - O) - archv + arch.lhs (cyt + ry) (sw -- fine) g4 (cx - rx + OX) [YSmoothMidL.cr cyt ry] - arcvh - g4 (cx + CorrectionOMidX * fine) (cyt - ry + O) - archv + arch.lhs (cyt - ry) (sw -- fine) g4 (cx + rx - OX) [YSmoothMidR.cr cyt ry] - arcvh - g4 (Middle - CorrectionOMidS) (XH - O) [widths.lhs] - archv + arch.lhs XH (swBefore -- fine) flat SB (XH - SmallArchDepthA) curl SB (0 + SmallArchDepthB) - arcvh - g4 (Middle + CorrectionOMidS) O - archv + arch.lhs 0 (swAfter -- fine) g4 (cx + rx - OX) [YSmoothMidR.cr cyb ry] [widths.lhs fine] - arcvh - g4 (cx - CorrectionOMidX * fine) (cyb + ry - O) - archv + arch.lhs (cyb + ry) (sw -- fine) g4 (cx - rx + OX) [YSmoothMidL.cr cyb ry] - arcvh - g4 (cx + CorrectionOMidX * fine) (cyb - ry + O) - archv + arch.lhs (cyb - ry) (sw -- fine) g4 (cx + rx - OX) [YSmoothMidR.cr cyb ry] diff --git a/packages/font-glyphs/src/letter/latin/upper-d.ptl b/packages/font-glyphs/src/letter/latin/upper-d.ptl index fda5997c9..2e55e41d0 100644 --- a/packages/font-glyphs/src/letter/latin/upper-d.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-d.ptl @@ -23,21 +23,21 @@ glyph-block Letter-Latin-Upper-D : begin if (fRound) : include : sink widths.rhs sw [if offset corner flat] (df.leftSB - O) (top - offset) [heading Rightward] - curl (right - barchDepthRd - CorrectionOMidS) (top - offset) + curl [arch.adjust-x.top (right - barchDepthRd)] (top - offset) archv g4 (right - OX - offset) [YSmoothMidR top 0 ada adb] arcvh - flat (right - barchDepthRd + CorrectionOMidS) offset + flat [arch.adjust-x.bot (right - barchDepthRd)] offset [if offset corner curl] (df.leftSB - O) offset [heading Leftward] : else : include : sink widths.rhs sw [if offset corner flat] (df.leftSB - O) (top - offset) [heading Rightward] - curl (right - bsmooth - CorrectionOMidS) (top - offset) + curl [arch.adjust-x.top (right - bsmooth)] (top - offset) archv flat (right - OX - offset) (top - adb) curl (right - OX - offset) (0 + ada) arcvh - flat (right - bsmooth + CorrectionOMidS) offset + flat [arch.adjust-x.bot (right - bsmooth)] offset [if offset corner curl] (df.leftSB - O) offset [heading Leftward] define [DShape df top right fRound slabTop slabBot] : glyph-proc diff --git a/packages/font-glyphs/src/letter/latin/upper-g.ptl b/packages/font-glyphs/src/letter/latin/upper-g.ptl index 952c27a9b..0c1a49dfe 100644 --- a/packages/font-glyphs/src/letter/latin/upper-g.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-g.ptl @@ -10,7 +10,7 @@ glyph-block Letter-Latin-Upper-G : begin glyph-block-import Common-Derivatives glyph-block-import Mark-Adjustment : ExtendAboveBaseAnchors LeaningAnchor glyph-block-import Letter-Shared : CreateTurnedLetter - glyph-block-import Letter-Shared-Shapes : DToothlessRise ShoulderMidKnotLhs + glyph-block-import Letter-Shared-Shapes : DToothlessRise glyph-block-import Letter-Shared-Shapes : SerifedArcStart TopHook glyph-block-import Letter-Shared-Shapes : ArcStartSerif LetterBarOverlay SerifFrame @@ -32,25 +32,28 @@ glyph-block Letter-Latin-Upper-G : begin local fine ShoulderFine local knots : match slabShape - ([Just SLAB-LETTER] || [Just SLAB-HOOK-TOP]) : SerifedArcStart.RtlLhs RightSB Middle top Stroke Hook (slabShape === SLAB-HOOK-TOP) - [Just SLAB-INWARD] : list [g4 RightSB (top - DToothlessRise) [widths.lhs]] [g4 (Middle - CorrectionOMidS) (top - O)] [archv] + ([Just SLAB-LETTER] || [Just SLAB-HOOK-TOP]) : begin + SerifedArcStart.RtlLhs RightSB Middle top Stroke Hook (slabShape === SLAB-HOOK-TOP) + [Just SLAB-INWARD] : list + g4 RightSB (top - DToothlessRise) [widths.lhs] + arch.lhs.centerAt.rtl.t Middle top + archv __ : list [widths.lhs] [g4 RightSB (top - Hook)] [hookstart (top - O)] knots.push flat (SB + OX) (top - ada) curl (SB + OX) adb - arcvh match toothShape [Just TOOTHED] : knots.push - ShoulderMidKnotLhs Middle O fine Stroke 1 1 - archv - straight.up.end (RightSB - (Stroke - fine) * HVContrast) ada [widths.heading fine 0 Upward] + arch.lhs 0 (swAfter -- fine) + straight.up.end (RightSB - [HSwToV (Stroke - fine)]) ada [widths.lhs.heading fine Upward] [Just TOOTHLESS-CORNER] : knots.push - g4 (Middle + CorrectionOMidS) O + arcvh + arch.lhs.centerAt.ltr.b Middle 0 g4 RightSB DToothlessRise [Just TOOTHLESS-ROUNDED] : knots.push - g4 (Middle + CorrectionOMidS) O + arch.lhs 0 flat RightSB ada curl RightSB yBar [heading Upward] @@ -152,9 +155,7 @@ glyph-block Letter-Latin-Upper-G : begin hookstart (top - O - offset) (sw -- BBS) flat (SB + OX + offset) (top - ada) curl (SB + OX + offset) adb - arcvh - g4 ([mix SB xTerm 0.5] + CorrectionOMidS) (O + offset) - archv + arch.lhs offset (sw -- BBS) flat (xTerm - offset) ada curl (xTerm - offset) yTerm [heading Upward] diff --git a/packages/font-glyphs/src/letter/latin/upper-j.ptl b/packages/font-glyphs/src/letter/latin/upper-j.ptl index 774130b18..c3b78cba6 100644 --- a/packages/font-glyphs/src/letter/latin/upper-j.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-j.ptl @@ -60,7 +60,7 @@ glyph-block Letter-Latin-Upper-J : begin set-base-anchor 'jTopSerifAttach' (center - [HSwToV HalfStroke]) top local hookx : center - (df.width * 0.5) - [HSwToV Stroke] + OXHook - local turn : [mix center hookx 0.5] + CorrectionOMidS + local turn : arch.adjust-x.bot [mix center hookx 0.5] include : dispiro widths.rhs flat center top [heading Downward] diff --git a/packages/font-glyphs/src/letter/latin/upper-p.ptl b/packages/font-glyphs/src/letter/latin/upper-p.ptl index 2fafe48f9..29920b4a5 100644 --- a/packages/font-glyphs/src/letter/latin/upper-p.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-p.ptl @@ -31,7 +31,7 @@ glyph-block Letter-Latin-Upper-P : begin hookstart (bowlTop - O) g4 (right - overshoot) turn arcvh - flat ([Math.max (endX + 0.01 + sw / 2 * TanSlope) df.middle] + CorrectionOMidX * sw * 0.5) bowlBottom + flat [arch.adjust-x.bot [Math.max (endX + 0.01 + sw / 2 * TanSlope) df.middle] (sw -- sw * 0.5)] bowlBottom curl endX bowlBottom [heading Leftward] define [PShapeOutlineKnots top df mul bp overshoot sw offset] : begin @@ -45,11 +45,11 @@ glyph-block Letter-Latin-Upper-P : begin local turn : YSmoothMidR bowlTop bowlBottom ada adb return : list flat (left - O) bowlTop [heading Rightward] - curl (right - turnRadius - CorrectionOMidX * sw) bowlTop + curl [arch.adjust-x.top (right - turnRadius) (sw -- sw)] bowlTop archv g4 (right - overshoot) turn arcvh - flat (right - turnRadius + CorrectionOMidX * sw) bowlBottom + flat [arch.adjust-x.bot (right - turnRadius) (sw -- sw)] bowlBottom curl (left - O) bowlBottom [heading Leftward] define [RevPshapeOutlineKnots top df mul bp overshoot sw offset] : begin @@ -63,11 +63,11 @@ glyph-block Letter-Latin-Upper-P : begin local turn : YSmoothMidL bowlTop bowlBottom ada adb return : list flat (right + O) bowlTop [heading Leftward] - curl (left + turnRadius - CorrectionOMidX * sw) bowlTop + curl [arch.adjust-x.top (left + turnRadius) (sw -- sw)] bowlTop archv g4 (left + overshoot) turn arcvh - flat (left + turnRadius + CorrectionOMidX * sw) bowlBottom + flat [arch.adjust-x.bot (left + turnRadius) (sw -- sw)] bowlBottom curl (right + O) bowlBottom [heading Rightward] diff --git a/packages/font-glyphs/src/letter/latin/upper-q.ptl b/packages/font-glyphs/src/letter/latin/upper-q.ptl index 6666ea2c9..52816a9f7 100644 --- a/packages/font-glyphs/src/letter/latin/upper-q.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-q.ptl @@ -20,17 +20,15 @@ glyph-block Letter-Latin-Upper-Q : begin define fine : mix ShoulderFine sw 0.125 return : dispiro flat (df.middle - sw * TanSlope + O) (sw - fine) [widths.lhs fine] - curl (df.middle + CorrectionOMidX * fine) (sw - fine) + curl [arch.adjust-x.bot df.middle fine] (sw - fine) archv flat df.rightSB ArchDepthA [widths.lhs sw] curl df.rightSB (top - ArchDepthB) - arcvh - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.lhs top flat df.leftSB (top - ArchDepthA) curl df.leftSB ArchDepthB arcvh - straight.right.end (df.middle + CorrectionOMidS) 0 + straight.right.end [arch.adjust-x.bot df.middle] 0 define [QOpenSwashyBody df top] : glyph-proc define fine : AdviceStroke 3.5 @@ -48,7 +46,7 @@ glyph-block Letter-Latin-Upper-Q : begin include : difference dispiro flat df.width (yRingStart + O) [widths.rhs.heading fine Leftward] - curl (df.middle + CorrectionOMidS) (yRingStart + O) + curl [arch.adjust-x.bot df.middle] (yRingStart + O) archv flat (df.leftSB + OX) (yRingStart + ArchDepthB) [widths.rhs Stroke] curl (df.leftSB + OX) [mix yRingStart top 0.5] [heading Upward] @@ -60,9 +58,7 @@ glyph-block Letter-Latin-Upper-Q : begin include : dispiro flat (df.leftSB + OX) [mix yRingStart top 0.5] [widths.rhs.heading Stroke Upward] curl (df.leftSB + OX) (top - ArchDepthA) - arcvh - g4 (df.middle - CorrectionOMidS) (top - O) - archv + arch.rhs top flat (df.rightSB - OX) (top - ArchDepthB) curl (df.rightSB - OX) ArchDepthA alsoThru.g2 0.5 0.8 [widths.rhs : 0.9 * [mix Stroke fine 0.25]] @@ -130,7 +126,7 @@ glyph-block Letter-Latin-Upper-Q : begin VBar.m df.middle 0 TailDepth define [QHorizontalTail df tio sw] : dispiro - flat (df.middle + CorrectionOMidS) 0 [widths.lhs : AdviceStroke 3] + flat [arch.adjust-x.bot df.middle] 0 [widths.lhs : AdviceStroke 3] curl [mix df.rightSB df.width 0.5] 0 define detachedTailGap : Math.max (-0.25 * Descender) [AdviceStroke 12] diff --git a/packages/font-glyphs/src/letter/latin/v.ptl b/packages/font-glyphs/src/letter/latin/v.ptl index e91c0acff..958972c7e 100644 --- a/packages/font-glyphs/src/letter/latin/v.ptl +++ b/packages/font-glyphs/src/letter/latin/v.ptl @@ -111,7 +111,7 @@ glyph-block Letter-Latin-V : begin define xArcEnd : [mix SB RightSB 0.8] + sw * 0.375 define yArcEnd : top - O define rInY : DiagTail.DefaultInnerRadius - define xArcMidBottom : xBar + [HSwToV sw] + [HSwToV rInY] + CorrectionOMidX * sw + define xArcMidBottom : arch.adjust-x.bot (xBar + [HSwToV sw] + [HSwToV rInY]) sw include : dispiro widths.lhs sw @@ -161,9 +161,7 @@ glyph-block Letter-Latin-V : begin curl (xLoopL + loopSizeX) (top - 2 * loopSizeY) archv g4 (xLoopL + 2 * loopSizeX - O) (top - loopSizeY) - arcvh - g4 (xLoopL + loopSizeX - CorrectionOMidX * swLoop + 0.5 * HVContrast * (swLoopMix2 - swLoop)) (top - O) [widths.lhs swLoopMix1] - archv + arch.lhs top (swBefore -- swLoop) (sw -- swLoopMix1) (swAfter -- swLoopMix2) g4 xLoopL (top - loopSizeY) [widths.lhs swLoopMix2] flat [mix vxStartL vxEndL : if fBarStraight 0.5 0.425] [mix top 0 0.5] [widths.lhs : mix sw cornerSw 0.5] curl vxEndL 0 [widths.lhs cornerSw] diff --git a/packages/font-glyphs/src/letter/latin/w.ptl b/packages/font-glyphs/src/letter/latin/w.ptl index 8dbaf6522..39ee17e78 100644 --- a/packages/font-glyphs/src/letter/latin/w.ptl +++ b/packages/font-glyphs/src/letter/latin/w.ptl @@ -298,9 +298,7 @@ glyph-block Letter-Latin-W : begin widths.rhs fine flat (df.width - x1) (top - TailY - 0.5 * fine - O) [heading Downward] curl (df.width - x1) y3 [heading Downward] - arcvh 16 - g4 ([mix (df.width - x1) (df.middle - [HSwToV : 0.5 * fine]) 0.5] + fine * CorrectionOMidX) O - archv 16 + arch.rhs 0 (sw -- fine) (swAfter -- mfine) flat (df.middle - (mfine - fine / 2) * HVContrast) y3 [widths.heading 0 mfine Upward] curl (df.middle - (mfine - fine / 2) * HVContrast) y4 [heading Upward] : else : begin @@ -308,9 +306,7 @@ glyph-block Letter-Latin-W : begin widths.rhs fine g4 (df.width - x0) y0 g4 (df.width - x1 - OX) (top / 2) - arcvh 16 - g4 ([mix (df.width - x1) (df.middle - [HSwToV : 0.5 * fine]) 0.5] + fine * CorrectionOMidX) O - archv 16 + arch.rhs 0 (sw -- fine) (swAfter -- mfine) flat (df.middle - (mfine - fine / 2) * HVContrast) y3 [widths.heading 0 mfine Upward] curl (df.middle - (mfine - fine / 2) * HVContrast) y4 [heading Upward] diff --git a/packages/font-glyphs/src/letter/latin/x.ptl b/packages/font-glyphs/src/letter/latin/x.ptl index 16faba4ac..6109b0468 100644 --- a/packages/font-glyphs/src/letter/latin/x.ptl +++ b/packages/font-glyphs/src/letter/latin/x.ptl @@ -8,7 +8,7 @@ glyph-module glyph-block Letter-Latin-X : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - glyph-block-import Letter-Shared-Shapes : ShoulderMidKnotRhs SerifFrame WithSerifOverflowMask + glyph-block-import Letter-Shared-Shapes : SerifFrame WithSerifOverflowMask glyph-block-import Letter-Shared-Shapes : DiagTail glyph-block-import Letter-Shared-Shapes : CyrDescender PalatalHook @@ -96,9 +96,7 @@ glyph-block Letter-Latin-X : begin local upperHalf : include : dispiro flat (xMidBarRightEdge - [HSwToV fineMid]) ([mix bottom top 0.5] + O) [widths.rhs.heading fineMid Upward] curl (xMidBarRightEdge - [HSwToV fineMid]) (top - ada) - arcvh - ShoulderMidKnotRhs xUpperTurn (top - O) fineMid swEnd (+1) (-1) - archv + arch.rhs top (sw -- swEnd) (swBefore -- fineMid) flat (right - OX) (top - upperHookDepth + upperHookStraightDepth) [heading Downward] curl (right - OX) (top - upperHookDepth) [heading Downward] diff --git a/packages/font-glyphs/src/letter/shared.ptl b/packages/font-glyphs/src/letter/shared.ptl index 5f9e7bfb2..4ed0bfa98 100644 --- a/packages/font-glyphs/src/letter/shared.ptl +++ b/packages/font-glyphs/src/letter/shared.ptl @@ -204,40 +204,23 @@ glyph-block Letter-Shared-Shapes : begin quadControls ((x1 - mid) / (x2 - mid)) 0 8 g4 x2 y2 - glyph-block-export ShoulderMidKnotLhs - define [ShoulderMidKnotLhs cx cy fine sw dirX dirY] : begin - local skew : shoulderMidSkew fine sw - return : g4 - begin (cx + (dirY * CorrectionOMidX - skew - dirX * TanSlope) * sw) - begin cy - widths.heading sw 0 {.y dirY .x (skew)} - - glyph-block-export ShoulderMidKnotLhsRev - define [ShoulderMidKnotLhsRev cx cy fine sw dirX dirY] : begin - local skew : shoulderMidSkew fine sw - return : g4 - begin (cx + (dirY * CorrectionOMidX + skew - dirX * TanSlope) * sw) - begin cy - widths.heading sw 0 {.y dirY .x (-skew)} - - glyph-block-export ShoulderMidKnotRhs - define [ShoulderMidKnotRhs cx cy fine sw dirX dirY] : begin - local skew : shoulderMidSkew fine sw - return : g4 - begin (cx + (dirY * CorrectionOMidX + skew + dirX * TanSlope) * sw) - begin cy - widths.heading 0 sw {.y (-dirY) .x (skew)} - glyph-block-export nShoulderKnots - define [nShoulderKnots] : with-params [left right [fine ShoulderFine] [top XH] [bottom 0] [ada SmallArchDepthA] [adb SmallArchDepthB] [stroke Stroke] [fMask false] [leftY0 nothing]] : begin - local skew : shoulderMidSkew fine stroke - local middle : [mix (left - [HSwToV stroke]) right 0.5] + (skew - CorrectionOMidX) * stroke + define flex-params [nShoulderKnots] : begin + local-parameter : left + local-parameter : right + local-parameter : fine -- ShoulderFine + local-parameter : top -- XH + local-parameter : bottom -- 0 + local-parameter : ada -- SmallArchDepthA + local-parameter : adb -- SmallArchDepthB + local-parameter : stroke -- Stroke + local-parameter : fMask -- false + local-parameter : leftY0 -- nothing + return : list flat (left - [HSwToV fine]) [fallback leftY0 (top - ada - 2)] [widths.rhs fine] curl (left - [HSwToV fine]) (top - ada) - arcvh - ShoulderMidKnotRhs [mix (left - [HSwToV stroke]) right 0.5] (top - O) fine stroke (+1) (-1) - archv + arch.rhs top (sw -- stroke) (swBefore -- fine) flat right (top - adb) [widths.rhs stroke] [if fMask corner curl] right bottom [widths.rhs.heading stroke Downward] if [not fMask] {} {[corner left bottom]} @@ -261,28 +244,20 @@ glyph-block Letter-Shared-Shapes : begin [ada SmallArchDepthA] [adb SmallArchDepthB] [ystart (top - ada - 0.01)] ] : begin - local skew : shoulderMidSkew fine sw - local mt : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw local xstart : left + (sw - fine) * HVContrast return : list flat xstart ystart [widths.rhs fine] curl xstart (top - ada) - arcvh - g4 mt (top - O) [widths.rhs.heading sw {.y (-1) .x (-skew)}] - archv + arch.rhs top (sw -- sw) (swBefore -- fine) export : define [arcEnd] : with-params [ [bot 0] [left SB] [right RightSB] [sw Stroke] [fine ShoulderFine] [ada SmallArchDepthA] [adb SmallArchDepthB] [yend (bot + ada + 0.01)] ] : begin - local skew : shoulderMidSkew fine sw - local mb : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw local xend : left + (sw - fine) * HVContrast return : list - arcvh - g4 mb (bot + O) [widths.rhs.heading sw {.y (1) .x (-skew)}] - archv + arch.rhs bot (sw -- sw) (swAfter -- fine) flat xend (bot + adb) [widths.rhs fine] curl xend yend @@ -290,42 +265,29 @@ glyph-block Letter-Shared-Shapes : begin [top XH] [left SB] [right RightSB] [sw Stroke] [fine ShoulderFine] [ada SmallArchDepthA] [adb SmallArchDepthB] ] : begin - local skew : shoulderMidSkew fine sw - local mt : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw - local mb : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw return : dispiro widths.lhs fine flat (left + (sw - fine) * HVContrast) (top - ada - 0.01) curl (left + (sw - fine) * HVContrast) (0 + adb) - arcvh - g4 (mb) O [widths.lhs.heading sw {.y (1) .x (-skew)}] - archv + arch.lhs 0 (sw -- sw) (swBefore -- fine) flat (right - OX) (0 + ada) curl (right - OX) (top - adb) - arcvh - g4 (mt) (top - O) [widths.lhs.heading sw {.y (-1) .x (-skew)}] - archv + arch.lhs top (sw -- sw) (swAfter -- fine) flat (left + (sw - fine) * HVContrast) (top - ada) [widths.lhs fine] curl (left + (sw - fine) * HVContrast) (top - ada - 0.01) export : define [toothless] : with-params [ - [top XH] [left SB] [right RightSB] [rise SHook] [sw Stroke] + [top XH] [left SB] [right RightSB] [rise SHook] [sw Stroke] [fine ShoulderFine] [mBlend : Math.sqrt (1 / 2)] [ada SmallArchDepthA] [adb SmallArchDepthB] ] : begin - local fine ShoulderFine - local skew : shoulderMidSkew fine sw - local mt : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw - local mb : [mix left right 0.5] + CorrectionOMidX * sw return : dispiro g4 left rise [widths.lhs sw] alsoThru.g2 0.5 mBlend important - g4.right.mid mb O + arch.lhs.centerAt.ltr.b [mix left right 0.5] 0 (sw -- sw) archv flat (right - OX) (0 + ada) curl (right - OX) (top - adb) - arcvh - g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-skew)}] - archv + arch.lhs top (sw -- sw) (swAfter -- fine) flat (left + (sw - fine) * HVContrast) (top - ada) [widths.lhs fine] curl (left + (sw - fine) * HVContrast) (top - ada - 0.01) [widths.lhs fine] @@ -333,41 +295,28 @@ glyph-block Letter-Shared-Shapes : begin [top XH] [left SB] [right RightSB] [yTerminal CAP] [sw Stroke] [fine ShoulderFine] [ada SmallArchDepthA] [adb SmallArchDepthB] ] : begin - local skew : shoulderMidSkew fine sw - local mt : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw - local mb : [mix left right 0.5] + CorrectionOMidX * sw return : dispiro flat left yTerminal [widths.lhs.heading sw Downward] curl left [Math.min adb (yTerminal - 0.01)] - arcvh - g4 mb O - archv + arch.lhs 0 (sw -- sw) flat (right - OX) (0 + ada) curl (right - OX) (top - adb) - arcvh - g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-skew)}] - archv + arch.lhs top (sw -- sw) (swAfter -- fine) flat (left + (sw - fine) * HVContrast) (top - ada + 0.01) [widths.lhs fine] curl (left + (sw - fine) * HVContrast) (top - ada) [widths.lhs fine] export : define [toothlessTop] : with-params [ - [top XH] [left SB] [right RightSB] [rise SHook] [sw Stroke] + [top XH] [left SB] [right RightSB] [rise SHook] [sw Stroke] [fine ShoulderFine] [mBlend : Math.sqrt (1 / 2)] [ada SmallArchDepthA] [adb SmallArchDepthB] ] : begin - local fine ShoulderFine - local skew : shoulderMidSkew fine - local mt : [mix left right 0.5] - CorrectionOMidX * sw - local mb : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw return : dispiro flat (left + (sw - fine) * HVContrast) (top - ada - 0.01) [widths.lhs fine] curl (left + (sw - fine) * HVContrast) (0 + adb) [widths.lhs fine] - arcvh - g4 (mb) O [widths.heading sw 0 {.y (1) .x (-skew)}] - archv + arch.lhs 0 (sw -- sw) (swBefore -- fine) flat (right - OX) (0 + ada) curl (right - OX) (top - adb) arcvh - g4 mt (top - O) [widths.lhs sw] + arch.lhs.centerAt.rtl.t [mix left right 0.5] top (sw -- sw) alsoThru.g2 0.5 (1 - mBlend) important g4 left (top - rise) [widths.lhs sw] @@ -375,20 +324,13 @@ glyph-block Letter-Shared-Shapes : begin [top XH] [left SB] [right RightSB] [yTerminal Descender] [sw Stroke] [fine ShoulderFine] [ada SmallArchDepthA] [adb SmallArchDepthB] ] : begin - local skew : shoulderMidSkew fine - local mt : [mix left right 0.5] - CorrectionOMidX * sw - local mb : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * sw return : dispiro flat (left + (sw - fine) * HVContrast) (top - ada - 0.01) [widths.lhs fine] curl (left + (sw - fine) * HVContrast) (0 + adb) [widths.lhs fine] - arcvh - g4 (mb) O [widths.heading sw 0 {.y (1) .x (-skew)}] - archv + arch.lhs 0 (sw -- sw) (swBefore -- fine) flat (right - OX) (0 + ada) curl (right - OX) (top - adb) - arcvh - g4 mt (top - O) [widths.lhs sw] - archv + arch.lhs top (sw -- sw) flat left [Math.max (yTerminal + 0.01 - TanSlope * Stroke) (top - ada)] curl left yTerminal [widths.lhs.heading sw Downward] @@ -400,28 +342,20 @@ glyph-block Letter-Shared-Shapes : begin [ada SmallArchDepthA] [adb SmallArchDepthB] [ystart (top - ada - 0.01)] ] : begin - local skew : shoulderMidSkew fine sw - local mt : [mix left right 0.5] - (skew + kSkewShift * TanSlope) * sw local xstart : right - (sw - fine) * HVContrast return : list flat xstart ystart [widths.lhs fine] curl xstart (top - adb) - arcvh - g4 mt (top - O) [widths.lhs.heading sw {.y (-1) .x (skew)}] - archv + arch.lhs top (sw -- sw) (swBefore -- fine) export : define [arcEnd] : with-params [ [bot 0] [left SB] [right RightSB] [sw Stroke] [fine ShoulderFine] [ada SmallArchDepthA] [adb SmallArchDepthB] [yend (bot + ada + 0.01)] ] : begin - local skew : shoulderMidSkew fine sw - local mb : [mix left right 0.5] - (skew + kSkewShift * TanSlope) * sw local xend : right - (sw - fine) * HVContrast return : list - arcvh - g4 mb (bot + O) [widths.lhs.heading sw {.y (1) .x (skew)}] - archv + arch.lhs bot (sw -- sw) (swAfter -- fine) flat xend (bot + ada) [widths.lhs fine] curl xend yend @@ -440,7 +374,7 @@ glyph-block Letter-Shared-Shapes : begin include : FlipAround [mix left right 0.5] (top / 2) export : define [toothless] : with-params [ - [top XH] [left SB] [right RightSB] [rise SHook] [sw Stroke] + [top XH] [left SB] [right RightSB] [rise SHook] [sw Stroke] [fine ShoulderFine] [mBlend : Math.sqrt (1 / 2)] [ada SmallArchDepthA] [adb SmallArchDepthB] ] : new-glyph : glyph-proc include : OBarLeft.toothlessTop @@ -449,20 +383,22 @@ glyph-block Letter-Shared-Shapes : begin right -- right rise -- rise sw -- sw + fine -- fine mBlend -- mBlend ada -- ada adb -- adb include : FlipAround [mix left right 0.5] (top / 2) export : define [rounded] : with-params [ - [top XH] [left SB] [right RightSB] [sw Stroke] [yTerminal CAP] - [ada SmallArchDepthA] [adb SmallArchDepthB] + [top XH] [left SB] [right RightSB] [sw Stroke] [fine ShoulderFine] + [yTerminal CAP] [ada SmallArchDepthA] [adb SmallArchDepthB] ] : new-glyph : glyph-proc include : OBarLeft.roundedTop top -- top left -- left right -- right sw -- sw + fine -- fine yTerminal -- (top - yTerminal) ada -- ada adb -- adb @@ -519,7 +455,7 @@ glyph-block Letter-Shared-Shapes : begin cy - [ArcStartSerifDepth hook] widths.lhs.heading fine Upward arcvh.superness 2 - ShoulderMidKnotLhs cx (cy - O) fine sw (-1) (-1) + arch.lhs.centerAt.rtl.t cx cy (sw -- sw) (swBefore -- fine) archv export : define [LtrRhs sx cx cy sw hook origBar] : begin @@ -531,7 +467,7 @@ glyph-block Letter-Shared-Shapes : begin cy - [ArcStartSerifDepth hook] widths.rhs.heading fine Upward arcvh.superness 2 - ShoulderMidKnotRhs cx (cy - O) fine sw (+1) (-1) + arch.rhs.centerAt.ltr.t cx cy (sw -- sw) (swBefore -- fine) archv glyph-block-export SerifedArcEnd @@ -541,7 +477,7 @@ glyph-block Letter-Shared-Shapes : begin local fine : barSw * [mix CThinB (ShoulderFine / Stroke) 0.5] return : list arcvh - ShoulderMidKnotRhs cx (cy + O) fine sw (-1) (+1) + arch.rhs.centerAt.rtl.b cx cy (sw -- sw) (swAfter -- fine) archv.superness 2 g4.up.end sx + (barSw - fine) * HVContrast @@ -553,7 +489,7 @@ glyph-block Letter-Shared-Shapes : begin local fine : barSw * [mix CThinB (ShoulderFine / Stroke) 0.5] return : list arcvh - ShoulderMidKnotLhs cx (cy + O) fine sw (+1) (+1) + arch.lhs.centerAt.ltr.b cx cy (sw -- sw) (swAfter -- fine) archv.superness 2 g4.up.end sx - (barSw - fine) * HVContrast diff --git a/packages/font-glyphs/src/marks/overlay.ptl b/packages/font-glyphs/src/marks/overlay.ptl index abe9639e2..f99faa8e3 100644 --- a/packages/font-glyphs/src/marks/overlay.ptl +++ b/packages/font-glyphs/src/marks/overlay.ptl @@ -414,16 +414,16 @@ glyph-block Mark-Overlay : begin : then : return : OShapeOutline.NoOvershoot y + halfDotHeight y - halfDotHeight - x + halfDotWidth x - halfDotWidth + x + halfDotWidth Stroke * halfDotWidth * 2 / Width ArchDepthAOf halfDotWidth (halfDotWidth * 2) ArchDepthBOf halfDotWidth (halfDotWidth * 2) : else : return : Rect y + halfDotHeight y - halfDotHeight - x + halfDotWidth x - halfDotWidth + x + halfDotWidth set [InnerDot.spaceOfDf df] : df.rightSB - df.leftSB - 2 * OX - [HSwToV : 2 * df.mvs] diff --git a/packages/font-glyphs/src/meta/aesthetics.ptl b/packages/font-glyphs/src/meta/aesthetics.ptl index 6638792fc..2417a7d58 100644 --- a/packages/font-glyphs/src/meta/aesthetics.ptl +++ b/packages/font-glyphs/src/meta/aesthetics.ptl @@ -172,11 +172,6 @@ export : define [calculateMetrics para] : begin define CorrectionOMidX : TanSlope * 0.9 * [StrokeWidthBlend 1.3 0.9] define CorrectionOMidS : Stroke * CorrectionOMidX - define ArchXAdjust : object - top : function [x sw] : x - CorrectionOMidX * [fallback sw Stroke] - bottom : function [x sw] : x + CorrectionOMidX * [fallback sw Stroke] - bot : function [x sw] : x + CorrectionOMidX * [fallback sw Stroke] - define OverlayStroke : AdviceStroke 3.75 define OperatorStroke : AdviceStroke 2.75 define GeometryStroke : AdviceStroke 4 @@ -189,11 +184,6 @@ export : define [calculateMetrics para] : begin define [AdviceGlottalStopArchDepth y sign] : begin return : ((y - Stroke) * 0.24 + Stroke * 0.625) + sign * TanSlope * SmoothAdjust - define [shoulderMidSkew _fine _stroke] : begin - local stroke : fallback _stroke Stroke - local fine : fallback _fine ShoulderFine - return : 0.5 * Contrast * (stroke - fine) / stroke - return [object DesignParameters UPM HalfUPM Width SB CAP XH Ascender Descender Contrast SymbolMid ParenTop ParenBot OperTop OperBot TackTop TackBot PlusTop PlusBot PictTop PictBot BgOpTop @@ -205,9 +195,9 @@ export : define [calculateMetrics para] : begin JBalance JBalance2 TBalance TBalance2 RBalance RBalance2 FBalance OneBalance WideWidth0 WideWidth1 WideWidth2 WideWidth3 WideWidth4 EssUpper EssLower EssQuestion HalfStroke RightSB Middle DotRadius PeriodRadius SideJut ArchDepthA ArchDepthB SmallArchDepthA - SmallArchDepthB CorrectionOMidX CorrectionOMidS ArchXAdjust compositeBaseAnchors + SmallArchDepthB CorrectionOMidX CorrectionOMidS compositeBaseAnchors AdviceStroke AdviceStroke2 OverlayStroke OperatorStroke GeometryStroke ShoulderFine - _SuperXY AdviceGlottalStopArchDepth shoulderMidSkew StrokeWidthBlend + _SuperXY AdviceGlottalStopArchDepth StrokeWidthBlend ArchDepthAOf ArchDepthBOf SmoothAdjust MidJutSide MidJutCenter YSmoothMidR YSmoothMidL HSwToV NarrowUnicodeT WideUnicodeT] diff --git a/packages/font-glyphs/src/meta/macros.ptl b/packages/font-glyphs/src/meta/macros.ptl index 788acd569..89181b856 100644 --- a/packages/font-glyphs/src/meta/macros.ptl +++ b/packages/font-glyphs/src/meta/macros.ptl @@ -193,14 +193,13 @@ define-macro glyph-block-import : syntax-rules derive-composites link-reduced-variant alias-reduced-variant HalfAdvance derive-multi-part-glyphs DeriveMeshT link-gr] - CommonShapes `[no-shape tagged KnotAdj Rect SquareAt Ring RingAt DotAt RingStroke - RingStrokeAt DotStrokeAt Circle Ellipse - OShapeT OShape OShapeOutline OShapeFlatTB HSerif VSerif NeedSlab NeedNotItalic HBar - HOverlayBar VBar FlatSlashShape hookstart hookend Ungizmo Regizmo FlipAround ScaleAround - Realign ForceUpright DiagCor NameUni PointingTo with-transform clear-geometry - clear-anchors AsRadical ExtLineCenter ExtLineLhs ExtLineRhs DiagCorDs HCrossBar VERY-FAR - MaskAbove MaskBelow MaskLeft MaskRight HalfRectTriangle MaskAboveLine MaskBelowLine - MaskLeftLine MaskRightLine DotVariants WithDotVariants] + CommonShapes `[no-shape tagged Rect SquareAt Ring RingAt DotAt RingStroke + RingStrokeAt DotStrokeAt Circle Ellipse OShapeT OShape OShapeOutline OShapeFlatTB HSerif + VSerif NeedSlab NeedNotItalic HBar HOverlayBar VBar FlatSlashShape hookstart hookend arch + Ungizmo Regizmo FlipAround ScaleAround Realign ForceUpright DiagCor NameUni PointingTo + with-transform clear-geometry clear-anchors AsRadical ExtLineCenter ExtLineLhs ExtLineRhs + DiagCorDs HCrossBar VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight HalfRectTriangle + MaskAboveLine MaskBelowLine MaskLeftLine MaskRightLine DotVariants WithDotVariants] define vartiableFilter : if externEnv.$glyphBlockVariableUsage$ lambda [x] externEnv.$glyphBlockVariableUsage$.(x) @@ -274,8 +273,8 @@ define-macro glyph-block : syntax-rules RBalance2 FBalance OneBalance WideWidth0 WideWidth1 WideWidth2 WideWidth3 WideWidth4 EssUpper EssLower EssQuestion HalfStroke RightSB Middle DotRadius PeriodRadius SideJut ArchDepthA ArchDepthB SmallArchDepthA SmallArchDepthB CorrectionOMidX CorrectionOMidS - ArchXAdjust AdviceStroke AdviceStroke2 OverlayStroke OperatorStroke GeometryStroke - ShoulderFine _SuperXY AdviceGlottalStopArchDepth shoulderMidSkew + AdviceStroke AdviceStroke2 OverlayStroke OperatorStroke GeometryStroke + ShoulderFine _SuperXY AdviceGlottalStopArchDepth StrokeWidthBlend ArchDepthAOf ArchDepthBOf SmoothAdjust MidJutSide MidJutCenter compositeBaseAnchors YSmoothMidR YSmoothMidL HSwToV NarrowUnicodeT WideUnicodeT] define spiroFnImports `[g4 g2 corner flat curl close end straight widths diff --git a/packages/font-glyphs/src/number/0.ptl b/packages/font-glyphs/src/number/0.ptl index b7218ad6a..4e47f75d2 100644 --- a/packages/font-glyphs/src/number/0.ptl +++ b/packages/font-glyphs/src/number/0.ptl @@ -16,13 +16,13 @@ glyph-block Digits-Zero : begin define [CutoutStrokeWidth top] : Math.max (0.1 * top) : Math.min (0.125 * top) (0.5 * CircleInnerWidth) [AdviceStroke 3] glyph-block-export OvalShapeT - define [OvalShapeT sink t b l r pHAdj sw] : let [m : mix l r 0.5] : sink + define [OvalShapeT sink t b l r sw] : let [m : mix l r 0.5] : sink widths.rhs [fallback sw Stroke] - g4 (m - [fallback pHAdj 1] * CorrectionOMidS) (t - O) + arch.rhs.centerAt.ltr.t m t archv g4 (r - OX) [YSmoothMidR t b SmallArchDepthA SmallArchDepthB] arcvh - g4 (m + [fallback pHAdj 1] * CorrectionOMidS) (b + O) + arch.rhs.centerAt.rtl.b m b archv g4 (l + OX) [YSmoothMidL t b SmallArchDepthA SmallArchDepthB] arcvh @@ -35,8 +35,8 @@ glyph-block Digits-Zero : begin local sw1 fine local sw2 : mix body fine 0.375 - local mxb : [mix (l - OX) (r + OX) 0.5] + CorrectionOMidX * fine - local mxt : [mix (l - OX) (r + OX) 0.5] - CorrectionOMidX * fine + local mxb : arch.adjust-x.bot [mix (l - OX) (r + OX) 0.5] (sw -- fine) + local mxt : arch.adjust-x.top [mix (l - OX) (r + OX) 0.5] (sw -- fine) local myl : YSmoothMidL t b local myr : YSmoothMidR t b @@ -155,8 +155,8 @@ glyph-block Digits-Zero : begin return : OShapeOutline.NoOvershoot top / 2 + DotRadius top / 2 - DotRadius - Middle + halfDotWidth Middle - halfDotWidth + Middle + halfDotWidth Stroke * halfDotWidth * 2 / Width ArchDepthAOf halfDotWidth (halfDotWidth * 2) ArchDepthBOf halfDotWidth (halfDotWidth * 2) @@ -167,31 +167,12 @@ glyph-block Digits-Zero : begin return : OShapeOutline.NoOvershoot top / 2 + halfDotHeight top / 2 - halfDotHeight - Middle + halfDotWidth Middle - halfDotWidth + Middle + halfDotWidth Stroke * halfDotWidth * 2 / Width ArchDepthAOf halfDotWidth (halfDotWidth * 2) ArchDepthBOf halfDotWidth (halfDotWidth * 2) - define [ZeroOvalDotShape top] : begin - local halfDotWidth : Math.min DotRadius (CircleInnerWidth / 4) - return : OvalShapeT spiro-outline - top / 2 + DotRadius - O - top / 2 - DotRadius + O - Middle - halfDotWidth + OX - Middle + halfDotWidth - OX - begin 0 - - define [ZeroOvalLongDotShape top] : begin - local halfDotWidth : Math.min HalfStroke (CircleInnerWidth / 4) - local halfDotHeight : Math.max DotRadius : Math.min ((top - Stroke * 2) / 4) ((top - Stroke * 2 - (CircleInnerWidth - halfDotWidth * 2)) / 2) - return : OvalShapeT spiro-outline - top / 2 + halfDotHeight - O - top / 2 - halfDotHeight + O - Middle - halfDotWidth + OX - Middle + halfDotWidth - OX - begin 0 - define ZeroConfig : SuffixCfg.weave object # outline shape '' Capsule diff --git a/packages/font-glyphs/src/number/5.ptl b/packages/font-glyphs/src/number/5.ptl index 8189fb890..02b0757f1 100644 --- a/packages/font-glyphs/src/number/5.ptl +++ b/packages/font-glyphs/src/number/5.ptl @@ -13,7 +13,7 @@ glyph-block Digits-Five : begin define [FiveFlatStroke xLeft archTop pShapeHeight sw] : dispiro widths.rhs sw flat (xLeft + [HSwToV sw]) archTop - curl [Math.max (xLeft + 0.01) (Middle - CorrectionOMidX * sw)] archTop + curl [Math.max (xLeft + 0.01) [arch.adjust-x.top Middle sw]] archTop archv g4 (RightSB - OX) [YSmoothMidR archTop 0 ArchDepthA ArchDepthB] hookend O (sw -- sw) diff --git a/packages/font-glyphs/src/number/6.ptl b/packages/font-glyphs/src/number/6.ptl index 6f6947cbb..6af67da65 100644 --- a/packages/font-glyphs/src/number/6.ptl +++ b/packages/font-glyphs/src/number/6.ptl @@ -12,70 +12,54 @@ glyph-block Digits-Six : begin glyph-block-export OpenContourSixShape define [OpenContourSixShape charTop] : glyph-proc local oTop : charTop * 0.55 + Stroke / 2 - local fine : Stroke * CThinB - local coFine : Math.max [AdviceStroke 3.5] (Stroke - fine / 2) + local ymiddlea : (oTop - SmallArchDepthA + SmallArchDepthB) / 2 + local ymiddleb : (oTop - SmallArchDepthB + SmallArchDepthA) / 2 include : dispiro - widths.rhs fine - KnotAdj.ArchBot.o (ty -- g4.left.start) (Middle - TanSlope * (Stroke - fine)) (Stroke - fine) - archv - KnotAdj.BowlLeft.o g4 (SB + (Stroke - fine) * HVContrast) (oTop / 2) - arcvh - KnotAdj.ArchTop.o Middle oTop [widths.rhs] - archv - KnotAdj.BowlRight.o g4.down.mid RightSB (oTop / 2) - arcvh - KnotAdj.ArchBot.o (ty -- g4.left.mid) Middle 0 - archv - KnotAdj.BowlLeft.o g4.up.mid SB (oTop / 2 + Stroke * 0.3) [widths.rhs coFine] + widths.rhs ShoulderFine + g4 (SB + OX + [HSwToV (Stroke - ShoulderFine)]) ymiddlea + arch.rhs oTop (swBefore -- ShoulderFine) + g4.down.mid (RightSB - OX) ymiddleb + arch.rhs 0 + g4.up.mid (SB + OX) ymiddlea quadControls 0 0.85 - g4 ([mix SB RightSB 0.85] - [HSwToV : 0.25 * Stroke]) (charTop - O) [widths.rhs] + g4 ([mix SB RightSB 0.85] - 0.25 * Stroke * HVContrast) (charTop - O) [widths.rhs] glyph-block-export ClosedContourSixShape define [ClosedContourSixShape top] : glyph-proc local oTop : Math.max (2 * SmallArchDepth + 0.1) (top * 0.55 + HalfStroke) include : dispiro - widths.rhs (Stroke * CThinB) - KnotAdj.BowlLeft.o straight.up.start (SB + Stroke * (1 - CThinB) * HVContrast) (oTop - SmallArchDepth) - arcvh - KnotAdj.ArchTop.o Middle oTop [widths.rhs Stroke] - archv - KnotAdj.BowlRight.o flat RightSB (oTop - SmallArchDepth) - KnotAdj.BowlRight.o curl RightSB (0 + SmallArchDepth) - arcvh - KnotAdj.ArchBot.o Middle 0 - archv - KnotAdj.BowlLeft.o flat SB SmallArchDepth - KnotAdj.BowlLeft.o curl SB (top - SmallArchDepth) + widths.rhs ShoulderFine + straight.up.start (SB + OX + [HSwToV (Stroke - ShoulderFine)]) (oTop - SmallArchDepthA) + arch.rhs oTop (swBefore -- ShoulderFine) + flat (RightSB - OX) (oTop - SmallArchDepthB) + curl (RightSB - OX) SmallArchDepthA + arch.rhs 0 + flat (SB + OX) SmallArchDepthB + curl (SB + OX) (top - SmallArchDepthA) hookend (top - O) - g4 RightSB (top - Hook) + g4 (RightSB - OX) (top - Hook) glyph-block-export StraightBarSixShape define [StraightBarSixShape] : with-params [charTop [sw Stroke] [bbd 0]] : glyph-proc local oTop : charTop * 0.55 + sw / 2 - local fine : sw * CThin - local coFine : Math.max (sw * CThin) (sw - fine / 2) + local ymiddlea : (oTop - SmallArchDepthA + SmallArchDepthB) / 2 + local ymiddleb : (oTop - SmallArchDepthB + SmallArchDepthA) / 2 local xMockBarStart 0 - local yMockBarStart : KnotAdj.BowlLeft.yOf : oTop / 2 + sw * 0.3 - local xTerminal0 : [mix SB RightSB 0.6] - [HSwToV : 0.5 * sw] + local yMockBarStart : ymiddlea + sw * 0.3 + local xTerminal0 : [mix SB RightSB 0.6] - 0.5 * sw * HVContrast local kDiagBbd : DiagCorDs (charTop - yMockBarStart) (xTerminal0 - xMockBarStart) bbd local xTerminal : xTerminal0 + (kDiagBbd * bbd / 2) local pStraightBarStart : 0.75 - (sw / charTop) include : intersection Rect charTop (-charTop) (-Width) (2 * Width) dispiro - widths.rhs fine - KnotAdj.ArchBot.o (ty -- g4.left.start) (Middle + bbd / 2 - TanSlope * (sw - fine)) (sw - fine + 1/16) - archv - KnotAdj.BowlLeft.o g4.up.mid (SB + bbd + (sw - fine) * HVContrast + 1/16) (oTop / 2) - arcvh - KnotAdj.ArchTop.o (Middle + bbd / 2) oTop [widths.rhs sw] - archv - KnotAdj.BowlRight.o g4.down.mid RightSB (oTop / 2) - arcvh - KnotAdj.ArchBot.o (ty -- g4.left.mid) (Middle + bbd / 2) 0 - archv - KnotAdj.BowlLeft.o g4.up.mid (SB + bbd) (oTop / 2 + sw * 0.3) [widths.rhs coFine] + widths.rhs ShoulderFine + g4.up.mid (SB + bbd + OX + [HSwToV (sw - ShoulderFine)]) ymiddlea + arch.rhs oTop (sw -- sw) (swBefore -- ShoulderFine) + g4.down.mid (RightSB - OX) ymiddleb + arch.rhs 0 (sw -- sw) + g4.up.mid (SB + bbd + OX) ymiddlea flat [mix (xMockBarStart + bbd) xTerminal pStraightBarStart] [mix yMockBarStart charTop pStraightBarStart] [widths.rhs sw] curl [mix (xMockBarStart + bbd) xTerminal 2] [mix yMockBarStart charTop 2] @@ -83,9 +67,9 @@ glyph-block Digits-Six : begin if bbd : include : intersection Rect charTop (-charTop) (-Width) (2 * Width) dispiro - KnotAdj.ArchBot.o (ty -- g4.left.mid) (Middle + bbd / 2) 0 [widths.rhs sw] + arch.rhs.centerAt.rtl.b (Middle + bbd / 2) 0 (sw -- sw) archv - KnotAdj.BowlLeft.o g4.up.mid SB (oTop / 2 + sw * 0.3) + g4.up.mid (SB + OX) ymiddlea flat [mix xMockBarStart (xTerminal - kDiagBbd * bbd) pStraightBarStart] [mix yMockBarStart charTop pStraightBarStart] curl [mix xMockBarStart (xTerminal - kDiagBbd * bbd) 2] [mix yMockBarStart charTop 2] diff --git a/packages/font-glyphs/src/number/8.ptl b/packages/font-glyphs/src/number/8.ptl index 49010b329..dcb474a3f 100644 --- a/packages/font-glyphs/src/number/8.ptl +++ b/packages/font-glyphs/src/number/8.ptl @@ -18,13 +18,13 @@ glyph-block Digits-Eight : begin local r (RightSB - OX) return : dispiro widths.rhs stroke - g4.right.mid (Middle - CorrectionOMidS) (top - O) + arch.rhs.centerAt.ltr.t Middle top (sw -- stroke) archv g4 [mix l r p] (top - [ArchDepthBOf (ArchDepth * EightPr * p) Width]) alsoThru.g2 0.5 0.5 [widths.center stroke] g4 (l) [ArchDepthBOf (ArchDepth * EightPr) Width] [widths.lhs stroke] arcvh - g4.right.mid (Middle + CorrectionOMidS) (O) + arch.lhs.centerAt.ltr.b Middle 0 (sw -- stroke) archv g4 (r) [ArchDepthAOf (ArchDepth * EightPr) Width] [widths.lhs stroke] alsoThru.g2 0.5 0.5 [widths.center stroke] @@ -53,7 +53,6 @@ glyph-block Digits-Eight : begin local topRight : mix SB RightSB (pShrink * pSizeDiffX) local fine : stroke * CThin - local mc : CorrectionOMidX * stroke local coFine : stroke / 2 - (stroke - fine) local spT : StrokeWidthBlend 2.08 2.20 local spB : StrokeWidthBlend 2.18 2.20 @@ -61,25 +60,25 @@ glyph-block Digits-Eight : begin return : union dispiro widths.rhs stroke - g4 (Middle - mc) (top - O) - archv.superness spB g4 (topRight - OX) [YSmoothMidR (top - O) (yMid - coFine) adaTop adbTop] arcvh.superness spT - g4 (Middle + mc) (yMid - coFine) [widths.rhs fine] + arch.rhs.centerAt.rtl.b Middle (yMid - coFine) (sw -- fine) (o -- 0) archv.superness spT g4 (topLeft + OX) [YSmoothMidL (top - O) (yMid - coFine) adaTop adbTop] [widths.rhs stroke] arcvh.superness spB + arch.rhs.centerAt.ltr.t Middle top (sw -- stroke) + archv.superness spB close dispiro widths.rhs stroke - g4 (Middle + mc) O - archv.superness spB g4 (botLeft + OX) [YSmoothMidL (yMid + coFine) O ada adb] arcvh.superness spT - g4 (Middle - mc) (yMid + coFine) [widths.rhs fine] + arch.rhs.centerAt.ltr.t Middle (yMid + coFine) (sw -- fine) (o -- 0) archv.superness spT g4 (botRight - OX) [YSmoothMidR (yMid + coFine) O ada adb] [widths.rhs stroke] arcvh.superness spB + arch.rhs.centerAt.rtl.b Middle 0 (sw -- stroke) + archv.superness spB close @@ -93,42 +92,42 @@ glyph-block Digits-Eight : begin define p 0.96 define l : SB + OX define r : RightSB - OX - define arch : ArchDepth * [mix 1 EightPr 0.5] + define ad : ArchDepth * [mix 1 EightPr 0.5] define gap : (r - l) * 0.25 define [Spine kty] : list - kty (Middle - CorrectionOMidS) (top - O) [widths.lhs stroke] + kty [arch.adjust-x.top Middle] (top - O) [widths.lhs stroke] archv - g4 [mix r l p] (top - [ArchDepthAOf (arch * p) Width]) + g4 [mix r l p] (top - [ArchDepthAOf (ad * p) Width]) alsoThruThem { {0.34 0.45 (2 / 3)} {0.66 0.55 (1 / 3)} } : object blend : function [rt] : widths (stroke * rt) (stroke * (1 - rt)) - g4 r [ArchDepthAOf arch Width] [widths.rhs stroke] + g4 r [ArchDepthAOf ad Width] [widths.rhs stroke] arcvh - kty (Middle + CorrectionOMidS) (O) + kty [arch.adjust-x.bot Middle] (O) define [CoSpineMask xFar] : spiro-outline corner xFar (2 * CAP) - corner (Middle - CorrectionOMidS) (2 * CAP) + corner [arch.adjust-x.top Middle] (2 * CAP) Spine corner - corner (Middle + CorrectionOMidS) (-CAP) + corner [arch.adjust-x.bot Middle] (-CAP) corner xFar (-CAP) return : union difference dispiro - g4.right.mid (Middle - CorrectionOMidS) (top - O) [widths.rhs stroke] - g4.down.mid [mix l r p] (top - [ArchDepthBOf (arch * p) Width]) + g4.right.mid [arch.adjust-x.top Middle] (top - O) [widths.rhs stroke] + g4.down.mid [mix l r p] (top - [ArchDepthBOf (ad * p) Width]) straight.left.end 0 (top * 0.4 - stroke * 0.5) [widths.rhs fine] CoSpineMask (-Width * 4) - MaskBelow arch + MaskBelow ad difference dispiro straight.left.start Width (top * 0.6 + stroke * 0.5) [widths.lhs fine] - g4.down.mid l [ArchDepthBOf arch Width] [widths.lhs stroke] - g4.right.mid (Middle + CorrectionOMidS) (O) + g4.down.mid l [ArchDepthBOf ad Width] [widths.lhs stroke] + g4.right.mid [arch.adjust-x.bot Middle] (O) CoSpineMask (Width * 4) - MaskAbove (top - arch * p) + MaskAbove (top - ad * p) dispiro : Spine g4.left.mid create-glyph 'eight.lnum.crossingAsymmetric' : glyph-proc @@ -151,7 +150,7 @@ glyph-block Digits-Eight : begin alsoThru 0.5 (1 - py) [widths (Stroke * py) (Stroke * (1 - py))] g4 [mix r l p] (CAP - ArchDepthA * p * EightPr) [widths.rhs] arcvh - g4 (Middle - CorrectionOMidS) (CAP - O) + g4 [arch.adjust-x.top Middle] (CAP - O) archv g4 [mix l r p] (CAP - ArchDepthB * p * EightPr) alsoThru 0.5 py [widths (Stroke * py) (Stroke * (1 - py))] @@ -181,15 +180,11 @@ glyph-block Digits-Eight : begin return : dispiro g2 ([Center 1].x + [OffsetC 1].x) ([Center 1].y + [OffsetC 1].y) [widths.center stroke] g4 (xRightTop - [HSwToV soStart]) (top - adb) [widths.lhs fine] - arcvh - g4 (Middle - CorrectionOMidX * stroke - bbOvershoot / 2) (top - O - soStart) - archv + arch.lhs (top - soStart) (sw -- stroke) g4 (xLeftTop + [OffsetLT sign].x) (top - ada + [OffsetLT sign].y) g2 ([Center sign].x + [OffsetC sign].x) ([Center sign].y + [OffsetC sign].y) [widths.center stroke] g4 (xRightBot - [OffsetRB sign].x) (ada + [OffsetRB sign].y) [widths.rhs fine] - arcvh - g4 (Middle + CorrectionOMidX * stroke + bbOvershoot / 2) (O + soEnd) - archv + arch.rhs soEnd (sw -- stroke) g4 (xLeftBot + [HSwToV soEnd]) adb [widths.rhs fine] g2 ([Center (-1)].x + [OffsetC (-1)].x) ([Center (-1)].y + [OffsetC (-1)].y) [widths.center stroke] diff --git a/packages/font-glyphs/src/symbol/arrow.ptl b/packages/font-glyphs/src/symbol/arrow.ptl index 414b3b8e4..2563ff5f7 100644 --- a/packages/font-glyphs/src/symbol/arrow.ptl +++ b/packages/font-glyphs/src/symbol/arrow.ptl @@ -642,7 +642,7 @@ glyph-block Symbol-Arrow : for-width-kinds WideWidth1 include : TriangleArrowHead arrowX gapTop arrowX (gapTop - headLength) headSize define [OpenCircleArrow headFunc fCcw fClosed] : glyph-proc - local arrowX : arrowMidX - CorrectionOMidX * arcSW + local arrowX : arch.adjust-x.top arrowMidX arcSW local arrowXS : arrowX + [if fCcw 0.5 (-0.5)] * headLength local arrowXE : arrowX + [if fCcw (-0.5) 0.5] * headLength local arrowY : t - (0.5 * arcSW) diff --git a/packages/font-glyphs/src/symbol/letter.ptl b/packages/font-glyphs/src/symbol/letter.ptl index 8b7301d6c..556043a3f 100644 --- a/packages/font-glyphs/src/symbol/letter.ptl +++ b/packages/font-glyphs/src/symbol/letter.ptl @@ -338,7 +338,6 @@ glyph-block Symbol-Letter : begin glyph-block Symbol-Cyrl-Thousands : begin glyph-block-import CommonShapes - glyph-block-import Common-Derivatives create-glyph 'cyrlThousandsSign' 0x482 : glyph-proc define fine : AdviceStroke 3 include : ExtLineCenter (-0.1) fine SB Descender RightSB XH @@ -346,6 +345,7 @@ glyph-block Symbol-Cyrl-Thousands : begin include : ExtLineCenter (-0.1) fine [mix SB RightSB (-0.1)] [mix Descender XH 0.5] [mix SB RightSB 0.9] [mix Descender XH 0.2] glyph-block Symbol-Letter-Phonetic : begin + glyph-block-import CommonShapes create-glyph 'modifierArchBreve' 0xAB5B : glyph-proc include : MarkSet.e local archHeight : XH * 0.45 @@ -353,15 +353,11 @@ glyph-block Symbol-Letter-Phonetic : begin include : dispiro widths.rhs g4.up.start (SB + OX) 0 [heading Upward] - arcvh - g4.right.mid (Middle - CorrectionOMidS) archHeight - archv + arch.rhs archHeight g4.down.end (RightSB - OX) 0 [heading Downward] include : dispiro widths.lhs g4.down.start (SB + OX) XH [heading Downward] - arcvh - g4.right.mid (Middle + CorrectionOMidS) (XH - archHeight) - archv + arch.lhs (XH - archHeight) g4.up.end (RightSB - OX) XH [heading Upward] diff --git a/packages/font-glyphs/src/symbol/math/apl.ptl b/packages/font-glyphs/src/symbol/math/apl.ptl index 13988bcbd..4b9cbb323 100644 --- a/packages/font-glyphs/src/symbol/math/apl.ptl +++ b/packages/font-glyphs/src/symbol/math/apl.ptl @@ -87,13 +87,11 @@ glyph-block Symbol-Math-APL : begin local shift : OperTop - 2 * ArchDepth - OperBot local fine : CThin * [AdviceStroke 4] local [InnerCircleMask sw] : spiro-outline - corner (SB + HVContrast * (Stroke - fine)) (OperTop + shift) - curl (SB + HVContrast * (Stroke - fine)) (OperBot + ArchDepthB + shift) - arcvh - g4 (Middle + CorrectionOMidX * OperatorStroke) (OperBot + (OperatorStroke - sw) + shift + O) - archv - flat (RightSB - HVContrast * (Stroke - fine)) (OperBot + ArchDepthA + shift) - corner (RightSB - HVContrast * (Stroke - fine)) (OperTop + shift) + corner (SB + [HSwToV (Stroke - fine)]) (OperTop + shift) + curl (SB + [HSwToV (Stroke - fine)]) (OperBot + ArchDepthB + shift) + arch.lhs (OperBot + (OperatorStroke - sw) + shift) (sw -- OperatorStroke) + flat (RightSB - [HSwToV (Stroke - fine)]) (OperBot + ArchDepthA + shift) + corner (RightSB - [HSwToV (Stroke - fine)]) (OperTop + shift) include : union composite-proc UShape [DivFrame 1] OperTop OperBot (stroke -- OperatorStroke) diff --git a/packages/font-glyphs/src/symbol/math/letter-like.ptl b/packages/font-glyphs/src/symbol/math/letter-like.ptl index 5fb711baa..92d9362bb 100644 --- a/packages/font-glyphs/src/symbol/math/letter-like.ptl +++ b/packages/font-glyphs/src/symbol/math/letter-like.ptl @@ -16,7 +16,7 @@ glyph-block Symbol-Math-Letter-Like : begin turned 'amalg' 0x2A3F 'grek/Pi' Middle (CAP / 2) create-glyph 'emptySet' 0x2205 : glyph-proc - include : OvalShapeT dispiro CAP 0 SB RightSB 1 OperatorStroke + include : OvalShapeT dispiro CAP 0 SB RightSB OperatorStroke include : MarkSet.capital local fine : OperatorStroke / 2 include : dispiro @@ -25,7 +25,7 @@ glyph-block Symbol-Math-Letter-Like : begin curl (RightSB - O - fine) [mix 0 CAP 1.05] create-glyph 'reverseEmptySet' 0x29B0 : glyph-proc - include : OvalShapeT dispiro CAP 0 SB RightSB 1 OperatorStroke + include : OvalShapeT dispiro CAP 0 SB RightSB OperatorStroke include : MarkSet.capital local fine : OperatorStroke / 2 include : dispiro diff --git a/packages/font-glyphs/src/symbol/pictograph/musical.ptl b/packages/font-glyphs/src/symbol/pictograph/musical.ptl index fcb280572..cbd201042 100644 --- a/packages/font-glyphs/src/symbol/pictograph/musical.ptl +++ b/packages/font-glyphs/src/symbol/pictograph/musical.ptl @@ -110,24 +110,23 @@ glyph-block Symbol-Pictograph-Musical : begin local l : fallback _l [mix SB RightSB 0.07] local r : fallback _r [mix RightSB SB 0.07] local sw : fallback _sw fine + + define [archShapeT offset] : list + [if offset g4 corner] l (nsBot - offset) [widths.lhs (sw + offset)] + alsoThru 0.5 curly3 + g4.up.mid (r - O + offset) ([mix nsBot yTerminal curly] + (r - l) * skew - TanSlope * SmoothAdjust) + arcvh + arch.lhs.centerAt.rtl.t [mix l r 0.5] ([mix nsBot yTerminal curly2] + (r - l) * skew / 2 + offset) (sw -- (sw + offset)) + [if offset g4 corner] l (yTerminal + offset) + include : difference union VBar.l l nsBot nsTop sw - dispiro - widths.lhs sw - g4 l (nsBot - 1) - alsoThru 0.5 curly3 - g4.up.mid (r - O + 1) ([mix nsBot yTerminal curly] + (r - l) * skew - TanSlope * SmoothAdjust) [widths.lhs (sw + 1)] - g4.left.mid ([mix l r 0.5] - CorrectionOMidX * sw) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2 + 1) - g4 l (yTerminal + 1) + dispiro [archShapeT 1] difference spiro-outline corner l (nsBot - UPM) - corner l nsBot - alsoThru 0.5 curly3 - g4.up.mid (r - O) ([mix nsBot yTerminal curly] + (r - l) * skew - TanSlope * SmoothAdjust) - g4.left.mid ([mix l r 0.5] - CorrectionOMidX * sw) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2) - corner l yTerminal + archShapeT 0 corner l (yTerminal + 1) corner l nsTop corner Width nsTop @@ -221,7 +220,7 @@ glyph-block Symbol-Pictograph-Musical : begin close create-glyph 'dblFlatTone' 0x1D12B : glyph-proc - local sw : AdviceStroke 5.5 + local sw : AdviceStroke 4 include : union FlatToneShape l (Middle + sw / 3) sw FlatToneShape (Middle - sw / 3) r sw diff --git a/packages/font-glyphs/src/symbol/punctuation/ampersand.ptl b/packages/font-glyphs/src/symbol/punctuation/ampersand.ptl index a9d6b4c07..9ce96806f 100644 --- a/packages/font-glyphs/src/symbol/punctuation/ampersand.ptl +++ b/packages/font-glyphs/src/symbol/punctuation/ampersand.ptl @@ -84,9 +84,7 @@ glyph-block Symbol-Punctuation-Ampersand : begin g4 (SB + OX) [YSmoothMidL (0.66 * yUpperLoopRight + HalfStroke) O ArchDepthA ArchDepthB] alsoThru 0.5 0.5 [widths.center SwAmpersand] g4 xUpperLoopRight yUpperLoopRight [widths.lhs SwAmpersand] - arcvh - g4 (xUpperLoopTop - CorrectionOMidX * SwAmpersand) (CAP - O) - archv + arch.lhs CAP (sw -- SwAmpersand) g4 xUpperLoopLeft yUpperLoopLeft flat [mix xUpperLoopLeft xTerminal pStraightBar] [mix yMockUpperLoopLeftBottom 0 pStraightBar] curl [mix xUpperLoopLeft xTerminal 2] (-yMockUpperLoopLeftBottom) @@ -113,7 +111,7 @@ glyph-block Symbol-Punctuation-Ampersand : begin intersection Rect (CAP * 2) ArchDepthA 0 (RightSB - [HSwToV fineAmp]) with-transform [Translate (-O) 0] : spiro-outline - g4.left.start (xUpperLoopTop - CorrectionOMidX * SwAmpersand) (CAP - O) + arch.lhs.centerAt.rtl.t xUpperLoopTop CAP (sw -- SwAmpersand) archv g4 xUpperLoopLeft yUpperLoopLeft flat [mix xUpperLoopLeft xTerminal pStraightBar] [mix yMockUpperLoopLeftBottom 0 pStraightBar] @@ -124,7 +122,7 @@ glyph-block Symbol-Punctuation-Ampersand : begin dispiro g4.up.start xUpperLoopRight yUpperLoopRight [widths.heading SwAmpersand 0 Upward] arcvh - g4 (xUpperLoopTop - CorrectionOMidX * SwAmpersand) (CAP - O) + arch.lhs.centerAt.rtl.t xUpperLoopTop CAP (sw -- SwAmpersand) archv g4 xUpperLoopLeft yUpperLoopLeft flat [mix xUpperLoopLeft xTerminal pStraightBar] [mix yMockUpperLoopLeftBottom 0 pStraightBar] @@ -142,6 +140,7 @@ glyph-block Symbol-Punctuation-Ampersand : begin widths.rhs fineAmp corner (xLowerOpenBarLeft + TanSlope * fineAmp / 2) y corner (xLowerOpenBarRight + TanSlope * fineAmp / 2) y + create-glyph 'ampersand.lowerOpen' : union LowerOpenCrossbar yLowerOpenEnd dispiro @@ -149,30 +148,30 @@ glyph-block Symbol-Punctuation-Ampersand : begin flat (xLowerOpenRight - O) yLowerOpenEnd [heading Downward] curl (xLowerOpenRight - O) ArchDepthA arcvh - g4 (xLowerOpenBottom + CorrectionOMidX * SwAmpersand) O + arch.rhs.centerAt.rtl.b xLowerOpenBottom 0 (sw -- SwAmpersand) archv g4 (SB + O) ArchDepthB alsoThru 0.5 0.5 [widths.center SwAmpersand] g4 xUpperLoopRight yUpperLoopRight [widths.lhs SwAmpersand] arcvh - g4.left.mid (xUpperLoopTop - CorrectionOMidX * SwAmpersand) (CAP - O) + arch.lhs.centerAt.rtl.t xUpperLoopTop CAP (sw -- SwAmpersand) difference dispiro - g4.left.mid (xUpperLoopTop - CorrectionOMidX * SwAmpersand) (CAP - O) [widths.lhs SwAmpersand] + arch.lhs.centerAt.rtl.t xUpperLoopTop CAP (sw -- SwAmpersand) archv g4 xUpperLoopLeft yUpperLoopLeft flat [mix xUpperLoopLeft xTerminal pStraightBar] [mix yMockUpperLoopLeftBottom 0 pStraightBar] curl xTerminal 0 spiro-outline - g4.left.start (xLowerOpenBottom + CorrectionOMidX * SwAmpersand) O + arch.rhs.centerAt.rtl.b xLowerOpenBottom 0 (sw -- SwAmpersand) archv g4 (SB + OX) [YSmoothMidL (0.66 * yUpperLoopRight + HalfStroke) O ArchDepthA ArchDepthB] alsoThru 0.5 0.5 [widths.center SwAmpersand] g4 xUpperLoopRight yUpperLoopRight arcvh - corner.left.end (xUpperLoopTop - CorrectionOMidX * SwAmpersand) (CAP - O) - corner (xUpperLoopTop - CorrectionOMidX * SwAmpersand) (CAP * 2) + arch.lhs.centerAt.rtl.t (knot-ty -- corner) xUpperLoopTop CAP (sw -- SwAmpersand) + arch.lhs.centerAt.rtl.t (knot-ty -- corner) xUpperLoopTop (CAP * 2) (sw -- SwAmpersand) corner (Width * 2) (CAP * 2) corner (Width * 2) O @@ -205,14 +204,11 @@ glyph-block Symbol-Punctuation-Ampersand : begin g4 (xEtLeft + O * 2) adbEt [widths.lhs] match form [Just FORM-TOOTHLESS-CORNER] : list - arcvh - g4 (xEtBottom + CorrectionOMidS) O + arch.lhs 0 (noBlendPost -- true) g4 xEtRight DToothlessRise [Just FORM-TOOTHLESS-ROUNDED] : list - arcvh - g4 (xEtBottom + CorrectionOMidS) O - archv + arch.lhs 0 flat xEtRight adaEt curl xEtRight yEtRightBarTop [heading Upward] @@ -243,7 +239,6 @@ glyph-block Symbol-Punctuation-Ampersand : begin define yEtFlatTopEnd : Math.max (ArchDepthA + fineAmp) (CAP * 0.4) define yEtFlatTopBarPos : (OverlayPos * CAP + Stroke * 0.625) / CAP - define skFlatTop : shoulderMidSkew fineAmp nothing create-glyph 'ampersand.flatTop' : union LowerOpenCrossbar yEtFlatTopEnd @@ -251,9 +246,7 @@ glyph-block Symbol-Punctuation-Ampersand : begin dispiro widths.lhs g4.down.start (SB + OX) [RevEzhShape.yLoopLeft CAP 0 yEtFlatTopBarPos adaEt adbEt] - arcvh - g4.right.mid (xLowerOpenBottom + CorrectionOMidS) O [widths.heading Stroke 0 {.y (1) .x (skFlatTop)}] - archv + arch.lhs 0 (swAfter -- fineAmp) flat (xLowerOpenRight - OX) adaEt [widths.lhs fineAmp] curl (xLowerOpenRight - OX) yEtFlatTopEnd [heading Upward] diff --git a/packages/font-glyphs/src/symbol/punctuation/at.ptl b/packages/font-glyphs/src/symbol/punctuation/at.ptl index af218eada..b37ee5354 100644 --- a/packages/font-glyphs/src/symbol/punctuation/at.ptl +++ b/packages/font-glyphs/src/symbol/punctuation/at.ptl @@ -31,22 +31,18 @@ glyph-block Symbol-Punctuation-At : begin archv flat m1 (otop - ada) curl m1 (obot + adb) - arcvh - g4 m2 (obot + O) - archv + arch.lhs obot (sw -- sw) flat RightSB (obot + ada) curl RightSB (otop - O) dispiro widths.lhs sw flat RightSB (obot + ada) curl RightSB (top - ArchDepthB) - arcvh - g4 [ArchXAdjust.top Middle sw] (top - O) [widths.lhs Stroke] - archv + arch.lhs top flat SB (top - ArchDepthA) [widths.lhs sw] curl SB (bot + ArchDepthB) arcvh - flat [ArchXAdjust.bot Middle sw] (bot + O) [widths Stroke 0 ] + arch.lhs.centerAt.ltr.b Middle bot (knot-ty -- flat) curl (RightSB - HalfStroke + TanSlope * sw) (bot + O) define [FourFoldShape height fSolidInner] : glyph-proc @@ -81,9 +77,7 @@ glyph-block Symbol-Punctuation-At : begin : else : list flat m2 (obot - O) [heading Upward] curl m2 (otop - adbInner) - arcvh - g4 [ArchXAdjust.top df.middle sw] (otop - O) - archv + arch.lhs otop (sw -- sw) flat m1 (otop - adaInner) curl m1 (obot + adbInner) arcvh @@ -92,22 +86,18 @@ glyph-block Symbol-Punctuation-At : begin archv flat df.rightSB (obot + [Math.max adaInner (sw * 1.5)]) curl df.rightSB (top - adb) - arcvh - g4 [ArchXAdjust.top df.middle sw] (top - O) [widths.lhs swh] - archv + arch.lhs top (sw -- swh) flat df.leftSB (top - ada) [widths.lhs sw] curl df.leftSB (bot + adb) arcvh - flat [ArchXAdjust.bot df.middle sw] (bot + O) [widths swh 0 ] + arch.lhs.centerAt.ltr.b df.middle bot (knot-ty -- flat) curl (df.rightSB - HalfStroke + TanSlope * sw) (bot + O) if fSolidInner spiro-outline corner m2 obot curl m2 (otop - adbInner) - arcvh - g4 [ArchXAdjust.top df.middle sw] otop - archv + arch.lhs otop (sw -- sw) flat m1 (otop - adaInner) curl m1 (obot + adbInner) arcvh @@ -131,14 +121,10 @@ glyph-block Symbol-Punctuation-At : begin include : dispiro straight.up.start (m1 - (sw * (1 - shrink) * HVContrast)) (otop - adb) [widths.heading (sw * shrink) 0 Upward] - arcvh - g4 (m2 - sw * TanSlope) (otop - O) [widths.heading sw 0 Leftward] - archv + arch.lhs otop (sw -- sw) (swBefore -- (sw * shrink)) flat SB (otop - ada) curl SB (obot + adb) - arcvh - g4 (m2 - sw * TanSlope) (obot + O) [heading Rightward] - archv + arch.lhs obot (sw -- sw) (swAfter -- (sw * shrink)) straight.up.end (m1 - (sw * (1 - shrink) * HVContrast)) (obot + ada) [widths.heading (sw * shrink) 0 Upward] include : dispiro @@ -150,9 +136,7 @@ glyph-block Symbol-Punctuation-At : begin include : dispiro widths.lhs (sw * shrink) straight.down.start (m1 - sw * [HSwToV shrink]) (atTurnBot + ada) [heading Downward] - arcvh - g4 [ArchXAdjust.bot [mix (m1 - [HSwToV sw]) RightSB 0.5] sw] (atTurnBot + O) [widths.lhs sw] - archv + arch.lhs atTurnBot (sw -- sw) (swBefore -- (sw * shrink)) flat RightSB (atTurnBot + ada) curl RightSB (top - ArchDepthB) hookend (top - O) (sw -- sw) diff --git a/packages/font-glyphs/src/symbol/punctuation/emotion.ptl b/packages/font-glyphs/src/symbol/punctuation/emotion.ptl index 79e0090a7..832ea78ea 100644 --- a/packages/font-glyphs/src/symbol/punctuation/emotion.ptl +++ b/packages/font-glyphs/src/symbol/punctuation/emotion.ptl @@ -99,7 +99,7 @@ glyph-block Symbol-Punctuation-Emotion : begin include : dispiro widths.rhs flat [mix left right 0.125] top [heading Rightward] - curl (right - depth - CorrectionOMidS) top + curl [arch.adjust-x.top (right - depth)] top archv g4 (right - OX) [YSmoothMidR top (questionYConnect - Stroke) ArchDepthA ArchDepthB] arcvh @@ -112,7 +112,7 @@ glyph-block Symbol-Punctuation-Emotion : begin include : dispiro widths.lhs flat [mix right left 0.125] top [heading Leftward] - curl (left + depth + CorrectionOMidS) top + curl [arch.adjust-x.bot (left + depth)] top archv g4 (left + OX) [YSmoothMidL top (questionYConnect - Stroke) ArchDepthA ArchDepthB] arcvh diff --git a/packages/font-glyphs/src/symbol/punctuation/percentages.ptl b/packages/font-glyphs/src/symbol/punctuation/percentages.ptl index 50ea04951..366c16059 100644 --- a/packages/font-glyphs/src/symbol/punctuation/percentages.ptl +++ b/packages/font-glyphs/src/symbol/punctuation/percentages.ptl @@ -90,7 +90,7 @@ glyph-block Symbol-Punctuation-Percentages : begin local perMilleOffset : Width + l - halfGapRing * 1.5 - m define [ConnnectedBar] : difference - HBar.t ([mix l (m - halfGapRing) 0.5] - CorrectionOMidX * swRing) (r - [HSwToV swBar]) CAP fineBar + HBar.t [arch.adjust-x.top [mix l (m - halfGapRing) 0.5] swRing] (r - [HSwToV swBar]) CAP fineBar OShapeOutline.NoOvershoot CAP (CAP / 2 + halfGapRing) l (m - halfGapRing) swRing ada adb define [PerMilleProc] : glyph-proc diff --git a/packages/font-glyphs/src/symbol/punctuation/section.ptl b/packages/font-glyphs/src/symbol/punctuation/section.ptl index ea0cf3dd0..0847dbaaa 100644 --- a/packages/font-glyphs/src/symbol/punctuation/section.ptl +++ b/packages/font-glyphs/src/symbol/punctuation/section.ptl @@ -23,7 +23,7 @@ glyph-block Symbol-Punctuation-Section : begin alsoThru 0.5 0.5 [widths.center : 2 * HalfStroke] g4 (RightSB - offset) (sBot + ada) [widths.rhs] arcvh - flat (Middle + CorrectionOMidS) (sBot + offset + O) + flat [arch.adjust-x.bot Middle] (sBot + offset + O) [if (sink === dispiro) curl corner] 0 (sBot + offset + O) [heading Leftward] if (sink === dispiro) [list] : list corner 0 [mix bot top 2] diff --git a/packages/util/src/index.mjs b/packages/util/src/index.mjs index a2ab3cd00..9c7985ab5 100644 --- a/packages/util/src/index.mjs +++ b/packages/util/src/index.mjs @@ -25,6 +25,14 @@ export function bez3(a, b, c, d, t) { t * t * t * d ); } +export function boole(b) { + if (b) return 1; + else return 0; +} +export function boolePn(b) { + if (b) return 1; + else return -1; +} ///////////////////////////////////////////////////////////////////////////////////////////////////