diff --git a/changes/3.4.4.md b/changes/3.4.4.md index afe0038897..32c6ce4885 100644 --- a/changes/3.4.4.md +++ b/changes/3.4.4.md @@ -1,2 +1,2 @@ * Add toothless variant for `a` (#669). - * Add earless variants for `n` (#669). \ No newline at end of file + * Add earless variants for `n`, `r` (#669). \ No newline at end of file diff --git a/font-src/glyphs/letter/latin.ptl b/font-src/glyphs/letter/latin.ptl index ebba3be5d4..41ed947629 100644 --- a/font-src/glyphs/letter/latin.ptl +++ b/font-src/glyphs/letter/latin.ptl @@ -2837,18 +2837,20 @@ glyph-block Letter-Latin-Upper-R : begin glyph-block Letter-Latin-Lower-R : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives + glyph-block-import Letter-Shared-Shapes : DToothlessRise DMBlend local dfR : DivFrame para.diversityF local rStraight 0 local rSerifed 1 local rNarrow 2 + local rEarless 3 define [RDim mode] : begin - local rBalanceMultiplier : match mode [0 1] [1 (4 / 3)] [2 (1 / 2)] - local rHookMultiplier : match mode [0 1] [1 (2 / 3)] [2 1] - local rHookSwMultiplier : match mode [0 0] [1 (1 / 4)] [2 0] - local rSerifLeftExtender : match mode [0 0] [1 (1 / 3)] [2 0] - local hookSuperness : match mode [0 2.35] [1 2.75] [2 2.35] + 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 rbar : SB + RBalance * rBalanceMultiplier + Stroke * HVContrast local rSerifX : rbar - HalfStroke * HVContrast @@ -2865,10 +2867,12 @@ glyph-block Letter-Latin-Lower-R : begin 0 : mix (rbar - fine) rHookX (0.54 + 2 * TanSlope * Stroke / Width) 1 : mix (rbar - fine) rHookX (0.59 + 2 * TanSlope * Stroke / Width) 2 : mix rHookX dfR.width (3 / 8) + 3 : mix (rbar - Stroke * HVContrast) rHookX 0.5 local mixpin : match mode 0 : 0.65 + 4 * TanSlope * Stroke / Width 1 : 0.65 + 0.25 * Stroke / Width + 4 * TanSlope * Stroke / Width 2 : 0.65 + 4 * TanSlope * Stroke / Width + 3 : 0.65 + 4 * TanSlope * Stroke / Width local rmiddlein : [mix rbar (rHookX - Stroke * HVContrast * 1.05) mixpin] - CorrectionOMidS local skew : Math.max 0 : (rmiddle - rmiddlein) / Stroke local rHookY : RHook * rHookMultiplier + Stroke * rHookSwMultiplier @@ -2889,7 +2893,7 @@ glyph-block Letter-Latin-Lower-R : begin if doTopSerif : include : rTopSerif XH define [NarrowLowerRshape df md doTopSerif doBottomSerif] : glyph-proc - define [object rbar fine rmiddle] : RDim rNarrow + define [object rbar fine rmiddle] : RDim md include : dispiro widths.lhs g4.left.mid (rmiddle - CorrectionOMidS * [linreg 72 0.75 108 1 Stroke]) (XH - O) @@ -2898,12 +2902,35 @@ glyph-block Letter-Latin-Lower-R : begin include : VBarRight rbar 0 XH set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5) + define [EarlessCornerLowerRShape df md doTopSerif doBottomSerif] : glyph-proc + define [object rbar rmiddle rHookX rHookY hookSuperness] : RDim md + include : dispiro + widths.lhs + g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward] + arcvh nothing hookSuperness + g4.left.mid (rmiddle - CorrectionOMidS) (XH - O) [heading Leftward] + g4 (rbar - Stroke * HVContrast) (XH - DToothlessRise) + include : VBarRight rbar 0 (XH - DToothlessRise) + set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5) + + define [EarlessRoundedLowerRShape df md doTopSerif doBottomSerif] : glyph-proc + define [object rbar rmiddle rHookX rHookY hookSuperness] : RDim md + include : dispiro + widths.lhs + g4 rHookX (XH - rHookY) + hookstart (XH - O) + flat (rbar - Stroke * HVContrast) (XH - SmallSmoothA) + curl (rbar - Stroke * HVContrast) 0 [heading Downward] + set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5) + create-glyph : glyph-proc set-width dfR.width include dfR.markSet.e - create-derived "r.straight" : StandardLowerRShape dfR rStraight 0 0 - create-derived "r.serifed" : StandardLowerRShape dfR rSerifed 1 1 - create-derived "r.top-serifed" : StandardLowerRShape dfR rSerifed 1 0 + create-derived "r.straight" : StandardLowerRShape dfR rStraight 0 0 + create-derived "r.serifed" : StandardLowerRShape dfR rSerifed 1 1 + create-derived "r.top-serifed" : StandardLowerRShape dfR rSerifed 1 0 + create-derived "r.earlessCorner" : EarlessCornerLowerRShape dfR rEarless 0 0 + create-derived "r.earlessRounded" : EarlessRoundedLowerRShape dfR rEarless 0 0 create-glyph 'r.narrow' : glyph-proc set-width dfR.width @@ -2917,6 +2944,8 @@ glyph-block Letter-Latin-Lower-R : begin turned 'turnr.straight' nothing 'r.straight' dfR.middle (XH / 2) [marks] turned 'turnr.serifed' nothing 'r.serifed' dfR.middle (XH / 2) [marks] turned 'turnr.top-serifed' nothing 'r.top-serifed' dfR.middle (XH / 2) [marks] + turned 'turnr.earlessCorner' nothing 'r.earlessCorner' dfR.middle (XH / 2) [marks] + turned 'turnr.earlessRounded' nothing 'r.earlessRounded' dfR.middle (XH / 2) [marks] turned 'turnr.narrow' nothing 'r.narrow' dfR.middle (XH / 2) [marks] select-variant 'turnr' 0x279 (follow -- 'r') @@ -2932,13 +2961,17 @@ glyph-block Letter-Latin-Lower-R : begin set-width dfR.width include dfR.markSet.p create-derived 'rlongleg.straight' - SmallRLongLegShape StandardLowerRShape rStraight 0 + SmallRLongLegShape StandardLowerRShape rStraight 0 create-derived 'rlongleg.serifed' - SmallRLongLegShape StandardLowerRShape rSerifed 1 + SmallRLongLegShape StandardLowerRShape rSerifed 1 create-derived 'rlongleg.top-serifed' - SmallRLongLegShape StandardLowerRShape rSerifed 1 + SmallRLongLegShape StandardLowerRShape rSerifed 1 + create-derived 'rlongleg.earlessCorner' + SmallRLongLegShape EarlessCornerLowerRShape rEarless 0 + create-derived 'rlongleg.earlessRounded' + SmallRLongLegShape EarlessRoundedLowerRShape rEarless 0 create-derived 'rlongleg.narrow' - SmallRLongLegShape NarrowLowerRshape rNarrow 0 + SmallRLongLegShape NarrowLowerRshape rNarrow 0 select-variant 'rlongleg' 0x27C (follow -- 'r') @@ -2947,6 +2980,8 @@ glyph-block Letter-Latin-Lower-R : begin turned 'turnrlongleg.straight' nothing 'rlongleg.straight' dfR.middle (XH / 2) [marks] turned 'turnrlongleg.serifed' nothing 'rlongleg.serifed' dfR.middle (XH / 2) [marks] turned 'turnrlongleg.top-serifed' nothing 'rlongleg.top-serifed' dfR.middle (XH / 2) [marks] + turned 'turnrlongleg.earlessCorner' nothing 'rlongleg.earlessCorner' dfR.middle (XH / 2) [marks] + turned 'turnrlongleg.earlessRounded' nothing 'rlongleg.earlessRounded' dfR.middle (XH / 2) [marks] turned 'turnrlongleg.narrow' nothing 'rlongleg.narrow' dfR.middle (XH / 2) [marks] select-variant 'turnrlongleg' 0x27A (follow -- 'r') @@ -2963,16 +2998,26 @@ glyph-block Letter-Latin-Lower-R : begin create-glyph : glyph-proc set-width dfR.width include dfR.markSet.p - create-derived 'rrtail.straight' : SmallRRTailShape StandardLowerRShape rStraight 0 - create-derived 'rrtail.serifed' : SmallRRTailShape StandardLowerRShape rSerifed 1 - create-derived 'rrtail.top-serifed' : SmallRRTailShape StandardLowerRShape rSerifed 1 - create-derived 'rrtail.narrow' : SmallRRTailShape NarrowLowerRshape rNarrow 0 + create-derived 'rrtail.straight' + SmallRRTailShape StandardLowerRShape rStraight 0 + create-derived 'rrtail.serifed' + SmallRRTailShape StandardLowerRShape rSerifed 1 + create-derived 'rrtail.top-serifed' + SmallRRTailShape StandardLowerRShape rSerifed 1 + create-derived 'rrtail.earlessCorner' + SmallRRTailShape EarlessCornerLowerRShape rEarless 0 + create-derived 'rrtail.earlessRounded' + SmallRRTailShape EarlessRoundedLowerRShape rEarless 0 + create-derived 'rrtail.narrow' + SmallRRTailShape NarrowLowerRshape rNarrow 0 select-variant 'rrtail' 0x27D (follow -- 'r') do turned 'smallLetterTurnedRWithTail.straight' nothing 'rrtail.straight' dfR.middle (XH / 2) turned 'smallLetterTurnedRWithTail.serifed' nothing 'rrtail.serifed' dfR.middle (XH / 2) turned 'smallLetterTurnedRWithTail.top-serifed' nothing 'rrtail.top-serifed' dfR.middle (XH / 2) + turned 'smallLetterTurnedRWithTail.earlessCorner' nothing 'rrtail.earlessCorner' dfR.middle (XH / 2) + turned 'smallLetterTurnedRWithTail.earlessRounded' nothing 'rrtail.earlessRounded' dfR.middle (XH / 2) turned 'smallLetterTurnedRWithTail.narrow' nothing 'rrtail.narrow' dfR.middle (XH / 2) select-variant 'smallLetterTurnedRWithTail' 0x2C79 (follow -- 'r') @@ -2990,12 +3035,16 @@ glyph-block Letter-Latin-Lower-R : begin create-glyph : glyph-proc set-width dfR.width include dfR.markSet.p - create-derived 'turnrrtail.straight' : TurnRRTailShape StandardLowerRShape rStraight 0 - create-derived 'turnrrtail.serifed' : TurnRRTailShape StandardLowerRShape rSerifed 1 - create-derived 'turnrrtail.top-serifed' : TurnRRTailShape StandardLowerRShape rSerifed 0 - create-derived 'turnrrtail.narrow' : TurnRRTailShape NarrowLowerRshape rNarrow 0 - - select-variant 'turnrrtail' 0x27B (follow -- 'r') + create-derived 'turnrrtail.straight' + TurnRRTailShape StandardLowerRShape rStraight 0 + create-derived 'turnrrtail.serifed' + TurnRRTailShape StandardLowerRShape rSerifed 1 + create-derived 'turnrrtail.top-serifed' + TurnRRTailShape StandardLowerRShape rSerifed 0 + create-derived 'turnrrtail.narrow' + TurnRRTailShape NarrowLowerRshape rNarrow 0 + + select-variant 'turnrrtail' 0x27B create-glyph 'rflap.straight' : glyph-proc set-width dfR.width diff --git a/params/variants.toml b/params/variants.toml index af396ce6bf..b3854069ad 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -600,18 +600,35 @@ tag = "cv85" sampler = 'r' description = 'Straight, serif-less `r`' variant.r = "straight" +variant."turnrrtail" = "straight" [simple.v-r-serifed] tag = "cv86" sampler = 'r' description = '`r` with serif at both top and bottom' variant.r = "serifed" +variant."turnrrtail" = "serifed" [simple.v-r-top-serifed] tag = "cv87" sampler = 'r' description = '`r` with serifs at top-left only' variant.r = "top-serifed" +variant."turnrrtail" = "top-serifed" + +[simple.v-r-earless-corner] +tag = "VXDS" +sampler = 'r' +description = 'Earless (corner top-left), serif-less `r`' +variant.r = "earlessCorner" +variant."turnrrtail" = "straight" + +[simple.v-r-earless-rounded] +tag = "VXDT" +sampler = 'r' +description = 'Earless (rounded top-left), serif-less `r`' +variant.r = "earlessRounded" +variant."turnrrtail" = "straight" [simple.v-t-standard] tag = 'cv40'