diff --git a/changes/20.0.1.md b/changes/20.0.1.md index dba610f6d..34e117665 100644 --- a/changes/20.0.1.md +++ b/changes/20.0.1.md @@ -1,4 +1,15 @@ +* Make ASCII marks (grave, caret, tilde) more significant (#1576). * Optimize shape for Italic long-dotted-oval zero (#1577). * Fix ear-cuts of capital Y under Italics (#1578). * Fix disconnected Cedillas for serifed italic glyphs on heavier weights (#1579). -* Make ASCII marks (grave, caret, tilde) more significant (#1576). +* Fix disconnected underbars for Abkhasian Che (#1579). +* Fix shape of heavy-weight serifed Latin C With Hook, Epsilons (#1580). +* Fix heavy-weight ampersand's top arc alignment (#1581). +* Fix shape of heavy-weight lowercase r (#1582). +* Optimize shape for Sulzbacher Eszet (#1583). +* Fix missing serifs of Cyrillic Koppa (#1584). +* Fix shape of heavy-weight Rs (#1585). +* Fix shape of Latin Small Letter Y with Hook under heavy weights (#1588, #1589). +* Fix shape of Bashkir Ka under heavy weights (#1590). +* Fix artifacts of certain K-related letters (#1591). +* Optimize shape of small S (#1592). diff --git a/font-src/glyphs/letter/cyrillic/zhe.ptl b/font-src/glyphs/letter/cyrillic/zhe.ptl index 090166087..175fda69d 100644 --- a/font-src/glyphs/letter/cyrillic/zhe.ptl +++ b/font-src/glyphs/letter/cyrillic/zhe.ptl @@ -13,7 +13,7 @@ glyph-block Letter-Cyrillic-Zhe : begin define [ZheSw df] : AdviceStroke 3.3 df.div define [ZheSw2 df] : AdviceStroke 4.0 df.div define [ZheSw3 df] : AdviceStroke 3.7 df.div - define [ZheOvershoot fSlab df] : if fSlab 0 (O * 3 * df.div) + define [Overshoot fSlab df] : if fSlab 0 (O * 3 * df.div) define [CenterBar fSlab df bot midTop] : glyph-proc include : VBar.m df.middle bot midTop [ZheSw df] @@ -30,18 +30,18 @@ glyph-block Letter-Cyrillic-Zhe : begin include : HSerif.rt (df.rightSB - fine * fineK) top SideJut include : HSerif.rb (df.rightSB - fine * fineK) bot SideJut - export : define [Descender df] : begin + export : define [Descender fSlab df] : begin define sw : ZheSw df define fineK 0.1 return : CyrDescender.rSideJut - x -- df.rightSB - fineK * sw + x -- df.rightSB - fineK * sw - [Overshoot fSlab df] y -- 0 refSw -- sw sideJut -- SideJut export : define [StraightLegs fSlab df bot top] : begin define fine : ZheSw df - define overshoot : ZheOvershoot fSlab df + define overshoot : Overshoot fSlab df define attach1X : df.middle - 0.5 * HVContrast * fine define attach1Y : [mix bot top 0.42] - fine @@ -114,7 +114,7 @@ glyph-block Letter-Cyrillic-Zhe : begin define cor : DiagCor (top - bot) (df.rightSB - df.leftSB) define midX : mix df.leftSB (df.middle - HVContrast * cor * fine) k define midY : mix bot top 0.5 - define overshoot : ZheOvershoot fSlab df + define overshoot : Overshoot fSlab df return : union HBar.m midX (df.width - midX) midY fine intersection [MaskBelow midY] [MaskAbove bot] @@ -147,7 +147,7 @@ glyph-block Letter-Cyrillic-Zhe : begin create-glyph "cyrl/ZheDescender.\(suffix)" : glyph-proc local df : DivFrame para.diversityM 3 include [refer-glyph "cyrl/Zhe.\(suffix)"] AS_BASE ALSO_METRICS - include : Zhe.Descender df + include : Zhe.Descender fSlab df create-glyph "cyrl/zhe.\(suffix)" : glyph-proc define df : DivFrame para.diversityM 3 @@ -158,7 +158,7 @@ glyph-block Letter-Cyrillic-Zhe : begin create-glyph "cyrl/zheDescender.\(suffix)" : glyph-proc local df : DivFrame para.diversityM 3 include [refer-glyph "cyrl/zhe.\(suffix)"] AS_BASE ALSO_METRICS - include : Zhe.Descender df + include : Zhe.Descender fSlab df create-glyph "cyrl/zhe.BGR.\(suffix)" : glyph-proc define df : DivFrame para.diversityM 3 diff --git a/font-src/glyphs/letter/greek/lower-epsilon.ptl b/font-src/glyphs/letter/greek/lower-epsilon.ptl index 880cdbe6c..7425f5516 100644 --- a/font-src/glyphs/letter/greek/lower-epsilon.ptl +++ b/font-src/glyphs/letter/greek/lower-epsilon.ptl @@ -43,7 +43,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin [Just SLAB-CLASSICAL] : SerifedArcStart_RtlLhs RightSB Middle top stroke hook [Just SLAB-INWARD] : InwardSlabArcStart_RtlLhs RightSB Middle top stroke hook __ : list [g4 (RightSB + O) (top - hook) [widths.lhs]] [hookstart (top - O)] - g4 SB (top - ada) + g4 SB [YSmoothMidL top (midy - stroke / 2)] arcvh flat Middle (midy - (fine - stroke / 2)) [widths.heading fine 0 Rightward] curl midx (midy - (fine - stroke / 2)) [heading Rightward] @@ -54,7 +54,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin flat midx (midy + (fine - stroke / 2)) [widths.heading fine 0 Leftward] curl Middle (midy + (fine - stroke / 2)) [heading Leftward] archv - g4 (SB + OX * 2) (bot + adb) [widths.lhs] + g4 (SB + OX * 2) [YSmoothMidL (midy + stroke / 2) bot] [widths.lhs] match slabType [Just SLAB-CLASSICAL] : SerifedArcEnd_LtrLhs RightSB Middle bot stroke hook [Just SLAB-INWARD] : InwardSlabArcEnd_LtrLhs RightSB Middle bot stroke hook @@ -64,15 +64,19 @@ glyph-block Letter-Greek-Lower-Epsilon : begin SmallEpsilonUpperShape slabTop top bot blend hook SmallEpsilonLowerShape slabBot top bot blend hook - define [AutoStartSerifR sty top] : match sty - [Just SLAB-CLASSICAL] : ArcStartSerifR RightSB top Stroke Hook - [Just SLAB-INWARD] : ArcStartInwardSerifR RightSB top Stroke Hook - __ : glyph-proc + define [AutoStartSerifR sty top bot blend] : begin + define [object stroke] : SmallEpsilonShapeDim top bot blend + return : match sty + [Just SLAB-CLASSICAL] : ArcStartSerifR RightSB top stroke Hook + [Just SLAB-INWARD] : ArcStartInwardSerifR RightSB top stroke Hook + __ : glyph-proc - define [AutoEndSerifR sty bot] : match sty - [Just SLAB-CLASSICAL] : ArcEndSerifR RightSB bot Stroke Hook - [Just SLAB-INWARD] : ArcEndInwardSerifR RightSB bot Stroke Hook - __ : glyph-proc + define [AutoEndSerifR sty top bot blend] : begin + define [object stroke] : SmallEpsilonShapeDim top bot blend + return : match sty + [Just SLAB-CLASSICAL] : ArcEndSerifR RightSB bot stroke Hook + [Just SLAB-INWARD] : ArcEndInwardSerifR RightSB bot stroke Hook + __ : glyph-proc define [CyrZeShapeDim top bot blend] : begin local stroke : AdviceStroke2 2 3 (top - bot) @@ -92,7 +96,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin [Just SLAB-CLASSICAL] : SerifedArcStart_LtrRhs SB Middle top stroke hook [Just SLAB-INWARD] : InwardSlabArcStart_LtrRhs SB Middle top stroke hook __ : list [g4 (SB - O) (top - hook) : widths.rhs] [hookstart (top - O)] - g4 RightSB (top - adb) + g4 RightSB [YSmoothMidR top (midy - stroke / 2)] arcvh flat Middle (midy - (fine - stroke / 2)) [widths.heading 0 fine Leftward] curl midx (midy - (fine - stroke / 2)) [heading Leftward] @@ -103,7 +107,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin flat midx (midy + (fine - stroke / 2)) [widths.rhs.heading fine Rightward] curl Middle (midy + (fine - stroke / 2)) [heading Rightward] archv - g4 (RightSB - OX * 2) (bot + ada) [widths.rhs stroke] + g4 (RightSB - OX * 2) [YSmoothMidR (midy + stroke / 2) bot] [widths.rhs stroke] match slabType [Just SLAB-CLASSICAL] : SerifedArcEnd_RtlRhs SB Middle bot stroke hook [Just SLAB-INWARD] : InwardSlabArcEnd_RtlRhs SB Middle bot stroke hook @@ -132,15 +136,19 @@ glyph-block Letter-Greek-Lower-Epsilon : begin CyrZeUpperShape slabTop top bot blend hook CyrZeLowerShapeTailed SLAB-NONE top bot blend hook - define [AutoStartSerifL sty top] : match sty - [Just SLAB-CLASSICAL] : ArcStartSerifL SB top Stroke Hook - [Just SLAB-INWARD] : ArcStartInwardSerifL SB top Stroke Hook - __ : glyph-proc + define [AutoStartSerifL sty top bot blend] : begin + define [object stroke] : CyrZeShapeDim top bot blend + return : match sty + [Just SLAB-CLASSICAL] : ArcStartSerifL SB top stroke Hook + [Just SLAB-INWARD] : ArcStartInwardSerifL SB top stroke Hook + __ : glyph-proc - define [AutoEndSerifL sty bot] : match sty - [Just SLAB-CLASSICAL] : ArcEndSerifL SB bot Stroke Hook - [Just SLAB-INWARD] : ArcEndInwardSerifL SB bot Stroke Hook - __ : glyph-proc + define [AutoEndSerifL sty top bot blend] : begin + define [object stroke] : CyrZeShapeDim top bot blend + return : match sty + [Just SLAB-CLASSICAL] : ArcEndSerifL SB bot stroke Hook + [Just SLAB-INWARD] : ArcEndInwardSerifL SB bot stroke Hook + __ : glyph-proc define EpsilonConfig : object serifless { SLAB-NONE SLAB-NONE } @@ -156,42 +164,42 @@ glyph-block Letter-Greek-Lower-Epsilon : begin create-glyph "latn/Epsilon.\(suffix)" : glyph-proc include : MarkSet.capital include : SmallEpsilonShape slabTop slabBot CAP 0 StdBlend Hook - include : AutoStartSerifR slabTop CAP - include : AutoEndSerifR slabBot 0 + include : AutoStartSerifR slabTop CAP 0 StdBlend + include : AutoEndSerifR slabBot CAP 0 StdBlend create-glyph "latn/epsilon.\(suffix)" : glyph-proc include : MarkSet.e include : SmallEpsilonShape slabTop slabBot XH 0 StdBlend SHook - include : AutoStartSerifR slabTop XH - include : AutoEndSerifR slabBot 0 + include : AutoStartSerifR slabTop XH 0 StdBlend + include : AutoEndSerifR slabBot XH 0 StdBlend create-glyph "cyrl/Ze.\(suffix)" : glyph-proc include : MarkSet.capital include : CyrZeShape slabTop slabBot CAP 0 StdBlend Hook - include : AutoStartSerifL slabTop CAP - include : AutoEndSerifL slabBot 0 + include : AutoStartSerifL slabTop CAP 0 StdBlend + include : AutoEndSerifL slabBot CAP 0 StdBlend create-glyph "cyrl/ze.\(suffix)" : glyph-proc include : MarkSet.e include : CyrZeShape slabTop slabBot XH 0 StdBlend SHook - include : AutoStartSerifL slabTop XH - include : AutoEndSerifL slabBot 0 + include : AutoStartSerifL slabTop XH 0 StdBlend + include : AutoEndSerifL slabBot XH 0 StdBlend create-glyph "cyrl/ze.BGR.\(suffix)" : glyph-proc include : MarkSet.p include : CyrZeShape slabTop slabBot XH Descender StdBlend SHook - include : AutoStartSerifL slabTop XH - include : AutoEndSerifL slabBot Descender + include : AutoStartSerifL slabTop XH Descender StdBlend + include : AutoEndSerifL slabBot XH Descender StdBlend create-glyph "cyrl/KsiBase.\(suffix)" : glyph-proc include : MarkSet.capital include : CyrKsiBaseShape slabTop CAP 0 StdBlend Hook - include : AutoStartSerifL slabTop CAP + include : AutoStartSerifL slabTop CAP 0 StdBlend create-glyph "cyrl/ksiBase.\(suffix)" : glyph-proc include : MarkSet.e include : CyrKsiBaseShape slabTop XH 0 StdBlend SHook - include : AutoStartSerifL slabTop XH + include : AutoStartSerifL slabTop XH 0 StdBlend alias 'grek/epsilon' 0x3B5 'latn/epsilon.serifless' select-variant 'latn/Epsilon' 0x190 diff --git a/font-src/glyphs/letter/greek/qoppa.ptl b/font-src/glyphs/letter/greek/qoppa.ptl index 0a5387be0..9c8d46c81 100644 --- a/font-src/glyphs/letter/greek/qoppa.ptl +++ b/font-src/glyphs/letter/greek/qoppa.ptl @@ -27,7 +27,7 @@ glyph-block Letter-Greek-Qoppa : begin if SLAB : begin define kSerifShift : 0.45 * ((0.3 * (RightSB - SB)) / (CAP / 2 + HalfStroke)) include : HSerif.mb (x2co + kSerifShift * Stroke) 0 Jut - include : HSerif.mt (x2 - kSerifShift * Stroke) CAP Jut + include : HSerif.mt (x2 - kSerifShift * Stroke) CAP Jut create-glyph 'grek/qoppa' 0x3DF : glyph-proc include : MarkSet.b diff --git a/font-src/glyphs/letter/latin-ext/eszet.ptl b/font-src/glyphs/letter/latin-ext/eszet.ptl index 1b2e591db..47da56682 100644 --- a/font-src/glyphs/letter/latin-ext/eszet.ptl +++ b/font-src/glyphs/letter/latin-ext/eszet.ptl @@ -15,14 +15,6 @@ glyph-block Letter-Latin-Lower-Eszet : begin define DESCENDING 1 define TAILED 2 - local ymiddle : [mix 0 Ascender 0.5] - HalfStroke - local ymiddleCap : [mix 0 Ascender 0.54] - HalfStroke - local xmiddle : Math.max (SB + Stroke * HVContrast * 1.2) (RightSB - ymiddle / 2 - Stroke * 0.75) - local xmiddleBot : Math.max (SB + Stroke * HVContrast * 1.2) (RightSB - ymiddle / 2 - Stroke * 0.75) - local xfinal : Math.min - xmiddle - 1 - Stroke * TanSlope - Math.max (SB + Stroke * 2) [mix SB RightSB (1 / 4)] - define [TraditionalBody fFlathook slab tail] : glyph-proc include : MarkSet.b local l : SB * 1 @@ -66,24 +58,31 @@ glyph-block Letter-Latin-Lower-Eszet : begin define [SulzbacherBody slab tail] : glyph-proc + define ymiddle : [mix 0 Ascender 0.5] - HalfStroke + define xFinal : Math.max + mix (SB + Stroke * HVContrast) RightSB 0.1 + mix SB RightSB 0.3 + define xMiddle : Math.max xFinal (SB + Stroke * HVContrast * 1.2) (RightSB - ymiddle / 2 - Stroke * 0.75) + define xMiddleBot : Math.max xMiddle (xFinal + 0.01 + TanSlope * Stroke) + include : MarkSet.b include : dispiro widths.rhs flat SB 0 [heading Upward] curl SB XH arcvh - g4 (Middle + O) (Ascender - O) + g4 (Middle - CorrectionOMidS) (Ascender - O) archv - g4 (RightSB + O * 2) [mix Ascender ymiddle 0.47] - g4.left.end xmiddle ymiddle [heading Leftward] + g4 (RightSB + O * 2) [YSmoothMidR ymiddle Ascender] + g4.left.end xMiddle ymiddle [heading Leftward] include : dispiro widths.rhs - g4.right.start xmiddle (ymiddle + Stroke) [heading Rightward] + g4.right.start xMiddle (ymiddle + Stroke) [heading Rightward] archv - g4 (RightSB - O) [mix 0 (ymiddle + Stroke) 0.5] + g4 (RightSB - O) [YSmoothMidR (ymiddle + Stroke) 0] arcvh - flat xmiddleBot 0 - curl xfinal 0 [heading Leftward] + flat xMiddleBot 0 [heading Leftward] + curl xFinal 0 [heading Leftward] if slab : include : HSerif.lb SB 0 SideJut include : match tail @@ -98,7 +97,7 @@ glyph-block Letter-Latin-Lower-Eszet : begin define swOuter : AdviceStroke2 2 3 Ascender define strokeCoeff : StrokeWidthBlend 0 1 swInner define sEndX : Math.max - SB + swOuter * HVContrast + (RightSB - SB - Stroke) * 0.1 + mix (SB + Stroke * HVContrast) RightSB 0.1 mix SB RightSB 0.3 define swInner : AdviceStroke2 2.5 3 Ascender define ess: swInner * EssLower / Stroke @@ -125,7 +124,7 @@ glyph-block Letter-Latin-Lower-Eszet : begin alsoThru.g2 0.5 0.50 [widths.center swInner] g4 (RightSB - OX) (innerSmoothB - 2 * TanSlope * swInner) [widths.rhs.heading swInner Downward] arcvh - flat ([Math.max (sEndX + 1) : Math.min (RightSB - innerSmoothB) [mix sEndX RightSB 0.375]] + CorrectionOMidX * swInner / 2 + TanSlope * swInner ) 0 + flat ([Math.max (sEndX + 0.1 + TanSlope * swInner) : Math.min (RightSB - innerSmoothB) [mix sEndX RightSB 0.375]] + CorrectionOMidX * swInner / 2 + TanSlope * swInner ) 0 curl sEndX 0 [heading Leftward] if slab : include : HSerif.lb SB 0 SideJut @@ -154,35 +153,37 @@ glyph-block Letter-Latin-Upper-Eszet : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - local ymiddle : [mix 0 CAP 0.5] - HalfStroke - local ymiddleCap : [mix 0 CAP 0.54] - HalfStroke - local xmiddle : Math.max (SB + Stroke * HVContrast * 1.2) (RightSB - ymiddle / 2 - Stroke * 0.75) - local xmiddleBot : Math.max (SB + Stroke * HVContrast * 1.2) (RightSB - ymiddle / 2 - Stroke * 0.75) - local xfinal : Math.min - xmiddle - 1 - Stroke * TanSlope - Math.max (SB + Stroke * 2) [mix SB RightSB (1 / 4)] create-glyph 'Eszet' 0x1E9E : glyph-proc include : MarkSet.capital - local rightTopX : RightSB + O * 4 + + define ymiddle : [mix 0 CAP 0.5] - HalfStroke + define ymiddleCap : [mix 0 CAP 0.54] - HalfStroke + define xFinal : Math.max + mix (SB + Stroke * HVContrast) RightSB 0.1 + mix SB RightSB 0.3 + define xMiddle : Math.max xFinal (SB + Stroke * HVContrast * 1.2) (RightSB - ymiddle / 2 - Stroke * 0.75) + define xMiddleBot : Math.max xMiddle (xFinal + 0.01 + TanSlope * Stroke) + define rightTopX : RightSB + O + include : dispiro widths.lhs - flat rightTopX CAP + flat rightTopX CAP [heading Leftward] curl Middle CAP archv flat SB XH curl SB 0 [heading Downward] include : dispiro widths.rhs - g4 xmiddle (ymiddleCap + Stroke) [heading Rightward] + g4 xMiddle (ymiddleCap + Stroke) [heading Rightward] archv - g4 (RightSB - O * 2) [mix 0 (ymiddleCap + Stroke) 0.5] + g4 (RightSB - O * 2) [YSmoothMidR (ymiddleCap + Stroke) 0] arcvh - flat xmiddleBot 0 - curl xfinal 0 [heading Leftward] + flat xMiddleBot 0 + curl xFinal 0 [heading Leftward] include : dispiro widths.rhs g4 rightTopX (CAP - Stroke) - g4 xmiddle (ymiddleCap + Stroke) [widths Stroke 0] - if SLAB : include : HSerif.lb SB 0 SideJut + g4 xMiddle (ymiddleCap + Stroke) [widths Stroke 0] + if SLAB : include : HSerif.lb SB 0 SideJut diff --git a/font-src/glyphs/letter/latin/c.ptl b/font-src/glyphs/letter/latin/c.ptl index ff5fc0d4f..2d4312d86 100644 --- a/font-src/glyphs/letter/latin/c.ptl +++ b/font-src/glyphs/letter/latin/c.ptl @@ -406,6 +406,7 @@ glyph-block Letter-Latin-C : begin refer-glyph src Rect (CAP / 2) Descender (Middle + Stroke * HVContrast) (Width * 4) Rect (XH / 2) [mix Stroke Hook 0.5] Middle (Width * 4) + if SLAB : include : HSerif.mb (Middle + HalfStroke * HVContrast) Descender MidJutSide derive-glyphs 'cyrl/koppa' 0x481 'cTopSerifOnly' : lambda [src gr] : glyph-proc include : MarkSet.p @@ -413,6 +414,7 @@ glyph-block Letter-Latin-C : begin refer-glyph src Rect (XH / 2) Descender (Middle + Stroke * HVContrast) (Width * 4) Rect (XH / 2) [mix Stroke Hook 0.5] Middle (Width * 4) + if SLAB : include : HSerif.mb (Middle + HalfStroke * HVContrast) Descender MidJutSide derive-composites 'CCedilla' 0xC7 'C' 'cedillaExtShapeBelowOArc' derive-composites 'cCedilla' 0xE7 'c' 'cedillaExtShapeBelowOArc' diff --git a/font-src/glyphs/letter/latin/k.ptl b/font-src/glyphs/letter/latin/k.ptl index 68730764f..7dec75594 100644 --- a/font-src/glyphs/letter/latin/k.ptl +++ b/font-src/glyphs/letter/latin/k.ptl @@ -47,7 +47,11 @@ glyph-block Letter-Latin-K : begin set-base-anchor 'trailing' (kshRightBot - Ok) 0 - define [TopStrokeMask offset] : Rect top 0 kshLeft [if [maskBit slabLegs 1] (kshRightTop + offset) (2 * Width)] + local kshRightSerifs : right + [KBalanceRight true true] + local serifLengthAdj : Ok + stroke * HVContrast + define [TopStrokeMask offset] : Rect top 0 kshLeft [if [maskBit slabLegs 1] (kshRightSerifs - serifLengthAdj + offset + SideJut + serifLengthAdj - TanSlope * Stroke) (2 * Width)] + define [BottomStrokeMask offset] : Rect top 0 kshLeft [if [maskBit slabLegs 0] (kshRightSerifs - serifLengthAdj + offset + SideJut + serifLengthAdj + TanSlope * Stroke) (2 * Width)] + if [not fHookTop] : include : intersection TopStrokeMask 0 dispiro @@ -63,6 +67,7 @@ glyph-block Letter-Latin-K : begin curl (kshLeft + stroke) attach [widths.rhs fine] include : intersection + BottomStrokeMask (-0.1) spiro-outline corner (kshLeft + stroke) 0 corner (kshLeft + stroke) (attach + 1) @@ -70,9 +75,8 @@ glyph-block Letter-Latin-K : begin corner (kshRightBot - Ok) top corner (kshRightBot - Ok) 0 dispiro - widths.lhs stroke - flat (kshRightBot - Ok) 0 - curl (kshLeft + stroke) attach2 + flat (kshRightBot - Ok) 0 [widths.lhs stroke] + curl (kshLeft + stroke) attach2 [widths.lhs fine] include : difference union @@ -214,7 +218,7 @@ glyph-block Letter-Latin-K : begin define [KCursiveLoopAndLegDimen top straightBar slabLeft slabLegs] : begin define kshLeft : SB + [KBalance slabLeft straightBar] - define kshRight : RightSB + [KBalanceRightCursive slabLegs straightBar] + 0.2 * Stroke + define kshRight : RightSB + [KBalanceRightCursive slabLegs straightBar] define arcFine : Stroke * CThin define arcStroke : AdviceStroke2 2 3 top @@ -238,7 +242,7 @@ glyph-block Letter-Latin-K : begin define arcBottomX : mix arcStartX kshRight pArcBottomX define arcBottomY : mix 0 top pArcBottomY define arcTerminalY : arcBottomY + arcStroke * 0.125 - O - define arcRightX : kshRight * pArcRightX + define arcRightX : kshRight * pArcRightX + 0.2 * Stroke * HVContrast define arcRightY : mix arcBottomY top pArcRightY define arcTopX : mix arcStartX arcRightX pArcTopX define arcTopY : top - O @@ -249,6 +253,8 @@ glyph-block Letter-Latin-K : begin define [KCursiveLoopAndLegShapeImpl tailed] : function [fHookTop left right stroke top slabLeft slabLegs attachment] : glyph-proc define dim : KCursiveLoopAndLegDimen top true slabLeft slabLegs + local Ok : KO slabLegs true top stroke + include : dispiro g4.up.start dim.arcStartX dim.arcStartY [widths.heading 0 dim.arcFine Upward] arcvh 8 2.0 @@ -279,7 +285,7 @@ glyph-block Letter-Latin-K : begin Rect XH 0 0 [if slabLegs (dim.slabStartX + SideJut) (Width * 2)] dispiro flat dim.arcTerminalX dim.arcTerminalY [widths.lhs] - curl dim.kshRight 0 [widths.rhs] + curl (dim.kshRight - Ok) 0 [widths.rhs] spiro-outline g4.up.start (dim.arcStartX - O) dim.arcStartY arcvh 4 2.1 @@ -292,9 +298,10 @@ glyph-block Letter-Latin-K : begin if (slabLegs && !tailed) : include : HSerif.rb dim.slabStartX 0 SideJut if attachment : include : attachment.rSideJut - x -- dim.slabStartX - jut -- Jut + x -- [if slabLegs dim.slabStartX (dim.kshRight - Ok)] + xLink -- (xDTStart - Stroke * HVContrast) y -- 0 + jut -- Jut define [KHookTopBar slabLegs straightBar] : HooktopLeftBar.inner x -- SB + [KBalance slabLegs straightBar] @@ -460,14 +467,16 @@ glyph-block Letter-Latin-K : begin define [BashkirKaShape df top] : glyph-proc local left : if slabTop ([mix SB RightSB 0.35] - df.mvs / 2 * HVContrast) [mix SB RightSB 0.2] local leftNB : left - [KBalance slabTop straightBar] - local barLeft : mix 0 SB [if slabTop 0.25 0.375] + local xTopBarLeftEnd : mix 0 SB [if slabTop 0.25 0.375] local sw : AdviceStroke 3 - include : HBar.t barLeft (Stroke * 0.1 + left) top + include : HBar.t xTopBarLeftEnd (Stroke * 0.1 + left) top include : VBar.l left 0 top sw - include : LegsImpl false leftNB RightSB Stroke top slabTop slabLegs - if slabTop : include : VSerif.dl barLeft top VJut (df.mvs / HVContrast) - if slabBot : include : HSerif.mb (left + HalfStroke * HVContrast) 0 Jut + include : LegsImpl false leftNB RightSB sw top slabTop slabLegs + if slabTop : include : VSerif.dl xTopBarLeftEnd top VJut + Math.min (VJutStroke * df.mvs / Stroke) (0.625 * (left - xTopBarLeftEnd)) + if slabBot : begin + include : HSerif.mb (left + 0.5 * sw * HVContrast) 0 Jut create-glyph "cyrl/BashkirUpperKa.\(suffix)" : glyph-proc define df : DivFrame 1 diff --git a/font-src/glyphs/letter/latin/lower-e.ptl b/font-src/glyphs/letter/latin/lower-e.ptl index 7d8f38820..cc9c3e013 100644 --- a/font-src/glyphs/letter/latin/lower-e.ptl +++ b/font-src/glyphs/letter/latin/lower-e.ptl @@ -110,7 +110,7 @@ glyph-block Letter-Latin-Lower-E : begin define dfSub : DivFrame divSub 2 include : Body dfSub top df.mvs if fDesc : include : difference - VBar.m dfSub.middle (- AccentStackOffset) 0 [AdviceStroke 3.5 df.div] + VBar.m dfSub.middle (-AccentStackOffset) (df.mvs + O) [AdviceStroke 3.5 df.div] OShapeOutline.NoOvershoot top 0 dfSub.leftSB dfSub.rightSB df.mvs include : Translate (Width * (df.div - divSub)) 0 diff --git a/font-src/glyphs/letter/latin/lower-r.ptl b/font-src/glyphs/letter/latin/lower-r.ptl index 2b6773a2d..e3ccef2d7 100644 --- a/font-src/glyphs/letter/latin/lower-r.ptl +++ b/font-src/glyphs/letter/latin/lower-r.ptl @@ -28,11 +28,11 @@ glyph-block Letter-Latin-Lower-R : begin local strokeA : mix strokeBar stroke 0.5 local { rBalanceMultiplier rHookMultiplier rHookSwMultiplier rSerifLeftExtender hookSuperness } : match mode [Just rStraight] { 1 1 0 0 2.35 } - [Just rSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.75 } + [Just rSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.35 } [Just rNarrow] { (2 * (df.div - 0.5)) 1 0 0 2.35 } [Just rNarrowSerifed] { (5 / 8 * df.div) (3 / 4) 0 (1 / 2 * [Math.max 0 : mix 1 df.div 4]) 2.35 } [Just rCornerHooked] { (2 * (df.div - 0.5)) 1 0 0 2.35 } - [Just rCornerHookedSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.75 } + [Just rCornerHookedSerifed] { (4 / 3) (2 / 3) (1 / 4) (1 / 3) 2.35 } [Just rEarless] { 1 1 0 0 2.35 } local xBar : match mode @@ -66,7 +66,7 @@ glyph-block Letter-Latin-Lower-R : begin 0.65 + 0.25 * strokeA / Width + 4 * TanSlope * strokeA / Width __ : 0.65 + 4 * TanSlope * strokeA / Width local rmiddlein : [mix xBar (rHookX - strokeA * HVContrast * 1.05) mixpin] - CorrectionOMidS - local skew : Math.max 0 : (xArchMiddle - rmiddlein) / stroke + local skew : Math.max 0 : (xArchMiddle - rmiddlein) / stroke - TanSlope local rHookY : RHook * rHookMultiplier + stroke * rHookSwMultiplier local rHookXN : match mode [Just rNarrowSerifed] : mix df.width rHookX df.div @@ -86,9 +86,9 @@ glyph-block Letter-Latin-Lower-R : begin include : dispiro widths.lhs g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward] - arcvh nothing hookSuperness + arcvh 32 hookSuperness g4.left.mid (xArchMiddle - CorrectionOMidS * [linreg 72 0.75 108 1 Stroke]) (XH - O) [widths.heading Stroke 0 {.y (-1) .x (-skew)}] - archv + archv 32 straight.down.end (xBar - fine * HVContrast) (XH * 0.53 + (SmallArchDepth - SmallArchDepthA)) [widths.heading fine 0 Downward] include : VBar.r xBar 0 XH if doBottomSerif : include : rBottomSerif 0 diff --git a/font-src/glyphs/letter/latin/lower-y.ptl b/font-src/glyphs/letter/latin/lower-y.ptl index 674667a03..75542eec5 100644 --- a/font-src/glyphs/letter/latin/lower-y.ptl +++ b/font-src/glyphs/letter/latin/lower-y.ptl @@ -228,6 +228,7 @@ glyph-block Letter-Latin-Lower-Y : begin yTopKnots (Width - yrstroker) top bottom ds (-1) yJoinKnots ds ds2 top bottom true SmallYStrokeSplitMask top bottom true (-1) + Rect (bottom + HalfStroke) (bottom - top) 0 Width if doSlabTop : include : let [sf : SerifFrame top bottom SB RightSB] sf.lt.full if doSlabBottom : include : yBaseSerif top bottom @@ -356,6 +357,7 @@ glyph-block Letter-Latin-Lower-Y : begin include : hookShape (XH - Hook - HalfStroke) Descender include : VerticalHook.r RightSB (XH - Hook - HalfStroke) HookX (-Hook) include : Cursive.Serifs XH slabKind + eject-contour 'serifRT' create-glyph "yCap.\(suffix)" : glyph-proc include : MarkSet.capital diff --git a/font-src/glyphs/letter/latin/s.ptl b/font-src/glyphs/letter/latin/s.ptl index 440779a6f..e4bb8fd89 100644 --- a/font-src/glyphs/letter/latin/s.ptl +++ b/font-src/glyphs/letter/latin/s.ptl @@ -32,7 +32,7 @@ glyph-block Letter-Latin-S : begin local stroke : fallback _stroke Stroke local strokeFactor : stroke * [clamp 1 2 : linreg 126 1 137 1.025 stroke] * [clamp 0 1 : Math.pow (Width / HalfUPM) 0.5] local widthFactor : RightSB - SB - local ss : y * 0.22 + 0.075 * strokeFactor + 0.05 * widthFactor + local ss : y * 0.22 + 0.12 * strokeFactor + 0.05 * widthFactor return : ss + sign * TanSlope * SmoothAdjust define [SStrokeDollarInterruptGap deltaX top bot gap stroke refSwEss] : begin diff --git a/font-src/glyphs/letter/latin/upper-n.ptl b/font-src/glyphs/letter/latin/upper-n.ptl index 0c8ddb9eb..2ce55b2dc 100644 --- a/font-src/glyphs/letter/latin/upper-n.ptl +++ b/font-src/glyphs/letter/latin/upper-n.ptl @@ -62,6 +62,7 @@ glyph-block Letter-Latin-Upper-N : begin include : MarkSet.capDesc include : NShape bodyType slabType CAP SB RightSB (crDiag -- crD) include : VerticalHook.r RightSB 0 (-HookX) Hook + include : VBar.r RightSB 0 CAP create-glyph "Nltail.\(suffix)" : glyph-proc include [refer-glyph "N.\(suffix)"] AS_BASE ALSO_METRICS diff --git a/font-src/glyphs/letter/latin/upper-p.ptl b/font-src/glyphs/letter/latin/upper-p.ptl index db0a3fd5d..624342ee5 100644 --- a/font-src/glyphs/letter/latin/upper-p.ptl +++ b/font-src/glyphs/letter/latin/upper-p.ptl @@ -106,7 +106,7 @@ glyph-block Letter-Latin-Upper-P : begin 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 + Math.min ([PBarPosY top sw bp] - sw) sw Math.max ([PBarPosY top sw bp] + sw) [mix top [PBarPosY top sw bp] 0.5] 0.2 * (RightSB - SB) * ([AdviceStroke 5] / Stroke) diff --git a/font-src/glyphs/letter/latin/upper-r.ptl b/font-src/glyphs/letter/latin/upper-r.ptl index 91d2a04e4..e78f7fd04 100644 --- a/font-src/glyphs/letter/latin/upper-r.ptl +++ b/font-src/glyphs/letter/latin/upper-r.ptl @@ -16,8 +16,8 @@ glyph-block Letter-Latin-Upper-R : begin define LEG-SHAPE-STRAIGHT 1 define LEG-SHAPE-STANDING 2 - define [RLegTerminalX legShape right sw] : right - [if legShape (OX * 2) 0] - sw / 2 * HVContrast - define [RSlabExtraShift slab sw] : if slab (-Jut / 2 + 0.25 * sw * HVContrast) 0 + define [RLegTerminalX legShape right sw] : right - [if legShape (OX * 2) 0] + define [RSlabExtraShift slab sw] : if slab (-Jut / 2 + 0.5 * sw * HVContrast) 0 define [RLegDiagCor top bottom left right extraShift sw] : DiagCor (top - bottom) (right - left - extraShift) 0 sw define [RStandingLegFine sw] : sw * CThinB @@ -25,14 +25,18 @@ glyph-block Letter-Latin-Upper-R : begin define [RStandingBottomOverflow slab] : if slab 0 (2 * OX) define [RLegShape-Straight] : params [top bottom left right charTop slab sw extraShift] : glyph-proc - local xRightBottom : RLegTerminalX LEG-SHAPE-STRAIGHT right sw local shift : RSlabExtraShift slab sw - include : dispiro - widths.center (sw * [RLegDiagCor top bottom left right extraShift sw]) - corner (left + extraShift + shift / 2) top [heading Downward] - corner (xRightBottom + shift) bottom [heading Downward] + local xLeftTop : Math.max (PShape.BarPos + sw * HVContrast) (left - 0.5 * sw * HVContrast + shift) + local xRightBottom : [RLegTerminalX LEG-SHAPE-STRAIGHT right sw] + shift + local xRightBottomSerifStart : xRightBottom - 0.25 * sw * HVContrast + include : intersection + Rect top bottom (-Width) [if slab xRightBottomSerifStart (2 * Width)] + dispiro + corner xLeftTop top [widths.lhs sw] + corner xRightBottom bottom [widths.rhs sw] + if slab : begin - include : HSerif.rb (xRightBottom + shift + 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8) + include : HSerif.rb xRightBottomSerifStart 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 @@ -40,7 +44,7 @@ glyph-block Letter-Latin-Upper-R : begin Rect top bottom (-Width) (2 * Width) dispiro widths.center sw - g4.up.start xRightBottom bottom [heading Upward] + g4.up.start (xRightBottom - 0.5 * sw * HVContrast) bottom [heading Upward] quadControls 0 0.4 8 g4 left top if slab : begin @@ -65,17 +69,21 @@ glyph-block Letter-Latin-Upper-R : begin define RLegShapes { RLegShape-Curly RLegShape-Straight RLegShape-Standing } - define [RevRLegTerminalX legShape left sw] : left + [if legShape (OX * 2) 0] + sw / 2 * HVContrast + define [RevRLegTerminalX legShape left sw] : left + [if legShape (OX * 2) 0] define [RevRLegShape-Straight] : params [top bottom left right charTop slab sw extraShift] : glyph-proc - local xLeftBottom : RevRLegTerminalX LEG-SHAPE-STRAIGHT left sw local shift : RSlabExtraShift slab sw - include : dispiro - widths.center (sw * [RLegDiagCor top bottom left right extraShift sw]) - corner (right - extraShift - shift / 2) top [heading Downward] - corner (xLeftBottom - shift) bottom [heading Downward] + local xLeftBottom : [RevRLegTerminalX LEG-SHAPE-STRAIGHT left sw] - shift + local xLeftBottomSerifStart : xLeftBottom + 0.25 * sw * HVContrast + local xRightTop : Math.min (RightSB - PShape.BarPos - sw * HVContrast) (right + 0.5 * sw * HVContrast - shift) + + include : intersection + Rect top bottom [if slab xLeftBottomSerifStart (-Width)] (2 * Width) + dispiro + corner xRightTop top [widths.rhs sw] + corner xLeftBottom bottom [widths.lhs sw] if slab : begin - include : HSerif.lb (xLeftBottom - shift - 0.25 * sw * HVContrast) bottom (SideJut + Jut / 8) + include : HSerif.lb xLeftBottomSerifStart 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 @@ -83,7 +91,7 @@ glyph-block Letter-Latin-Upper-R : begin Rect top 0 (-Width) (2 * Width) dispiro widths.center sw - g4.up.start xLeftBottom bottom [heading Upward] + g4.up.start (xLeftBottom + 0.5 * sw * HVContrast) bottom [heading Upward] quadControls 0 0.4 8 g4 right top if slab : begin diff --git a/font-src/glyphs/letter/shared.ptl b/font-src/glyphs/letter/shared.ptl index 879b58bee..ce48c8484 100644 --- a/font-src/glyphs/letter/shared.ptl +++ b/font-src/glyphs/letter/shared.ptl @@ -391,7 +391,7 @@ glyph-block Letter-Shared-Shapes : begin sx - (barSw - fine) * HVContrast cy - hook + O * 2 widths.lhs.heading fine Upward - arcvh + arcvh.superness 2 ShoulderMidKnotLhs cx (cy - O) fine sw (-1) (-1) archv @@ -404,7 +404,7 @@ glyph-block Letter-Shared-Shapes : begin sx + (barSw - fine) * HVContrast cy - hook + O * 2 widths.rhs.heading fine Upward - arcvh + arcvh.superness 2 ShoulderMidKnotRhs cx (cy - O) fine sw (+1) (-1) archv @@ -415,7 +415,7 @@ glyph-block Letter-Shared-Shapes : begin return : list arcvh ShoulderMidKnotRhs cx (cy + O) fine sw (-1) (+1) - archv + archv.superness 2 g4.up.end sx + (barSw - fine) * HVContrast cy + hook - O * 2 @@ -428,7 +428,7 @@ glyph-block Letter-Shared-Shapes : begin return : list arcvh ShoulderMidKnotLhs cx (cy + O) fine sw (+1) (+1) - archv + archv.superness 2 g4.up.end sx - (barSw - fine) * HVContrast cy + hook - O * 2 @@ -498,9 +498,11 @@ glyph-block Letter-Shared-Shapes : begin return : VBar.r cx (cy + hook + DToothlessRise / 2) (cy + DToothlessRise) [ArcStartSerifWidth stroke] glyph-block-export ArcStartHookTop - define [ArcStartHookTop cx cy sw hookX hookY] : union - VBar.r cx (cy - hookY + O * 2) cy sw - VerticalHook.r cx cy hookX (-hookY) sw + define [ArcStartHookTop cx cy stroke hookX hookY] : begin + local sw : ArcStartSerifWidth stroke + return : union + VBar.r cx (cy - hookY + O * 2) cy sw + VerticalHook.r cx cy hookX (-hookY) sw define DiagTailDefaultAngle 40 diff --git a/font-src/glyphs/symbol/punctuation/ampersand.ptl b/font-src/glyphs/symbol/punctuation/ampersand.ptl index eadb58d9d..dd14a3493 100644 --- a/font-src/glyphs/symbol/punctuation/ampersand.ptl +++ b/font-src/glyphs/symbol/punctuation/ampersand.ptl @@ -191,7 +191,7 @@ glyph-block Symbol-Punctuation-Ampersand : begin define FORM-TOOTHED 3 define [EtUpperHalf] : dispiro - g4 (xEtRight + O) (CAP - SHook) [widths.lhs] + g4 xEtRight (CAP - SHook) [widths.lhs] hookstart (CAP - O) g4 xEtLeft (CAP - adaEt) arcvh diff --git a/font-src/meta/aesthetics.ptl b/font-src/meta/aesthetics.ptl index bae4bb45b..24e9a3f0c 100644 --- a/font-src/meta/aesthetics.ptl +++ b/font-src/meta/aesthetics.ptl @@ -145,13 +145,17 @@ export : define [calculateMetrics para] : begin define SmoothAdjust : StrokeWidthBlend 80 144 define [ArchDepthAOf archDepth width] : archDepth - TanSlope * SmoothAdjust / Width * width define [ArchDepthBOf archDepth width] : archDepth + TanSlope * SmoothAdjust / Width * width - define [YSmoothMidR top bot ada adb] : begin + define [YSmoothMidR top bot _ada _adb] : begin + local ada : fallback _ada ArchDepthA + local adb : fallback _adb ArchDepthB local delta : (adb - ada) / 2 local smOfSma : ada + delta local smOfSmb : adb - delta local yNotAdjusted : mix top bot (smOfSmb / (smOfSma + smOfSmb)) return : yNotAdjusted - delta - define [YSmoothMidL top bot ada adb] : begin + define [YSmoothMidL top bot _ada _adb] : begin + local ada : fallback _ada ArchDepthA + local adb : fallback _adb ArchDepthB local delta : (adb - ada) / 2 local smOfSma : ada + delta local smOfSmb : adb - delta