diff --git a/font-src/gen/finalize/glyphs.mjs b/font-src/gen/finalize/glyphs.mjs index fa3dcb0f4..20f8fe713 100644 --- a/font-src/gen/finalize/glyphs.mjs +++ b/font-src/gen/finalize/glyphs.mjs @@ -63,22 +63,27 @@ function flattenSimpleGlyph(cache, skew, g) { g.includeContours(CurveUtil.repToShape(cached), 0, 0); cache.refreshGF(ck); } else { - let gSimplified; - if (skew) { - const tfBack = g.gizmo ? g.gizmo.inverse() : new Transform(1, -skew, 0, 1, 0, 0); - const tfForward = g.gizmo ? g.gizmo : new Transform(1, +skew, 0, 1, 0, 0); - gSimplified = new Geom.TransformedGeometry( - new SimplifyGeometry(new Geom.TransformedGeometry(g.geometry, tfBack)), - tfForward - ); - } else { - gSimplified = new SimplifyGeometry(g.geometry); - } + try { + let gSimplified; + if (skew) { + const tfBack = g.gizmo ? g.gizmo.inverse() : new Transform(1, -skew, 0, 1, 0, 0); + const tfForward = g.gizmo ? g.gizmo : new Transform(1, +skew, 0, 1, 0, 0); + gSimplified = new Geom.TransformedGeometry( + new SimplifyGeometry(new Geom.TransformedGeometry(g.geometry, tfBack)), + tfForward + ); + } else { + gSimplified = new SimplifyGeometry(g.geometry); + } - const cs = gSimplified.asContours(); - g.clearGeometry(); - g.includeContours(cs, 0, 0); - if (ck) cache.saveGF(ck, CurveUtil.shapeToRep(cs)); + const cs = gSimplified.asContours(); + g.clearGeometry(); + g.includeContours(cs, 0, 0); + if (ck) cache.saveGF(ck, CurveUtil.shapeToRep(cs)); + } catch (e) { + console.error("Detected broken geometry when processing", g._m_identifier); + throw e; + } } } diff --git a/font-src/glyphs/common/shapes.ptl b/font-src/glyphs/common/shapes.ptl index b1b695740..2662ce20d 100644 --- a/font-src/glyphs/common/shapes.ptl +++ b/font-src/glyphs/common/shapes.ptl @@ -264,208 +264,76 @@ glyph-block CommonShapes : begin flat (middle - mc + gap / 2) (u - O) curl (middle - mc) (u - O) - glyph-block-export OBarLeftShape - define [OBarLeftShape] : params [[top XH] [left SB] [right RightSB] [stroke Stroke] [fine ShoulderFine]] : begin - local skew : shoulderMidSkew fine stroke - local mt : [mix left right 0.5] + (skew - CorrectionOMidX) * stroke - local mb : [mix left right 0.5] + (skew + CorrectionOMidX) * stroke - return : dispiro - flat (left + (stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] - curl (left + (stroke - fine) * HVContrast) (0 + SmallArchDepthB) [widths fine 0] - arcvh - g4 (mb) O [widths.heading stroke 0 {.y (1) .x (-skew)}] - archv - flat (right - OX) (0 + SmallArchDepthA) - curl (right - OX) (top - SmallArchDepthB) - arcvh - g4 (mt) (top - O) [widths.heading stroke 0 {.y (-1) .x (-skew)}] - archv - flat (left + (stroke - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] - curl (left + (stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + glyph-block-export HSerif + define HSerif : namespace + export : define [lt x y length _sw _swRef] : glyph-proc + local sw : fallback _sw Stroke + local swRef : fallback _swRef sw + include : dispiro + flat (x + 0.5 * HVContrast * swRef) y [widths.heading sw 0 Leftward] + curl (x - length - TanSlope * (sw * DesignParameters.serifShiftX)) y - glyph-block-export OBarLeftToothlessShape - define [OBarLeftToothlessShape] : params [[top XH] [left SB] [right RightSB] [rise SHook] [mBlend [Math.sqrt (1 / 2)]] [sw Stroke]] : glyph-proc - local fine ShoulderFine - local skew : shoulderMidSkew fine sw - local mt : [mix left right 0.5] + (skew - CorrectionOMidX) * sw - local mb : [mix left right 0.5] + CorrectionOMidX * sw - include : dispiro - g4 left rise [widths.lhs sw] - alsoThru.g2 0.5 mBlend important - g4.right.mid mb O - archv - flat (right - OX) (0 + SmallArchDepthA) - curl (right - OX) (top - SmallArchDepthB) - arcvh - g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-skew)}] - archv - flat (left + (sw - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] - curl (left + (sw - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + export : define [lb x y length _sw _swRef] : glyph-proc + local sw : fallback _sw Stroke + local swRef : fallback _swRef sw + include : dispiro + flat (x + 0.5 * HVContrast * swRef) y [widths.heading 0 sw Leftward] + curl (x - length + TanSlope * (sw * DesignParameters.serifShiftX)) y - glyph-block-export OBarLeftRoundedShape - define [OBarLeftRoundedShape] : params [[top XH] [left SB] [right RightSB] [yTerminal CAP] [sw Stroke]] : glyph-proc - local fine ShoulderFine - local skew : shoulderMidSkew fine sw - local mt : [mix left right 0.5] + (skew - CorrectionOMidX) * sw - local mb : [mix left right 0.5] + CorrectionOMidX * Stroke - include : dispiro - flat left yTerminal [widths.lhs.heading sw Downward] - curl left SmallArchDepthB - arcvh - g4.right.mid mb O - archv - flat (right - OX) (0 + SmallArchDepthA) - curl (right - OX) (top - SmallArchDepthB) - arcvh - g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-skew)}] - archv - flat (left + (sw - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] - curl (left + (sw - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + export : define [rt x y length _sw _swRef] : glyph-proc + local sw : fallback _sw Stroke + local swRef : fallback _swRef sw + include : dispiro + flat (x - 0.5 * HVContrast * swRef) y [widths.heading 0 sw Rightward] + curl (x + length - TanSlope * (sw * DesignParameters.serifShiftX)) y - glyph-block-export OBarLeftToothlessTopShape - define [OBarLeftToothlessTopShape _top _left _rise _mBlend] : glyph-proc - local top : fallback _top XH - local left : fallback _left SB - local rise : fallback _rise SHook - local mBlend : fallback _mBlend [Math.sqrt (1 / 2)] - local fine ShoulderFine - local skew : shoulderMidSkew fine - local mt : [mix left RightSB 0.5] - CorrectionOMidX * Stroke - local mb : [mix left RightSB 0.5] + (skew + CorrectionOMidX) * Stroke - include : dispiro - flat (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] - curl (left + (Stroke - fine) * HVContrast) (0 + SmallArchDepthB) [widths fine 0] - arcvh - g4 (mb) O [widths.heading Stroke 0 {.y (1) .x (-skew)}] - archv - flat (RightSB - OX) (0 + SmallArchDepthA) - curl (RightSB - OX) (top - SmallArchDepthB) - arcvh - g4 mt (top - O) [widths.lhs Stroke] - alsoThru.g2 0.5 (1 - mBlend) important - g4 left (top - rise) [widths.lhs Stroke] + export : define [rb x y length _sw _swRef] : glyph-proc + local sw : fallback _sw Stroke + local swRef : fallback _swRef sw + include : dispiro + flat (x - 0.5 * HVContrast * swRef) y [widths.heading sw 0 Rightward] + curl (x + length + TanSlope * (sw * DesignParameters.serifShiftX)) y - glyph-block-export OBarLeftRoundedTopShape - define [OBarLeftRoundedTopShape _top _left _yTerminal] : glyph-proc - local top : fallback _top XH - local left : fallback _left SB - local yTerminal : fallback _yTerminal Descender - local fine ShoulderFine - local skew : shoulderMidSkew fine - local mt : [mix left RightSB 0.5] - CorrectionOMidX * Stroke - local mb : [mix left RightSB 0.5] + (skew + CorrectionOMidX) * Stroke - include : dispiro - flat (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] - curl (left + (Stroke - fine) * HVContrast) (0 + SmallArchDepthB) [widths fine 0] - arcvh - g4 (mb) O [widths.heading Stroke 0 {.y (1) .x (-skew)}] - archv - flat (RightSB - OX) (0 + SmallArchDepthA) - curl (RightSB - OX) (top - SmallArchDepthB) - arcvh - g4 mt (top - O) [widths.lhs Stroke] - archv - flat left (top - SmallArchDepthA) - curl left yTerminal [widths.lhs.heading Stroke Downward] + export : define [mt x y length _sw] : mtAsymmetric x y length length _sw - glyph-block-export OBarRightShape - define [OBarRightShape] : params [[top XH] [right RightSB] [stroke Stroke] [fine ShoulderFine]] : new-glyph : glyph-proc - include : OBarLeftShape - top -- [fallback top XH] - left -- (Width - right) - stroke -- stroke - fine -- fine - include : FlipAround Middle (top / 2) + export : define [mtAsymmetric x y l r _sw] : begin + local sw : fallback _sw Stroke + return : dispiro + flat (x + r - TanSlope * (sw * DesignParameters.serifShiftX)) y [widths sw 0] + curl (x - l - TanSlope * (sw * DesignParameters.serifShiftX)) y - glyph-block-export OBarRightToothlessShape - define [OBarRightToothlessShape _top _right _rise _mBlend] : new-glyph : glyph-proc - include : OBarLeftToothlessTopShape _top (Width - [fallback _right RightSB]) _rise _mBlend - include : FlipAround Middle ([fallback _top XH] / 2) + export : define [mb x y length _sw] : mbAsymmetric x y length length _sw + export : define [mbAsymmetric x y l r _sw] : begin + local sw : fallback _sw Stroke + return : dispiro + flat (x + r + TanSlope * (sw * DesignParameters.serifShiftX)) y [widths 0 sw] + curl (x - l + TanSlope * (sw * DesignParameters.serifShiftX)) y - glyph-block-export OBarRightRoundedShape - define [OBarRightRoundedShape _top _right _yTerminal] : new-glyph : glyph-proc - local top : fallback _top XH - local right : fallback right RightSB - local yTerminal : fallback _yTerminal CAP - include : OBarLeftRoundedTopShape top (Width - right) (top - yTerminal) - include : FlipAround Middle (top / 2) + glyph-block-export VSerif + define VSerif : namespace + export : define [dr x y length sw] : glyph-proc + include : dispiro + widths.rhs [fallback sw VJutStroke] + flat x y [heading Downward] + curl x (y - length) [heading Downward] - glyph-block-export LeftwardTopSerif - define [LeftwardTopSerif x y length _sw _swRef] : glyph-proc - local sw : fallback _sw Stroke - local swRef : fallback _swRef sw - include : dispiro - flat (x + 0.5 * HVContrast * swRef) y [widths.heading sw 0 Leftward] - curl (x - length - TanSlope * (sw * DesignParameters.serifShiftX)) y + export : define [ur x y length sw] : glyph-proc + include : dispiro + widths.lhs [fallback sw VJutStroke] + flat x y [heading Upward] + curl x (y + length) [heading Upward] - glyph-block-export LeftwardBottomSerif - define [LeftwardBottomSerif x y length _sw _swRef] : glyph-proc - local sw : fallback _sw Stroke - local swRef : fallback _swRef sw - include : dispiro - flat (x + 0.5 * HVContrast * swRef) y [widths.heading 0 sw Leftward] - curl (x - length + TanSlope * (sw * DesignParameters.serifShiftX)) y + export : define [dl x y length sw] : glyph-proc + include : dispiro + widths.lhs [fallback sw VJutStroke] + flat x y [heading Downward] + curl x (y - length) [heading Downward] - glyph-block-export RightwardTopSerif - define [RightwardTopSerif x y length _sw _swRef] : glyph-proc - local sw : fallback _sw Stroke - local swRef : fallback _swRef sw - include : dispiro - flat (x - 0.5 * HVContrast * swRef) y [widths.heading 0 sw Rightward] - curl (x + length - TanSlope * (sw * DesignParameters.serifShiftX)) y - - glyph-block-export RightwardBottomSerif - define [RightwardBottomSerif x y length _sw _swRef] : glyph-proc - local sw : fallback _sw Stroke - local swRef : fallback _swRef sw - include : dispiro - flat (x - 0.5 * HVContrast * swRef) y [widths.heading sw 0 Rightward] - curl (x + length + TanSlope * (sw * DesignParameters.serifShiftX)) y - - glyph-block-export CenterTopSerif - define [CenterTopSerif x y length _sw] : CenterTopSerifAsymmetric x y length length _sw - - glyph-block-export CenterBottomSerif - define [CenterBottomSerif x y length _sw] : CenterBottomSerifAsymmetric x y length length _sw - - glyph-block-export CenterTopSerifAsymmetric - define [CenterTopSerifAsymmetric x y l r _sw] : begin - local sw : fallback _sw Stroke - return : dispiro - flat (x + r - TanSlope * (sw * DesignParameters.serifShiftX)) y [widths sw 0] - curl (x - l - TanSlope * (sw * DesignParameters.serifShiftX)) y - - glyph-block-export CenterBottomSerifAsymmetric - define [CenterBottomSerifAsymmetric x y l r _sw] : begin - local sw : fallback _sw Stroke - return : dispiro - flat (x + r + TanSlope * (sw * DesignParameters.serifShiftX)) y [widths 0 sw] - curl (x - l + TanSlope * (sw * DesignParameters.serifShiftX)) y - - glyph-block-export DownwardRightSerif - define [DownwardRightSerif x y length sw] : glyph-proc - include : dispiro - widths.rhs [fallback sw VJutStroke] - flat x y [heading Downward] - curl x (y - length) [heading Downward] - glyph-block-export UpwardRightSerif - define [UpwardRightSerif x y length sw] : glyph-proc - include : dispiro - widths.lhs [fallback sw VJutStroke] - flat x y [heading Upward] - curl x (y + length) [heading Upward] - glyph-block-export DownwardLeftSerif - define [DownwardLeftSerif x y length sw] : glyph-proc - include : dispiro - widths.lhs [fallback sw VJutStroke] - flat x y [heading Downward] - curl x (y - length) [heading Downward] - glyph-block-export UpwardLeftSerif - define [UpwardLeftSerif x y length sw] : glyph-proc - include : dispiro - widths.rhs [fallback sw VJutStroke] - flat x y [heading Upward] - curl x (y + length) [heading Upward] + export : define [ul x y length sw] : glyph-proc + include : dispiro + widths.rhs [fallback sw VJutStroke] + flat x y [heading Upward] + curl x (y + length) [heading Upward] glyph-block-export NeedSlab define [NeedSlab level p] : if level p [glyph-proc] diff --git a/font-src/glyphs/letter/cyrillic/big-yus.ptl b/font-src/glyphs/letter/cyrillic/big-yus.ptl index 80741129e..7de18dd61 100644 --- a/font-src/glyphs/letter/cyrillic/big-yus.ptl +++ b/font-src/glyphs/letter/cyrillic/big-yus.ptl @@ -46,10 +46,10 @@ glyph-block Letter-Cyrillic-BigYus : begin begin fine if SLAB : begin - include : tagged 'serifLB' : LeftwardBottomSerif (df.leftSB - 0.5 * fine * HVContrast) 0 (SideJut - 0.5 * fine * HVContrast) - include : tagged 'serifRB' : RightwardBottomSerif (df.rightSB + 0.5 * fine * HVContrast) 0 (SideJut - 0.5 * fine * HVContrast) + include : tagged 'serifLB' : HSerif.lb (df.leftSB - 0.5 * fine * HVContrast) 0 (SideJut - 0.5 * fine * HVContrast) + include : tagged 'serifRB' : HSerif.rb (df.rightSB + 0.5 * fine * HVContrast) 0 (SideJut - 0.5 * fine * HVContrast) define middleSerifFits : df.width > 7 * para.refJut - if middleSerifFits : include : tagged 'serifMB' : CenterBottomSerif df.middle 0 Jut + if middleSerifFits : include : tagged 'serifMB' : HSerif.mb df.middle 0 Jut create-glyph 'cyrl/BigYus' 0x46A : glyph-proc local df : DivFrame para.diversityM 3 @@ -75,10 +75,10 @@ glyph-block Letter-Cyrillic-BigYus : begin include : VBar.l df.leftSB 0 top df.mvs include : HBar.t (df.leftSB - O) [mix df.leftSB df.rightSB (2 / 3)] (top * yp) df.mvs if SLAB : begin - include : tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut df.mvs + include : tagged 'serifLT' : HSerif.lt df.leftSB top SideJut df.mvs if (fCapital || [not para.isItalic]) : begin - include : tagged 'serifLB' : LeftwardBottomSerif df.leftSB 0 SideJut df.mvs - include : tagged 'serifRB' : RightwardBottomSerif (df.rightSB + 0.5 * df.mvs * HVContrast) 0 (SideJut - 0.5 * df.mvs * HVContrast) df.mvs + include : tagged 'serifLB' : HSerif.lb df.leftSB 0 SideJut df.mvs + include : tagged 'serifRB' : HSerif.rb (df.rightSB + 0.5 * df.mvs * HVContrast) 0 (SideJut - 0.5 * df.mvs * HVContrast) df.mvs create-glyph 'cyrl/BigYusIotified' 0x46C : glyph-proc local df : DivFrame para.diversityM 4 diff --git a/font-src/glyphs/letter/cyrillic/dje.ptl b/font-src/glyphs/letter/cyrillic/dje.ptl index 8e09a2fe5..e3c7e8490 100644 --- a/font-src/glyphs/letter/cyrillic/dje.ptl +++ b/font-src/glyphs/letter/cyrillic/dje.ptl @@ -42,6 +42,6 @@ glyph-block Letter-Cyrillic-Dje : begin if SLAB : begin local swVJut : Math.min [AdviceStroke 4.5] (0.625 * (left - xTopBarLeft)) - include : LeftwardBottomSerif left 0 SideJut - include : DownwardLeftSerif xTopBarLeft CAP VJut swVJut - include : DownwardRightSerif xTopBarRight CAP VJut swVJut + include : HSerif.lb left 0 SideJut + include : VSerif.dl xTopBarLeft CAP VJut swVJut + include : VSerif.dr xTopBarRight CAP VJut swVJut diff --git a/font-src/glyphs/letter/cyrillic/el.ptl b/font-src/glyphs/letter/cyrillic/el.ptl index cc7954d29..d7a1828a4 100644 --- a/font-src/glyphs/letter/cyrillic/el.ptl +++ b/font-src/glyphs/letter/cyrillic/el.ptl @@ -32,18 +32,18 @@ glyph-block Letter-Cyrillic-El : begin xb -- xCutLeft include : tagged 'serifLT' : match slabType - [Just SLAB-ALL] : LeftwardTopSerif xCutLeft top SideJut - [Just SLAB-LOWER] : LeftwardTopSerif xCutLeft top SideJut - [Just SLAB-TAILED-U] : LeftwardTopSerif xCutLeft top SideJut - [Just SLAB-TAILED-I] : LeftwardTopSerif xCutLeft top SideJut + [Just SLAB-ALL] : HSerif.lt xCutLeft top SideJut + [Just SLAB-LOWER] : HSerif.lt xCutLeft top SideJut + [Just SLAB-TAILED-U] : HSerif.lt xCutLeft top SideJut + [Just SLAB-TAILED-I] : HSerif.lt xCutLeft top SideJut __ : glyph-proc include : tagged 'SerifRT' : match slabType - [Just SLAB-ALL] : RightwardTopSerif RightSB top SideJut - [Just SLAB-TAILED-U] : RightwardTopSerif RightSB top SideJut + [Just SLAB-ALL] : HSerif.rt RightSB top SideJut + [Just SLAB-TAILED-U] : HSerif.rt RightSB top SideJut __ : glyph-proc include : tagged 'SerifRB' : match slabType - [Just SLAB-ALL] : CenterBottomSerif (RightSB - HalfStroke * HVContrast) 0 Jut - [Just SLAB-LOWER] : RightwardBottomSerif RightSB 0 SideJut + [Just SLAB-ALL] : HSerif.mb (RightSB - HalfStroke * HVContrast) 0 Jut + [Just SLAB-LOWER] : HSerif.rb RightSB 0 SideJut __ : glyph-proc create-glyph 'cyrl/El' 0x41B : glyph-proc diff --git a/font-src/glyphs/letter/cyrillic/lje.ptl b/font-src/glyphs/letter/cyrillic/lje.ptl index 30872b4ea..e22ad26b0 100644 --- a/font-src/glyphs/letter/cyrillic/lje.ptl +++ b/font-src/glyphs/letter/cyrillic/lje.ptl @@ -31,7 +31,7 @@ glyph-block Letter-Cyrillic-Lje : begin jut -- jut include : HBar.t xTopLeft middle top if SLAB : begin - include : LeftwardTopSerif xTopLeft top (jut - df.mvs / 2 * HVContrast) + include : HSerif.lt xTopLeft top (jut - df.mvs / 2 * HVContrast) define YerConfig : object corner { CyrlYeriUprightShape } diff --git a/font-src/glyphs/letter/cyrillic/sha.ptl b/font-src/glyphs/letter/cyrillic/sha.ptl index 530f9cf61..5b8dbd5a9 100644 --- a/font-src/glyphs/letter/cyrillic/sha.ptl +++ b/font-src/glyphs/letter/cyrillic/sha.ptl @@ -17,20 +17,20 @@ glyph-block Letter-Cyrillic-Sha : begin VBar.m df.middle 0 top df.mvs if SLAB : begin - include : tagged 'serifLB' : LeftwardBottomSerif df.leftSB 0 SideJut - include : tagged 'serifRB' : RightwardBottomSerif df.rightSB 0 SideJut + include : tagged 'serifLB' : HSerif.lb df.leftSB 0 SideJut + include : tagged 'serifRB' : HSerif.rb df.rightSB 0 SideJut local jut : Jut * df.mvs / Stroke + O if (df.width > 7 * para.refJut) : begin include : tagged 'serifLT' - CenterTopSerif (df.leftSB + 0.5 * df.mvs * HVContrast) top jut df.mvs + HSerif.mt (df.leftSB + 0.5 * df.mvs * HVContrast) top jut df.mvs include : tagged 'serifMT' - CenterTopSerif df.middle top jut df.mvs + HSerif.mt df.middle top jut df.mvs include : tagged 'serifRT' - CenterTopSerif (df.rightSB - 0.5 * df.mvs * HVContrast) top jut df.mvs + HSerif.mt (df.rightSB - 0.5 * df.mvs * HVContrast) top jut df.mvs : else : begin - include : tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut - include : tagged 'serifRT' : RightwardTopSerif df.rightSB top SideJut + include : tagged 'serifLT' : HSerif.lt df.leftSB top SideJut + include : tagged 'serifRT' : HSerif.rt df.rightSB top SideJut create-glyph 'cyrl/Sha' 0x428 : glyph-proc local df : DivFrame para.diversityM 3 diff --git a/font-src/glyphs/letter/cyrillic/small-yus.ptl b/font-src/glyphs/letter/cyrillic/small-yus.ptl index 20c780ab4..b63033253 100644 --- a/font-src/glyphs/letter/cyrillic/small-yus.ptl +++ b/font-src/glyphs/letter/cyrillic/small-yus.ptl @@ -19,10 +19,10 @@ glyph-block Letter-Cyrillic-SmallYus : begin include : VBar.m df.middle (top / 2) 0 fine if SLAB : begin - include : tagged 'serifLB' : LeftwardBottomSerif df.leftSB 0 SideJut - include : tagged 'serifRB' : RightwardBottomSerif df.rightSB 0 SideJut + include : tagged 'serifLB' : HSerif.lb df.leftSB 0 SideJut + include : tagged 'serifRB' : HSerif.rb df.rightSB 0 SideJut define middleSerifFits : df.width > 7 * para.refJut - if middleSerifFits : include : tagged 'serifMB' : CenterBottomSerif df.middle 0 Jut + if middleSerifFits : include : tagged 'serifMB' : HSerif.mb df.middle 0 Jut create-glyph : glyph-proc local df : DivFrame para.diversityM 3 @@ -54,11 +54,11 @@ glyph-block Letter-Cyrillic-SmallYus : begin include : HBar.t (df.leftSB - O) [mix df.leftSB df.rightSB (2 / 3)] (top / 2) df.mvs if SLAB : begin include : tagged 'serifLT' : if (!fCapital && para.isItalic) - LeftwardTopSerif df.leftSB top SideJut df.mvs - CenterTopSerif (df.leftSB + 0.5 * df.mvs * HVContrast) top Jut df.mvs + HSerif.lt df.leftSB top SideJut df.mvs + HSerif.mt (df.leftSB + 0.5 * df.mvs * HVContrast) top Jut df.mvs if (fCapital || [not para.isItalic]) : begin - include : tagged 'serifLB' : LeftwardBottomSerif df.leftSB 0 SideJut df.mvs - include : tagged 'serifRB' : RightwardBottomSerif df.rightSB 0 SideJut df.mvs + include : tagged 'serifLB' : HSerif.lb df.leftSB 0 SideJut df.mvs + include : tagged 'serifRB' : HSerif.rb df.rightSB 0 SideJut df.mvs create-glyph : glyph-proc local df : DivFrame para.diversityM 4 diff --git a/font-src/glyphs/letter/cyrillic/tse.ptl b/font-src/glyphs/letter/cyrillic/tse.ptl index 8dd5f1720..e9a444328 100644 --- a/font-src/glyphs/letter/cyrillic/tse.ptl +++ b/font-src/glyphs/letter/cyrillic/tse.ptl @@ -43,8 +43,8 @@ glyph-block Letter-Cyrillic-Tse : begin include sf.rb.outer local swVJut : Math.min [AdviceStroke 4.5] (0.625 * (left - xTopBarLeft)) - include : DownwardLeftSerif xTopBarLeft top VJut swVJut - include : DownwardRightSerif xTopBarRight top VJut swVJut + include : VSerif.dl xTopBarLeft top VJut swVJut + include : VSerif.dr xTopBarRight top VJut swVJut create-glyph 'cyrl/Tse' 0x426 : glyph-proc diff --git a/font-src/glyphs/letter/cyrillic/tshe.ptl b/font-src/glyphs/letter/cyrillic/tshe.ptl index 9a11bc0a3..9d4451707 100644 --- a/font-src/glyphs/letter/cyrillic/tshe.ptl +++ b/font-src/glyphs/letter/cyrillic/tshe.ptl @@ -33,7 +33,7 @@ glyph-block Letter-Cyrillic-Tshe : begin if SLAB : begin local swVJut : Math.min [AdviceStroke 4.5] (0.625 * (left - xTopBarLeft)) - include : CenterBottomSerif (left + 0.5 * HVContrast * sw) 0 Jut - include : CenterBottomSerif (right - 0.5 * HVContrast * sw) 0 Jut - include : DownwardLeftSerif xTopBarLeft CAP VJut swVJut - include : DownwardRightSerif xTopBarRight CAP VJut swVJut + include : HSerif.mb (left + 0.5 * HVContrast * sw) 0 Jut + include : HSerif.mb (right - 0.5 * HVContrast * sw) 0 Jut + include : VSerif.dl xTopBarLeft CAP VJut swVJut + include : VSerif.dr xTopBarRight CAP VJut swVJut diff --git a/font-src/glyphs/letter/cyrillic/yat.ptl b/font-src/glyphs/letter/cyrillic/yat.ptl index a206876ec..ac3372589 100644 --- a/font-src/glyphs/letter/cyrillic/yat.ptl +++ b/font-src/glyphs/letter/cyrillic/yat.ptl @@ -33,7 +33,7 @@ glyph-block Letter-Cyrillic-Yat : begin if SLAB : begin eject-contour 'serifYeriLT' - include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut + include : tagged 'serifLT' : HSerif.lt SB Ascender SideJut glyph-block-import Letter-Shared-Shapes : nShoulderKnots @@ -66,5 +66,5 @@ glyph-block Letter-Cyrillic-Yat : begin if SLAB : begin if [not para.isItalic] : include : tagged 'serifLB' - LeftwardBottomSerif df.leftSB 0 SideJut - include : tagged 'serifLT' : LeftwardTopSerif df.leftSB XH SideJut + HSerif.lb df.leftSB 0 SideJut + include : tagged 'serifLT' : HSerif.lt df.leftSB XH SideJut diff --git a/font-src/glyphs/letter/cyrillic/yeri.ptl b/font-src/glyphs/letter/cyrillic/yeri.ptl index af8c1dbf2..9d95c2780 100644 --- a/font-src/glyphs/letter/cyrillic/yeri.ptl +++ b/font-src/glyphs/letter/cyrillic/yeri.ptl @@ -37,8 +37,8 @@ glyph-block Letter-Cyrillic-Yeri : begin VBar.l left 0 top stroke if SLAB : begin - include : tagged 'serifYeriLB' : LeftwardBottomSerif left 0 (jut - stroke / 2 * HVContrast) - include : tagged 'serifYeriLT' : CenterTopSerif (left + stroke / 2 * HVContrast) top jut + include : tagged 'serifYeriLB' : HSerif.lb left 0 (jut - stroke / 2 * HVContrast) + include : tagged 'serifYeriLT' : HSerif.mt (left + stroke / 2 * HVContrast) top jut glyph-block-export CyrlYeriRoundShape define [CyrlYeriRoundShape] : params [top [left SB] [right RightSB] [stroke Stroke] [jut Jut] [pBar DefaultBarPos]] : glyph-proc @@ -63,7 +63,7 @@ glyph-block Letter-Cyrillic-Yeri : begin curl (left + Stroke * 0.2) bowl [heading Leftward] if SLAB : begin - include : tagged 'serifYeriLT' : LeftwardTopSerif left top (jut - stroke / 2 * HVContrast) + include : tagged 'serifYeriLT' : HSerif.lt left top (jut - stroke / 2 * HVContrast) glyph-block-export CyrlYeriCursiveShape define [CyrlYeriCursiveShape] : params [top [left SB] [right RightSB] [stroke Stroke] [jut Jut] [pBar DefaultBarPos]] : glyph-proc @@ -89,7 +89,7 @@ glyph-block Letter-Cyrillic-Yeri : begin g4.down.end (left + (stroke - fine) * HVContrast) yTurnBottomL [widths.lhs.heading fine Downward] if SLAB : begin - include : tagged 'serifYeriLT' : LeftwardTopSerif left top (jut - stroke / 2 * HVContrast) + include : tagged 'serifYeriLT' : HSerif.lt left top (jut - stroke / 2 * HVContrast) define [RevCyrYeriShape] : params [top [left SB] [right RightSB] [stroke Stroke] [jut Jut] [pBar DefaultBarPos]] : glyph-proc local bowl : top * pBar + HalfStroke @@ -108,9 +108,9 @@ glyph-block Letter-Cyrillic-Yeri : begin include : VBar.r right 0 top stroke if SLAB : begin include : tagged 'serifYeriRB' - RightwardBottomSerif right 0 (jut - stroke / 2 * HVContrast) + HSerif.rb right 0 (jut - stroke / 2 * HVContrast) include : tagged 'serifYeriRT' - CenterTopSerif (right - stroke / 2 * HVContrast) top jut + HSerif.mt (right - stroke / 2 * HVContrast) top jut define [CyrYerShape Yeri df top] : glyph-proc local xLeftBarLeftEdge : Math.max (df.rightSB - (RightSB - SB)) : if SLAB @@ -123,7 +123,7 @@ glyph-block Letter-Cyrillic-Yeri : begin stroke -- [AdviceStroke 2.5] include : HBar.t xTopBarLeftEnd (Stroke * 0.1 + xLeftBarLeftEdge) top if SLAB : begin - include : DownwardLeftSerif xTopBarLeftEnd top VJut + include : VSerif.dl xTopBarLeftEnd top VJut Math.min (VJutStroke * df.mvs / Stroke) (0.625 * (xLeftBarLeftEdge - xTopBarLeftEnd)) define [CyrYeryShape Yeri df top fTail] : glyph-proc @@ -140,10 +140,10 @@ glyph-block Letter-Cyrillic-Yeri : begin if SLAB : begin include : tagged 'serifRT' : if (Yeri !== CyrlYeriUprightShape) then : glyph-proc - else : CenterTopSerif (df.rightSB - df.mvs / 2 * HVContrast) top jut + else : HSerif.mt (df.rightSB - df.mvs / 2 * HVContrast) top jut if (!fTail) : include : tagged 'serifRB' : if (Yeri !== CyrlYeriUprightShape) - then : RightwardBottomSerif df.rightSB 0 (jut - 0.5 * df.mvs * HVContrast) - else : CenterBottomSerif (df.rightSB - df.mvs / 2 * HVContrast) 0 jut + then : HSerif.rb df.rightSB 0 (jut - 0.5 * df.mvs * HVContrast) + else : HSerif.mb (df.rightSB - df.mvs / 2 * HVContrast) 0 jut define [ZhuangToneSixShape Yeri top] : glyph-proc include : Yeri top @@ -238,7 +238,7 @@ glyph-block Letter-Cyrillic-Yeri : begin include : CyrlYeriUprightShape CAP include : HBar.m SB [mix SB RightSB 0.9] (CAP - HalfStroke) if SLAB : begin - include : DownwardRightSerif [mix SB RightSB 0.9] CAP VJut + include : VSerif.dr [mix SB RightSB 0.9] CAP VJut alias 'latinBe' 0x182 'cyrl/Be' @@ -247,4 +247,4 @@ glyph-block Letter-Cyrillic-Yeri : begin include : RevCyrYeriShape CAP include : HBar.t [mix RightSB SB 0.9] (RightSB + O) CAP if SLAB : begin - include : DownwardLeftSerif [mix RightSB SB 0.9] CAP VJut + include : VSerif.dl [mix RightSB SB 0.9] CAP VJut diff --git a/font-src/glyphs/letter/cyrillic/yu.ptl b/font-src/glyphs/letter/cyrillic/yu.ptl index 4c6d4e755..2b6d13685 100644 --- a/font-src/glyphs/letter/cyrillic/yu.ptl +++ b/font-src/glyphs/letter/cyrillic/yu.ptl @@ -23,11 +23,11 @@ glyph-block Letter-Cyrillic-Yu : begin if SLAB : begin include : tagged "serifLT" : if (slabType === SLAB-BULGARIAN || useItalicShape) - then : LeftwardTopSerif df.leftSB xtop (jut - df.mvs / 2 * HVContrast) - else : CenterTopSerif (df.leftSB + df.mvs / 2 * HVContrast) xtop jut + then : HSerif.lt df.leftSB xtop (jut - df.mvs / 2 * HVContrast) + else : HSerif.mt (df.leftSB + df.mvs / 2 * HVContrast) xtop jut include : tagged "seriflB" : if useItalicShape glyph-proc - CenterBottomSerif (df.leftSB + df.mvs / 2 * HVContrast) 0 jut + HSerif.mb (df.leftSB + df.mvs / 2 * HVContrast) 0 jut create-glyph 'cyrl/Yu' 0x42E : glyph-proc local df : DivFrame para.diversityM 3 diff --git a/font-src/glyphs/letter/cyrillic/zhe.ptl b/font-src/glyphs/letter/cyrillic/zhe.ptl index a7973c546..37daeb741 100644 --- a/font-src/glyphs/letter/cyrillic/zhe.ptl +++ b/font-src/glyphs/letter/cyrillic/zhe.ptl @@ -18,17 +18,17 @@ glyph-block Letter-Cyrillic-Zhe : begin define [CenterBar fSlab df bot midTop] : glyph-proc include : VBar.m df.middle bot midTop [ZheSw df] if (fSlab && !para.isItalic && (df.width > 7 * para.refJut)) : begin - include : CenterBottomSerif df.middle bot Jut - include : CenterTopSerif df.middle midTop Jut + include : HSerif.mb df.middle bot Jut + include : HSerif.mt df.middle midTop Jut define [LegSerifs fSlab df bot top] : glyph-proc define fine : ZheSw df define fineK 0.1 if fSlab : begin - include : LeftwardTopSerif (df.leftSB + fine * fineK) top SideJut - include : LeftwardBottomSerif (df.leftSB + fine * fineK) bot SideJut - include : RightwardTopSerif (df.rightSB - fine * fineK) top SideJut - include : RightwardBottomSerif (df.rightSB - fine * fineK) bot SideJut + include : HSerif.lt (df.leftSB + fine * fineK) top SideJut + include : HSerif.lb (df.leftSB + fine * fineK) bot SideJut + include : HSerif.rt (df.rightSB - fine * fineK) top SideJut + include : HSerif.rb (df.rightSB - fine * fineK) bot SideJut export : define [StraightLegs fSlab df bot top] : begin define fine : ZheSw df diff --git a/font-src/glyphs/letter/greek/lower-mu.ptl b/font-src/glyphs/letter/greek/lower-mu.ptl index 69ceb1393..977209c43 100644 --- a/font-src/glyphs/letter/greek/lower-mu.ptl +++ b/font-src/glyphs/letter/greek/lower-mu.ptl @@ -24,7 +24,7 @@ glyph-block Letter-Greek-Lower-Mu : begin curl SB (Descender / 2) [heading Upward] straight.up.end SB SmallArchDepthB [widths.heading 0 [AdviceStroke 4] Upward] if SLAB : begin - include : LeftwardTopSerif SB XH SideJut + include : HSerif.lt SB XH SideJut select-variant 'grek/mu' 0x3BC alias 'micro' 0xB5 'grek/mu' diff --git a/font-src/glyphs/letter/greek/lower-rho.ptl b/font-src/glyphs/letter/greek/lower-rho.ptl index b7a63453a..e0740919e 100644 --- a/font-src/glyphs/letter/greek/lower-rho.ptl +++ b/font-src/glyphs/letter/greek/lower-rho.ptl @@ -8,16 +8,16 @@ glyph-module glyph-block Letter-Greek-Lower-Rho : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - glyph-block-import Letter-Shared-Shapes : LetterBarOverlay + glyph-block-import Letter-Shared-Shapes : OBarRight LetterBarOverlay create-glyph 'grek/rho' 0x3C1 : glyph-proc include : MarkSet.p - include : tagged 'bowl' : OBarRightRoundedShape XH RightSB CAP + include : tagged 'bowl' : OBarRight.rounded XH RightSB CAP include : FlipAround Middle (XH / 2) create-glyph 'grek/rhoSymbol' 0x3F1 : glyph-proc include : MarkSet.p - include : tagged 'bowl' : OBarRightRoundedShape XH RightSB XH + include : tagged 'bowl' : OBarRight.rounded XH RightSB XH include : FlipAround Middle (XH / 2) include : dispiro widths.lhs diff --git a/font-src/glyphs/letter/greek/lower-sigma-final.ptl b/font-src/glyphs/letter/greek/lower-sigma-final.ptl index 115a34a22..5453602e3 100644 --- a/font-src/glyphs/letter/greek/lower-sigma-final.ptl +++ b/font-src/glyphs/letter/greek/lower-sigma-final.ptl @@ -56,4 +56,4 @@ glyph-block Letter-Greek-Lower-Sigma-Final : begin g4 [mix Middle RightSB 2] (yAttach + Hook * 2) [heading Upward] Rect (yAttach + Hook * 2 - O) Descender (Middle + HalfStroke * HVContrast) (2 * Width) include : VBar.m Middle 0 (yAttach + HalfStroke) - if SLAB : include : CenterBottomSerif Middle 0 MidJutSide \ No newline at end of file + if SLAB : include : HSerif.mb Middle 0 MidJutSide \ No newline at end of file diff --git a/font-src/glyphs/letter/greek/lower-upsilon.ptl b/font-src/glyphs/letter/greek/lower-upsilon.ptl index 481bf863b..678b90397 100644 --- a/font-src/glyphs/letter/greek/lower-upsilon.ptl +++ b/font-src/glyphs/letter/greek/lower-upsilon.ptl @@ -27,5 +27,5 @@ glyph-block Letter-Greek-Lower-Upsilon : begin create-glyph 'grek/upsilon' 0x3C5 : glyph-proc include : MarkSet.e include : LowerUpsilonShape 0.5 XH SmallArchDepthA SmallArchDepthB - if SLAB : include : LeftwardTopSerif SB XH SideJut + if SLAB : include : HSerif.lt SB XH SideJut diff --git a/font-src/glyphs/letter/greek/psi.ptl b/font-src/glyphs/letter/greek/psi.ptl index eace8702d..61a22a60d 100644 --- a/font-src/glyphs/letter/greek/psi.ptl +++ b/font-src/glyphs/letter/greek/psi.ptl @@ -22,10 +22,10 @@ glyph-block Letter-Greek-Psi : begin include : VBar.m df.middle y2 y4 df.mvs include : VBar.m df.middle y1 (y2 + HalfStroke) - if doSideSerifL : include : tagged 'serifLT' : LeftwardTopSerif df.leftSB y3 SideJut - if doSideSerifR : include : tagged 'serifRT' : RightwardTopSerif df.rightSB y3 SideJut - if doTopSerif : include : tagged 'serifMT' : CenterTopSerif df.middle CAP MidJutSide - if doBotSerif : include : tagged 'serifMB' : CenterBottomSerif df.middle 0 MidJutSide + if doSideSerifL : include : tagged 'serifLT' : HSerif.lt df.leftSB y3 SideJut + if doSideSerifR : include : tagged 'serifRT' : HSerif.rt df.rightSB y3 SideJut + if doTopSerif : include : tagged 'serifMT' : HSerif.mt df.middle CAP MidJutSide + if doBotSerif : include : tagged 'serifMB' : HSerif.mb df.middle 0 MidJutSide create-glyph 'grek/Psi' 0x3A8 : glyph-proc local df : DivFrame para.diversityM 3 diff --git a/font-src/glyphs/letter/greek/qoppa.ptl b/font-src/glyphs/letter/greek/qoppa.ptl index 422cfb0aa..0a5387be0 100644 --- a/font-src/glyphs/letter/greek/qoppa.ptl +++ b/font-src/glyphs/letter/greek/qoppa.ptl @@ -26,8 +26,8 @@ glyph-block Letter-Greek-Qoppa : begin include : HBar.m (x1 + HalfStroke * HVContrast) (x1co - HalfStroke * HVContrast) (CAP / 2) if SLAB : begin define kSerifShift : 0.45 * ((0.3 * (RightSB - SB)) / (CAP / 2 + HalfStroke)) - include : CenterBottomSerif (x2co + kSerifShift * Stroke) 0 Jut - include : CenterTopSerif (x2 - kSerifShift * Stroke) CAP Jut + include : HSerif.mb (x2co + kSerifShift * Stroke) 0 Jut + include : HSerif.mt (x2 - kSerifShift * Stroke) CAP Jut create-glyph 'grek/qoppa' 0x3DF : glyph-proc include : MarkSet.b @@ -61,7 +61,7 @@ glyph-block Letter-Greek-Qoppa-Archaic : begin define yAttach : [if SLAB Stroke 0] + XH * 0.2 include : OShape CAP yAttach SB RightSB Stroke ArchDepthA ArchDepthB include : VBar.m Middle 0 (yAttach + HalfStroke) - if SLAB : include : CenterBottomSerif Middle 0 MidJutSide + if SLAB : include : HSerif.mb Middle 0 MidJutSide create-glyph 'grek/qoppaArchaic' 0x3D9 : glyph-proc include : MarkSet.p diff --git a/font-src/glyphs/letter/greek/sampi.ptl b/font-src/glyphs/letter/greek/sampi.ptl index 4f7c7b2cf..16dc1ce7b 100644 --- a/font-src/glyphs/letter/greek/sampi.ptl +++ b/font-src/glyphs/letter/greek/sampi.ptl @@ -14,7 +14,7 @@ glyph-block Letter-Greek-Arachaic-Sampi : begin include : VBar.r df.rightSB top [mix (top - Stroke) bottom KSampiDepth] df.mvs include : VBar.m df.middle top bottom df.mvs include : HBar.t df.leftSB df.rightSB top - if (fDoSerifs && SLAB) : include : CenterBottomSerif df.middle 0 MidJutSide + if (fDoSerifs && SLAB) : include : HSerif.mb df.middle 0 MidJutSide create-glyph 'grek/SampiArchaic' 0x372 : glyph-proc local df : DivFrame para.diversityM 3 @@ -51,7 +51,7 @@ glyph-block Letter-Greek-Sampi : begin ExtLineCenter 2 fine [mix SB RightSB 0.45] 0 ([mix SB RightSB 0.95] - leftStrokeShift) CAP if SLAB : include : difference - CenterBottomSerif (RightSB - 0.5 * sw * HVContrast) 0 Jut + HSerif.mb (RightSB - 0.5 * sw * HVContrast) 0 Jut LeftSideMask create-glyph 'grek/sampi' 0x3E1 : glyph-proc diff --git a/font-src/glyphs/letter/greek/upper-gamma.ptl b/font-src/glyphs/letter/greek/upper-gamma.ptl index 5ec08b532..170876584 100644 --- a/font-src/glyphs/letter/greek/upper-gamma.ptl +++ b/font-src/glyphs/letter/greek/upper-gamma.ptl @@ -25,14 +25,14 @@ glyph-block Letter-Greek-Upper-Gamma: begin include : HBar.t (GammaBarLeft - O) (RightSB - OX) top match slabType [Just SLAB-ALL] : begin - include : LeftwardTopSerif GammaBarLeft top SideJut - include : LeftwardBottomSerif (GammaBarLeft + HVContrast * HalfStroke) 0 Jut - include : RightwardBottomSerif (GammaBarLeft + HVContrast * HalfStroke) 0 MidJutSide - include : tagged 'serifRT' : DownwardRightSerif (RightSB - OX) top VJut + include : HSerif.lt GammaBarLeft top SideJut + include : HSerif.lb (GammaBarLeft + HVContrast * HalfStroke) 0 Jut + include : HSerif.rb (GammaBarLeft + HVContrast * HalfStroke) 0 MidJutSide + include : tagged 'serifRT' : VSerif.dr (RightSB - OX) top VJut [Just SLAB-LT] : begin - include : LeftwardTopSerif GammaBarLeft top SideJut + include : HSerif.lt GammaBarLeft top SideJut [Just SLAB-TR] : begin - include : tagged 'serifRT' : DownwardRightSerif (RightSB - OX) top VJut + include : tagged 'serifRT' : VSerif.dr (RightSB - OX) top VJut define GammaConfig : object serifless { SLAB-NONE false } @@ -56,7 +56,7 @@ glyph-block Letter-Greek-Upper-Gamma: begin local yBar : CAP * DesignParameters.upperEBarPos include : HBar.m GammaBarLeft (RightSB - [xMidBarShrink slabType]) yBar if slabType : include : tagged 'serifRM' - DownwardRightSerif (RightSB - [xMidBarShrink slabType]) (yBar + HalfStroke) [mix Stroke VJut 0.5] + VSerif.dr (RightSB - [xMidBarShrink slabType]) (yBar + HalfStroke) [mix Stroke VJut 0.5] create-glyph "cyrl/GheDescender.\(suffix)" : glyph-proc include [refer-glyph "grek/Gamma.\(suffix)"] AS_BASE ALSO_METRICS diff --git a/font-src/glyphs/letter/greek/upper-phi.ptl b/font-src/glyphs/letter/greek/upper-phi.ptl index ff99833dd..e00528d72 100644 --- a/font-src/glyphs/letter/greek/upper-phi.ptl +++ b/font-src/glyphs/letter/greek/upper-phi.ptl @@ -25,8 +25,8 @@ glyph-block Letter-Greek-Upper-Phi : begin include : VBar.m df.middle (y2 - HalfStroke) CAP if SLAB : begin - include : tagged 'serifMT' : CenterTopSerif df.middle CAP MidJutSide - include : tagged 'serifMB' : CenterBottomSerif df.middle 0 MidJutSide + include : tagged 'serifMT' : HSerif.mt df.middle CAP MidJutSide + include : tagged 'serifMB' : HSerif.mb df.middle 0 MidJutSide create-glyph 'grek/Phi' 0x3A6 : glyph-proc local df : DivFrame para.diversityM 3 @@ -61,13 +61,13 @@ glyph-block Letter-Greek-Upper-Phi : begin create-glyph 'cyrl/ef.topSerifed' : glyph-proc local df : DivFrame para.diversityM 3 include [refer-glyph 'cyrl/ef.serifless'] AS_BASE ALSO_METRICS - include : tagged 'serifMT' : LeftwardTopSerif df.middle Ascender Jut + include : tagged 'serifMT' : HSerif.lt df.middle Ascender Jut create-glyph 'cyrl/ef.serifed' : glyph-proc local df : DivFrame para.diversityM 3 include [refer-glyph 'cyrl/ef.serifless'] AS_BASE ALSO_METRICS - include : tagged 'serifMT' : LeftwardTopSerif df.middle Ascender Jut - include : tagged 'serifMB' : CenterBottomSerif df.middle Descender Jut + include : tagged 'serifMT' : HSerif.lt df.middle Ascender Jut + include : tagged 'serifMB' : HSerif.mb df.middle Descender Jut create-glyph 'cyrl/ef.cursive' : glyph-proc local df : DivFrame para.diversityM 3 diff --git a/font-src/glyphs/letter/greek/upper-sigma.ptl b/font-src/glyphs/letter/greek/upper-sigma.ptl index c2f4fb785..454a765e8 100644 --- a/font-src/glyphs/letter/greek/upper-sigma.ptl +++ b/font-src/glyphs/letter/greek/upper-sigma.ptl @@ -26,8 +26,8 @@ glyph-block Letter-Greek-Upper-Sigma : begin corner (midx + offsetLeft) [mix bottom top 0.5] if (!noSerif && SLAB) : begin - include : DownwardRightSerif df.rightSB top VJut - include : UpwardRightSerif df.rightSB bottom VJut + include : VSerif.dr df.rightSB top VJut + include : VSerif.ur df.rightSB bottom VJut create-glyph 'grek/Sigma' 0x3A3 : glyph-proc set-width Width diff --git a/font-src/glyphs/letter/greek/upper-xi.ptl b/font-src/glyphs/letter/greek/upper-xi.ptl index c1245d44c..941a8b8ca 100644 --- a/font-src/glyphs/letter/greek/upper-xi.ptl +++ b/font-src/glyphs/letter/greek/upper-xi.ptl @@ -18,9 +18,9 @@ glyph-block Letter-Greek-Upper-Xi : begin include : HBar.t (SB + OX) (RightSB - OX) CAP include : HBar.b (SB + OX) (RightSB - OX) 0 if SLAB : begin - include : DownwardLeftSerif (SB + OX) CAP VJut - include : DownwardRightSerif (RightSB - OX) CAP VJut - include : UpwardLeftSerif (SB + OX) 0 VJut - include : UpwardRightSerif (RightSB - OX) 0 VJut + include : VSerif.dl (SB + OX) CAP VJut + include : VSerif.dr (RightSB - OX) CAP VJut + include : VSerif.ul (SB + OX) 0 VJut + include : VSerif.ur (RightSB - OX) 0 VJut include : VBar.l xMidLeft (yBar - 0.5 * VJut) (yBar + 0.5 * VJut) [AdviceStroke 3.5] include : VBar.r xMidRight (yBar - 0.5 * VJut) (yBar + 0.5 * VJut) [AdviceStroke 3.5] diff --git a/font-src/glyphs/letter/latin-ext/eszet.ptl b/font-src/glyphs/letter/latin-ext/eszet.ptl index 38622f5d8..6216cf6c7 100644 --- a/font-src/glyphs/letter/latin-ext/eszet.ptl +++ b/font-src/glyphs/letter/latin-ext/eszet.ptl @@ -57,7 +57,7 @@ glyph-block Letter-Latin-Lower-Eszet : begin corner tl (tm - Stroke) [heading Upward] corner (RightSB - HalfStroke * 1.2 - OX) t [heading Upward] - if slab : include : LeftwardBottomSerif SB 0 SideJut + if slab : include : HSerif.lb SB 0 SideJut include : match tail [Just DESCENDING] : VBar.l l Descender 0 [Just TAILED] : VerticalHook.l l 0 (-Hook * 1.2) Hook @@ -84,7 +84,7 @@ glyph-block Letter-Latin-Lower-Eszet : begin flat xmiddleBot 0 curl xfinal 0 [heading Leftward] - if slab : include : LeftwardBottomSerif SB 0 SideJut + if slab : include : HSerif.lb SB 0 SideJut include : match tail [Just DESCENDING] : VBar.l SB Descender 0 [Just TAILED] : VerticalHook.l SB 0 (-Hook * 1.2) Hook @@ -127,7 +127,7 @@ glyph-block Letter-Latin-Lower-Eszet : begin flat ([Math.max (sEndX + 1) : Math.min (RightSB - innerSmoothB) [mix sEndX RightSB 0.375]] + CorrectionOMidX * swInner / 2 + TanSlope * swInner ) 0 curl sEndX 0 [heading Leftward] - if slab : include : LeftwardBottomSerif SB 0 SideJut + if slab : include : HSerif.lb SB 0 SideJut include : match tail [Just DESCENDING] : VBar.l SB Descender 0 [Just TAILED] : VerticalHook.l SB 0 (-Hook * 1.2) Hook (sw -- swOuter) @@ -183,5 +183,5 @@ glyph-block Letter-Latin-Upper-Eszet : begin widths.rhs g4 rightTopX (CAP - Stroke) g4 xmiddle (ymiddleCap + Stroke) [widths Stroke 0] - if SLAB : include : LeftwardBottomSerif SB 0 SideJut + if SLAB : include : HSerif.lb SB 0 SideJut diff --git a/font-src/glyphs/letter/latin-ext/ezh.ptl b/font-src/glyphs/letter/latin-ext/ezh.ptl index c101f9828..1712e7097 100644 --- a/font-src/glyphs/letter/latin-ext/ezh.ptl +++ b/font-src/glyphs/letter/latin-ext/ezh.ptl @@ -44,7 +44,7 @@ glyph-block Letter-Latin-Ezh : begin [fallback terminalShape StdTerminalShape] top bot yMidBar if SLAB : begin - include : DownwardLeftSerif SB top VJut + include : VSerif.dl SB top VJut glyph-block-export RevEzhShape define [RevEzhShape] : params [top bot pleft pright hookless [ada SmallArchDepthA] [adb SmallArchDepthB] [diagCoeff 1.2] [pyBar 0.6]] : glyph-proc @@ -74,7 +74,7 @@ glyph-block Letter-Latin-Ezh : begin hookend bot g4 RightSB (bot + Hook * ((top - bot) / CAP)) if SLAB : begin - include : DownwardRightSerif RightSB top VJut + include : VSerif.dr RightSB top VJut set RevEzhShape.yMidBar : lambda [top bot pyBar] : mix bot top pyBar set RevEzhShape.yLoopLeft : lambda [top bot pyBar ada adb] mix [RevEzhShape.yMidBar top bot pyBar] bot (ada / (ada + adb)) @@ -109,7 +109,7 @@ glyph-block Letter-Latin-Ezh : begin create-glyph 'lyogh.hooky' : glyph-proc include [refer-glyph 'lyogh.serifless'] AS_BASE ALSO_METRICS - include : LeftwardTopSerif SB Ascender SideJut + include : HSerif.lt SB Ascender SideJut select-variant 'lyogh' 0x26E @@ -121,7 +121,7 @@ glyph-block Letter-Latin-Ezh : begin create-glyph 'lyoghRTail.hooky' : glyph-proc include [refer-glyph 'lyoghRTail.serifless'] AS_BASE ALSO_METRICS - include : LeftwardTopSerif SB Ascender SideJut + include : HSerif.lt SB Ascender SideJut select-variant 'lyoghRTail' 0x1DF05 (follow -- 'lyogh') diff --git a/font-src/glyphs/letter/latin-ext/f-ligatures.ptl b/font-src/glyphs/letter/latin-ext/f-ligatures.ptl index 67cc69d4f..da10be26c 100644 --- a/font-src/glyphs/letter/latin-ext/f-ligatures.ptl +++ b/font-src/glyphs/letter/latin-ext/f-ligatures.ptl @@ -22,7 +22,7 @@ glyph-block Letter-Latin-F-ligatures : begin include : Translate shift 0 include : VBar.r barr 0 fbar include : HBar.t hbarleft barr fbar - if SLAB : include : tagged 'serifRB' : CenterBottomSerif (barr - HalfStroke * HVContrast) 0 Jut + if SLAB : include : tagged 'serifRB' : HSerif.mb (barr - HalfStroke * HVContrast) 0 Jut create-glyph 'f_i.italic' : glyph-proc include : MarkSet.b @@ -31,7 +31,7 @@ glyph-block Letter-Latin-F-ligatures : begin include : Translate shift 0 include : VBar.r barr 0 fbar include : HBar.t hbarleft barr fbar - if SLAB : include : tagged 'serifRB' : RightwardBottomSerif barr 0 SideJut + if SLAB : include : tagged 'serifRB' : HSerif.rb barr 0 SideJut create-glyph 'f_l.upright' : glyph-proc local m : Middle - JBalance - HalfStroke * HVContrast + shift @@ -47,8 +47,8 @@ glyph-block Letter-Latin-F-ligatures : begin flat ([Math.min (m - Stroke * 0.3) hbarleft] - TanSlope * HalfStroke) fbar curl ([mix SB barr 0.6] - TanSlope * HalfStroke) fbar if SLAB : begin - include : tagged 'serifLB' : CenterBottomSerif (m + HalfStroke * HVContrast + RBalance * 0.35) 0 (Jut + RBalance * 0.65) - include : tagged 'serifRB' : CenterBottomSerif (barr - HalfStroke * HVContrast) 0 Jut + include : tagged 'serifLB' : HSerif.mb (m + HalfStroke * HVContrast + RBalance * 0.35) 0 (Jut + RBalance * 0.65) + include : tagged 'serifRB' : HSerif.mb (barr - HalfStroke * HVContrast) 0 Jut create-glyph 'f_l.italic' : glyph-proc include : new-glyph : glyph-proc @@ -56,4 +56,4 @@ glyph-block Letter-Latin-F-ligatures : begin include : Translate shift 0 include : VBar.r barr 0 Ascender include : HBar.t hbarleft [mix SB barr 0.65] fbar - if SLAB : include : tagged 'serifRB' : RightwardBottomSerif barr 0 SideJut + if SLAB : include : tagged 'serifRB' : HSerif.rb barr 0 SideJut diff --git a/font-src/glyphs/letter/latin-ext/glottal-stop.ptl b/font-src/glyphs/letter/latin-ext/glottal-stop.ptl index 3bc1eea02..880cb7908 100644 --- a/font-src/glyphs/letter/latin-ext/glottal-stop.ptl +++ b/font-src/glyphs/letter/latin-ext/glottal-stop.ptl @@ -22,7 +22,7 @@ glyph-block Letter-Latin-Glottal-Stop : begin flat (Middle + HalfStroke * HVContrast) (XH * 0.3) curl (Middle + HalfStroke * HVContrast) 0 [heading Downward] if SLAB : begin - include : CenterBottomSerif Middle 0 Jut + include : HSerif.mb Middle 0 Jut alias 'capGlottalStop' 0x241 'glottalStop' @@ -37,7 +37,7 @@ glyph-block Letter-Latin-Glottal-Stop : begin flat (Middle - HalfStroke * HVContrast) (XH * 0.3) curl (Middle - HalfStroke * HVContrast) 0 [heading Downward] if SLAB : begin - include : CenterBottomSerif Middle 0 Jut + include : HSerif.mb Middle 0 Jut create-glyph 'smallGlottalStop' 0x242 : glyph-proc include : MarkSet.b @@ -50,7 +50,7 @@ glyph-block Letter-Latin-Glottal-Stop : begin flat (Middle + HalfStroke * HVContrast) (XH * 0.15) curl (Middle + HalfStroke * HVContrast) 0 [heading Downward] if SLAB : begin - include : CenterBottomSerif Middle 0 Jut + include : HSerif.mb Middle 0 Jut create-glyph 'fineGlottalStop' : glyph-proc include : MarkSet.b @@ -64,7 +64,7 @@ glyph-block Letter-Latin-Glottal-Stop : begin flat (Middle + fine / 2 * HVContrast) (XH * 0.3) curl (Middle + fine / 2 * HVContrast) 0 [heading Downward] if SLAB : begin - include : CenterBottomSerif Middle 0 Jut fine + include : HSerif.mb Middle 0 Jut fine create-glyph 'fineRevGlottalStop' : glyph-proc include : MarkSet.b @@ -78,7 +78,7 @@ glyph-block Letter-Latin-Glottal-Stop : begin flat (Middle - fine / 2 * HVContrast) (XH * 0.3) curl (Middle - fine / 2 * HVContrast) 0 [heading Downward] if SLAB : begin - include : CenterBottomSerif Middle 0 Jut fine + include : HSerif.mb Middle 0 Jut fine turned 'invGlottalStop' 0x296 'revGlottalStop' Middle (Ascender / 2) diff --git a/font-src/glyphs/letter/latin-ext/insular-g.ptl b/font-src/glyphs/letter/latin-ext/insular-g.ptl index b3322f6de..bc3ebd400 100644 --- a/font-src/glyphs/letter/latin-ext/insular-g.ptl +++ b/font-src/glyphs/letter/latin-ext/insular-g.ptl @@ -53,7 +53,7 @@ glyph-block Letter-Latin-Insular-G : begin corner (2 * Width) bot corner (2 * Width) top - if SLAB : include : DownwardLeftSerif SB top VJut + if SLAB : include : VSerif.dl SB top VJut create-glyph 'gInsular' 0x1D79 : glyph-proc include : MarkSet.p diff --git a/font-src/glyphs/letter/latin-ext/long-s.ptl b/font-src/glyphs/letter/latin-ext/long-s.ptl index 4284f4b8c..285f3bbc3 100644 --- a/font-src/glyphs/letter/latin-ext/long-s.ptl +++ b/font-src/glyphs/letter/latin-ext/long-s.ptl @@ -53,7 +53,7 @@ glyph-block Letter-Latin-Long-S : begin curl m 0 [heading Downward] set-base-anchor 'overlay' (m + Stroke * 0.65 * HVContrast) (Ascender * OverlayPos) if fSlab : include : tagged 'serifLB' - CenterBottomSerif (m + HalfStroke * HVContrast + RBalance * 0.35) 0 (Jut + RBalance * 0.65) + HSerif.mb (m + HalfStroke * HVContrast + RBalance * 0.35) 0 (Jut + RBalance * 0.65) define [LongSBentHookOverlayBar m] : LetterBarOverlay.m.in x -- (m + HalfStroke * HVContrast) @@ -101,7 +101,7 @@ glyph-block Letter-Latin-Long-S : begin curl m yBot [heading Downward] set-base-anchor 'overlay' (m + Stroke * 0.65 * HVContrast) (Ascender * OverlayPos) if fSlab : begin - include : tagged 'serifLB' : CenterBottomSerif (m + HalfStroke * HVContrast + RBalance * 0.35) yBot (Jut + RBalance * 0.65) + include : tagged 'serifLB' : HSerif.mb (m + HalfStroke * HVContrast + RBalance * 0.35) yBot (Jut + RBalance * 0.65) create-glyph 'longs.flatHook' : glyph-proc @@ -168,8 +168,8 @@ glyph-block Letter-Latin-Long-S : begin include : VBar.m Middle Descender (XH - Hook) include : VerticalHook.m Middle (XH - Hook) (-LongJut + balance) (-Hook + HalfStroke) if SLAB : include : union - LeftwardBottomSerif (Middle - HalfStroke * HVContrast) Descender (SideJut + balance) - RightwardBottomSerif (Middle + HalfStroke * HVContrast) Descender SideJut + HSerif.lb (Middle - HalfStroke * HVContrast) Descender (SideJut + balance) + HSerif.rb (Middle + HalfStroke * HVContrast) Descender SideJut create-glyph 'iviby' 0x285 : glyph-proc include : MarkSet.p diff --git a/font-src/glyphs/letter/latin-ext/lower-ae-oe.ptl b/font-src/glyphs/letter/latin-ext/lower-ae-oe.ptl index 709d37b46..bda16413e 100644 --- a/font-src/glyphs/letter/latin-ext/lower-ae-oe.ptl +++ b/font-src/glyphs/letter/latin-ext/lower-ae-oe.ptl @@ -96,7 +96,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin ada -- adb adb -- adb include : FlipAround (df.width / 2) (XH / 2) - if fSlab : include : LeftwardTopSerif df.leftSB XH SideJut + if fSlab : include : HSerif.lt df.leftSB XH SideJut define AeConfig : object flatCrossbar { aeEPart } @@ -155,7 +155,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin include : oeOPart df include : VBar.m df.middle (XH / 2) Ascender df.mvs if SLAB : begin - include : LeftwardTopSerif (df.middle - df.mvs / 2 * HVContrast) Ascender SideJut + include : HSerif.lt (df.middle - df.mvs / 2 * HVContrast) Ascender SideJut create-glyph 'qp' 0x239 : glyph-proc local df : DivFrame para.diversityM 3 @@ -166,4 +166,4 @@ glyph-block Letter-Latin-Lower-AE-OE : begin include : oeOPart df include : VBar.m df.middle Descender (XH / 2) df.mvs if SLAB : begin - include : CenterBottomSerif df.middle Descender Jut + include : HSerif.mb df.middle Descender Jut diff --git a/font-src/glyphs/letter/latin-ext/rams-horn.ptl b/font-src/glyphs/letter/latin-ext/rams-horn.ptl index e314d23d8..29085c581 100644 --- a/font-src/glyphs/letter/latin-ext/rams-horn.ptl +++ b/font-src/glyphs/letter/latin-ext/rams-horn.ptl @@ -73,8 +73,8 @@ glyph-block Letter-Latin-Rams-Horn : begin else : no-shape if SLAB : begin - include : DownwardLeftSerif SB (top - sw) (VJut * (sw / Stroke) - sw) fine - include : DownwardRightSerif RightSB (top - sw) (VJut * (sw / Stroke) - sw) fine + include : VSerif.dl SB (top - sw) (VJut * (sw / Stroke) - sw) fine + include : VSerif.dr RightSB (top - sw) (VJut * (sw / Stroke) - sw) fine create-glyph 'ramshorn' 0x264 : glyph-proc include : MarkSet.e diff --git a/font-src/glyphs/letter/latin-ext/thorn.ptl b/font-src/glyphs/letter/latin-ext/thorn.ptl index c70fee762..afddb90f6 100644 --- a/font-src/glyphs/letter/latin-ext/thorn.ptl +++ b/font-src/glyphs/letter/latin-ext/thorn.ptl @@ -8,7 +8,7 @@ glyph-module glyph-block Letter-Latin-Thorn : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - glyph-block-import Letter-Shared-Shapes : LetterBarOverlay SerifFrame + glyph-block-import Letter-Shared-Shapes : OBarLeft LetterBarOverlay SerifFrame define xThornLeftStroke : SB * 1.25 define yThornBowlBot : CAP * 0.19 + [if SLAB (Stroke * 0.375) 0] @@ -39,7 +39,7 @@ glyph-block Letter-Latin-Thorn : begin create-glyph 'thorn' 0xFE : glyph-proc include : MarkSet.if - include : OBarLeftShape + include : OBarLeft.shape include : VBar.l SB Descender Ascender if SLAB : begin local sf : SerifFrame Ascender Descender SB RightSB @@ -70,5 +70,5 @@ glyph-block Letter-Latin-Thorn : begin alias 'grek/Sho' 0x3F7 'Thorn' create-glyph 'grek/sho' 0x3F8 : glyph-proc include : MarkSet.if - include : OBarLeftShape + include : OBarLeft.shape include : VBar.l SB Descender Ascender diff --git a/font-src/glyphs/letter/latin-ext/upper-ae-oe.ptl b/font-src/glyphs/letter/latin-ext/upper-ae-oe.ptl index 7f6c84583..4c59c1c30 100644 --- a/font-src/glyphs/letter/latin-ext/upper-ae-oe.ptl +++ b/font-src/glyphs/letter/latin-ext/upper-ae-oe.ptl @@ -76,12 +76,12 @@ glyph-block Letter-Latin-Upper-AE-OE : begin define eleft : df.middle - sw * 0.25 * HVContrast match slabKind ([Just SLAB-A-BASE] || [Just SLAB-A-TRI]) : begin - include : CenterBottomSerif (df.leftSB + sw / 2 * HVContrast) 0 Jut sw + include : HSerif.mb (df.leftSB + sw / 2 * HVContrast) 0 Jut sw match slabKind [Just SLAB-A-TRI] : begin - include : LeftwardTopSerif df.middle top (MidJutSide + Stroke * HVContrast * 0.25) + include : HSerif.lt df.middle top (MidJutSide + Stroke * HVContrast * 0.25) [Just SLAB-A-TOP] : begin - include : LeftwardTopSerif df.middle top [mix MidJutSide LongJut 0.5] + include : HSerif.lt df.middle top [mix MidJutSide LongJut 0.5] define [AEAHalf df top straight slabKind] : glyph-proc define sw : AESW df top @@ -105,8 +105,8 @@ glyph-block Letter-Latin-Upper-AE-OE : begin match slabKind [Just SLAB-E-ALL] : begin local { jutTop jutBot } : EFVJutLength top eBarPos sw - include : DownwardRightSerif df.rightSB top jutTop swVJut - include : UpwardRightSerif df.rightSB 0 jutBot swVJut + include : VSerif.dr df.rightSB top jutTop swVJut + include : VSerif.ur df.rightSB 0 jutBot swVJut define AConfig : object straightSerifless { true SLAB-A-NONE } @@ -192,8 +192,8 @@ glyph-block Letter-Latin-Upper-AE-OE : begin match slabKind [Just SLAB-E-ALL] : begin local { jutTop jutBot } : EFVJutLength top eBarPos sw - include : DownwardRightSerif df.rightSB top jutTop swVJut - include : UpwardRightSerif df.rightSB 0 jutBot swVJut + include : VSerif.dr df.rightSB top jutTop swVJut + include : VSerif.ur df.rightSB 0 jutBot swVJut foreach { suffix { slabKind } } [Object.entries EConfig] : do diff --git a/font-src/glyphs/letter/latin/k.ptl b/font-src/glyphs/letter/latin/k.ptl index 155bf3af2..bc8c5ef03 100644 --- a/font-src/glyphs/letter/latin/k.ptl +++ b/font-src/glyphs/letter/latin/k.ptl @@ -23,10 +23,10 @@ glyph-block Letter-Latin-K : begin local serifLengthAdj : Ok + stroke * HVContrast if [maskBit mode 1] : include : tagged 'serifRT' : difference - RightwardTopSerif (kshRight - serifLengthAdj) top (SideJut + serifLengthAdj) + HSerif.rt (kshRight - serifLengthAdj) top (SideJut + serifLengthAdj) if mask mask [glyph-proc] if [maskBit mode 0] : include : tagged 'serifRB' : difference - RightwardBottomSerif (kshRight - serifLengthAdj) 0 (SideJut + serifLengthAdj) + HSerif.rb (kshRight - serifLengthAdj) 0 (SideJut + serifLengthAdj) if mask mask [glyph-proc] define [KStraightLegShapeImpl fHookTop left right stroke top slabLeft slab] : glyph-proc @@ -273,7 +273,7 @@ glyph-block Letter-Latin-K : begin g4 dim.arcBottomX (dim.arcBottomY - dim.arcStroke - O) g4 dim.arcStartX (dim.arcTerminalY - dim.arcStroke - O) - if (slab && !tailed) : include : RightwardBottomSerif dim.slabStartX 0 SideJut + if (slab && !tailed) : include : HSerif.rb dim.slabStartX 0 SideJut define [KDescender shape top straightBar slabLeft slab] : begin local xPos : RightSB + [KBalanceRight slab straightBar] - [KO slab straightBar top Stroke] @@ -345,13 +345,13 @@ glyph-block Letter-Latin-K : begin symmetricConnectedSerifed2 { [KSymmetricLegsImpl : AdviceStroke 6] 1 1 2 1 } define [UpperKLTSerif top sw slabTop straightBar] : match slabTop - 2 : LeftwardTopSerif (SB + [KBalance slabTop straightBar]) top SideJut - 1 : CenterTopSerif (SB + [KBalance slabTop straightBar] + 0.5 * sw * HVContrast) top Jut + 2 : HSerif.lt (SB + [KBalance slabTop straightBar]) top SideJut + 1 : HSerif.mt (SB + [KBalance slabTop straightBar] + 0.5 * sw * HVContrast) top Jut _ : glyph-proc define [UpperKLBSerif top sw slabTop straightBar] : match slabTop - 2 : LeftwardBottomSerif (SB + [KBalance slabTop straightBar]) 0 SideJut - 1 : CenterBottomSerif (SB + [KBalance slabTop straightBar] + 0.5 * sw * HVContrast) 0 Jut + 2 : HSerif.lb (SB + [KBalance slabTop straightBar]) 0 SideJut + 1 : HSerif.mb (SB + [KBalance slabTop straightBar] + 0.5 * sw * HVContrast) 0 Jut _ : glyph-proc define [CyrlKaVBar top slabTop straightBar] : VBar.m @@ -415,7 +415,7 @@ glyph-block Letter-Latin-K : begin include : MarkSet.e include : VBar.l (SB + [KBalance slabTop straightBar]) 0 XH include : LegsImpl false SB RightSB Stroke XH slabTop false - if slabTop : include : LeftwardTopSerif (SB + [KBalance slabTop straightBar]) XH SideJut + if slabTop : include : HSerif.lt (SB + [KBalance slabTop straightBar]) XH SideJut create-glyph "grek/KaiSymbol.\(suffix)" : glyph-proc include [refer-glyph "K.\(suffix)"] AS_BASE ALSO_METRICS @@ -450,8 +450,8 @@ glyph-block Letter-Latin-K : begin include : HBar.t barLeft (Stroke * 0.1 + left) top include : VBar.l left 0 top sw include : LegsImpl false leftNB RightSB Stroke top slabTop slabLegs - if slabTop : include : DownwardLeftSerif barLeft top VJut (df.mvs / HVContrast) - if slabBot : include : CenterBottomSerif (left + HalfStroke * HVContrast) 0 Jut + if slabTop : include : VSerif.dl barLeft top VJut (df.mvs / HVContrast) + if slabBot : include : HSerif.mb (left + HalfStroke * HVContrast) 0 Jut create-glyph "cyrl/BashkirUpperKa.\(suffix)" : glyph-proc define df : DivFrame 1 @@ -505,9 +505,9 @@ glyph-block Letter-Latin-K : begin include : MarkSet.b include : VBar.l (SB + [KBalance slabTop straightBar]) 0 Ascender include : LegsImpl false SB RightSB Stroke XH slabTop slabLegs - if slabTop : include : LeftwardTopSerif (SB + [KBalance slabTop straightBar]) Ascender SideJut + if slabTop : include : HSerif.lt (SB + [KBalance slabTop straightBar]) Ascender SideJut if slabBot : include : tagged 'serifLB' - CenterBottomSerif (SB + [KBalance slabTop straightBar] + HalfStroke * HVContrast) 0 Jut + HSerif.mb (SB + [KBalance slabTop straightBar] + HalfStroke * HVContrast) 0 Jut create-forked-glyph "kDescender.\(suffix)" : KCyrlNormalDescender XH straightBar slabTop slabLegs create-forked-glyph "kPalatalHook.\(suffix)" : KPalatalHook XH straightBar slabTop slabLegs @@ -523,7 +523,7 @@ glyph-block Letter-Latin-K : begin include : LegsImpl false SB RightSB Stroke XH slabTop slabLegs include : KHookTopBar slabTop straightBar if slabBot : include : tagged 'serifLB' - CenterBottomSerif (SB + [KBalance slabTop straightBar] + HalfStroke * HVContrast) 0 Jut + HSerif.mb (SB + [KBalance slabTop straightBar] + HalfStroke * HVContrast) 0 Jut select-variant 'K' 'K' link-reduced-variant 'K/sansSerif' 'K' MathSansSerif diff --git a/font-src/glyphs/letter/latin/lower-a.ptl b/font-src/glyphs/letter/latin/lower-a.ptl index facc6572b..a1194b580 100644 --- a/font-src/glyphs/letter/latin/lower-a.ptl +++ b/font-src/glyphs/letter/latin/lower-a.ptl @@ -10,6 +10,7 @@ glyph-block Letter-Latin-Lower-A : begin glyph-block-import Common-Derivatives glyph-block-import Mark-Shared-Metrics : markHalfStroke glyph-block-import Letter-Shared : CreateAccentedComposition CreateOgonekComposition + glyph-block-import Letter-Shared-Shapes : OBarLeft OBarRight glyph-block-import Letter-Shared-Shapes : RightwardTailedBar InvRightwardTailedBar glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend RetroflexHook @@ -71,7 +72,7 @@ glyph-block Letter-Latin-Lower-A : begin fallback _sw ADoubleStoreyStroke export : define [Serifless] : union [HookAndBar 0] [Arc 0] - export : define [Serifed] : union [Serifless] [RightwardBottomSerif RightSB 0 SideJut] + export : define [Serifed] : union [Serifless] [HSerif.rb RightSB 0 SideJut] export : define [Tailed] : union HookAndBar (XH - ADoubleStoreySmoothB + O) Arc 0 @@ -114,14 +115,14 @@ glyph-block Letter-Latin-Lower-A : begin define SingleStorey : namespace export : define [FullBarBody height bar mask] : glyph-proc - include : OBarRightShape height + include : OBarRight.shape height include : bar height mask export : define [EarlessCornerBody height bar mask] : glyph-proc - include : OBarLeftToothlessShape (rise -- DToothlessRise) (mBlend -- DMBlend) + include : OBarLeft.toothless (rise -- DToothlessRise) (mBlend -- DMBlend) include : FlipAround Middle (XH / 2) include : bar (height - DToothlessRise) mask export : define [EarlessRoundedBody height bar mask] : glyph-proc - include : OBarLeftRoundedShape (yTerminal -- (XH - SmallArchDepthA)) + include : OBarLeft.rounded (yTerminal -- (XH - SmallArchDepthA)) include : FlipAround Middle (XH / 2) include : bar (height - SmallArchDepthB) mask @@ -132,7 +133,7 @@ glyph-block Letter-Latin-Lower-A : begin mask height export : define [SerifedBar height mask] : glyph-proc include : SeriflessBar height mask - include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut + include : tagged 'serifRB' : HSerif.rb RightSB 0 SideJut export : define [TailedBar height mask] : glyph-proc set-base-anchor 'trailing' (RightSB + SideJut) 0 include : difference @@ -142,7 +143,7 @@ glyph-block Letter-Latin-Lower-A : begin set SeriflessBar.inv SeriflessBar set SerifedBar.inv : function [height mask] : glyph-proc include : SeriflessBar height mask - include : tagged 'serifRT' : RightwardTopSerif RightSB height SideJut + include : tagged 'serifRT' : HSerif.rt RightSB height SideJut set TailedBar.inv : function [height mask] : glyph-proc set-base-anchor 'trailing' (RightSB + SideJut) 0 include : difference diff --git a/font-src/glyphs/letter/latin/lower-b.ptl b/font-src/glyphs/letter/latin/lower-b.ptl index c5aa65a5f..da2d125cd 100644 --- a/font-src/glyphs/letter/latin/lower-b.ptl +++ b/font-src/glyphs/letter/latin/lower-b.ptl @@ -9,29 +9,29 @@ glyph-block Letter-Latin-Lower-B : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateAccentedComposition - glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend HooktopLeftBar + glyph-block-import Letter-Shared-Shapes : OBarLeft DToothlessRise DMBlend HooktopLeftBar glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook define [ToothedBody] : union - OBarLeftShape + OBarLeft.shape VBar.l SB 0 Ascender define [ToothlessCornerBody] : union - OBarLeftToothlessShape (rise -- DToothlessRise) (mBlend -- DMBlend) + OBarLeft.toothless (rise -- DToothlessRise) (mBlend -- DMBlend) VBar.l SB DToothlessRise Ascender - define [ToothlessRoundedBody] : OBarLeftRoundedShape (yTerminal -- Ascender) + define [ToothlessRoundedBody] : OBarLeft.rounded (yTerminal -- Ascender) define [FullSerifs] : glyph-proc if SLAB : begin - include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut - include : tagged 'serifLB' : LeftwardBottomSerif SB 0 SideJut + include : tagged 'serifLT' : HSerif.lt SB Ascender SideJut + include : tagged 'serifLB' : HSerif.lb SB 0 SideJut define [LTSerifs] : glyph-proc if SLAB : begin - include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut + include : tagged 'serifLT' : HSerif.lt SB Ascender SideJut - define [MotionSerifs] : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut + define [MotionSerifs] : tagged 'serifLT' : HSerif.lt SB Ascender SideJut define BConfig : object toothed { ToothedBody FullSerifs SLAB } @@ -75,19 +75,19 @@ glyph-block Letter-Latin-Lower-B : begin create-glyph 'bHookTop.toothed' : glyph-proc include : MarkSet.b - include : OBarLeftShape + include : OBarLeft.shape include : HooktopLeftBar.inner if SLAB : begin - include : tagged 'serifLB' : LeftwardBottomSerif SB 0 SideJut + include : tagged 'serifLB' : HSerif.lb SB 0 SideJut create-glyph 'bHookTop.toothlessCorner' : glyph-proc include : MarkSet.b - include : OBarLeftToothlessShape (rise -- DToothlessRise) (mBlend -- DMBlend) + include : OBarLeft.toothless (rise -- DToothlessRise) (mBlend -- DMBlend) include : HooktopLeftBar.inner (bottom -- DToothlessRise) create-glyph 'bHookTop.toothlessRounded' : glyph-proc include : MarkSet.b - include : OBarLeftRoundedShape (yTerminal -- XH) + include : OBarLeft.rounded (yTerminal -- XH) include : HooktopLeftBar.inner (bottom -- SmallArchDepthB) select-variant 'bHookTop' 0x253 @@ -101,7 +101,7 @@ glyph-block Letter-Latin-Lower-B : begin include [refer-glyph src] AS_BASE include : HBar.t (SB - O) [mix SB RightSB 0.9] Ascender if SLAB : begin - include : DownwardRightSerif [mix SB RightSB 0.9] Ascender VJut + include : VSerif.dr [mix SB RightSB 0.9] Ascender VJut glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft create-glyph 'mathbb/b' 0x1D553 : glyph-proc @@ -110,7 +110,7 @@ glyph-block Letter-Latin-Lower-B : begin include : intersection OShapeOutline.NoOvershoot XH 0 (SB + BBD + BBS * HVContrast) RightSB VBar.r (RightSB - BBD - OX) 0 XH BBS - include : OBarLeftShape + include : OBarLeft.shape left -- SB + BBD top -- XH stroke -- BBS diff --git a/font-src/glyphs/letter/latin/lower-d.ptl b/font-src/glyphs/letter/latin/lower-d.ptl index 24a63c27a..3c21a9a98 100644 --- a/font-src/glyphs/letter/latin/lower-d.ptl +++ b/font-src/glyphs/letter/latin/lower-d.ptl @@ -9,35 +9,35 @@ glyph-block Letter-Latin-Lower-D : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateAccentedComposition - glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend CurlyTail - glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook VerticalHook + glyph-block-import Letter-Shared-Shapes : OBarRight RightwardTailedBar DToothlessRise DMBlend + glyph-block-import Letter-Shared-Shapes : CurlyTail LetterBarOverlay PalatalHook VerticalHook define [ToothedBody] : union - OBarRightShape + OBarRight.shape VBar.r RightSB 0 Ascender define [ToothlessCornerBody] : union - OBarRightToothlessShape XH RightSB DToothlessRise DMBlend + OBarRight.toothless XH RightSB DToothlessRise DMBlend VBar.r RightSB DToothlessRise Ascender define [ToothlessCornerHBBBody] : union - OBarRightToothlessShape XH RightSB DToothlessRise DMBlend + OBarRight.toothless XH RightSB DToothlessRise DMBlend VBar.r RightSB 0 Ascender - define [ToothlessRoundedBody] : OBarRightRoundedShape XH RightSB Ascender + define [ToothlessRoundedBody] : OBarRight.rounded XH RightSB Ascender define [ToothlessRoundedHBBBody] : union - OBarRightRoundedShape XH RightSB Ascender + OBarRight.rounded XH RightSB Ascender VBar.r RightSB 0 Ascender define [TailedBody] : union - OBarRightShape + OBarRight.shape RightwardTailedBar RightSB 0 Ascender define [TopSerif] : tagged 'serifRT' - LeftwardTopSerif (RightSB - Stroke * HVContrast) Ascender SideJut + HSerif.lt (RightSB - Stroke * HVContrast) Ascender SideJut define [BaseSerif] : tagged 'serifRB' - RightwardBottomSerif RightSB 0 SideJut + HSerif.rb RightSB 0 SideJut define DConfig : object toothedSerifless { ToothedBody null null } @@ -72,7 +72,7 @@ glyph-block Letter-Latin-Lower-D : begin include [refer-glyph "d.\(suffix)"] AS_BASE ALSO_METRICS local xLeft : mix RightSB SB 0.9 include : HBar.t xLeft (RightSB + O) CAP - if topSerif : include : DownwardLeftSerif xLeft CAP : Math.min VJut (0.8 * (Ascender - XH)) + if topSerif : include : VSerif.dl xLeft CAP : Math.min VJut (0.8 * (Ascender - XH)) select-variant 'd' 'd' select-variant 'dcroat' 0x111 (follow -- 'd') @@ -100,56 +100,56 @@ glyph-block Letter-Latin-Lower-D : begin local x2 : mix SB m1 0.5 local y2 : 0 - fine - rinner * 1.25 include : MarkSet.e - include : OBarRightShape XH m1 + include : OBarRight.shape XH m1 include : dispiro widths.rhs flat m1 Ascender [heading Downward] curl m1 (rinner * 2 + fine) CurlyTail fine rinner m1 0 (m1 + rinner * 2 + fine) x2 y2 - if fSerif : include : LeftwardTopSerif (m1 - Stroke * HVContrast) Ascender SideJut + if fSerif : include : HSerif.lt (m1 - Stroke * HVContrast) Ascender SideJut select-variant 'dCurlyTail' 0x221 define yDHookTopConnect : Ascender - Hook - HalfStroke create-glyph 'dHookTop.toothedSerifless' : glyph-proc include : MarkSet.b - include : OBarRightShape + include : OBarRight.shape include : VBar.r RightSB 0 yDHookTopConnect include : VerticalHook.r RightSB yDHookTopConnect HookX (-Hook) create-glyph 'dHookTop.toothedBottomSerifed' : glyph-proc include : MarkSet.b - include : OBarRightShape + include : OBarRight.shape include : VBar.r RightSB 0 yDHookTopConnect include : VerticalHook.r RightSB yDHookTopConnect HookX (-Hook) - include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut + include : tagged 'serifRB' : HSerif.rb RightSB 0 SideJut create-glyph 'dHookTop.tailedSerifless' : glyph-proc include : MarkSet.b - include : OBarRightShape + include : OBarRight.shape include : RightwardTailedBar RightSB 0 yDHookTopConnect include : VerticalHook.r RightSB yDHookTopConnect HookX (-Hook) create-glyph 'dHookTop.toothlessCornerSerifless' : glyph-proc include : MarkSet.b - include : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend + include : OBarRight.toothless XH RightSB DToothlessRise DMBlend include : VBar.r RightSB DToothlessRise yDHookTopConnect include : VerticalHook.r RightSB yDHookTopConnect HookX (-Hook) create-glyph 'dHookTop.toothlessCornerSeriflessHBB' : glyph-proc include : MarkSet.b - include : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend + include : OBarRight.toothless XH RightSB DToothlessRise DMBlend include : VBar.r RightSB 0 yDHookTopConnect include : VerticalHook.r RightSB yDHookTopConnect HookX (-Hook) create-glyph 'dHookTop.toothlessRoundedSerifless' : glyph-proc include : MarkSet.b - include : OBarRightRoundedShape XH RightSB yDHookTopConnect + include : OBarRight.rounded XH RightSB yDHookTopConnect include : VerticalHook.r RightSB yDHookTopConnect HookX (-Hook) create-glyph 'dHookTop.toothlessRoundedSeriflessHBB' : glyph-proc include : MarkSet.b - include : OBarRightRoundedShape XH RightSB yDHookTopConnect + include : OBarRight.rounded XH RightSB yDHookTopConnect include : VBar.r RightSB 0 yDHookTopConnect include : VerticalHook.r RightSB yDHookTopConnect HookX (-Hook) @@ -174,7 +174,7 @@ glyph-block Letter-Latin-Lower-D : begin include : intersection OShapeOutline.NoOvershoot XH 0 SB (RightSB - BBD - BBS * HVContrast) VBar.l (SB + BBD + OX) 0 XH BBS - include : OBarRightShape + include : OBarRight.shape right -- RightSB - BBD top -- XH stroke -- BBS diff --git a/font-src/glyphs/letter/latin/lower-f.ptl b/font-src/glyphs/letter/latin/lower-f.ptl index 77dbd88ff..033261730 100644 --- a/font-src/glyphs/letter/latin/lower-f.ptl +++ b/font-src/glyphs/letter/latin/lower-f.ptl @@ -23,7 +23,7 @@ glyph-block Letter-Latin-Lower-F : begin set-base-anchor 'palatalHookPos' r 0 define [NarrowBottomSerif df] : glyph-proc - include : CenterBottomSerif df.middle 0 (LongJut * df.div) + include : HSerif.mb df.middle 0 (LongJut * df.div) set-base-anchor 'palatalHookPos' (df.middle + LongJut * df.div + HalfStroke * TanSlope) 0 define [StdFShapeT sink offset barleft sw] : sink diff --git a/font-src/glyphs/letter/latin/lower-g.ptl b/font-src/glyphs/letter/latin/lower-g.ptl index 7d15b5b06..5c0f5b601 100644 --- a/font-src/glyphs/letter/latin/lower-g.ptl +++ b/font-src/glyphs/letter/latin/lower-g.ptl @@ -8,7 +8,7 @@ glyph-module glyph-block Letter-Latin-Lower-G : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend + glyph-block-import Letter-Shared-Shapes : OBarLeft OBarRight DToothlessRise DMBlend glyph-block-import Letter-Shared-Shapes : FlatHookDepth PalatalHook VerticalHook create-glyph 'g.doubleStorey' : glyph-proc @@ -91,14 +91,14 @@ glyph-block Letter-Latin-Lower-G : begin curl xTerminal Descender [heading Leftward] export : define [SeriflessBody df top] : glyph-proc - include : OBarRightShape (top -- top) (left -- df.leftSB) (right -- df.rightSB) (stroke -- df.mvs) + include : OBarRight.shape (top -- top) (left -- df.leftSB) (right -- df.rightSB) (stroke -- df.mvs) export : define [SerifedBody df top] : glyph-proc include : SeriflessBody df top - include : tagged 'serifRT' : RightwardTopSerif df.rightSB top SideJut + include : tagged 'serifRT' : HSerif.rt df.rightSB top SideJut export : define [EarlessCornerBody df top] : glyph-proc - include : OBarLeftToothlessShape + include : OBarLeft.toothless top -- top left -- df.leftSB right -- df.rightSB @@ -108,7 +108,7 @@ glyph-block Letter-Latin-Lower-G : begin include : FlipAround df.middle (top / 2) export : define [EarlessRoundedBody df top] : glyph-proc - include : OBarLeftRoundedShape + include : OBarLeft.rounded top -- top left -- df.leftSB right -- df.rightSB @@ -183,7 +183,7 @@ glyph-block Letter-Latin-Lower-G : begin include : intersection OShapeOutline.NoOvershoot XH 0 SB (RightSB - BBD - BBS * HVContrast) VBar.l (SB + BBD + OX) 0 XH BBS - include : OBarRightShape + include : OBarRight.shape right -- RightSB - BBD top -- XH stroke -- BBS diff --git a/font-src/glyphs/letter/latin/lower-h.ptl b/font-src/glyphs/letter/latin/lower-h.ptl index 966978ead..32f57f9a8 100644 --- a/font-src/glyphs/letter/latin/lower-h.ptl +++ b/font-src/glyphs/letter/latin/lower-h.ptl @@ -12,20 +12,20 @@ glyph-block Letter-Latin-Lower-H : begin glyph-block-import Letter-Shared-Shapes : CyrDescender HooktopLeftBar VerticalHook PalatalHook define [SmallHSerifs tailed hookTop] : glyph-proc : if SLAB : begin - if [not hookTop] : include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut + if [not hookTop] : include : tagged 'serifLT' : HSerif.lt SB Ascender SideJut if [not tailed] if (para.isItalic) - : then : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut - : else : include : tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) 0 Jut + : then : include : tagged 'serifRB' : HSerif.rb RightSB 0 SideJut + : else : include : tagged 'serifRB' : HSerif.mb (RightSB - HalfStroke * HVContrast) 0 Jut if (!para.isItalic) : begin - include : tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut + include : tagged 'serifLB' : HSerif.mb (SB + HalfStroke * HVContrast) 0 Jut define [SmallHMotionSerifs tailed hookTop] : glyph-proc - if [not hookTop] : include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut - if [not tailed] : include : tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut + if [not hookTop] : include : tagged 'serifLT' : HSerif.lt SB Ascender SideJut + if [not tailed] : include : tagged 'serifRB' : HSerif.rb RightSB 0 SideJut define [SmallHTopLeftSerifs tailed hookTop] : glyph-proc - if [not hookTop] : include : tagged 'serifLT' : LeftwardTopSerif SB Ascender SideJut + if [not hookTop] : include : tagged 'serifLT' : HSerif.lt SB Ascender SideJut define [HBar.mOverlay fHasTopSerif] : glyph-proc local barSpaceTop : Ascender - [if fHasTopSerif Stroke 0] @@ -121,8 +121,8 @@ glyph-block Letter-Latin-Lower-H : begin include : FlipAround Middle (XH / 2) include : MarkSet.p if SLAB : begin - include : LeftwardTopSerif (RightSB - Stroke * HVContrast) XH SideJut - include : CenterBottomSerif (RightSB - HalfStroke * HVContrast) Descender Jut + include : HSerif.lt (RightSB - Stroke * HVContrast) XH SideJut + include : HSerif.mb (RightSB - HalfStroke * HVContrast) Descender Jut create-glyph 'hookturnhrtail' 0x2AF : glyph-proc include : nShoulder @@ -135,7 +135,7 @@ glyph-block Letter-Latin-Lower-H : begin include : VerticalHook.r RightSB 0 HookX Hook include : MarkSet.p if SLAB : begin - include : LeftwardTopSerif (RightSB - Stroke * HVContrast) XH SideJut + include : HSerif.lt (RightSB - Stroke * HVContrast) XH SideJut derive-glyphs 'hCedilla' 0x1E29 'h' : lambda [src gr] : glyph-proc include [refer-glyph 'cedillaBelow'] diff --git a/font-src/glyphs/letter/latin/lower-il.ptl b/font-src/glyphs/letter/latin/lower-il.ptl index ac4bd2c36..df9f5c1f9 100644 --- a/font-src/glyphs/letter/latin/lower-il.ptl +++ b/font-src/glyphs/letter/latin/lower-il.ptl @@ -59,13 +59,13 @@ glyph-block Letter-Latin-Lower-I : begin export : define [HookyBottom df top xMiddle] : glyph-proc include : OverrideILMarks df xMiddle top include : VBar.m xMiddle 0 top df.mvs - include : tagged 'serifRB' : RightwardBottomSerif xMiddle 0 (LongJut * df.div) Stroke df.mvs + include : tagged 'serifRB' : HSerif.rb xMiddle 0 (LongJut * df.div) Stroke df.mvs set-base-anchor 'trailing' (xMiddle + LongJut * df.div) 0 export : define [Serifed df top xMiddle] : glyph-proc include : VBar.m xMiddle 0 top df.mvs include : tagged 'serifB' - CenterBottomSerif df.middle 0 (LongJut * df.div) + HSerif.mb df.middle 0 (LongJut * df.div) set-base-anchor 'trailing' (df.middle + LongJut * df.div) 0 define [ItalicDotlessIShape df top xMiddle] : glyph-proc @@ -147,9 +147,9 @@ glyph-block Letter-Latin-Lower-I : begin curl [Math.max df.rightSB (xMiddle + [Math.max HookX (LongJut * 1.05 * df.div)])] (0.5 * df.mvs) [heading Rightward] define Serifs : namespace - export : define [Hooky df top xMiddle] : LeftwardTopSerif xMiddle top (LongJut * df.div) Stroke df.mvs - export : define [Serifed df top xMiddle] : LeftwardTopSerif xMiddle top ((LongJut * df.div) - (xMiddle - df.middle)) Stroke df.mvs - export : define [SerifedShort df top xMiddle] : LeftwardTopSerif xMiddle top [mix Jut ((LongJut * df.div) - (xMiddle - df.middle)) 0.5] Stroke df.mvs + export : define [Hooky df top xMiddle] : HSerif.lt xMiddle top (LongJut * df.div) Stroke df.mvs + export : define [Serifed df top xMiddle] : HSerif.lt xMiddle top ((LongJut * df.div) - (xMiddle - df.middle)) Stroke df.mvs + export : define [SerifedShort df top xMiddle] : HSerif.lt xMiddle top [mix Jut ((LongJut * df.div) - (xMiddle - df.middle)) 0.5] Stroke df.mvs define [calcPhoneticHookPos g] : begin local attach : if g.baseAnchors.trailing @@ -333,7 +333,7 @@ glyph-block Letter-Latin-Lower-I : begin local m1 : df.middle + HalfStroke * HVContrast local x2 : mix SB m1 0.25 local y2 : - fine - if fSerif : include : LeftwardTopSerif df.middle Ascender LongJut + if fSerif : include : HSerif.lt df.middle Ascender LongJut include : dispiro widths.rhs flat m1 Ascender [heading Downward] diff --git a/font-src/glyphs/letter/latin/lower-j.ptl b/font-src/glyphs/letter/latin/lower-j.ptl index 945ee29c4..a5eeda784 100644 --- a/font-src/glyphs/letter/latin/lower-j.ptl +++ b/font-src/glyphs/letter/latin/lower-j.ptl @@ -21,7 +21,7 @@ glyph-block Letter-Latin-Lower-J : begin bar - hd.x - [Math.max (Stroke / 3) (df.width / 6)] crossLeft - OX * 2 - if serif : include : LeftwardTopSerif barCenter top (LongJut * df.div) + if serif : include : HSerif.lt barCenter top (LongJut * df.div) include : dispiro widths.lhs flat terminal Descender @@ -76,7 +76,7 @@ glyph-block Letter-Latin-Lower-J : begin set-base-anchor "trailing" (xMiddle - HalfStroke * HVContrast) Descender define Serifs : namespace - export : define [Long df top xMiddle] : LeftwardTopSerif xMiddle top (LongJut * df.div) + export : define [Long df top xMiddle] : HSerif.lt xMiddle top (LongJut * df.div) define Marks : namespace export : define [FullHook df top xMiddle fSerifed] : glyph-proc @@ -144,7 +144,7 @@ glyph-block Letter-Latin-Lower-J : begin create-glyph 'dotlessjCurlyTail.serifed' : glyph-proc include [refer-glyph 'dotlessjCurlyTail.serifless'] AS_BASE ALSO_METRICS - include : LeftwardTopSerif (Middle + JBalance) XH LongJut + include : HSerif.lt (Middle + JBalance) XH LongJut select-variant 'dotlessjCurlyTail' CreateAccentedComposition 'jCurlyTail' 0x29D 'dotlessjCurlyTail' 'dotAbove' diff --git a/font-src/glyphs/letter/latin/lower-m.ptl b/font-src/glyphs/letter/latin/lower-m.ptl index 8c2ccd56e..8ef0f655f 100644 --- a/font-src/glyphs/letter/latin/lower-m.ptl +++ b/font-src/glyphs/letter/latin/lower-m.ptl @@ -63,38 +63,38 @@ glyph-block Letter-Latin-Lower-M : begin define [SmallMTopLeftSerif df top lbot] : glyph-proc if (df.width > para.refJut * 7) : begin include : tagged 'serifLT' : intersection - CenterTopSerif (df.leftSB + 0.5 * df.mvs * HVContrast) top Jut df.mvs + HSerif.mt (df.leftSB + 0.5 * df.mvs * HVContrast) top Jut df.mvs Rect top lbot 0 (df.leftSB - O) : else : begin - include : tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut df.mvs + include : tagged 'serifLT' : HSerif.lt df.leftSB top SideJut df.mvs define [SmallMBottomLeftSerif df top lbot] : glyph-proc if (df.width > para.refJut * 7) : begin include : tagged 'serifLB' : begin - CenterBottomSerif (df.leftSB + 0.5 * df.mvs * HVContrast) lbot Jut df.mvs + HSerif.mb (df.leftSB + 0.5 * df.mvs * HVContrast) lbot Jut df.mvs : else : begin include : tagged 'serifLB' : begin - LeftwardBottomSerif df.leftSB lbot SideJut df.mvs + HSerif.lb df.leftSB lbot SideJut df.mvs define [SmallMBottomMiddleSerif df top mbot] : glyph-proc if (df.width > para.refJut * 7) : begin include : tagged 'serifMB' : begin - CenterBottomSerif df.middle mbot Jut df.mvs + HSerif.mb df.middle mbot Jut df.mvs define [SmallMBottomRightSerif df top rbot] : glyph-proc if (df.width > para.refJut * 7) : begin if para.isItalic : begin include : tagged 'serifRB' : intersection - CenterBottomSerif (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs + HSerif.mb (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs Rect top rbot (df.rightSB + O) df.width : else : begin include : tagged 'serifRB' : begin - CenterBottomSerif (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs + HSerif.mb (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs : else : begin - include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs + include : tagged 'serifRB' : HSerif.rb df.rightSB rbot SideJut df.mvs define [SmallMBottomMotionRightSerif df top rbot] : glyph-proc - include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs + include : tagged 'serifRB' : HSerif.rb df.rightSB rbot SideJut df.mvs define [AutoSerifs df top lbot mbot rbot tailed earless] : glyph-proc if SLAB : begin @@ -246,10 +246,10 @@ glyph-block Letter-Latin-Lower-M : begin include : VBar.r df.rightSB Descender XH df.mvs if (SLAB && Serifs === AutoSerifs) : begin include : union - LeftwardBottomSerif (df.rightSB - HalfStroke * HVContrast) Descender MidJutSide - RightwardBottomSerif (df.rightSB - HalfStroke * HVContrast) Descender Jut + HSerif.lb (df.rightSB - HalfStroke * HVContrast) Descender MidJutSide + HSerif.rb (df.rightSB - HalfStroke * HVContrast) Descender Jut if (Serifs === LtRbSerifs || Serifs === LtSerifs) : begin - include : RightwardBottomSerif df.rightSB Descender SideJut + include : HSerif.rb df.rightSB Descender SideJut create-glyph "turnmSideways.\(suffix)" : glyph-proc local realHeight : XH * para.diversityM diff --git a/font-src/glyphs/letter/latin/lower-n.ptl b/font-src/glyphs/letter/latin/lower-n.ptl index bd5668d11..59d545159 100644 --- a/font-src/glyphs/letter/latin/lower-n.ptl +++ b/font-src/glyphs/letter/latin/lower-n.ptl @@ -18,20 +18,20 @@ glyph-block Letter-Latin-Lower-N : begin define trAnchor currentGlyph.baseAnchors.trailing if trAnchor : set-base-anchor 'trailing' (trAnchor.x + SideJut) trAnchor.y - define [NTopLeftSerif top] : tagged 'serifLT' : LeftwardTopSerif SB top SideJut + define [NTopLeftSerif top] : tagged 'serifLT' : HSerif.lt SB top SideJut define [NHTB top] : VBar.l SB 0 top - define [NTopLeftSerifAuto top] : NeedSlab SLAB : LeftwardTopSerif SB top SideJut + define [NTopLeftSerifAuto top] : NeedSlab SLAB : HSerif.lt SB top SideJut define [NBottomLeftSerifAuto y] : NeedSlab SLAB : NeedNotItalic - tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) y Jut + tagged 'serifLB' : HSerif.mb (SB + HalfStroke * HVContrast) y Jut define [NBottomRightSerifAuto y] : NeedSlab SLAB : if (para.isItalic) then : NBottomRightSerifItalic y else : NBottomRightSerifUpright y define [NBottomRightSerifUpright y] : glyph-proc - include : tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) y Jut + include : tagged 'serifRB' : HSerif.mb (RightSB - HalfStroke * HVContrast) y Jut include : AdjustTrailingAnchor define [NBottomRightSerifItalic y] : glyph-proc - include : tagged 'serifRB' : RightwardBottomSerif RightSB y SideJut + include : tagged 'serifRB' : HSerif.rb RightSB y SideJut include : AdjustTrailingAnchor define [EaredBody top left right yBR sw] : glyph-proc @@ -185,7 +185,7 @@ glyph-block Letter-Latin-Lower-N : begin bottom -- Descender include : VBar.l SB 0 XH if SLAB : begin - include : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut + include : tagged 'serifLT' : HSerif.lt SB XH SideJut glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft diff --git a/font-src/glyphs/letter/latin/lower-p.ptl b/font-src/glyphs/letter/latin/lower-p.ptl index f68df8bf6..7537c5abe 100644 --- a/font-src/glyphs/letter/latin/lower-p.ptl +++ b/font-src/glyphs/letter/latin/lower-p.ptl @@ -9,24 +9,22 @@ glyph-block Letter-Latin-Lower-P : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateAccentedComposition - glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend HooktopLeftBar PalatalHook - glyph-block-import Letter-Shared-Shapes : SerifFrame + glyph-block-import Letter-Shared-Shapes : OBarLeft DToothlessRise DMBlend + glyph-block-import Letter-Shared-Shapes : HooktopLeftBar PalatalHook SerifFrame define [SmallPSerifLT] : return [SerifFrame XH Descender SB RightSB].lt.outer define [SmallPSerifLB] : return [SerifFrame XH Descender SB RightSB].lb.fullSide define [EaredBody] : glyph-proc - include : tagged 'bowl' : OBarLeftShape + include : tagged 'bowl' : OBarLeft.shape include : tagged 'stemLeft' : VBar.l SB Descender XH define [EarlessCornerBody] : glyph-proc - include : tagged 'bowl' : OBarRightToothlessShape XH RightSB DToothlessRise DMBlend - include : FlipAround Middle (XH / 2) + include : tagged 'bowl' : OBarLeft.toothlessTop XH SB DToothlessRise DMBlend include : tagged 'stemLeft' : VBar.l SB Descender (XH - DToothlessRise) define [EarlessRoundedBody] : glyph-proc - include : tagged 'bowl' : OBarRightRoundedShape XH RightSB CAP - include : FlipAround Middle (XH / 2) + include : tagged 'bowl' : OBarLeft.roundedTop XH SB CAP define [FullSerifs] : glyph-proc : if SLAB : begin include : SmallPSerifLT @@ -88,7 +86,7 @@ glyph-block Letter-Latin-Lower-P : begin include : intersection OShapeOutline.NoOvershoot XH 0 (SB + BBD + BBS * HVContrast) RightSB VBar.r (RightSB - BBD - OX) 0 XH BBS - include : OBarLeftShape + include : OBarLeft.shape left -- SB + BBD top -- XH stroke -- BBS diff --git a/font-src/glyphs/letter/latin/lower-q.ptl b/font-src/glyphs/letter/latin/lower-q.ptl index 21ab10f87..161256281 100644 --- a/font-src/glyphs/letter/latin/lower-q.ptl +++ b/font-src/glyphs/letter/latin/lower-q.ptl @@ -9,8 +9,8 @@ glyph-block Letter-Latin-Lower-Q : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Mark-Shared-Metrics : markHalfStroke - glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend - glyph-block-import Letter-Shared-Shapes : DiagonalTailR DiagonalTailStdDepth VerticalHook + glyph-block-import Letter-Shared-Shapes : OBarLeft OBarRight RightwardTailedBar DToothlessRise + glyph-block-import Letter-Shared-Shapes : DMBlend DiagonalTailR DiagonalTailStdDepth VerticalHook define TERMINAL-NORMAL 0 define TERMINAL-TAILED 1 @@ -24,7 +24,7 @@ glyph-block Letter-Latin-Lower-Q : begin define [EaredBody terminal top bottom] : glyph-proc set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender - include : OBarRightShape top + include : OBarRight.shape top include : match terminal [Just TERMINAL-NORMAL] : VBar.r RightSB bottom top [Just TERMINAL-TAILED] : RightwardTailedBar RightSB bottom top @@ -32,7 +32,7 @@ glyph-block Letter-Latin-Lower-Q : begin define [EarlessCornerBody terminal top bottom] : glyph-proc set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender - include : OBarLeftToothlessShape (top -- top) (rise -- DToothlessRise) (mBlend -- DMBlend) + include : OBarLeft.toothless (top -- top) (rise -- DToothlessRise) (mBlend -- DMBlend) include : FlipAround Middle (top / 2) include : match terminal [Just TERMINAL-NORMAL] : VBar.r RightSB bottom (top - DToothlessRise) @@ -41,18 +41,18 @@ glyph-block Letter-Latin-Lower-Q : begin define [EarlessRoundedBody terminal top bottom] : glyph-proc set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender - include : OBarLeftRoundedShape (top -- top) (yTerminal -- (SmallArchDepthB - O)) + include : OBarLeft.rounded (top -- top) (yTerminal -- (SmallArchDepthB - O)) include : FlipAround Middle (top / 2) include : match terminal [Just TERMINAL-NORMAL] : VBar.r RightSB bottom (top - SmallArchDepthB) [Just TERMINAL-TAILED] : RightwardTailedBar RightSB bottom (top - SmallArchDepthB) [Just TERMINAL-DIAG] : RDiagTailedBar RightSB bottom (top - SmallArchDepthB) - define [RtSerif y] : tagged 'serifRT' : RightwardTopSerif RightSB y SideJut + define [RtSerif y] : tagged 'serifRT' : HSerif.rt RightSB y SideJut define [RtSerifAuto y] : NeedSlab SLAB : RtSerif y define [RbSerif y] : tagged 'serifRB' : union - LeftwardBottomSerif (RightSB - HalfStroke * HVContrast) y MidJutSide - RightwardBottomSerif (RightSB - HalfStroke * HVContrast) y Jut + HSerif.lb (RightSB - HalfStroke * HVContrast) y MidJutSide + HSerif.rb (RightSB - HalfStroke * HVContrast) y Jut define [RbSerifAuto y] : NeedSlab SLAB : RbSerif y define QConfig : object @@ -108,7 +108,7 @@ glyph-block Letter-Latin-Lower-Q : begin include : intersection OShapeOutline.NoOvershoot XH 0 SB (RightSB - BBD - BBS * HVContrast) VBar.l (SB + BBD + OX) 0 XH BBS - include : OBarRightShape + include : OBarRight.shape right -- RightSB - BBD top -- XH stroke -- BBS diff --git a/font-src/glyphs/letter/latin/lower-r.ptl b/font-src/glyphs/letter/latin/lower-r.ptl index b9623f8c9..2b6773a2d 100644 --- a/font-src/glyphs/letter/latin/lower-r.ptl +++ b/font-src/glyphs/letter/latin/lower-r.ptl @@ -43,14 +43,14 @@ glyph-block Letter-Latin-Lower-R : begin local rSerifRightJut : rSerifLeftJut * 1.20 local [rBottomSerif y] : glyph-proc include : tagged 'serifLB' : union - LeftwardBottomSerif rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast) - RightwardBottomSerif rSerifX y (rSerifRightJut + (strokeBar / 2) * HVContrast) + HSerif.lb rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast) + HSerif.rb rSerifX y (rSerifRightJut + (strokeBar / 2) * HVContrast) local xAtt : rSerifX + rSerifRightJut + (strokeBar / 2) * HVContrast set-base-anchor 'palatalHookAttach' xAtt 0 set-base-anchor 'palatalHookPos' xAtt 0 local [rTopSerif y] : tagged 'serifLT' - LeftwardTopSerif rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast) + HSerif.lt rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast) local fine ShoulderFine local rHookX : df.rightSB + RBalance2 * rBalanceMultiplier - (OX - O) local xArchMiddle : match mode @@ -116,7 +116,7 @@ glyph-block Letter-Latin-Lower-R : begin include : dispiro [widths.lhs arcTopWidth] [ArcKnots] include : VBar.r xBar 0 XH if doHookSerif : include : intersection - DownwardRightSerif (rHookXN - xCor) XH VJut + VSerif.dr (rHookXN - xCor) XH VJut spiro-outline ArcKnots corner (xBar - fine * HVContrast) 0 diff --git a/font-src/glyphs/letter/latin/lower-y.ptl b/font-src/glyphs/letter/latin/lower-y.ptl index 89b04812d..c3574adcc 100644 --- a/font-src/glyphs/letter/latin/lower-y.ptl +++ b/font-src/glyphs/letter/latin/lower-y.ptl @@ -134,9 +134,9 @@ glyph-block Letter-Latin-Lower-Y : begin if bottomShape : return nothing if (useStraightBottom) : begin local xBaseKnot : mix yrstroker joinX ((top - bottom) / (top - joinY)) - include : LeftwardBottomSerif (xBaseKnot - HalfStroke * HVContrast) bottom yBottomJut + include : HSerif.lb (xBaseKnot - HalfStroke * HVContrast) bottom yBottomJut : else : begin - include : LeftwardBottomSerif (yrstrokel - HalfStroke * HVContrast) bottom yBottomJut + include : HSerif.lb (yrstrokel - HalfStroke * HVContrast) bottom yBottomJut define [yJoinProportion hooktop x] : linreg 1 - px2 @@ -200,7 +200,7 @@ glyph-block Letter-Latin-Lower-Y : begin if doSlabTop : include : let [sf : SerifFrame top bottom SB RightSB] composite-proc sf.lt.full sf.rt.full if doSlabBottom : include : yBaseSerif top bottom - if doSlabMotion : include : LeftwardTopSerif SB top SideJut + if doSlabMotion : include : HSerif.lt SB top SideJut export : define [SmallYHookTopShape top bottom] : glyph-proc local {ds ds2} : CalcDS top bottom @@ -230,7 +230,7 @@ glyph-block Letter-Latin-Lower-Y : begin if doSlabTop : include : let [sf : SerifFrame top bottom SB RightSB] sf.lt.full if doSlabBottom : include : yBaseSerif top bottom - if doSlabMotion : include : LeftwardTopSerif SB top SideJut + if doSlabMotion : include : HSerif.lt SB top SideJut export : define [SmallLambdaShape top bottom] : union : glyph-proc set currentGlyph.gizmo : Italify (-para.slopeAngle) @@ -330,7 +330,7 @@ glyph-block Letter-Latin-Lower-Y : begin export : define [Serifs top slabType] : begin local { doSlabTop doSlabBottom doSlabMotion } slabKind return : if (doSlabTop || doSlabMotion) - LeftwardTopSerif SB top SideJut + HSerif.lt SB top SideJut no-shape define CursiveConfig : object diff --git a/font-src/glyphs/letter/latin/u.ptl b/font-src/glyphs/letter/latin/u.ptl index 000a2b0a1..0cebc0add 100644 --- a/font-src/glyphs/letter/latin/u.ptl +++ b/font-src/glyphs/letter/latin/u.ptl @@ -85,13 +85,13 @@ glyph-block Letter-Latin-U : begin include : FlipAround df.middle (top / 2) define [UTopLeftSerif df yTop] : tagged 'serifLT' - LeftwardTopSerif df.leftSB yTop SideJut + HSerif.lt df.leftSB yTop SideJut define [UTopRightSerif df yTop] : tagged 'serifRT' - LeftwardTopSerif (df.rightSB - Stroke * HVContrast) yTop SideJut + HSerif.lt (df.rightSB - Stroke * HVContrast) yTop SideJut define [UBottomRightSerif df yTop] : glyph-proc - include : tagged 'serifRB' : RightwardBottomSerif df.rightSB 0 SideJut + include : tagged 'serifRB' : HSerif.rb df.rightSB 0 SideJut define trAnchor currentGlyph.baseAnchors.trailing if trAnchor : begin set-base-anchor 'trailing' (trAnchor.x + SideJut) trAnchor.y @@ -110,8 +110,8 @@ glyph-block Letter-Latin-U : begin if [not para.isItalic] : include : UTopRightSerif df top define [CapitalUMotionToothlessSlabs df top] : glyph-proc - include : LeftwardTopSerif df.leftSB top SideJut - include : RightwardTopSerif df.rightSB top SideJut + include : HSerif.lt df.leftSB top SideJut + include : HSerif.rt df.rightSB top SideJut define [SmallUToothlessSlabs df top] : glyph-proc : if SLAB : begin include : UTopLeftSerif df top @@ -271,7 +271,7 @@ glyph-block Letter-Latin-U : begin flat (RightSB + O) SmallArchDepthA corner (RightSB + O) XH if SLAB : begin - include : LeftwardTopSerif SB XH SideJut + include : HSerif.lt SB XH SideJut glyph-block-import Letter-Blackboard : BBS BBD BBBarRight create-glyph 'mathbb/U' 0x1D54C : glyph-proc diff --git a/font-src/glyphs/letter/latin/upper-a.ptl b/font-src/glyphs/letter/latin/upper-a.ptl index 48899d56f..63ecacbb3 100644 --- a/font-src/glyphs/letter/latin/upper-a.ptl +++ b/font-src/glyphs/letter/latin/upper-a.ptl @@ -40,9 +40,9 @@ glyph-block Letter-Latin-Upper-A : begin if fBaseSlabs : include : composite-proc sf.lb.full sf.rb.full match kind [Just SLAB-TRI] : begin - include : LeftwardTopSerif df.middle top (MidJutSide + Stroke * HVContrast * 0.25) + include : HSerif.lt df.middle top (MidJutSide + Stroke * HVContrast * 0.25) [Just SLAB-TOP] : begin - include : LeftwardTopSerif df.middle top [mix MidJutSide LongJut 0.5] + include : HSerif.lt df.middle top [mix MidJutSide LongJut 0.5] foreach { suffix { fStraightBar slabKind fBaseSlabs } } [Object.entries AConfig] : do define [AShapeImpl mak top fGrek] : glyph-proc diff --git a/font-src/glyphs/letter/latin/upper-d.ptl b/font-src/glyphs/letter/latin/upper-d.ptl index ffcea8f0d..514156aac 100644 --- a/font-src/glyphs/letter/latin/upper-d.ptl +++ b/font-src/glyphs/letter/latin/upper-d.ptl @@ -43,8 +43,8 @@ glyph-block Letter-Latin-Upper-D : begin define [DShape df top right fRound slabTop slabBot] : glyph-proc include : VBar.l df.leftSB 0 top df.mvs include : DArcShapeT dispiro df top right 0 df.mvs fRound - if slabTop : include : tagged 'serifLT' : LeftwardTopSerif df.leftSB top SideJut - if slabBot : include : tagged 'serifLB' : LeftwardBottomSerif df.leftSB 0 SideJut + if slabTop : include : tagged 'serifLT' : HSerif.lt df.leftSB top SideJut + if slabBot : include : tagged 'serifLB' : HSerif.lb df.leftSB 0 SideJut define DConfig : object standardSerifless { false false false } diff --git a/font-src/glyphs/letter/latin/upper-e.ptl b/font-src/glyphs/letter/latin/upper-e.ptl index dd108dadd..5275a6307 100644 --- a/font-src/glyphs/letter/latin/upper-e.ptl +++ b/font-src/glyphs/letter/latin/upper-e.ptl @@ -20,12 +20,12 @@ glyph-block Letter-Latin-Upper-E : begin include : HBar.t (xEBarLeft - O) RightSB top stroke include : HBar.m (xEBarLeft - O) (RightSB - [xMidBarShrink serifV]) [yMidBar top pyBar] stroke include : HBar.b (xEBarLeft - O) RightSB 0 stroke - if serifLT : include : LeftwardTopSerif xEBarLeft top SideJut - if serifLB : include : LeftwardBottomSerif xEBarLeft 0 SideJut + if serifLT : include : HSerif.lt xEBarLeft top SideJut + if serifLB : include : HSerif.lb xEBarLeft 0 SideJut if serifV : begin local { jutTop jutBot } : EFVJutLength top pyBar stroke - include : DownwardRightSerif RightSB top jutTop - include : UpwardRightSerif RightSB 0 jutBot + include : VSerif.dr RightSB top jutTop + include : VSerif.ur RightSB 0 jutBot glyph-block-export RevEShape define [RevEShape] : params [top pyBar serifRT serifRB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc @@ -33,12 +33,12 @@ glyph-block Letter-Latin-Upper-E : begin include : HBar.t SB (xRevEBarRight + O) top stroke include : HBar.m (SB + [xMidBarShrink serifV]) (xRevEBarRight + O) [yMidBar top pyBar] stroke include : HBar.b SB (xRevEBarRight + O) 0 stroke - if serifRT : include : RightwardTopSerif xRevEBarRight top SideJut - if serifRB : include : RightwardBottomSerif xRevEBarRight 0 SideJut + if serifRT : include : HSerif.rt xRevEBarRight top SideJut + if serifRB : include : HSerif.rb xRevEBarRight 0 SideJut if serifV : begin local { jutTop jutBot } : EFVJutLength top pyBar stroke - include : DownwardLeftSerif SB top jutTop - include : UpwardLeftSerif SB 0 jutBot + include : VSerif.dl SB top jutTop + include : VSerif.ul SB 0 jutBot define EConfig : object serifless { false false false } diff --git a/font-src/glyphs/letter/latin/upper-f.ptl b/font-src/glyphs/letter/latin/upper-f.ptl index 60e1f93e6..b87332cb3 100644 --- a/font-src/glyphs/letter/latin/upper-f.ptl +++ b/font-src/glyphs/letter/latin/upper-f.ptl @@ -31,25 +31,25 @@ glyph-block Letter-Latin-Upper-F : begin include : HBar.t (xFBarLeft - O) RightSB top stroke include : tagged 'crossBar' HBar.m (xFBarLeft - O) (RightSB - [xMidBarShrink serifV]) [yMidBar top pyBar] stroke - if serifLT : include : LeftwardTopSerif xFBarLeft top SideJut + if serifLT : include : HSerif.lt xFBarLeft top SideJut if serifLB : begin - include : tagged 'serifBottom' : LeftwardBottomSerif xFBarLeft 0 SideJut - include : tagged 'serifBottom' : RightwardBottomSerif (xFBarLeft + HalfStroke * HVContrast) 0 MidJutSide + include : tagged 'serifBottom' : HSerif.lb xFBarLeft 0 SideJut + include : tagged 'serifBottom' : HSerif.rb (xFBarLeft + HalfStroke * HVContrast) 0 MidJutSide if serifV : begin local { jutTop jutBot } : EFVJutLength top pyBar stroke - include : DownwardRightSerif RightSB top jutTop + include : VSerif.dr RightSB top jutTop define [RevFShape] : params [top pyBar serifRT serifRB serifV [stroke : AdviceStroke2 2 3 top]] : glyph-proc include : VBar.r (xFBarRight) 0 top stroke include : HBar.t SB (xFBarRight + O) top stroke include : HBar.m (SB + [xMidBarShrink serifV]) (xFBarRight + O) [yMidBar top pyBar] stroke - if serifRT : include : RightwardTopSerif xFBarRight top SideJut + if serifRT : include : HSerif.rt xFBarRight top SideJut if serifRB : begin - include : tagged 'serifBottom' : RightwardBottomSerif xFBarRight 0 SideJut - include : tagged 'serifBottom' : LeftwardBottomSerif (xFBarRight - HalfStroke * HVContrast) 0 MidJutSide + include : tagged 'serifBottom' : HSerif.rb xFBarRight 0 SideJut + include : tagged 'serifBottom' : HSerif.lb (xFBarRight - HalfStroke * HVContrast) 0 MidJutSide if serifV : begin local { jutTop jutBot } : EFVJutLength top pyBar stroke - include : DownwardLeftSerif SB top jutTop + include : VSerif.dl SB top jutTop define FConfig : object diff --git a/font-src/glyphs/letter/latin/upper-h.ptl b/font-src/glyphs/letter/latin/upper-h.ptl index 018e36afa..a0ad69be7 100644 --- a/font-src/glyphs/letter/latin/upper-h.ptl +++ b/font-src/glyphs/letter/latin/upper-h.ptl @@ -61,7 +61,7 @@ glyph-block Letter-Latin-Upper-H : begin include : HBar.t (xRightBar + O) xTopRight top include : HSerifs slabType top 0 df.leftSB xRightBar sw - if vSlab : include : DownwardRightSerif xTopRight top VJut (df.mvs / HVContrast) + if vSlab : include : VSerif.dr xTopRight top VJut (df.mvs / HVContrast) define [HwairShape df top slabType] : glyph-proc include : VBar.l df.leftSB 0 CAP df.mvs diff --git a/font-src/glyphs/letter/latin/upper-i.ptl b/font-src/glyphs/letter/latin/upper-i.ptl index 3a043eb79..aea5ae205 100644 --- a/font-src/glyphs/letter/latin/upper-i.ptl +++ b/font-src/glyphs/letter/latin/upper-i.ptl @@ -15,8 +15,8 @@ glyph-block Letter-Latin-Upper-I : begin define [ISerifShape df top jut] : glyph-proc include : VBar.m df.middle 0 top - include : CenterBottomSerif df.middle 0 (jut * df.div) - include : CenterTopSerif df.middle top (jut * df.div) + include : HSerif.mb df.middle 0 (jut * df.div) + include : HSerif.mt df.middle top (jut * df.div) set-base-anchor 'trailing' (df.middle + jut * df.div) 0 define UpperIConfig : object diff --git a/font-src/glyphs/letter/latin/upper-j.ptl b/font-src/glyphs/letter/latin/upper-j.ptl index 4c27bcf3e..294f4e4d3 100644 --- a/font-src/glyphs/letter/latin/upper-j.ptl +++ b/font-src/glyphs/letter/latin/upper-j.ptl @@ -104,9 +104,9 @@ glyph-block Letter-Latin-Upper-J : begin barCenter -- (df.middle + JBalance * df.div) serif -- true - define [JLeftwardSerif df x top] : LeftwardTopSerif x top LongJut - define [JBothSidesSerif df x top] : union [LeftwardTopSerif x top LongJut] [RightwardTopSerif x top Jut] - define [JSymmetricSerif df x top] : CenterTopSerif (x + O) top (Jut + JBalance2) + define [JLeftwardSerif df x top] : HSerif.lt x top LongJut + define [JBothSidesSerif df x top] : union [HSerif.lt x top LongJut] [HSerif.rt x top Jut] + define [JSymmetricSerif df x top] : HSerif.mt (x + O) top (Jut + JBalance2) define JConfig : object serifless { JFullHookBase [DivFrame 1] [DivFrame 1] null } diff --git a/font-src/glyphs/letter/latin/upper-l.ptl b/font-src/glyphs/letter/latin/upper-l.ptl index f08e8f727..ee6900d76 100644 --- a/font-src/glyphs/letter/latin/upper-l.ptl +++ b/font-src/glyphs/letter/latin/upper-l.ptl @@ -18,10 +18,10 @@ glyph-block Letter-Latin-Upper-L : begin include : VBar.l LBarLeftX 0 top swv include : HBar.b (LBarLeftX - O) (RightSB - OX) 0 if (sgr > 1) : begin - include : LeftwardBottomSerif (LBarLeftX + 0.5 * HVContrast * swv) 0 Jut - include : LeftwardTopSerif (LBarLeftX + 0.5 * HVContrast * swv) top Jut - include : RightwardTopSerif (LBarLeftX + 0.5 * HVContrast * swv) top MidJutSide - if (sgr > 0) : include : UpwardRightSerif (RightSB - OX) 0 VJut + include : HSerif.lb (LBarLeftX + 0.5 * HVContrast * swv) 0 Jut + include : HSerif.lt (LBarLeftX + 0.5 * HVContrast * swv) top Jut + include : HSerif.rt (LBarLeftX + 0.5 * HVContrast * swv) top MidJutSide + if (sgr > 0) : include : VSerif.ur (RightSB - OX) 0 VJut define LConfig : object serifless { 0 } diff --git a/font-src/glyphs/letter/latin/upper-p.ptl b/font-src/glyphs/letter/latin/upper-p.ptl index 668f5f8f9..db0a3fd5d 100644 --- a/font-src/glyphs/letter/latin/upper-p.ptl +++ b/font-src/glyphs/letter/latin/upper-p.ptl @@ -95,15 +95,15 @@ glyph-block Letter-Latin-Upper-P : begin set PShape.SwBelowBar 0.25 set PShape.SlabMotion : function [top sw mul] : glyph-proc - include : tagged 'serifLT' : LeftwardTopSerif (SB * mul) top SideJut sw + include : tagged 'serifLT' : HSerif.lt (SB * mul) top SideJut sw set PShape.SlabSymmetric : function [top sw mul] : glyph-proc include : PShape.SlabMotion top sw mul - include : tagged 'serifLB' : CenterBottomSerif (SB * mul + 0.5 * sw * HVContrast) 0 Jut sw + include : tagged 'serifLB' : HSerif.mb (SB * mul + 0.5 * sw * HVContrast) 0 Jut sw set PShape.SlabAsymmetric : function [top sw mul] : glyph-proc include : PShape.SlabMotion top sw mul include : tagged 'serifLB' : union - LeftwardBottomSerif (SB * mul) 0 SideJut sw - RightwardBottomSerif (SB * mul + 0.5 * sw * HVContrast) 0 MidJutSide sw + HSerif.lb (SB * mul) 0 SideJut sw + HSerif.rb (SB * mul + 0.5 * sw * HVContrast) 0 MidJutSide sw set PShape.OpenGap : function [] : params [top [mul PShape.defaultMul] [bp PShape.BarPos] [sw Stroke]] : VBar.l SB * mul + sw * HVContrast [PBarPosY top sw bp] - sw @@ -111,12 +111,12 @@ glyph-block Letter-Latin-Upper-P : begin 0.2 * (RightSB - SB) * ([AdviceStroke 5] / Stroke) set RevPShape.SlabMotion : function [top sw mul] : glyph-proc - include : tagged 'serifRT' : RightwardTopSerif (Width - SB * mul) top SideJut sw + include : tagged 'serifRT' : HSerif.rt (Width - SB * mul) top SideJut sw set RevPShape.SlabSymmetric : function [top sw mul] : glyph-proc include : RevPShape.SlabMotion top sw mul - include : tagged 'serifRB' : CenterBottomSerif (Width - SB * mul - HalfStroke * HVContrast) 0 Jut sw + include : tagged 'serifRB' : HSerif.mb (Width - SB * mul - HalfStroke * HVContrast) 0 Jut sw set RevPShape.SlabCyrlItalic : function [top sw mul] : glyph-proc - include : tagged 'serifRB' : RightwardBottomSerif (Width - SB * mul) 0 SideJut sw + include : tagged 'serifRB' : HSerif.rb (Width - SB * mul) 0 SideJut sw set RevPShape.OpenGap : function [] : params [top [mul PShape.defaultMul] [bp PShape.BarPos] [sw Stroke]] : VBar.r Width - SB * mul - sw * HVContrast [PBarPosY top sw bp] - sw diff --git a/font-src/glyphs/letter/latin/upper-r.ptl b/font-src/glyphs/letter/latin/upper-r.ptl index d7c1a31b0..91d2a04e4 100644 --- a/font-src/glyphs/letter/latin/upper-r.ptl +++ b/font-src/glyphs/letter/latin/upper-r.ptl @@ -32,7 +32,7 @@ glyph-block Letter-Latin-Upper-R : begin corner (left + extraShift + shift / 2) top [heading Downward] corner (xRightBottom + shift) bottom [heading Downward] if slab : begin - include : RightwardBottomSerif (xRightBottom + shift + 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8) + include : HSerif.rb (xRightBottom + shift + 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8) define [RLegShape-Curly] : params [top bottom left right charTop slab sw extraShift] : glyph-proc local xRightBottom : RLegTerminalX LEG-SHAPE-CURLY right sw @@ -44,7 +44,7 @@ glyph-block Letter-Latin-Upper-R : begin quadControls 0 0.4 8 g4 left top if slab : begin - include : RightwardBottomSerif right bottom (SideJut + Jut / 8) + include : HSerif.rb right bottom (SideJut + Jut / 8) define [RLegShape-Standing] : params [top bottom left right charTop slab sw extraShift] : glyph-proc local fine : RStandingLegFine sw @@ -61,7 +61,7 @@ glyph-block Letter-Latin-Upper-R : begin flat (right + O) [Math.max (yOffset + 1) (ytopRef - bend * charTop / CAP)] [widths.rhs.heading sw Downward] curl (right + O) yOffset [heading Downward] curl (right + O - xOverflow) bottom [heading Downward] - if slab : include : RightwardBottomSerif right bottom SideJut + if slab : include : HSerif.rb right bottom SideJut define RLegShapes { RLegShape-Curly RLegShape-Straight RLegShape-Standing } @@ -75,7 +75,7 @@ glyph-block Letter-Latin-Upper-R : begin corner (right - extraShift - shift / 2) top [heading Downward] corner (xLeftBottom - shift) bottom [heading Downward] if slab : begin - include : LeftwardBottomSerif (xLeftBottom - shift - 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8) + include : HSerif.lb (xLeftBottom - shift - 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8) define [RevRLegShape-Curly] : params [top bottom left right charTop slab sw extraShift] : glyph-proc local xLeftBottom : RevRLegTerminalX LEG-SHAPE-CURLY left sw @@ -87,7 +87,7 @@ glyph-block Letter-Latin-Upper-R : begin quadControls 0 0.4 8 g4 right top if slab : begin - include : LeftwardBottomSerif left bottom (SideJut + Jut / 8) + include : HSerif.lb left bottom (SideJut + Jut / 8) define [RevRLegShape-Standing] : params [top bottom left right charTop slab sw extraShift] : glyph-proc local fine : RStandingLegFine sw @@ -104,7 +104,7 @@ glyph-block Letter-Latin-Upper-R : begin flat (left - O) [Math.max (yOffset + 1) (ytopRef - bend * charTop / CAP)] [widths.lhs.heading sw Downward] curl (left - O) yOffset [heading Downward] curl (left - O + xOverflow) bottom [heading Downward] - if slab : include : LeftwardBottomSerif left bottom SideJut + if slab : include : HSerif.lb left bottom SideJut define RevRLegShapes { RevRLegShape-Curly RevRLegShape-Straight RevRLegShape-Standing } diff --git a/font-src/glyphs/letter/latin/upper-t.ptl b/font-src/glyphs/letter/latin/upper-t.ptl index a7b92d93a..4d8a75972 100644 --- a/font-src/glyphs/letter/latin/upper-t.ptl +++ b/font-src/glyphs/letter/latin/upper-t.ptl @@ -22,11 +22,11 @@ glyph-block Letter-Latin-Upper-T : begin include : tagged 'strokeRT' : HBar.t df.middle r top if doTopSerifs : begin - include : tagged 'serifRT' : DownwardRightSerif r top VJut - include : tagged 'serifLT' : DownwardLeftSerif l top VJut + include : tagged 'serifRT' : VSerif.dr r top VJut + include : tagged 'serifLT' : VSerif.dl l top VJut if doBottomSerifs : begin - include : tagged 'serifMB' : RightwardBottomSerif df.middle 0 MidJutCenter - include : tagged 'serifMB' : LeftwardBottomSerif df.middle 0 MidJutCenter + include : tagged 'serifMB' : HSerif.rb df.middle 0 MidJutCenter + include : tagged 'serifMB' : HSerif.lb df.middle 0 MidJutCenter define TConfig : object serifless { 1 false false } @@ -118,7 +118,7 @@ glyph-block Letter-Latin-Upper-T : begin include : HBar.t l r 0 if SLAB : begin - include : tagged 'serifRT' : DownwardRightSerif r CAP VJut - include : tagged 'serifLT' : DownwardLeftSerif l CAP VJut - include : tagged 'serifRB' : UpwardRightSerif r 0 VJut - include : tagged 'serifLB' : UpwardLeftSerif l 0 VJut + include : tagged 'serifRT' : VSerif.dr r CAP VJut + include : tagged 'serifLT' : VSerif.dl l CAP VJut + include : tagged 'serifRB' : VSerif.ur r 0 VJut + include : tagged 'serifLB' : VSerif.ul l 0 VJut diff --git a/font-src/glyphs/letter/latin/upper-y.ptl b/font-src/glyphs/letter/latin/upper-y.ptl index 3804f950e..c79df1d1d 100644 --- a/font-src/glyphs/letter/latin/upper-y.ptl +++ b/font-src/glyphs/letter/latin/upper-y.ptl @@ -27,9 +27,9 @@ glyph-block Letter-Latin-Upper-Y : begin match slabType [Just SLAB-ALL] : begin include : composite-proc sf.lt.full sf.rt.full - include : CenterBottomSerif Middle bot MidJutSide + include : HSerif.mb Middle bot MidJutSide [Just SLAB-MOTION] : include sf.lt.outer - [Just SLAB-BASE] : include : CenterBottomSerif Middle bot MidJutSide + [Just SLAB-BASE] : include : HSerif.mb Middle bot MidJutSide define [YShape bodyType top bot] : glyph-proc local cross : YCrossPos top bot diff --git a/font-src/glyphs/letter/latin/v.ptl b/font-src/glyphs/letter/latin/v.ptl index d1ca367df..a6e08ef8e 100644 --- a/font-src/glyphs/letter/latin/v.ptl +++ b/font-src/glyphs/letter/latin/v.ptl @@ -194,7 +194,7 @@ glyph-block Letter-Latin-V : begin include : VCursiveShape pxBar XH Stroke if fDoSerif : begin local xBar : VCursiveShapeBarPos pxBar - include : tagged 'serifLT' : LeftwardTopSerif xBar XH (SideJut + xBar - SB) + include : tagged 'serifLT' : HSerif.lt xBar XH (SideJut + xBar - SB) create-glyph "vPalatalHook.\(suffix)" : glyph-proc include [refer-glyph "v.\(suffix)"] AS_BASE ALSO_METRICS diff --git a/font-src/glyphs/letter/latin/w.ptl b/font-src/glyphs/letter/latin/w.ptl index f4c522a06..840c3f23c 100644 --- a/font-src/glyphs/letter/latin/w.ptl +++ b/font-src/glyphs/letter/latin/w.ptl @@ -210,8 +210,8 @@ glyph-block Letter-Latin-W : begin [Just SERIFS-CYRL-OMEGA] : begin local jut : Math.min Jut (0.5 * HVContrast * dim.strokeOuter + 0.375 * (dim.xLeft2 - df.leftSB - 1.5 * HVContrast * dim.strokeOuter)) NeedSlab SLAB : composite-proc - CenterTopSerifAsymmetric (df.leftSB + 0.5 * HVContrast * dim.strokeOuter) dim.wMidHeight jut jut - CenterTopSerifAsymmetric dim.xLeft2 dim.wMidHeight jut jut + HSerif.mtAsymmetric (df.leftSB + 0.5 * HVContrast * dim.strokeOuter) dim.wMidHeight jut jut + HSerif.mtAsymmetric dim.xLeft2 dim.wMidHeight jut jut define [WHooktopShape df top bodyType serifsType] : glyph-proc include : WShapeImpl df top bodyType serifsType diff --git a/font-src/glyphs/letter/latin/x.ptl b/font-src/glyphs/letter/latin/x.ptl index f8dfac220..d560b7a3c 100644 --- a/font-src/glyphs/letter/latin/x.ptl +++ b/font-src/glyphs/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 : ShoulderMidKnotLhsRev SerifFrame WithAIHSerifsMask + glyph-block-import Letter-Shared-Shapes : ShoulderMidKnotRhs SerifFrame WithAIHSerifsMask glyph-block-import Letter-Shared-Shapes : DiagonalTailInnerRadius DiagonalTailF glyph-block-import Letter-Shared-Shapes : CyrDescender PalatalHook @@ -79,13 +79,22 @@ glyph-block Letter-Latin-X : begin define flatHookDepth : 0.7 * (RightSB - SB) - swEnd - 1.5 * rIn define upperHalf : include : dispiro - curl (RightSB - OX) (top - hook1Depth) [widths.lhs.heading swEnd Upward] - flat (RightSB - OX) (top - hook1Depth + hook1StraightDepth) [heading Upward] - arcvh 16 - ShoulderMidKnotLhsRev (xTurn) (top - O) fineMid swEnd (-1) (-1) - archv 16 - flat (xCenterRight - HVContrast * fineMid) (top - ada) [widths.lhs fineMid] - curl (xCenterRight - HVContrast * fineMid) ([mix bottom top 0.5] + O) + flat (xCenterRight - HVContrast * fineMid) ([mix bottom top 0.5] + O) [widths.rhs.heading fineMid Upward] + curl (xCenterRight - HVContrast * fineMid) (top - ada) + arcvh + ShoulderMidKnotRhs xTurn (top - O) fineMid swEnd (+1) (-1) + archv + flat (RightSB - OX) (top - hook1Depth + hook1StraightDepth) [heading Downward] + curl (RightSB - OX) (top - hook1Depth) [heading Downward] + + # define upperHalf : include : dispiro + # curl (RightSB - OX) (top - hook1Depth) [widths.lhs.heading swEnd Upward] + # flat (RightSB - OX) (top - hook1Depth + hook1StraightDepth) [heading Upward] + # arcvh 16 + # ShoulderMidKnotLhsRev (xTurn) (top - O) fineMid swEnd (-1) (-1) + # archv 16 + # flat (xCenterRight - HVContrast * fineMid) (top - ada) [widths.lhs fineMid] + # curl (xCenterRight - HVContrast * fineMid) ([mix bottom top 0.5] + O) define lowerHalf : include : dispiro flat (xCenterRight - 0.5 * HVContrast * fineMid) ([mix bottom top 0.5] - O) [widths.center fineMid] @@ -105,10 +114,10 @@ glyph-block Letter-Latin-X : begin export : define [FullSerifs top bot] : let [sf : SerifFrame top bot SB RightSB] composite-proc sf.lt.full sf.rt.full sf.lb.full sf.rb.full export : define [MotionSerifs top bot] : glyph-proc - include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut + include : tagged 'serifLT' : HSerif.lt SB top SideJut export : define [MotionSerifsBilateral top bot] : glyph-proc - include : tagged 'serifLT' : LeftwardTopSerif SB top SideJut - include : tagged 'serifRB' : RightwardBottomSerif RightSB bot SideJut + include : tagged 'serifLT' : HSerif.lt SB top SideJut + include : tagged 'serifRB' : HSerif.rb RightSB bot SideJut define Config : object straightSerifless { Shape.StraightBase null false } diff --git a/font-src/glyphs/letter/latin/z.ptl b/font-src/glyphs/letter/latin/z.ptl index 4d95461a0..62d861b8b 100644 --- a/font-src/glyphs/letter/latin/z.ptl +++ b/font-src/glyphs/letter/latin/z.ptl @@ -23,14 +23,14 @@ glyph-block Letter-Latin-Z : begin define [ZSerifless top] : glyph-proc define [ZStdSerifs top] : glyph-proc - include : tagged 'serifLT' : DownwardLeftSerif SB top VJut - include : tagged 'serifRB' : UpwardRightSerif RightSB 0 VJut + include : tagged 'serifLT' : VSerif.dl SB top VJut + include : tagged 'serifRB' : VSerif.ur RightSB 0 VJut define [ZMotionSerifsB top] : glyph-proc - include : tagged 'serifRB' : UpwardRightSerif RightSB 0 VJut + include : tagged 'serifRB' : VSerif.ur RightSB 0 VJut define [ZMotionSerifsT top] : glyph-proc - include : tagged 'serifLT' : DownwardLeftSerif SB top VJut + include : tagged 'serifLT' : VSerif.dl SB top VJut define [ZBaseShape mode] : glyph-proc local cor : 1.15 * HVContrast diff --git a/font-src/glyphs/letter/shared.ptl b/font-src/glyphs/letter/shared.ptl index a12c1e82b..07d96c894 100644 --- a/font-src/glyphs/letter/shared.ptl +++ b/font-src/glyphs/letter/shared.ptl @@ -177,7 +177,7 @@ glyph-block Letter-Shared-Shapes : begin define [ShoulderMidKnotLhs cx cy fine sw dirX dirY] : begin local skew : shoulderMidSkew fine sw return : g4 - begin (cx + (dirY * CorrectionOMidX - skew) * sw) + begin (cx + (dirY * CorrectionOMidX - skew - dirX * TanSlope) * sw) begin cy widths.heading sw 0 {.y dirY .x (skew)} @@ -185,7 +185,7 @@ glyph-block Letter-Shared-Shapes : begin define [ShoulderMidKnotLhsRev cx cy fine sw dirX dirY] : begin local skew : shoulderMidSkew fine sw return : g4 - begin (cx + (dirY * CorrectionOMidX + skew) * sw) + begin (cx + (dirY * CorrectionOMidX + skew - dirX * TanSlope) * sw) begin cy widths.heading sw 0 {.y dirY .x (-skew)} @@ -193,7 +193,7 @@ glyph-block Letter-Shared-Shapes : begin define [ShoulderMidKnotRhs cx cy fine sw dirX dirY] : begin local skew : shoulderMidSkew fine sw return : g4 - begin (cx + (dirY * CorrectionOMidX + skew) * sw) + begin (cx + (dirY * CorrectionOMidX + skew + dirX * TanSlope) * sw) begin cy widths.heading 0 sw {.y (-dirY) .x (skew)} @@ -222,6 +222,137 @@ glyph-block Letter-Shared-Shapes : begin glyph-proc include : spiro-outline : nShoulderKnots.apply null [a.concat { (fMask -- true) }] + glyph-block-export : OBarLeft + define OBarLeft : namespace + define kSkewShift 0.5 + export : define [shape] : params [ + [top XH] [left SB] [right RightSB] [stroke Stroke] [fine ShoulderFine] + ] : begin + local skew : shoulderMidSkew fine stroke + local mt : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * stroke + local mb : [mix left right 0.5] + (skew + kSkewShift * TanSlope) * stroke + return : dispiro + widths.lhs fine + flat (left + (stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) + curl (left + (stroke - fine) * HVContrast) (0 + SmallArchDepthB) + arcvh + g4 (mb) O [widths.lhs.heading stroke {.y (1) .x (-skew)}] + archv + flat (right - OX) (0 + SmallArchDepthA) + curl (right - OX) (top - SmallArchDepthB) + arcvh + g4 (mt) (top - O) [widths.lhs.heading stroke {.y (-1) .x (-skew)}] + archv + flat (left + (stroke - fine) * HVContrast) (top - SmallArchDepthA) [widths.lhs fine] + curl (left + (stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) + + export : define [toothless] : params [ + [top XH] [left SB] [right RightSB] [rise SHook] [mBlend : Math.sqrt (1 / 2)] + [sw Stroke] + ] : 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 + archv + flat (right - OX) (0 + SmallArchDepthA) + curl (right - OX) (top - SmallArchDepthB) + arcvh + g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-skew)}] + archv + flat (left + (sw - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] + curl (left + (sw - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + + export : define [rounded] : params [ + [top XH] [left SB] [right RightSB] [yTerminal CAP] [sw Stroke] + ] : 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 * Stroke + return : dispiro + flat left yTerminal [widths.lhs.heading sw Downward] + curl left SmallArchDepthB + arcvh + g4.right.mid mb O + archv + flat (right - OX) (0 + SmallArchDepthA) + curl (right - OX) (top - SmallArchDepthB) + arcvh + g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-skew)}] + archv + flat (left + (sw - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] + curl (left + (sw - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + + export : define [toothlessTop] : params [ + [top XH] [left SB] [rise SHook] [mBlend : Math.sqrt (1 / 2)] + ] : begin + local fine ShoulderFine + local skew : shoulderMidSkew fine + local mt : [mix left RightSB 0.5] - CorrectionOMidX * Stroke + local mb : [mix left RightSB 0.5] + (skew + kSkewShift * TanSlope) * Stroke + return : dispiro + flat (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + curl (left + (Stroke - fine) * HVContrast) (0 + SmallArchDepthB) [widths fine 0] + arcvh + g4 (mb) O [widths.heading Stroke 0 {.y (1) .x (-skew)}] + archv + flat (RightSB - OX) (0 + SmallArchDepthA) + curl (RightSB - OX) (top - SmallArchDepthB) + arcvh + g4 mt (top - O) [widths.lhs Stroke] + alsoThru.g2 0.5 (1 - mBlend) important + g4 left (top - rise) [widths.lhs Stroke] + + export : define [roundedTop] : params [ + [top XH] [left SB] [yTerminal Descender] + ] : begin + local fine ShoulderFine + local skew : shoulderMidSkew fine + local mt : [mix left RightSB 0.5] - CorrectionOMidX * Stroke + local mb : [mix left RightSB 0.5] + (skew + kSkewShift * TanSlope) * Stroke + return : dispiro + flat (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + curl (left + (Stroke - fine) * HVContrast) (0 + SmallArchDepthB) [widths fine 0] + arcvh + g4 (mb) O [widths.heading Stroke 0 {.y (1) .x (-skew)}] + archv + flat (RightSB - OX) (0 + SmallArchDepthA) + curl (RightSB - OX) (top - SmallArchDepthB) + arcvh + g4 mt (top - O) [widths.lhs Stroke] + archv + flat left (top - SmallArchDepthA) + curl left yTerminal [widths.lhs.heading Stroke Downward] + + glyph-block-export : OBarRight + define OBarRight : namespace + export : define [shape] : params [ + [top XH] [right RightSB] [stroke Stroke] [fine ShoulderFine] + ] : new-glyph : glyph-proc + include : OBarLeft.shape + top -- [fallback top XH] + left -- (Width - right) + stroke -- stroke + fine -- fine + include : FlipAround Middle (top / 2) + + export : define [toothless] : params [ + [top XH] [right RightSB] [rise SHook] [mBlend : Math.sqrt (1 / 2)] + ] : new-glyph : glyph-proc + include : OBarLeft.toothlessTop top (Width - right) rise mBlend + include : FlipAround Middle (top / 2) + + export : define [rounded _top _right _yTerminal] : params [ + [top XH] [right RightSB] [yTerminal CAP] + ] : new-glyph : glyph-proc + include : OBarLeft.roundedTop top (Width - right) (yTerminal -- top - yTerminal) + include : FlipAround Middle (top / 2) + glyph-block-export FlatHookDepth define [FlatHookDepth df s] : object x : [fallback s 1] * [FlatHookDepthImpl [Math.min 1 : Math.sqrt df.div] HVContrast] @@ -449,25 +580,25 @@ glyph-block Letter-Shared-Shapes : begin local rBarInner : right - 1.0 * sw * HVContrast return : object lt : object - full : tagged 'serifLT' : CenterTopSerifAsymmetric lBarCenter top Jut jutIn sw - fullSide : tagged 'serifLT' : CenterTopSerifAsymmetric lBarCenter top Jut jutFS sw - outer : tagged 'serifLT' : LeftwardTopSerif left top SideJut sw - inner : tagged 'serifLT' : RightwardTopSerif lBarInner top sideJutIn sw + full : tagged 'serifLT' : HSerif.mtAsymmetric lBarCenter top Jut jutIn sw + fullSide : tagged 'serifLT' : HSerif.mtAsymmetric lBarCenter top Jut jutFS sw + outer : tagged 'serifLT' : HSerif.lt left top SideJut sw + inner : tagged 'serifLT' : HSerif.rt lBarInner top sideJutIn sw rt : object - full : tagged 'serifRT' : CenterTopSerifAsymmetric rBarCenter top jutIn Jut sw - fullSide : tagged 'serifRT' : CenterTopSerifAsymmetric rBarCenter top jutFS Jut sw - outer : tagged 'serifRT' : RightwardTopSerif right top SideJut sw - inner : tagged 'serifRT' : LeftwardTopSerif rBarInner top sideJutIn sw + full : tagged 'serifRT' : HSerif.mtAsymmetric rBarCenter top jutIn Jut sw + fullSide : tagged 'serifRT' : HSerif.mtAsymmetric rBarCenter top jutFS Jut sw + outer : tagged 'serifRT' : HSerif.rt right top SideJut sw + inner : tagged 'serifRT' : HSerif.lt rBarInner top sideJutIn sw lb : object - full : tagged 'serifLB' : CenterBottomSerifAsymmetric lBarCenter bot Jut jutIn sw - fullSide : tagged 'serifLB' : CenterBottomSerifAsymmetric lBarCenter bot Jut jutFS sw - outer : tagged 'serifLB' : LeftwardBottomSerif left bot SideJut sw - inner : tagged 'serifLB' : RightwardBottomSerif lBarInner bot sideJutIn sw + full : tagged 'serifLB' : HSerif.mbAsymmetric lBarCenter bot Jut jutIn sw + fullSide : tagged 'serifLB' : HSerif.mbAsymmetric lBarCenter bot Jut jutFS sw + outer : tagged 'serifLB' : HSerif.lb left bot SideJut sw + inner : tagged 'serifLB' : HSerif.rb lBarInner bot sideJutIn sw rb : object - full : tagged 'serifRB' : CenterBottomSerifAsymmetric rBarCenter bot jutIn Jut sw - fullSide : tagged 'serifRB' : CenterBottomSerifAsymmetric rBarCenter bot jutFS Jut sw - outer : tagged 'serifRB' : RightwardBottomSerif right bot SideJut sw - inner : tagged 'serifRB' : LeftwardBottomSerif rBarInner bot sideJutIn sw + full : tagged 'serifRB' : HSerif.mbAsymmetric rBarCenter bot jutIn Jut sw + fullSide : tagged 'serifRB' : HSerif.mbAsymmetric rBarCenter bot jutFS Jut sw + outer : tagged 'serifRB' : HSerif.rb right bot SideJut sw + inner : tagged 'serifRB' : HSerif.lb rBarInner bot sideJutIn sw glyph-block-export WithAIHSerifsMask define [WithAIHSerifsMask top bottom left right s] : begin diff --git a/font-src/glyphs/number/1.ptl b/font-src/glyphs/number/1.ptl index c7f9dcfb5..818ba62a0 100644 --- a/font-src/glyphs/number/1.ptl +++ b/font-src/glyphs/number/1.ptl @@ -23,7 +23,7 @@ glyph-block Digits-One : begin export : define [FlatSerifed top balance pTopSerif] : glyph-proc define topSW : AdviceStroke 3.5 include : VBar.m (Middle + balance) 0 top - include : LeftwardTopSerif (Middle + balance - HalfStroke * HVContrast) (top - Stroke / 8 - Hook * pTopSerif * (top / CAP)) (LongJut - HalfStroke * HVContrast) + include : HSerif.lt (Middle + balance - HalfStroke * HVContrast) (top - Stroke / 8 - Hook * pTopSerif * (top / CAP)) (LongJut - HalfStroke * HVContrast) export : define [TopCut top balance pTopSerif] : glyph-proc local sl : Middle + balance - 0.5 * Stroke * HVContrast @@ -34,7 +34,7 @@ glyph-block Digits-One : begin corner sl (top - (sr - sl) * pTopSerif) corner sr top - export : define [Base] : CenterBottomSerif Middle 0 LongJut + export : define [Base] : HSerif.mb Middle 0 LongJut define OneConfig : object line { Shape.Line null 0.75 0 } diff --git a/font-src/glyphs/number/2.ptl b/font-src/glyphs/number/2.ptl index e7a974891..5b08c64e8 100644 --- a/font-src/glyphs/number/2.ptl +++ b/font-src/glyphs/number/2.ptl @@ -39,13 +39,13 @@ glyph-block Digits-Two : begin include : TwoArcShapeT dispiro 0 Stroke top include : HBar.b (SB + HalfStroke) RightSB 0 if SLAB : begin - include : UpwardRightSerif RightSB 0 VJut + include : VSerif.ur RightSB 0 VJut define [TwoStraightNeckShape top] : glyph-proc include : TwoStraightNeckArcT dispiro 0 Stroke top include : HBar.b SB RightSB 0 if SLAB : begin - include : UpwardRightSerif RightSB 0 VJut + include : VSerif.ur RightSB 0 VJut create-glyph 'two.lnum.straightNeck' : glyph-proc include : MarkSet.capital diff --git a/font-src/glyphs/number/4.ptl b/font-src/glyphs/number/4.ptl index e8c5baad2..f2d55ef99 100644 --- a/font-src/glyphs/number/4.ptl +++ b/font-src/glyphs/number/4.ptl @@ -37,7 +37,7 @@ glyph-block Digits-Four : begin include : HBar.t xVertBar (xVertBar + bbd) CAP sw include : HBar.b xVertBar (xVertBar + bbd) 0 sw if (!bbd && SLAB) : begin - include : CenterBottomSerif (xVertBar - HalfStroke * HVContrast) 0 Jut + include : HSerif.mb (xVertBar - HalfStroke * HVContrast) 0 Jut define [FourOpenShape top crossing] : glyph-proc local yBar (top * 0.4) @@ -50,7 +50,7 @@ glyph-block Digits-Four : begin include : VBar.r xVertBar 0 [mix (yBar - Stroke) top 0.75] include : VBar.l SB yBar top if SLAB : begin - include : CenterBottomSerif (xVertBar - HalfStroke * HVContrast) 0 Jut + include : HSerif.mb (xVertBar - HalfStroke * HVContrast) 0 Jut create-glyph 'four.lnum.closed' : glyph-proc include : MarkSet.capital diff --git a/font-src/glyphs/number/5.ptl b/font-src/glyphs/number/5.ptl index e4137cffe..c9cb74b8f 100644 --- a/font-src/glyphs/number/5.ptl +++ b/font-src/glyphs/number/5.ptl @@ -60,7 +60,7 @@ glyph-block Digits-Five : begin Rect (t2 / 2 + t2 * kGap) (t2 / 2 - t2 * kGap) 0 Middle - if (!bbd && SLAB) : include : DownwardRightSerif xright top VJut + if (!bbd && SLAB) : include : VSerif.dr xright top VJut create-glyph 'five.lnum.verticalUpperLeftBar' : glyph-proc include : MarkSet.capital diff --git a/font-src/glyphs/number/7.ptl b/font-src/glyphs/number/7.ptl index 40cf37a23..e174ac8a8 100644 --- a/font-src/glyphs/number/7.ptl +++ b/font-src/glyphs/number/7.ptl @@ -38,8 +38,8 @@ glyph-block Digits-Seven : begin alsoThru.g2 0.5 0.5 g4.down.end RightSB (-top) [widths.rhs.heading Stroke Downward] - define [StartSerif top] : DownwardLeftSerif (SB + (OX - O)) top VJut - define [StartSerifThick top] : DownwardLeftSerif (SB + (OX - O)) top VJut [AdviceStroke 2.75] + define [StartSerif top] : VSerif.dl (SB + (OX - O)) top VJut + define [StartSerifThick top] : VSerif.dl (SB + (OX - O)) top VJut [AdviceStroke 2.75] define [Crossbar top] : glyph-proc local m : mix SevenXLeft (RightSB - HalfStroke * HVContrast) 0.5 diff --git a/font-src/glyphs/symbol/letter.ptl b/font-src/glyphs/symbol/letter.ptl index 885d1ffb4..829b60909 100644 --- a/font-src/glyphs/symbol/letter.ptl +++ b/font-src/glyphs/symbol/letter.ptl @@ -168,9 +168,9 @@ glyph-block Symbol-Letter : begin create-glyph 'informationSource' 0x2139 : glyph-proc local sw : UnicodeWeightGrade 9 1 include : VBar.m Middle 0 XH sw - include : LeftwardTopSerif (Middle - sw / 2 * HVContrast) XH (LongJut / 2) - include : LeftwardBottomSerif (Middle - sw / 2 * HVContrast) 0 (LongJut / 2) - include : RightwardBottomSerif (Middle + sw / 2 * HVContrast) 0 (LongJut / 2) + include : HSerif.lt (Middle - sw / 2 * HVContrast) XH (LongJut / 2) + include : HSerif.lb (Middle - sw / 2 * HVContrast) 0 (LongJut / 2) + include : HSerif.rb (Middle + sw / 2 * HVContrast) 0 (LongJut / 2) include : DotAt Middle (XH + AccentStackOffset) (DotRadius * sw / Stroke) create-glyph 'partial' 0x2202 : glyph-proc diff --git a/font-src/meta/aesthetics.ptl b/font-src/meta/aesthetics.ptl index 96a3def59..a41254cde 100644 --- a/font-src/meta/aesthetics.ptl +++ b/font-src/meta/aesthetics.ptl @@ -194,7 +194,7 @@ export : define [calculateMetrics para] : begin define [shoulderMidSkew _fine _stroke] : begin local stroke : fallback _stroke Stroke local fine : fallback _fine ShoulderFine - return : 0.5 * HVContrast * (stroke - fine) / stroke + return : 0.5 * Contrast * (stroke - fine) / stroke return [object DesignParameters UPM HalfUPM Width SB CAP XH Ascender Descender Contrast SymbolMid diff --git a/font-src/meta/macros.ptl b/font-src/meta/macros.ptl index 0d74182bd..b2d699225 100644 --- a/font-src/meta/macros.ptl +++ b/font-src/meta/macros.ptl @@ -145,17 +145,12 @@ define-macro glyph-block-import : syntax-rules CommonShapes `[no-shape KnotAdj Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt CircleRing CircleRingAt CircleDotAt RoundStrokeTerminalAt OShapeT OShape - OShapeOutline OShapeFlatTB OBarLeftShape OBarRightShape LeftwardTopSerif - LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif - CenterTopSerifAsymmetric CenterBottomSerif CenterBottomSerifAsymmetric - DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif NeedSlab - NeedNotItalic HBar HOverlayBar VBar + OShapeOutline OShapeFlatTB HSerif VSerif NeedSlab NeedNotItalic HBar HOverlayBar VBar LeftHook FlatSlashShape hookstart hookend Ungizmo Regizmo FlipAround ScaleAround Realign - ForceUpright DiagCor NameUni PointingTo WithTransform clear-anchors - OBarLeftToothlessShape OBarLeftRoundedShape OBarRightToothlessShape - OBarRightRoundedShape AsRadical ExtLineCenter ExtLineLhs ExtLineRhs DiagCorDs HCrossBar - VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight HalfRectTriangle MaskAboveLine - MaskBelowLine MaskLeftLine MaskRightLine DotVariants WithDotVariants] + ForceUpright DiagCor NameUni PointingTo WithTransform 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)