From abed5aba955142907cac9f11d17addb6e5b12b5a Mon Sep 17 00:00:00 2001 From: be5invis Date: Sun, 27 Dec 2020 09:43:08 -0800 Subject: [PATCH] Export compact `r` to CV system --- build-plans.toml | 2 +- font-src/glyphs/letter/latin.ptl | 22 +++++++++++----------- params/variants.toml | 12 +++++++----- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/build-plans.toml b/build-plans.toml index fa1f87c40..089cea54f 100644 --- a/build-plans.toml +++ b/build-plans.toml @@ -465,7 +465,7 @@ j = 'flat-hook-serifless' capital-i = 'serifless' capital-j = 'serifless' g = 'singlestorey' -r = 'narrow' +r = 'compact' a = 'doublestorey' d = 'toothed' u = 'toothed' diff --git a/font-src/glyphs/letter/latin.ptl b/font-src/glyphs/letter/latin.ptl index 4208c9bb8..874f6fb61 100644 --- a/font-src/glyphs/letter/latin.ptl +++ b/font-src/glyphs/letter/latin.ptl @@ -3449,11 +3449,11 @@ glyph-block Letter-Latin-Lower-R : begin local strokeBar : fallback _strokeBar Stroke local stroke : fallback _stroke Stroke local strokeA : mix strokeBar stroke 0.5 - local rBalanceMultiplier : match mode [0 1] [1 (4 / 3)] [2 (1 / 2)] [3 1] - local rHookMultiplier : match mode [0 1] [1 (2 / 3)] [2 1] [3 1] - local rHookSwMultiplier : match mode [0 0] [1 (1 / 4)] [2 0] [3 0] - local rSerifLeftExtender : match mode [0 0] [1 (1 / 3)] [2 0] [3 0] - local hookSuperness : match mode [0 2.35] [1 2.75] [2 2.35] [3 2.35] + local rBalanceMultiplier : match mode [0 1] [1 (4 / 3)] [2 (2 * (dfR.div - 0.5))] [3 1] + local rHookMultiplier : match mode [0 1] [1 (2 / 3)] [2 1] [3 1] + local rHookSwMultiplier : match mode [0 0] [1 (1 / 4)] [2 0] [3 0] + local rSerifLeftExtender : match mode [0 0] [1 (1 / 3)] [2 0] [3 0] + local hookSuperness : match mode [0 2.35] [1 2.75] [2 2.35] [3 2.35] local rbar : SB + RBalance * rBalanceMultiplier + strokeBar * HVContrast local rSerifX : rbar - strokeBar / 2 * HVContrast @@ -3469,7 +3469,7 @@ glyph-block Letter-Latin-Lower-R : begin local rmiddle : match mode 0 : mix (rbar - fine) rHookX (0.54 + 2 * TanSlope * strokeBar / Width) 1 : mix (rbar - fine) rHookX (0.59 + 2 * TanSlope * strokeBar / Width) - 2 : mix rHookX df.width (3 / 8) + 2 : mix df.width rHookX (5 / 4 * [mix 1 dfR.div 2]) 3 : mix (rbar - strokeBar * HVContrast) rHookX 0.5 local mixpin : match mode 0 : 0.65 + 4 * TanSlope * strokeA / Width @@ -3540,7 +3540,7 @@ glyph-block Letter-Latin-Lower-R : begin create-derived "r.earlessRounded" : EarlessRoundedLowerRShape dfN rEarless 0 0 create-derived "r.earlessRoundedSerifed" : EarlessRoundedLowerRShape dfN rEarless 0 1 - create-glyph 'r.narrow' : glyph-proc + create-glyph 'r.compact' : glyph-proc set-width dfR.width include : dfR.markSet.e include : NarrowLowerRshape dfR rNarrow 0 0 @@ -3597,7 +3597,7 @@ glyph-block Letter-Latin-Lower-R : begin SmallRLongLegShape EarlessRoundedLowerRShape dfN rEarless 0 0 create-glyph 'rlongleg.earlessRoundedSerifed' SmallRLongLegShape EarlessRoundedLowerRShape dfN rEarless 0 1 - create-glyph 'rlongleg.narrow' + create-glyph 'rlongleg.compact' SmallRLongLegShape NarrowLowerRshape dfR rNarrow 0 0 select-variant 'rlongleg' 0x27C (follow -- 'r') @@ -3624,7 +3624,7 @@ glyph-block Letter-Latin-Lower-R : begin SmallRRTailShape EarlessCornerLowerRShape dfN rEarless 0 create-glyph 'rrtail.earlessRounded' SmallRRTailShape EarlessRoundedLowerRShape dfN rEarless 0 - create-glyph 'rrtail.narrow' + create-glyph 'rrtail.compact' SmallRRTailShape NarrowLowerRshape dfR rNarrow 0 select-variant 'rrtail' 0x27D @@ -3652,7 +3652,7 @@ glyph-block Letter-Latin-Lower-R : begin TurnRRTailShape StandardLowerRShape dfN rSerifed 1 create-glyph 'turnrrtail.top-serifed' TurnRRTailShape StandardLowerRShape dfN rSerifed 0 - create-glyph 'turnrrtail.narrow' + create-glyph 'turnrrtail.compact' TurnRRTailShape NarrowLowerRshape dfR rNarrow 0 select-variant 'turnrrtail' 0x27B @@ -3663,7 +3663,7 @@ glyph-block Letter-Latin-Lower-R : begin include : EarlessRoundedLowerRShape dfN rEarless 0 0 create-derived 'rflap.serifed' : rBottomSerif 0 - create-glyph 'rflap.narrow' : glyph-proc + create-glyph 'rflap.compact' : glyph-proc set-width dfR.width include : dfR.markSet.e define [object rbar rBottomSerif rmiddle] : RDim dfR rNarrow diff --git a/params/variants.toml b/params/variants.toml index 2b97bdab0..69a63d739 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -961,11 +961,13 @@ selector.rrtail = "earlessRounded" selector."turnrrtail" = "serifed" selector."rflap" = "serifed" -[prime.r.variants.narrow] -selector.r = "narrow" -selector.rrtail = "narrow" -selector."turnrrtail" = "narrow" -selector."rflap" = "narrow" +[prime.r.variants.compact] +rank = 8 +description = 'Compact, serifless `r`' +selector.r = "compact" +selector.rrtail = "compact" +selector."turnrrtail" = "compact" +selector."rflap" = "compact"