From 7769e1f30e639e2da7599b12c96bdbe47f5249b9 Mon Sep 17 00:00:00 2001 From: be5invis Date: Tue, 13 Dec 2022 04:38:52 -0800 Subject: [PATCH] Add - LATIN SMALL LETTER B WITH PALATAL HOOK (`U+1D80`) ... LATIN SMALL LETTER Z WITH PALATAL HOOK (`U+1D8E`). - MODIFIER LETTER SMALL L WITH PALATAL HOOK (`U+1DAA`). --- changes/16.8.0.md | 2 + font-src/glyphs/auto-build/transformed.ptl | 1 + font-src/glyphs/common/shapes.ptl | 26 ++++++------ font-src/glyphs/letter/latin-ext/long-s.ptl | 7 ++- font-src/glyphs/letter/latin/k.ptl | 11 ++++- font-src/glyphs/letter/latin/lower-b.ptl | 10 ++++- font-src/glyphs/letter/latin/lower-d.ptl | 7 ++- font-src/glyphs/letter/latin/lower-f.ptl | 36 +++++++++++++--- font-src/glyphs/letter/latin/lower-g.ptl | 40 ++++++++++++++---- font-src/glyphs/letter/latin/lower-il.ptl | 26 +++++++++++- font-src/glyphs/letter/latin/lower-m.ptl | 7 ++- font-src/glyphs/letter/latin/lower-n.ptl | 7 ++- font-src/glyphs/letter/latin/lower-p.ptl | 7 ++- font-src/glyphs/letter/latin/lower-r.ptl | 47 +++++++++++++-------- font-src/glyphs/letter/latin/s.ptl | 6 +++ font-src/glyphs/letter/latin/v.ptl | 17 ++++++-- font-src/glyphs/letter/latin/x.ptl | 1 + font-src/glyphs/letter/latin/z.ptl | 20 ++++++--- font-src/glyphs/letter/shared.ptl | 29 ++++++++----- font-src/kits/spiro-kit.mjs | 4 ++ font-src/meta/macros.ptl | 26 ++++++++---- params/variants.toml | 32 +++++++++++--- 22 files changed, 280 insertions(+), 89 deletions(-) diff --git a/changes/16.8.0.md b/changes/16.8.0.md index 584fc1805..8a961b912 100644 --- a/changes/16.8.0.md +++ b/changes/16.8.0.md @@ -1,6 +1,8 @@ * Add Characters: - LATIN SMALL LETTER INSULAR G (`U+1D79`). - LATIN SMALL LETTER TH WITH STRIKETHROUGH (`U+1D7A`). + - LATIN SMALL LETTER B WITH PALATAL HOOK (`U+1D80`) ... LATIN SMALL LETTER Z WITH PALATAL HOOK (`U+1D8E`). + - MODIFIER LETTER SMALL L WITH PALATAL HOOK (`U+1DAA`). - LATIN CAPITAL LETTER MIDDLE-WELSH LL (`U+1EFA`) ... LATIN SMALL LETTER Y WITH LOOP (`U+1EFF`). * Fix shape of: - MODIFIER LETTER SMALL OPEN E (`U+1D4B`). diff --git a/font-src/glyphs/auto-build/transformed.ptl b/font-src/glyphs/auto-build/transformed.ptl index b290db224..970bad532 100644 --- a/font-src/glyphs/auto-build/transformed.ptl +++ b/font-src/glyphs/auto-build/transformed.ptl @@ -275,6 +275,7 @@ glyph-block Autobuild-Transformed : begin list 0x1DA8 'jCurlyTail' list 0x1DAB 'smcpL' list 0x1DA9 'lRTail' + list 0x1DAA 'lPalatalHook' list 0x1DAC 'mLTail' list 0x1DAD 'turnmLeg' list 0x1DAE 'nltail' diff --git a/font-src/glyphs/common/shapes.ptl b/font-src/glyphs/common/shapes.ptl index e5baf2cc8..003fe6052 100644 --- a/font-src/glyphs/common/shapes.ptl +++ b/font-src/glyphs/common/shapes.ptl @@ -258,34 +258,34 @@ glyph-block CommonShapes : begin curl (left + (stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] glyph-block-export OBarLeftToothlessShape - define [OBarLeftToothlessShape] : params [[top XH] [left SB] [right RightSB] [rise SHook] [mBlend [Math.sqrt (1 / 2)]]] : glyph-proc + define [OBarLeftToothlessShape] : params [[top XH] [left SB] [right RightSB] [rise SHook] [mBlend [Math.sqrt (1 / 2)]] [sw Stroke]] : glyph-proc local fine ShoulderFine local st : shoulderMidSlope fine nothing 1 local sb : shoulderMidSlope fine nothing (-1) - local mt : [mix left right 0.5] + (st - CorrectionOMidX) * Stroke - local mb : [mix left right 0.5] + CorrectionOMidX * Stroke + local mt : [mix left right 0.5] + (st - CorrectionOMidX) * sw + local mb : [mix left right 0.5] + CorrectionOMidX * sw include : dispiro - g4 left rise [widths.lhs Stroke] + 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 Stroke 0 {.y (-1) .x (-st)}] + g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-st)}] archv - flat (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] - curl (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + flat (left + (sw - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] + curl (left + (sw - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] glyph-block-export OBarLeftRoundedShape - define [OBarLeftRoundedShape] : params [[top XH] [left SB] [right RightSB] [yTerminal CAP]] : glyph-proc + define [OBarLeftRoundedShape] : params [[top XH] [left SB] [right RightSB] [yTerminal CAP] [sw Stroke]] : glyph-proc local fine ShoulderFine local st : shoulderMidSlope fine nothing 1 local sb : shoulderMidSlope fine nothing (-1) - local mt : [mix left right 0.5] + (st - CorrectionOMidX) * Stroke + local mt : [mix left right 0.5] + (st - CorrectionOMidX) * sw local mb : [mix left right 0.5] + CorrectionOMidX * Stroke include : dispiro - flat left yTerminal [widths.lhs.heading Stroke Downward] + flat left yTerminal [widths.lhs.heading sw Downward] curl left SmallArchDepthB arcvh g4.right.mid mb O @@ -293,10 +293,10 @@ glyph-block CommonShapes : begin flat (right - OX) (0 + SmallArchDepthA) curl (right - OX) (top - SmallArchDepthB) arcvh - g4 (mt) (top - O) [widths.heading Stroke 0 {.y (-1) .x (-st)}] + g4 (mt) (top - O) [widths.heading sw 0 {.y (-1) .x (-st)}] archv - flat (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] - curl (left + (Stroke - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] + flat (left + (sw - fine) * HVContrast) (top - SmallArchDepthA) [widths fine 0] + curl (left + (sw - fine) * HVContrast) (top - SmallArchDepthA - 0.01) [widths fine 0] glyph-block-export OBarLeftToothlessTopShape define [OBarLeftToothlessTopShape _top _left _rise _mBlend] : glyph-proc diff --git a/font-src/glyphs/letter/latin-ext/long-s.ptl b/font-src/glyphs/letter/latin-ext/long-s.ptl index 17d844d22..39b29c594 100644 --- a/font-src/glyphs/letter/latin-ext/long-s.ptl +++ b/font-src/glyphs/letter/latin-ext/long-s.ptl @@ -8,7 +8,8 @@ glyph-module glyph-block Letter-Latin-Long-S : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - glyph-block-import Letter-Shared-Shapes : CurlyTail FlatHookDepth LetterBarOverlay + glyph-block-import Letter-Shared-Shapes : CurlyTail FlatHookDepth + glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook glyph-block-import Letter-Latin-Lower-F : StdSmallFBarLeftPos StdSmallFBarLeftPos0 define [LongSUpperHalf sign x top bottom hookX hookY _sw] : begin @@ -126,6 +127,10 @@ glyph-block Letter-Latin-Long-S : begin select-variant 'longs' 0x17F select-variant 'longsbar' 0x1E9D (follow -- 'longs') alias 'esh' 0x283 'longs.flatHookTailed' + derive-composites 'eshPalatalHook' 0x1D8B 'esh' + difference + PalatalHook (x -- RightSB) (y -- 0) (xAttach -- Middle) + intersection [MaskBelow 0] [MaskLeft (Middle + HVContrast * HalfStroke + [Math.max (Width / 16) [AdviceStroke 12]])] create-glyph 'eshCurlyTail' 0x286 : glyph-proc include : MarkSet.if diff --git a/font-src/glyphs/letter/latin/k.ptl b/font-src/glyphs/letter/latin/k.ptl index d8588e859..14f22039a 100644 --- a/font-src/glyphs/letter/latin/k.ptl +++ b/font-src/glyphs/letter/latin/k.ptl @@ -10,7 +10,7 @@ glyph-block Letter-Latin-K : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Letter-Shared-Shapes : DiagonalTailInnerRadius DiagonalTailF CyrDescender - glyph-block-import Letter-Shared-Shapes : LetterBarOverlay + glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook local [KBalance slab straightBar] : if slab (Width / 16) : if straightBar (Width / 32) 0 local [KBalanceRight slab straightBar] : if slab 0 : if straightBar (Width / 32) 0 @@ -283,6 +283,13 @@ glyph-block Letter-Latin-K : begin RightSB + [KBalanceRight slab straightBar] - [KO slab straightBar top Stroke] connex -- [if straightBar 1 0.1] + define [KPalatalHook top straightBar slabLeft slab] : begin + local xPos : RightSB + [KBalanceRight slab straightBar] - [KO slab straightBar top Stroke] + return : PalatalHook + x -- xPos + SideJut + y -- 0 + xAttach -- xPos - [if straightBar 1 0.1] * HVContrast * Stroke + define [KHookTopBar slab straightBar] : union VBarLeft (SB + [KBalance slab straightBar]) 0 (Ascender - Hook - HalfStroke) VerticalHook (SB + [KBalance slab straightBar] + HalfStroke * HVContrast) (Ascender - Hook - HalfStroke) HookX (-Hook) @@ -507,6 +514,7 @@ glyph-block Letter-Latin-K : begin if slabBot : include : tagged 'serifLB' CenterBottomSerif (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 create-glyph "kBar.\(suffix)" : glyph-proc include [refer-glyph "k.\(suffix)"] AS_BASE ALSO_METRICS @@ -538,6 +546,7 @@ glyph-block Letter-Latin-K : begin select-variant 'k' 'k' link-reduced-variant 'k/sansSerif' 'k' MathSansSerif select-variant 'kDescender' 0x2C6A + select-variant 'kPalatalHook' 0x1D84 (follow -- 'kDescender') select-variant 'kBar' 0xA741 (follow -- 'k') select-variant 'cyrl/kaStroke' 0x49F (shapeFrom -- 'kBar') (follow -- 'cyrl/Ka') diff --git a/font-src/glyphs/letter/latin/lower-b.ptl b/font-src/glyphs/letter/latin/lower-b.ptl index 36c017f0c..f1d62255e 100644 --- a/font-src/glyphs/letter/latin/lower-b.ptl +++ b/font-src/glyphs/letter/latin/lower-b.ptl @@ -9,7 +9,8 @@ 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 LetterBarOverlay + glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend HooktopLeftBar + glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook define [ToothedBody] : union OBarLeftShape @@ -48,9 +49,11 @@ glyph-block Letter-Latin-Lower-B : begin include : Serifs set-base-anchor 'overlayOnBar' (SB + 0.5 * Stroke * HVContrast) yOverlay set-base-anchor 'overlay' Middle (XH / 2) + create-glyph "bBar.\(suffix)" : glyph-proc include [refer-glyph "b.\(suffix)"] AS_BASE ALSO_METRICS include : LetterBarOverlay.l.in SB XH (Ascender - [if doTS Stroke 0]) + create-glyph "bSlash.\(suffix)" : glyph-proc include [refer-glyph "b.\(suffix)"] AS_BASE ALSO_METRICS include : dispiro @@ -62,6 +65,11 @@ glyph-block Letter-Latin-Lower-B : begin select-variant 'bBar' 0x180 (follow -- 'b') select-variant 'bSlash' 0x2422 (follow -- 'b') + derive-composites 'bPalatalHook' 0x1D80 'b' : PalatalHook + x -- [mix (Middle + CorrectionOMidS) RightSB 0.75] + y -- 0 + yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75] + link-reduced-variant 'b/sansSerif' 'b' MathSansSerif CreateAccentedComposition 'bTildeOver' 0x1D6C 'b' 'tildeOverOnBar' diff --git a/font-src/glyphs/letter/latin/lower-d.ptl b/font-src/glyphs/letter/latin/lower-d.ptl index b78d9e042..da6639019 100644 --- a/font-src/glyphs/letter/latin/lower-d.ptl +++ b/font-src/glyphs/letter/latin/lower-d.ptl @@ -10,7 +10,7 @@ glyph-block Letter-Latin-Lower-D : begin 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 + glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook define [ToothedBody] : union OBarRightShape @@ -82,6 +82,11 @@ glyph-block Letter-Latin-Lower-D : begin link-reduced-variant 'd/hookBottomBase' 'd' CreateAccentedComposition 'dTildeOver' 0x1D6D 'd' 'tildeOverOnBar' + derive-composites 'dPalatalHook' 0x1D81 'd/hookBottomBase' : PalatalHook + xAttach -- RightSB + x -- (RightSB + SideJut) + y -- 0 + define DCurlyTailConfig : object toothedSerifless { false } toothedTopSerifed { true } diff --git a/font-src/glyphs/letter/latin/lower-f.ptl b/font-src/glyphs/letter/latin/lower-f.ptl index d049800e0..8690563ef 100644 --- a/font-src/glyphs/letter/latin/lower-f.ptl +++ b/font-src/glyphs/letter/latin/lower-f.ptl @@ -10,13 +10,21 @@ glyph-block Letter-Latin-Lower-F : begin glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateAccentedComposition glyph-block-import Letter-Shared-Shapes : FlatHookDepth DiagonalTailL DiagonalTailStdDepth - glyph-block-import Letter-Shared-Shapes : LetterBarOverlay + glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook + + define [SetPalatalHookPos barLeft] : glyph-proc + set-base-anchor 'palatalHookPos' (barLeft + (Stroke + [Math.max VJutStroke (Width / 12)]) * HVContrast) 0 define fbar : XH * DesignParameters.fBarPosToXH + Stroke * DesignParameters.fbarStrokeAdj - define [SmallFBottomSerif df shift] : dispiro - widths.lhs - flat ([mix df.leftSB df.rightSB 0.02] + HalfStroke * TanSlope + (df.rightSB - df.leftSB) * shift) 0 - curl ([mix df.leftSB df.rightSB 0.875] + HalfStroke * TanSlope + (df.rightSB - df.leftSB) * shift) 0 + define [SmallFBottomSerif df] : glyph-proc + local l : [mix df.leftSB df.rightSB 0.020] + HalfStroke * TanSlope + local r : [mix df.leftSB df.rightSB 0.875] + HalfStroke * TanSlope + include : dispiro [widths.lhs] [flat l 0] [curl r 0] + set-base-anchor 'palatalHookPos' r 0 + + define [NarrowBottomSerif df] : glyph-proc + include : CenterBottomSerif 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 widths.lhs sw @@ -62,6 +70,7 @@ glyph-block Letter-Latin-Lower-F : begin include : HCrossBar.top SB [mix SB RightSB m] bh match counterHook + [Just CH-NONE] : include : SetPalatalHookPos barLeft [Just CH-EXTENSION] : include : SmallFDownExtension barLeft [Just CH-HOOK] : begin local barRight : barLeft + Stroke * HVContrast @@ -69,7 +78,7 @@ glyph-block Letter-Latin-Lower-F : begin local counterHookLeft : Math.max SB : barRight - (crossRight - barLeft) include : SmallFDownHook df barRight counterHookLeft [Just CH-DIAGONAL-HOOK] : include : SmallFDiagonalTail df barLeft - [Just CH-SERIF] : include : SmallFBottomSerif df 0 + [Just CH-SERIF] : include : SmallFBottomSerif df define [NarrowFShape clcStyle] : function [df m bh counterHook] : glyph-proc local topHookExt : match clcStyle @@ -101,6 +110,7 @@ glyph-block Letter-Latin-Lower-F : begin include : HCrossBar.top crossLeft (crossRight + crossBarExt) bh match counterHook + [Just CH-NONE] : include : SetPalatalHookPos barLeft [Just CH-EXTENSION] : include : SmallFDownExtension barLeft [Just CH-HOOK] : begin local barRight : barLeft + Stroke * HVContrast @@ -108,7 +118,7 @@ glyph-block Letter-Latin-Lower-F : begin local counterHookLeft : barRight - (crossRight - barLeft) include : SmallFDownHook df barRight counterHookLeft [Just CH-DIAGONAL-HOOK] : include : SmallFDiagonalTail df barLeft - [Just CH-SERIF] : include : CenterBottomSerif df.middle 0 (LongJut * df.div) + [Just CH-SERIF] : include : NarrowBottomSerif df define CH-NONE 0 define CH-SERIF 1 @@ -159,6 +169,17 @@ glyph-block Letter-Latin-Lower-F : begin include : df.markSet.(mk) include : Body df pBar yBar ch + create-glyph "fPalatalHook.\(suffix)" : glyph-proc + include [refer-glyph "f.\(suffix)"] AS_BASE ALSO_METRICS + if currentGlyph.baseAnchors.palatalHookPos : begin + local attach : currentGlyph.gizmo.unapply currentGlyph.baseAnchors.overlay + local pos : currentGlyph.gizmo.unapply currentGlyph.baseAnchors.palatalHookPos + local gap : Math.max (Width / 8) [AdviceStroke 8] + include : PalatalHook + xAttach -- attach.x + x -- pos.x + y -- pos.y + select-variant 'f' 'f' link-reduced-variant 'f/sansSerif' 'f' MathSansSerif select-variant 'fLenis' 0xAB35 (shapeFrom -- 'f') @@ -166,6 +187,7 @@ glyph-block Letter-Latin-Lower-F : begin select-variant 'f/compLigLeft1' (shapeFrom -- 'f') select-variant 'f/compLigLeft2' (shapeFrom -- 'f') select-variant 'f/phoneticLeft' (shapeFrom -- 'f') + select-variant 'fPalatalHook' 0x1D82 (follow -- 'f/tailless') CreateAccentedComposition 'fBar' 0xA799 'f' 'barOver' CreateAccentedComposition 'fTildeOver' 0x1D6E 'f' 'tildeOver' diff --git a/font-src/glyphs/letter/latin/lower-g.ptl b/font-src/glyphs/letter/latin/lower-g.ptl index e5fd57aff..3d3083f82 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 FlatHookDepth + glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend FlatHookDepth PalatalHook create-glyph 'g.doubleStorey' : glyph-proc include : MarkSet.p @@ -77,12 +77,12 @@ glyph-block Letter-Latin-Lower-G : begin g4 (df.leftSB + offset) (Descender + SHook) if (sink == spiro-outline) {[corner df.leftSB XH]} {} - export : define [RoundHook df y0] : RoundHookT dispiro df y0 0 Stroke + export : define [RoundHook df y0] : RoundHookT dispiro df y0 0 df.mvs export : define [FlatHook df y0] : begin local hd : FlatHookDepth df (9 / 8) local xTerminal : Math.min (df.rightSB - hd.x - 0.1) : mix df.leftSB df.rightSB (1 / 5) return : dispiro - widths.rhs + widths.rhs df.mvs flat df.rightSB y0 [heading Downward] curl df.rightSB (Descender + hd.y) arcvh.superness DesignParameters.tightHookSuperness @@ -90,10 +90,10 @@ 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) + include : OBarRightShape (top -- top) (left -- df.leftSB) (right -- df.rightSB) (stroke -- df.mvs) export : define [SerifedBody df top] : glyph-proc - include : OBarRightShape (top -- top) (left -- df.leftSB) (right -- df.rightSB) + include : SeriflessBody df top include : tagged 'serifRT' : RightwardTopSerif df.rightSB top SideJut export : define [EarlessCornerBody df top] : glyph-proc @@ -103,6 +103,7 @@ glyph-block Letter-Latin-Lower-G : begin right -- df.rightSB rise -- DToothlessRise mBlend -- DMBlend + sw -- df.mvs include : FlipAround df.middle (top / 2) export : define [EarlessRoundedBody df top] : glyph-proc @@ -111,6 +112,7 @@ glyph-block Letter-Latin-Lower-G : begin left -- df.leftSB right -- df.rightSB yTerminal -- (SmallArchDepthB - O) + sw -- df.mvs include : FlipAround df.middle (top / 2) define SingleStoreyConfig : object @@ -129,18 +131,35 @@ glyph-block Letter-Latin-Lower-G : begin foreach { suffix { bodyShape hookShape hookStart } } [Object.entries SingleStoreyConfig] : do create-glyph "g.\(suffix)" : glyph-proc - define df : DivFrame 1 - include : df.markSet.p + include : MarkSet.p set-base-anchor 'overlay' Middle (XH / 2) + define df : DivFrame 1 include : bodyShape df XH include : hookShape df (XH - hookStart) + create-glyph "GScript.\(suffix)" : glyph-proc - define df : DivFrame 1 - include : df.markSet.capDesc + include : MarkSet.capDesc set-base-anchor 'overlay' Middle (CAP / 2) + define df : DivFrame 1 include : bodyShape df CAP include : hookShape df (CAP - hookStart) + create-glyph "gPalatalHook.\(suffix)" : glyph-proc + include : MarkSet.p + set-base-anchor 'overlay' Middle (XH / 2) + define dfSub : DivFrame 0.75 2 + include : bodyShape dfSub XH + include : hookShape dfSub (XH - hookStart) + include : difference + PalatalHook + x -- RightSB + y -- 0 + xAttach -- dfSub.rightSB + intersection + MaskBelow 0 + MaskLeft (dfSub.rightSB + [Math.max (Width / 16) [AdviceStroke 12]]) + + select-variant 'g' 'g' link-reduced-variant 'g/sansSerif' 'g' MathSansSerif turned 'turng' 0x1D77 'g' Middle [mix Descender XH 0.5] @@ -150,6 +169,9 @@ glyph-block Letter-Latin-Lower-G : begin follow -- [if SLAB 'gScript/slabSerif' 'gScript/sansSerif'] select-variant 'GScript' 0xA7AC follow -- [if SLAB 'gScript/slabSerif' 'gScript/sansSerif'] + select-variant 'gPalatalHook' 0x1D83 + follow -- [if SLAB 'gScript/slabSerif' 'gScript/sansSerif'] + alias 'cyrl/de.SRB' null 'gScript' alias 'cyrl/de.BGR' null 'gScript' diff --git a/font-src/glyphs/letter/latin/lower-il.ptl b/font-src/glyphs/letter/latin/lower-il.ptl index 7d96bb75e..f2248dded 100644 --- a/font-src/glyphs/letter/latin/lower-il.ptl +++ b/font-src/glyphs/letter/latin/lower-il.ptl @@ -11,7 +11,7 @@ glyph-block Letter-Latin-Lower-I : begin glyph-block-import Letter-Shared : CreateAccentedComposition CreateMultiAccentedComposition CreateOgonekComposition glyph-block-import Letter-Shared-Shapes : FlatHookDepth DiagonalTailR DiagonalTailStdDepth glyph-block-import Letter-Shared : CreateCommaCaronComposition - glyph-block-import Letter-Shared-Shapes : CurlyTail BeltOverlay + glyph-block-import Letter-Shared-Shapes : CurlyTail BeltOverlay PalatalHook glyph-block-export OverrideILMarks define [OverrideILMarks df xMiddle yTop] : glyph-proc @@ -86,6 +86,7 @@ glyph-block Letter-Latin-Lower-I : begin local xDot : xMiddle + [StrokeWidthBlend 0.25 0] * TanSlope * df.width include : OverrideILMarks df xDot top set-base-anchor 'trailing' [mix left rightTerm 0.5] 0 + set-base-anchor 'palatalHookMask' [mix left rightTerm 0.5] (HalfStroke + O) define [TailedDotlessShape df top xMiddle] : glyph-proc local tailLength : LongJut * 1.05 * [mix 1 df.div 0.75] @@ -103,6 +104,7 @@ glyph-block Letter-Latin-Lower-I : begin include : OverrideILMarks df xMiddle top set-base-anchor 'trailing' (xMiddle + x0) 0 + set-base-anchor 'palatalHookMask' (xMiddle + x0) (HalfStroke + O) export : define [Tailed df top xMiddle] : if para.isItalic ItalicDotlessIShape df top xMiddle @@ -126,7 +128,9 @@ glyph-block Letter-Latin-Lower-I : begin export : define [DiagTailed df top xMiddle] : glyph-proc include : OverrideILMarks df xMiddle top - set-base-anchor 'trailing' (xMiddle + 0.5 * df.mvs * HVContrast) 0 + + set-base-anchor 'trailing' (xMiddle + 0.75 * df.mvs * HVContrast) 0 + set-base-anchor 'palatalHookMask' currentGlyph.baseAnchors.trailing.x (HalfStroke + O) include : dispiro widths.center df.mvs @@ -243,6 +247,23 @@ glyph-block Letter-Latin-Lower-I : begin include : HOverlayBar [mix SB 0 0.7] [mix RightSB Width 0.7] (0.625 * Ascender) include : MarkSet.b + create-glyph "lPalatalHook.\(suffix)" : glyph-proc + include [refer-glyph "l.\(suffix)"] AS_BASE ALSO_METRICS + local attach : if currentGlyph.baseAnchors.trailing + currentGlyph.gizmo.unapply currentGlyph.baseAnchors.trailing + currentGlyph.gizmo.unapply currentGlyph.baseAnchors.overlay + local posX : if currentGlyph.baseAnchors.trailing + attach.x + HVContrast * (0.5 * VJutStroke) + attach.x + HVContrast * HalfStroke + [PalatalHook.adviceGap] + local maskY : if currentGlyph.baseAnchors.palatalHookMask + begin [currentGlyph.gizmo.unapply currentGlyph.baseAnchors.palatalHookMask].y + begin Stroke + include : intersection [MaskBelow maskY] : PalatalHook + x -- posX + y -- 0 + xAttach -- attach.x + yOverflow -- Stroke + do "i glyphs" select-variant 'dotlessi' 0x131 link-reduced-variant 'dotlessi/sansSerif' 'dotlessi' MathSansSerif @@ -282,6 +303,7 @@ glyph-block Letter-Latin-Lower-I : begin select-variant 'lRTail' 0x26D (follow -- 'l/reduced/rtail') select-variant 'lBeltRTail' 0xA78E (follow -- 'l/reduced/rtailDec') select-variant 'llWelsh' 0x1EFB (follow -- 'l') + select-variant 'lPalatalHook' 0x1D85 (follow -- 'l') CreateCommaCaronComposition 'lcaron' 0x13E 'l' derive-glyphs 'lSlash' 0x142 'l' : lambda [src gr] : glyph-proc diff --git a/font-src/glyphs/letter/latin/lower-m.ptl b/font-src/glyphs/letter/latin/lower-m.ptl index a19ccf172..e85a89eba 100644 --- a/font-src/glyphs/letter/latin/lower-m.ptl +++ b/font-src/glyphs/letter/latin/lower-m.ptl @@ -10,7 +10,7 @@ glyph-block Letter-Latin-Lower-M : begin glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateAccentedComposition glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend - glyph-block-import Letter-Shared-Shapes : nShoulder nShoulderMask CyrDescender + glyph-block-import Letter-Shared-Shapes : nShoulder nShoulderMask CyrDescender PalatalHook define [SmallMSmooth df] : df.div * (0.5 * SmallArchDepth + 0.375 * Stroke) define [SmallMShoulderSpiro] : params [left right top bottom width fine df coBottom] : glyph-proc @@ -268,6 +268,11 @@ glyph-block Letter-Latin-Lower-M : begin alias 'cyrl/te.BGR' null 'cyrl/te.italic' derive-composites 'cyrl/teDescender.italic' null 'cyrl/te.italic' CyrDescender [DivFrame para.diversityM 3].rightSB + derive-composites 'mPalatalHook' 0x1D86 'cyrl/te.italic' + PalatalHook + xAttach -- [DivFrame para.diversityM 3].rightSB + x -- [DivFrame para.diversityM 3].rightSB + SideJut + y -- 0 select-variant 'mLTail' 0x271 select-variant 'turnmLeg' 0x270 (follow -- 'm') diff --git a/font-src/glyphs/letter/latin/lower-n.ptl b/font-src/glyphs/letter/latin/lower-n.ptl index c0893f1f1..4a3aaed0f 100644 --- a/font-src/glyphs/letter/latin/lower-n.ptl +++ b/font-src/glyphs/letter/latin/lower-n.ptl @@ -12,7 +12,7 @@ glyph-block Letter-Latin-Lower-N : begin glyph-block-import Letter-Shared : CreateAccentedComposition glyph-block-import Letter-Shared-Shapes : CurlyTail nShoulder nShoulderKnots nShoulderMask glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend - glyph-block-import Letter-Shared-Shapes : CyrDescender + glyph-block-import Letter-Shared-Shapes : CyrDescender PalatalHook define [AdjustTrailingAnchor] : glyph-proc define trAnchor currentGlyph.baseAnchors.trailing @@ -155,6 +155,11 @@ glyph-block Letter-Latin-Lower-N : begin CreateAccentedComposition 'nTildeOver' 0x1D70 'n' 'tildeOverWide' derive-composites 'cyrl/peDescender.italic' null 'cyrl/peItalicDescBase' [CyrDescender RightSB] + derive-composites 'nPalatalHook' 0x1D87 'cyrl/peItalicDescBase' + PalatalHook + xAttach -- RightSB + x -- RightSB + SideJut + y -- 0 do "n with Apostrophe" derive-glyphs 'nApostrophe/comma' null 'commaAbove/asPunctuation' : function [src gr] : glyph-proc diff --git a/font-src/glyphs/letter/latin/lower-p.ptl b/font-src/glyphs/letter/latin/lower-p.ptl index 68c9e507f..3078a8976 100644 --- a/font-src/glyphs/letter/latin/lower-p.ptl +++ b/font-src/glyphs/letter/latin/lower-p.ptl @@ -9,7 +9,7 @@ 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 + glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend HooktopLeftBar PalatalHook define [SmallPSerifLT] : tagged 'serifLT' : LeftwardTopSerif SB XH SideJut @@ -60,6 +60,11 @@ glyph-block Letter-Latin-Lower-P : begin link-reduced-variant 'p/hookTopBase' 'p' select-variant 'cyrl/er' 0x440 (shapeFrom -- 'p') (follow -- 'p') + derive-composites 'pPalatalHook' 0x1D88 'p' : PalatalHook + x -- [mix (Middle + CorrectionOMidS) RightSB 0.75] + y -- 0 + yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75] + CreateAccentedComposition 'pTildeOver' 0x1D71 'p' 'tildeOverOnBar' derive-glyphs 'cyrl/rrTick' 0x48F 'cyrl/er' : lambda [src gr] : glyph-proc diff --git a/font-src/glyphs/letter/latin/lower-r.ptl b/font-src/glyphs/letter/latin/lower-r.ptl index 6b28daf63..462afec42 100644 --- a/font-src/glyphs/letter/latin/lower-r.ptl +++ b/font-src/glyphs/letter/latin/lower-r.ptl @@ -9,7 +9,7 @@ glyph-block Letter-Latin-Lower-R : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateAccentedComposition - glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend + glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend PalatalHook glyph-block-import Letter-Blackboard : BBS BBD BBBarRight local dfN : DivFrame 1 @@ -41,9 +41,14 @@ glyph-block Letter-Latin-Lower-R : begin local rSerifX : xBar - strokeBar / 2 * HVContrast local rSerifLeftJut : SideJut + RBalance * (0.3 + rSerifLeftExtender) local rSerifRightJut : rSerifLeftJut * 1.20 - local [rBottomSerif y] : tagged 'serifLB' : union - LeftwardBottomSerif rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast) - RightwardBottomSerif rSerifX y (rSerifRightJut + (strokeBar / 2) * HVContrast) + local [rBottomSerif y] : glyph-proc + include : tagged 'serifLB' : union + LeftwardBottomSerif rSerifX y (rSerifLeftJut + (strokeBar / 2) * HVContrast) + RightwardBottomSerif 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) local fine ShoulderFine @@ -67,15 +72,17 @@ glyph-block Letter-Latin-Lower-R : begin [Just rNarrowSerifed] : mix df.width rHookX df.div [Just rNarrow] : xArchMiddle + 0.1 __ rHookX - return : object xBar rBottomSerif rTopSerif fine xArchMiddle skew rHookX rHookXN rHookY hookSuperness + local [setMarks doTopSerif] : glyph-proc + set-base-anchor 'above' [mix [mix df.leftSB (xBar - Stroke * HVContrast) : if doTopSerif 0.5 1] df.rightSB 0.5] XH + set-base-anchor 'overlay' (xBar - Stroke * 0.25) (XH * 0.5) + set-base-anchor 'palatalHookAttach' xBar 0 + set-base-anchor 'palatalHookPos' (xBar + [PalatalHook.adviceGap]) 0 - define [OverrideMarks doTopSerif xBar] : glyph-proc - set-base-anchor 'above' [mix [mix df.leftSB (xBar - Stroke * HVContrast) : if doTopSerif 0.5 1] df.rightSB 0.5] XH - set-base-anchor 'overlay' (xBar - Stroke * 0.25) (XH * 0.5) + return : object xBar rBottomSerif rTopSerif fine xArchMiddle skew rHookX rHookXN rHookY hookSuperness setMarks define [StandardShape df md doTopSerif doBottomSerif] : glyph-proc - define [object xBar rBottomSerif rTopSerif fine xArchMiddle skew rHookX rHookY hookSuperness] : RDim df md - include : OverrideMarks doTopSerif xBar + define [object xBar rBottomSerif rTopSerif fine xArchMiddle skew rHookX rHookY hookSuperness setMarks] : RDim df md + include : setMarks doTopSerif include : dispiro widths.lhs g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward] @@ -90,8 +97,8 @@ glyph-block Letter-Latin-Lower-R : begin define [CompactShape df md ts bs] : CompactShapeImpl df md false ts bs define [CornerHookShape df md ts bs] : CompactShapeImpl df md true ts bs define [CompactShapeImpl df md doHookSerif doTopSerif doBottomSerif] : glyph-proc - define [object xBar rBottomSerif rTopSerif fine xArchMiddle rHookXN] : RDim df md - include : OverrideMarks doTopSerif xBar + define [object xBar rBottomSerif rTopSerif fine xArchMiddle rHookXN setMarks] : RDim df md + include : setMarks doTopSerif define xCor : if doHookSerif 0 : CorrectionOMidS * [linreg 72 0.75 108 1 Stroke] define arcTopShift : match md @@ -119,8 +126,8 @@ glyph-block Letter-Latin-Lower-R : begin if doTopSerif : include : rTopSerif XH define [EarlessCornerShape df md doTopSerif doBottomSerif] : glyph-proc - define [object xBar xArchMiddle rHookX rHookY hookSuperness rBottomSerif] : RDim df md - include : OverrideMarks doTopSerif xBar + define [object xBar xArchMiddle rHookX rHookY hookSuperness rBottomSerif setMarks] : RDim df md + include : setMarks doTopSerif include : dispiro widths.lhs g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward] @@ -131,8 +138,8 @@ glyph-block Letter-Latin-Lower-R : begin if doBottomSerif : include : rBottomSerif 0 define [EarlessRoundedShape df md doTopSerif doBottomSerif] : glyph-proc - define [object xBar xArchMiddle rHookX rHookY hookSuperness rBottomSerif] : RDim df md - include : OverrideMarks doTopSerif xBar + define [object xBar xArchMiddle rHookX rHookY hookSuperness rBottomSerif setMarks] : RDim df md + include : setMarks doTopSerif local hx : Math.max rHookX (xBar + 1.25 * Stroke) include : dispiro widths.lhs @@ -179,6 +186,12 @@ glyph-block Letter-Latin-Lower-R : begin include : VBarRight xBar Descender 0 if doBS : include : rBottomSerif Descender + create-glyph "rPalatalHook.\(suffix)" : glyph-proc + include [refer-glyph "r.\(suffix)"] AS_BASE ALSO_METRICS + local attach : currentGlyph.gizmo.unapply currentGlyph.baseAnchors.palatalHookAttach + local pos : currentGlyph.gizmo.unapply currentGlyph.baseAnchors.palatalHookPos + include : PalatalHook (x -- pos.x) (y -- pos.y) (xAttach -- attach.x) + create-glyph "rRTail.\(suffix)" : glyph-proc set-width df.width include : df.markSet.p @@ -229,7 +242,7 @@ glyph-block Letter-Latin-Lower-R : begin select-variant 'rTurnRTail' 0x27B select-variant 'rTurnLongLetRTail' 0x1DF08 (follow -- 'rTurnRTail') - + select-variant 'rPalatalHook' 0x1D89 (follow -- 'r') define [BBRShape df md doTopSerif doBottomSerif] : glyph-proc define [object xBar fine xArchMiddle skew rHookX rHookY hookSuperness] : RDim df md BBD BBS diff --git a/font-src/glyphs/letter/latin/s.ptl b/font-src/glyphs/letter/latin/s.ptl index 23edecf37..a3b6d28c5 100644 --- a/font-src/glyphs/letter/latin/s.ptl +++ b/font-src/glyphs/letter/latin/s.ptl @@ -17,6 +17,7 @@ glyph-block Letter-Latin-S : begin glyph-block-import Letter-Shared-Shapes : ArcStartSerifL ArcEndSerifR glyph-block-import Letter-Shared-Shapes : ArcStartInwardSerifR ArcEndInwardSerifL glyph-block-import Letter-Shared-Shapes : ArcStartInwardSerifL ArcEndInwardSerifR + glyph-block-import Letter-Shared-Shapes : PalatalHook define SLAB-NONE 0 define SLAB-CLASSICAL 1 @@ -375,6 +376,11 @@ glyph-block Letter-Latin-S : begin select-variant 's/phoneticRight' + derive-composites 'sPalatalHook' 0x1D8A 's' : PalatalHook + x -- [mix (Middle + CorrectionOMidS) RightSB 0.75] + y -- 0 + yAttach -- [mix O [adviceSSmooth XH (-1) [AdviceStroke2 2 3 XH]] : archv.yFromX 0.75] + CreateAccentedComposition 'sTildeOver' 0x1D74 's' 'tildeOverWide' create-glyph 'mathbb/S' 0x1D54A : glyph-proc diff --git a/font-src/glyphs/letter/latin/v.ptl b/font-src/glyphs/letter/latin/v.ptl index 2d9fe67ad..2e5742e83 100644 --- a/font-src/glyphs/letter/latin/v.ptl +++ b/font-src/glyphs/letter/latin/v.ptl @@ -9,7 +9,7 @@ glyph-block Letter-Latin-V : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-export VShape VShapeOutline - glyph-block-import Letter-Shared-Shapes : DiagonalTailInnerRadius SerifFrame + glyph-block-import Letter-Shared-Shapes : DiagonalTailInnerRadius SerifFrame PalatalHook glyph-block-import Letter-Blackboard : BBS BBD define VCornerHalfWidth : HalfStroke * HVContrast * 1.15 @@ -183,10 +183,19 @@ glyph-block Letter-Latin-V : begin select-variant 'V' 'V' link-reduced-variant 'V/sansSerif' 'V' MathSansSerif - select-variant 'v' 'v' - link-reduced-variant 'v/sansSerif' 'v' MathSansSerif select-variant 'smcpV' 0x1D20 (shapeFrom -- 'v') (follow -- 'V') - select-variant 'vHookTop' 0x2C71 (follow -- 'vHookTop') + + select-variant 'v' 'v' + select-variant 'v/nonCursive' (shapeFrom -- 'v') + link-reduced-variant 'v/sansSerif' 'v' MathSansSerif + + derive-composites 'vPalatalHook' 0x1D8C 'v/nonCursive' + PalatalHook + xAttach -- Middle + x -- (Middle + HVContrast * HalfStroke + [PalatalHook.adviceGap]) + y -- 0 + + select-variant 'vHookTop' 0x2C71 (follow -- 'v/nonCursive') select-variant 'cyrl/Izhitsa' 0x474 (follow -- 'VHookTop') (shapeFrom -- 'VHookTop') alias 'cyrl/izhitsa' 0x475 'vHookTop' diff --git a/font-src/glyphs/letter/latin/x.ptl b/font-src/glyphs/letter/latin/x.ptl index 93cf8950b..a29988a3f 100644 --- a/font-src/glyphs/letter/latin/x.ptl +++ b/font-src/glyphs/letter/latin/x.ptl @@ -160,6 +160,7 @@ glyph-block Letter-Latin-X : begin derive-composites 'cyrl/HaHook' 0x4FC 'cyrl/Ha' [CyrHookDescender RightSB] derive-composites 'cyrl/haHook' 0x4FD 'cyrl/ha' [CyrHookDescender RightSB] + alias 'xPalatalHook' 0x1D8D 'cyrl/haHook' define [CyrlHaBarShape top] : HOverlayBar [mix SB RightSB 0.08] [mix SB RightSB 0.92] (top / 2) derive-composites 'cyrl/HaBar' 0x4FE 'cyrl/Ha' [CyrlHaBarShape CAP] diff --git a/font-src/glyphs/letter/latin/z.ptl b/font-src/glyphs/letter/latin/z.ptl index b121a2352..3e26162dd 100644 --- a/font-src/glyphs/letter/latin/z.ptl +++ b/font-src/glyphs/letter/latin/z.ptl @@ -9,7 +9,7 @@ glyph-block Letter-Latin-Z : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives glyph-block-import Letter-Shared : CreateAccentedComposition - glyph-block-import Letter-Shared-Shapes : HCurlyTail + glyph-block-import Letter-Shared-Shapes : HCurlyTail PalatalHook glyph-block-import Letter-Blackboard : BBS BBD glyph-block-import Letter-Latin-X : XStrand @@ -88,8 +88,8 @@ glyph-block Letter-Latin-Z : begin corner (RightSB - xDiagWidth) (2 * top) corner (RightSB - xDiagWidth) (top - yFootHeight) dispiro - flat (SB + 2 * O) (top - yHookDepth) [widths.rhs.heading hookTerminalWidth Upward] - curl (SB + 2 * O) (top - yHookDepth + yHookStraightDepth) [heading Upward] + flat SB (top - yHookDepth) [widths.rhs.heading hookTerminalWidth Upward] + curl SB (top - yHookDepth + yHookStraightDepth) [heading Upward] arcvh g2.right.mid (SB + xHookDepth) (top - O) [widths.rhs.heading Stroke Rightward] flat [mix (SB + xMockTailDepth) RightSB kTop] (top - kTop * yTailDepth) @@ -139,8 +139,8 @@ glyph-block Letter-Latin-Z : begin corner RightSB top dispiro - flat (RightSB - 2 * O) yHookDepth [widths.rhs.heading hookTerminalWidth Downward] - curl (RightSB - 2 * O) (yHookDepth - yHookStraightDepth) [heading Downward] + flat RightSB yHookDepth [widths.rhs.heading hookTerminalWidth Downward] + curl RightSB (yHookDepth - yHookStraightDepth) [heading Downward] arcvh g2.left.mid (RightSB - xHookDepth) O [widths.rhs.heading Stroke Leftward] flat [mix (RightSB - xHookDepth) SB kBot] (kBot * yTailDepth) @@ -239,7 +239,14 @@ glyph-block Letter-Latin-Z : begin create-glyph "zDesc.\(suffix)" : glyph-proc include [refer-glyph "z.\(suffix)"] AS_BASE ALSO_METRICS eject-contour 'serifRB' - include : VBarRight [mix SB RightSB 1.05] (HalfStroke - LongJut) Stroke + include : VBarRight RightSB (HalfStroke - LongJut) + if (small == SmallZCursiveShape) Hook Stroke + + create-glyph "zPalatalHook.\(suffix)" : glyph-proc + include [refer-glyph "z.\(suffix)"] AS_BASE ALSO_METRICS + eject-contour 'serifRB' + include : PalatalHook RightSB 0 + yOverflow -- [if (small == SmallZCursiveShape) Hook Stroke] create-glyph "z/rtailBase.\(suffix)" : glyph-proc include : MarkSet.e @@ -296,6 +303,7 @@ glyph-block Letter-Latin-Z : begin select-variant 'ZSwash' 0x2C7F (follow -- 'ZDesc') select-variant 'zSwash' 0x240 (follow -- 'zDesc') select-variant 'zCurlyTail' 0x291 (follow -- 'zDesc') + select-variant 'zPalatalHook' 0x1D8E (follow -- 'zDesc') alias 'grek/Zeta' 0x396 'Z/reduced' alias-reduced-variant 'grek/Zeta/sansSerif' 'grek/Zeta' 'Z/reduced/sansSerif' MathSansSerif diff --git a/font-src/glyphs/letter/shared.ptl b/font-src/glyphs/letter/shared.ptl index d16d2df1c..d9f70ce0d 100644 --- a/font-src/glyphs/letter/shared.ptl +++ b/font-src/glyphs/letter/shared.ptl @@ -501,16 +501,11 @@ glyph-block Letter-Shared-Shapes : begin define [CyrHookDescender] : params [x [connex 0.5] [overflow nothing]] : begin local descenderOverflow : fallback overflow SideJut local xRef : x + descenderOverflow + 0.25 * Stroke - local hd : FlatHookDepth [DivFrame 1] - return : union - HBarTop (x - connex * Stroke * HVContrast) (x + descenderOverflow) Stroke - dispiro - widths.rhs VJutStroke - flat xRef Stroke [heading Downward] - curl xRef (hd.y - Hook - 0.25 * VJutStroke) [heading Downward] - arcvh - flat (xRef - hd.x + 0.25 * VJutStroke * HVContrast) (0 - Hook) - curl (xRef - HookX - 0.5 * VJutStroke * HVContrast) (0 - Hook) + PalatalHook + x -- x + descenderOverflow + 0.25 * Stroke + y -- 0 + xAttach -- (x - connex * Stroke * HVContrast) + yOverflow -- Stroke glyph-block-export CyrTailDescender define [CyrTailDescender] : params [x [connex 0.5] [overflow nothing]] : begin @@ -534,6 +529,20 @@ glyph-block Letter-Shared-Shapes : begin HBarTop (x + connex * Stroke * HVContrast) (x - descenderOverflow) Stroke glyph-proc + glyph-block-export PalatalHook + define [PalatalHook] : params [x y [xAttach x] [yAttach y] [yOverflow 0]] : glyph-proc + local hd : FlatHookDepth [DivFrame 1] + if (xAttach < x) : include : HBarBottom xAttach x yAttach + include : dispiro + widths.rhs VJutStroke + flat x (yAttach + yOverflow) [heading Downward] + curl x (y + hd.y - Hook - 0.25 * VJutStroke) + arcvh + flat (x - hd.x + 0.25 * VJutStroke * HVContrast) (y - Hook) + curl (x - HookX - 0.5 * VJutStroke * HVContrast) (y - Hook) + + set PalatalHook.adviceGap : function [] : HVContrast * VJutStroke + [Math.max (Width / 16) [AdviceStroke 12]] + glyph-block-export HooktopLeftBar define [HooktopLeftBar] : params [[bottom 0]] : glyph-proc local yTurn : CAP - Hook - HalfStroke diff --git a/font-src/kits/spiro-kit.mjs b/font-src/kits/spiro-kit.mjs index d08269dbb..fde2de5c7 100644 --- a/font-src/kits/spiro-kit.mjs +++ b/font-src/kits/spiro-kit.mjs @@ -351,6 +351,10 @@ export function SetupBuilders(bindings) { arcvh.superness = function (s) { return arcvh(DEFAULT_STEPS, s); }; + archv.yFromX = function (px, _s) { + const s = fallback(_s, Superness); + return 1 - Math.pow(1 - Math.pow(px, s), 1 / s); + }; function dispiro(...args) { return new DispiroImpl(bindings, args); } diff --git a/font-src/meta/macros.ptl b/font-src/meta/macros.ptl index 1b4cb22b1..86c9660c0 100644 --- a/font-src/meta/macros.ptl +++ b/font-src/meta/macros.ptl @@ -20,27 +20,37 @@ define-macro params : syntax-rules local ta : env.newt local tb : env.newt local t : env.newt + local ps `[begin [local @ta : {}.slice.call arguments 0] [local @tb {}] [for [local @t 0] (@t < @ta.length) [inc @t] : if [not : @ta.(@t) <@ $NamedParameterPair$] : @tb.push @ta.(@t)] ] - local aps `[begin] - local dps `[begin] + + local declarations `[begin] + local namedAssigns `[begin] + local indexAssigns `[begin] + local tearDowns `[begin] + local j 0 foreach [pf : items-of : formOf _pairs] : begin local name if [atom pf] : then - ps.push `[local @pf : fallback @pf (@tb).(@{".quote" j})] + declarations.push `[local @pf] + indexAssigns.push `[set @pf : fallback @pf (@tb).(@{".quote" j})] set name pf : else - ps.push `[local @(pf.0) : fallback @(pf.0) (@tb).(@{".quote" j}) @(pf.1)] + declarations.push `[local @(pf.0)] + indexAssigns.push `[set @(pf.0) : fallback @(pf.0) (@tb).(@{".quote" j}) @(pf.1)] set name pf.0 - aps.push `[if (@t && @t <@ $NamedParameterPair$ && @t.left == @{".quote" name}) [set @name @t.right]] - if pf.2 : dps.push `[local @(pf.2) @name] + if pf.2 : tearDowns.push `[local @(pf.2) @name] + namedAssigns.push `[if (@t && @t <@ $NamedParameterPair$ && @t.left == @{".quote" name}) [set @name @t.right]] inc j - ps.push `[foreach [@t : items-of @ta] @aps] - ps.push dps + + ps.push declarations + ps.push `[foreach [@t : items-of @ta] @namedAssigns] + ps.push indexAssigns + ps.push tearDowns ps.push : formOf body return : dirty ps diff --git a/params/variants.toml b/params/variants.toml index 7c10c7b01..c3c6b12d9 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -2153,6 +2153,7 @@ selector."f/sansSerif" = "serifless" selector."f/compLigLeft1" = "flatHookCLC1" selector."f/compLigLeft2" = "flatHookCLC2" selector."f/phoneticLeft" = "seriflessCrossbarAtXHeight" +selector."f/tailless" = "serifless" selector.fLenis = "serifless" selector.fLTail = "tailed" selector.dotlessjWithStrokeAndHook = "tailed" @@ -2165,6 +2166,7 @@ selector."f/sansSerif" = "serifless" selector."f/compLigLeft1" = "flatHookSerifedCLC1" selector."f/compLigLeft2" = "flatHookSerifedCLC2" selector."f/phoneticLeft" = "serifedCrossbarAtXHeight" +selector."f/tailless" = "serifed" selector.fLenis = "serifless" selector.fLTail = "tailed" selector.dotlessjWithStrokeAndHook = "tailed" @@ -2177,6 +2179,7 @@ selector."f/sansSerif" = "tailed" selector."f/compLigLeft1" = "flatHookTailedCLC1" selector."f/compLigLeft2" = "flatHookTailedCLC2" selector."f/phoneticLeft" = "tailedCrossbarAtXHeight" +selector."f/tailless" = "serifless" selector.fLenis = "serifless" selector.fLTail = "tailed" selector.dotlessjWithStrokeAndHook = "tailed" @@ -2189,6 +2192,7 @@ selector."f/sansSerif" = "extended" selector."f/compLigLeft1" = "flatHookExtendedCLC1" selector."f/compLigLeft2" = "flatHookExtendedCLC2" selector."f/phoneticLeft" = "extendedCrossbarAtXHeight" +selector."f/tailless" = "serifless" selector.fLenis = "serifless" selector.fLTail = "tailed" selector.dotlessjWithStrokeAndHook = "tailed" @@ -2201,6 +2205,7 @@ selector."f/sansSerif" = "diagonalTailed" selector."f/compLigLeft1" = "flatHookDiagonalTailedCLC1" selector."f/compLigLeft2" = "flatHookDiagonalTailedCLC2" selector."f/phoneticLeft" = "diagonalTailedCrossbarAtXHeight" +selector."f/tailless" = "serifless" selector.fLenis = "serifless" selector.fLTail = "tailed" selector.dotlessjWithStrokeAndHook = "tailed" @@ -2213,6 +2218,7 @@ selector."f/sansSerif" = "seriflessCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookCLC1" selector."f/compLigLeft2" = "flatHookCLC2" selector."f/phoneticLeft" = "seriflessCrossbarAtXHeight" +selector."f/tailless" = "seriflessCrossbarAtXHeight" selector.fLenis = "seriflessCrossbarAtXHeight" selector.fLTail = "tailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "tailedCrossbarAtXHeight" @@ -2225,6 +2231,7 @@ selector."f/sansSerif" = "seriflessCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookSerifedCLC1" selector."f/compLigLeft2" = "flatHookSerifedCLC2" selector."f/phoneticLeft" = "serifedCrossbarAtXHeight" +selector."f/tailless" = "serifedCrossbarAtXHeight" selector.fLenis = "seriflessCrossbarAtXHeight" selector.fLTail = "tailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "tailedCrossbarAtXHeight" @@ -2237,6 +2244,7 @@ selector."f/sansSerif" = "tailedCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookTailedCLC1" selector."f/compLigLeft2" = "flatHookTailedCLC2" selector."f/phoneticLeft" = "tailedCrossbarAtXHeight" +selector."f/tailless" = "seriflessCrossbarAtXHeight" selector.fLenis = "seriflessCrossbarAtXHeight" selector.fLTail = "tailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "tailedCrossbarAtXHeight" @@ -2249,6 +2257,7 @@ selector."f/sansSerif" = "extendedCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookExtendedCLC1" selector."f/compLigLeft2" = "flatHookExtendedCLC2" selector."f/phoneticLeft" = "extendedCrossbarAtXHeight" +selector."f/tailless" = "seriflessCrossbarAtXHeight" selector.fLenis = "seriflessCrossbarAtXHeight" selector.fLTail = "tailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "tailedCrossbarAtXHeight" @@ -2261,6 +2270,7 @@ selector."f/sansSerif" = "diagonalTailedCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookDiagonalTailedCLC1" selector."f/compLigLeft2" = "flatHookDiagonalTailedCLC2" selector."f/phoneticLeft" = "diagonalTailedCrossbarAtXHeight" +selector."f/tailless" = "seriflessCrossbarAtXHeight" selector.fLenis = "seriflessCrossbarAtXHeight" selector.fLTail = "tailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "tailedCrossbarAtXHeight" @@ -2273,6 +2283,7 @@ selector."f/sansSerif" = "flatHook" selector."f/compLigLeft1" = "flatHookCLC1" selector."f/compLigLeft2" = "flatHookCLC2" selector."f/phoneticLeft" = "flatHookCrossbarAtXHeight" +selector."f/tailless" = "flatHook" selector.fLenis = "flatHook" selector.fLTail = "flatHookTailed" selector.dotlessjWithStrokeAndHook = "flatHookTailed" @@ -2285,6 +2296,7 @@ selector."f/sansSerif" = "flatHook" selector."f/compLigLeft1" = "flatHookSerifedCLC1" selector."f/compLigLeft2" = "flatHookSerifedCLC2" selector."f/phoneticLeft" = "flatHookSerifedCrossbarAtXHeight" +selector."f/tailless" = "flatHookSerifed" selector.fLenis = "flatHook" selector.fLTail = "flatHookTailed" selector.dotlessjWithStrokeAndHook = "flatHookTailed" @@ -2297,6 +2309,7 @@ selector."f/sansSerif" = "flatHookTailed" selector."f/compLigLeft1" = "flatHookTailedCLC1" selector."f/compLigLeft2" = "flatHookTailedCLC2" selector."f/phoneticLeft" = "flatHookTailedCrossbarAtXHeight" +selector."f/tailless" = "flatHook" selector.fLenis = "flatHook" selector.fLTail = "flatHookTailed" selector.dotlessjWithStrokeAndHook = "flatHookTailed" @@ -2309,6 +2322,7 @@ selector."f/sansSerif" = "flatHookExtended" selector."f/compLigLeft1" = "flatHookExtendedCLC1" selector."f/compLigLeft2" = "flatHookExtendedCLC2" selector."f/phoneticLeft" = "flatHookExtendedCrossbarAtXHeight" +selector."f/tailless" = "flatHook" selector.fLenis = "flatHook" selector.fLTail = "flatHookTailed" selector.dotlessjWithStrokeAndHook = "flatHookTailed" @@ -2321,6 +2335,7 @@ selector."f/sansSerif" = "flatHookDiagonalTailed" selector."f/compLigLeft1" = "flatHookDiagonalTailedCLC1" selector."f/compLigLeft2" = "flatHookDiagonalTailedCLC2" selector."f/phoneticLeft" = "flatHookDiagonalTailedCrossbarAtXHeight" +selector."f/tailless" = "flatHook" selector.fLenis = "flatHook" selector.fLTail = "flatHookTailed" selector.dotlessjWithStrokeAndHook = "flatHookTailed" @@ -2333,6 +2348,7 @@ selector."f/sansSerif" = "flatHookCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookCLC1" selector."f/compLigLeft2" = "flatHookCLC2" selector."f/phoneticLeft" = "flatHookCrossbarAtXHeight" +selector."f/tailless" = "flatHookCrossbarAtXHeight" selector.fLenis = "flatHookCrossbarAtXHeight" selector.fLTail = "flatHookTailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "flatHookTailedCrossbarAtXHeight" @@ -2345,6 +2361,7 @@ selector."f/sansSerif" = "flatHookCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookSerifedCLC1" selector."f/compLigLeft2" = "flatHookSerifedCLC2" selector."f/phoneticLeft" = "flatHookSerifedCrossbarAtXHeight" +selector."f/tailless" = "flatHookSerifedCrossbarAtXHeight" selector.fLenis = "flatHookCrossbarAtXHeight" selector.fLTail = "flatHookTailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "flatHookTailedCrossbarAtXHeight" @@ -2357,6 +2374,7 @@ selector."f/sansSerif" = "flatHookTailedCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookTailedCLC1" selector."f/compLigLeft2" = "flatHookTailedCLC2" selector."f/phoneticLeft" = "flatHookTailedCrossbarAtXHeight" +selector."f/tailless" = "flatHookCrossbarAtXHeight" selector.fLenis = "flatHookCrossbarAtXHeight" selector.fLTail = "flatHookTailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "flatHookTailedCrossbarAtXHeight" @@ -2369,6 +2387,7 @@ selector."f/sansSerif" = "flatHookExtendedCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookExtendedCLC1" selector."f/compLigLeft2" = "flatHookExtendedCLC2" selector."f/phoneticLeft" = "flatHookExtendedCrossbarAtXHeight" +selector."f/tailless" = "flatHookCrossbarAtXHeight" selector.fLenis = "flatHookCrossbarAtXHeight" selector.fLTail = "flatHookTailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "flatHookTailedCrossbarAtXHeight" @@ -2381,6 +2400,7 @@ selector."f/sansSerif" = "flatHookDiagonalTailedCrossbarAtXHeight" selector."f/compLigLeft1" = "flatHookDiagonalTailedCLC1" selector."f/compLigLeft2" = "flatHookDiagonalTailedCLC2" selector."f/phoneticLeft" = "flatHookDiagonalTailedCrossbarAtXHeight" +selector."f/tailless" = "flatHookCrossbarAtXHeight" selector.fLenis = "flatHookCrossbarAtXHeight" selector.fLTail = "flatHookTailedCrossbarAtXHeight" selector.dotlessjWithStrokeAndHook = "flatHookTailedCrossbarAtXHeight" @@ -4088,42 +4108,42 @@ rank = 1 description = "Standard, straight `v`" selector.v = "straight" selector."v/sansSerif" = "straight" -selector.vHookTop = "straight" +selector."v/nonCursive" = "straight" [prime.v.variants.curly] rank = 2 description = "Slightly curly `v`, like Iosevka 2.x" selector.v = "curly" selector."v/sansSerif" = "curly" -selector.vHookTop = "curly" +selector."v/nonCursive" = "curly" [prime.v.variants.cursive] rank = 3 description = "Cursive `v`" selector.v = "cursive" selector."v/sansSerif" = "cursive" -selector.vHookTop = "straight" +selector."v/nonCursive" = "straight" [prime.v.variants.straight-motion-serifed] rank = 4 description = "Standard, straight `v`, with motion serifs" selector.v = "straightMotionSerifed" selector."v/sansSerif" = "straight" -selector.vHookTop = "straightMotionSerifed" +selector."v/nonCursive" = "straightMotionSerifed" [prime.v.variants.curly-motion-serifed] rank = 5 description = "Slightly curly `v`, like Iosevka 2.x, with motion serifs" selector.v = "curlyMotionSerifed" selector."v/sansSerif" = "curly" -selector.vHookTop = "curlyMotionSerifed" +selector."v/nonCursive" = "curlyMotionSerifed" [prime.v.variants.cursive-serifed] rank = 6 description = "Cursive `v` with motion serifs" selector.v = "cursiveMotionSerifed" selector."v/sansSerif" = "cursive" -selector.vHookTop = "straightMotionSerifed" +selector."v/nonCursive" = "straightMotionSerifed"