Added variant r/earless-corner-serifed and r/earless-rounded-serifed; Reordered r's variant ranking and renamed r/straight to r/serifless (#742).

This commit is contained in:
be5invis 2020-11-19 19:08:42 -08:00
parent c6dc8c370c
commit d4ca01bada
5 changed files with 72 additions and 42 deletions

View file

@ -590,11 +590,13 @@ Subsection `variants` is used to configure character variants in the font. Prope
+ `q = 'earless-rounded'`, `cv25 = 5`: Earless (rounded top-left) single-storey `q`. + `q = 'earless-rounded'`, `cv25 = 5`: Earless (rounded top-left) single-storey `q`.
+ `q = 'earless-rounded-tailed'`, `cv25 = 6`: Earless (rounded top-left) single-storey `q` with curly tail. + `q = 'earless-rounded-tailed'`, `cv25 = 6`: Earless (rounded top-left) single-storey `q` with curly tail.
- Styles for `r`: - Styles for `r`:
+ `r = 'straight'`, `cv26 = 1`: Straight, serif-less `r` (default for Sans). + `r = 'serifless'`, `cv26 = 1`: Straight, serif-less `r` (default for Sans).
+ `r = 'serifed'`, `cv26 = 2`: `r` with serif at both top and bottom (default for Slab Upright). + `r = 'serifed'`, `cv26 = 2`: `r` with serif at both top and bottom (default for Slab Upright).
+ `r = 'top-serifed'`, `cv26 = 3`: `r` with serifs at top-left only (default for Slab Italic). + `r = 'top-serifed'`, `cv26 = 3`: `r` with serifs at top-left only (default for Slab Italic).
+ `r = 'earless-corner'`, `cv26 = 4`: Earless (corner top-left), serif-less `r`. + `r = 'earless-corner'`, `cv26 = 4`: Earless (corner top-left), serif-less `r`.
+ `r = 'earless-rounded'`, `cv26 = 5`: Earless (rounded top-left), serif-less `r`. + `r = 'earless-corner-serifed'`, `cv26 = 5`: Earless (corner top-left), serifed `r`.
+ `r = 'earless-rounded'`, `cv26 = 6`: Earless (rounded top-left), serif-less `r`.
+ `r = 'earless-rounded-serifed'`, `cv26 = 7`: Earless (rounded top-left), serifed `r`.
- Styles for `t`: - Styles for `t`:
+ `t = 'standard'`, `cv27 = 1`: Standard `t` shape (default). + `t = 'standard'`, `cv27 = 1`: Standard `t` shape (default).
+ `t = 'cross'`, `cv27 = 2`: Futura-like `t` shape. + `t = 'cross'`, `cv27 = 2`: Futura-like `t` shape.

View file

@ -465,7 +465,7 @@ j = 'flat-hook-serifed'
capital-i = 'serifed' capital-i = 'serifed'
capital-j = 'serifed' capital-j = 'serifed'
g = 'singlestorey' g = 'singlestorey'
r = 'straight' r = 'serifless'
a = 'doublestorey' a = 'doublestorey'
d = 'toothed' d = 'toothed'
u = 'toothed' u = 'toothed'

View file

@ -1,3 +1,4 @@
* \[**Breaking**\] Added variant `r/earless-corner-serifed` and `r/earless-rounded-serifed`; Reordered `r`'s variant ranking and renamed `r/straight` to `r/serifless` (#742).
* Fix variant application of fraction 1/10 (U+2152, #736). * Fix variant application of fraction 1/10 (U+2152, #736).
* Make variant application effective on LATIN SMALL LETTER WITH STROKE (U+0167, #737). * Make variant application effective on LATIN SMALL LETTER WITH STROKE (U+0167, #737).
* Updated readme to reflect change in spacing parameter `force-monospace` to `fontconfig-mono`. * Updated readme to reflect change in spacing parameter `force-monospace` to `fontconfig-mono`.

View file

@ -3434,7 +3434,7 @@ glyph-block Letter-Latin-Lower-R : begin
set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5) set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5)
define [EarlessCornerLowerRShape df md doTopSerif doBottomSerif] : glyph-proc define [EarlessCornerLowerRShape df md doTopSerif doBottomSerif] : glyph-proc
define [object rbar rmiddle rHookX rHookY hookSuperness] : RDim df md define [object rbar rmiddle rHookX rHookY hookSuperness rBottomSerif] : RDim df md
include : dispiro include : dispiro
widths.lhs widths.lhs
g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward] g4.up.start rHookX (XH - rHookY - Stroke * 0.5) [heading Upward]
@ -3442,10 +3442,11 @@ glyph-block Letter-Latin-Lower-R : begin
g4.left.mid (rmiddle - CorrectionOMidS) (XH - O) [heading Leftward] g4.left.mid (rmiddle - CorrectionOMidS) (XH - O) [heading Leftward]
g4 (rbar - Stroke * HVContrast) (XH - DToothlessRise) g4 (rbar - Stroke * HVContrast) (XH - DToothlessRise)
include : VBarRight rbar 0 (XH - DToothlessRise) include : VBarRight rbar 0 (XH - DToothlessRise)
if doBottomSerif : include : rBottomSerif 0
set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5) set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5)
define [EarlessRoundedLowerRShape df md doTopSerif doBottomSerif] : glyph-proc define [EarlessRoundedLowerRShape df md doTopSerif doBottomSerif] : glyph-proc
define [object rbar rmiddle rHookX rHookY hookSuperness] : RDim df md define [object rbar rmiddle rHookX rHookY hookSuperness rBottomSerif] : RDim df md
local hx : Math.max rHookX (rbar + 1.25 * Stroke) local hx : Math.max rHookX (rbar + 1.25 * Stroke)
include : dispiro include : dispiro
widths.lhs widths.lhs
@ -3453,16 +3454,19 @@ glyph-block Letter-Latin-Lower-R : begin
hookstart (XH - O) hookstart (XH - O)
flat (rbar - Stroke * HVContrast) (XH - SmallSmoothA) flat (rbar - Stroke * HVContrast) (XH - SmallSmoothA)
curl (rbar - Stroke * HVContrast) 0 [heading Downward] curl (rbar - Stroke * HVContrast) 0 [heading Downward]
if doBottomSerif : include : rBottomSerif 0
set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5) set-base-anchor 'overlay' (rbar - Stroke * 0.25) (XH * 0.5)
create-glyph : glyph-proc create-glyph : glyph-proc
set-width dfR.width set-width dfR.width
include : dfR.markSet.e include : dfR.markSet.e
create-derived "r.straight" : StandardLowerRShape dfN rStraight 0 0 create-derived "r.serifless" : StandardLowerRShape dfN rStraight 0 0
create-derived "r.serifed" : StandardLowerRShape dfN rSerifed 1 1 create-derived "r.serifed" : StandardLowerRShape dfN rSerifed 1 1
create-derived "r.top-serifed" : StandardLowerRShape dfN rSerifed 1 0 create-derived "r.top-serifed" : StandardLowerRShape dfN rSerifed 1 0
create-derived "r.earlessCorner" : EarlessCornerLowerRShape dfN rEarless 0 0 create-derived "r.earlessCorner" : EarlessCornerLowerRShape dfN rEarless 0 0
create-derived "r.earlessRounded" : EarlessRoundedLowerRShape dfN rEarless 0 0 create-derived "r.earlessCornerSerifed" : EarlessCornerLowerRShape dfN rEarless 0 1
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.narrow' : glyph-proc
set-width dfR.width set-width dfR.width
@ -3498,27 +3502,31 @@ glyph-block Letter-Latin-Lower-R : begin
turned 'turnr' 0x279 'r' HalfAdvance (XH / 2) [TurnRMarks 'e'] turned 'turnr' 0x279 'r' HalfAdvance (XH / 2) [TurnRMarks 'e']
do do
define [SmallRLongLegShape F df mode doTopSerif] : glyph-proc define [SmallRLongLegShape F df mode doTopSerif doBottomSerif] : glyph-proc
set-width df.width set-width df.width
include : df.markSet.p include : df.markSet.p
define [object rbar rBottomSerif] : RDim df mode define [object rbar rBottomSerif] : RDim df mode
include : F df mode doTopSerif 0 include : F df mode doTopSerif 0
eject-contour 'serifLB' eject-contour 'serifLB'
include : VBarRight rbar Descender 0 include : VBarRight rbar Descender 0
if SLAB : include : rBottomSerif Descender if doBottomSerif : include : rBottomSerif Descender
create-glyph 'rlongleg.straight' create-glyph 'rlongleg.serifless'
SmallRLongLegShape StandardLowerRShape dfN rStraight 0 SmallRLongLegShape StandardLowerRShape dfN rStraight 0 0
create-glyph 'rlongleg.serifed' create-glyph 'rlongleg.serifed'
SmallRLongLegShape StandardLowerRShape dfN rSerifed 1 SmallRLongLegShape StandardLowerRShape dfN rSerifed 1 1
create-glyph 'rlongleg.top-serifed' create-glyph 'rlongleg.top-serifed'
SmallRLongLegShape StandardLowerRShape dfN rSerifed 1 SmallRLongLegShape StandardLowerRShape dfN rSerifed 1 0
create-glyph 'rlongleg.earlessCorner' create-glyph 'rlongleg.earlessCorner'
SmallRLongLegShape EarlessCornerLowerRShape dfN rEarless 0 SmallRLongLegShape EarlessCornerLowerRShape dfN rEarless 0 0
create-glyph 'rlongleg.earlessCornerSerifed'
SmallRLongLegShape EarlessCornerLowerRShape dfN rEarless 0 1
create-glyph 'rlongleg.earlessRounded' create-glyph 'rlongleg.earlessRounded'
SmallRLongLegShape EarlessRoundedLowerRShape dfN rEarless 0 SmallRLongLegShape EarlessRoundedLowerRShape dfN rEarless 0 0
create-glyph 'rlongleg.earlessRoundedSerifed'
SmallRLongLegShape EarlessRoundedLowerRShape dfN rEarless 0 1
create-glyph 'rlongleg.narrow' create-glyph 'rlongleg.narrow'
SmallRLongLegShape NarrowLowerRshape dfR rNarrow 0 SmallRLongLegShape NarrowLowerRshape dfR rNarrow 0 0
select-variant 'rlongleg' 0x27C (follow -- 'r') select-variant 'rlongleg' 0x27C (follow -- 'r')
@ -3536,10 +3544,8 @@ glyph-block Letter-Latin-Lower-R : begin
include : Upright include : Upright
include : Translate rbar 0 include : Translate rbar 0
include : Italify include : Italify
create-glyph 'rrtail.straight' create-glyph 'rrtail.serifless'
SmallRRTailShape StandardLowerRShape dfN rStraight 0 SmallRRTailShape StandardLowerRShape dfN rStraight 0
create-glyph 'rrtail.serifed'
SmallRRTailShape StandardLowerRShape dfN rSerifed 1
create-glyph 'rrtail.top-serifed' create-glyph 'rrtail.top-serifed'
SmallRRTailShape StandardLowerRShape dfN rSerifed 1 SmallRRTailShape StandardLowerRShape dfN rSerifed 1
create-glyph 'rrtail.earlessCorner' create-glyph 'rrtail.earlessCorner'
@ -3548,7 +3554,7 @@ glyph-block Letter-Latin-Lower-R : begin
SmallRRTailShape EarlessRoundedLowerRShape dfN rEarless 0 SmallRRTailShape EarlessRoundedLowerRShape dfN rEarless 0
create-glyph 'rrtail.narrow' create-glyph 'rrtail.narrow'
SmallRRTailShape NarrowLowerRshape dfR rNarrow 0 SmallRRTailShape NarrowLowerRshape dfR rNarrow 0
select-variant 'rrtail' 0x27D (follow -- 'r') select-variant 'rrtail' 0x27D
turned 'smallLetterTurnedRWithTail' 0x2C79 'rrtail' HalfAdvance (XH / 2) : glyph-proc turned 'smallLetterTurnedRWithTail' 0x2C79 'rrtail' HalfAdvance (XH / 2) : glyph-proc
local df : DivFrame (currentGlyph.advanceWidth / Width) local df : DivFrame (currentGlyph.advanceWidth / Width)
@ -3568,7 +3574,7 @@ glyph-block Letter-Latin-Lower-R : begin
include : Translate (df.rightSB - rbar + df.leftSB + Stroke * HVContrast) 0 include : Translate (df.rightSB - rbar + df.leftSB + Stroke * HVContrast) 0
include : Italify include : Italify
create-glyph 'turnrrtail.straight' create-glyph 'turnrrtail.serifless'
TurnRRTailShape StandardLowerRShape dfN rStraight 0 TurnRRTailShape StandardLowerRShape dfN rStraight 0
create-glyph 'turnrrtail.serifed' create-glyph 'turnrrtail.serifed'
TurnRRTailShape StandardLowerRShape dfN rSerifed 1 TurnRRTailShape StandardLowerRShape dfN rSerifed 1
@ -3576,10 +3582,9 @@ glyph-block Letter-Latin-Lower-R : begin
TurnRRTailShape StandardLowerRShape dfN rSerifed 0 TurnRRTailShape StandardLowerRShape dfN rSerifed 0
create-glyph 'turnrrtail.narrow' create-glyph 'turnrrtail.narrow'
TurnRRTailShape NarrowLowerRshape dfR rNarrow 0 TurnRRTailShape NarrowLowerRshape dfR rNarrow 0
select-variant 'turnrrtail' 0x27B select-variant 'turnrrtail' 0x27B
create-glyph 'rflap.straight' : glyph-proc create-glyph 'rflap.serifless' : glyph-proc
set-width dfN.width set-width dfN.width
include : dfN.markSet.e include : dfN.markSet.e
define [object rBottomSerif] : RDim dfN rEarless define [object rBottomSerif] : RDim dfN rEarless

View file

@ -866,17 +866,19 @@ selector.q = 'earlessRoundedTailed'
sampler = 'r' sampler = 'r'
tag = 'cv26' tag = 'cv26'
[prime.r.variants.straight] [prime.r.variants.serifless]
rank = 1 rank = 1
description = 'Straight, serif-less `r`' description = 'Straight, serif-less `r`'
selector.r = "straight" selector.r = "serifless"
selector."turnrrtail" = "straight" selector.rrtail = "serifless"
selector."rflap" = "straight" selector."turnrrtail" = "serifless"
selector."rflap" = "serifless"
[prime.r.variants.serifed] [prime.r.variants.serifed]
rank = 2 rank = 2
description = '`r` with serif at both top and bottom' description = '`r` with serif at both top and bottom'
selector.r = "serifed" selector.r = "serifed"
selector.rrtail = "top-serifed"
selector."turnrrtail" = "serifed" selector."turnrrtail" = "serifed"
selector."rflap" = "serifed" selector."rflap" = "serifed"
@ -884,22 +886,47 @@ selector."rflap" = "serifed"
rank = 3 rank = 3
description = '`r` with serifs at top-left only' description = '`r` with serifs at top-left only'
selector.r = "top-serifed" selector.r = "top-serifed"
selector.rrtail = "top-serifed"
selector."turnrrtail" = "top-serifed" selector."turnrrtail" = "top-serifed"
selector."rflap" = "straight" selector."rflap" = "serifless"
[prime.r.variants.earless-corner] [prime.r.variants.earless-corner]
rank = 4 rank = 4
description = 'Earless (corner top-left), serif-less `r`' description = 'Earless (corner top-left), serif-less `r`'
selector.r = "earlessCorner" selector.r = "earlessCorner"
selector."turnrrtail" = "straight" selector.rrtail = "earlessCorner"
selector."rflap" = "straight" selector."turnrrtail" = "serifless"
selector."rflap" = "serifless"
[prime.r.variants.earless-corner-serifed]
rank = 5
description = 'Earless (corner top-left), serifed `r`'
selector.r = "earlessCornerSerifed"
selector.rrtail = "earlessCorner"
selector."turnrrtail" = "serifed"
selector."rflap" = "serifed"
[prime.r.variants.earless-rounded] [prime.r.variants.earless-rounded]
rank = 5 rank = 6
description = 'Earless (rounded top-left), serif-less `r`' description = 'Earless (rounded top-left), serif-less `r`'
selector.r = "earlessRounded" selector.r = "earlessRounded"
selector."turnrrtail" = "straight" selector.rrtail = "earlessRounded"
selector."rflap" = "straight" selector."turnrrtail" = "serifless"
selector."rflap" = "serifless"
[prime.r.variants.earless-rounded-serifed]
rank = 7
description = 'Earless (rounded top-left), serifed `r`'
selector.r = "earlessRoundedSerifed"
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"
@ -1678,11 +1705,6 @@ selector.dotlessj = "narrow"
[prime.j.variants.narrow-serifed] [prime.j.variants.narrow-serifed]
selector.dotlessj = "narrowSerifed" selector.dotlessj = "narrowSerifed"
[prime.r.variants.narrow]
selector.r = "narrow"
selector."turnrrtail" = "narrow"
selector."rflap" = "narrow"
# This is a special variant selector that controls digit form # This is a special variant selector that controls digit form
[prime.digit-form.variants.lining] [prime.digit-form.variants.lining]
selector.__defaultDigitForm = "lining" selector.__defaultDigitForm = "lining"
@ -1709,7 +1731,7 @@ b = 'toothed'
g = 'singlestorey' g = 'singlestorey'
p = 'eared' p = 'eared'
q = 'straight' q = 'straight'
r = 'straight' r = 'serifless'
t = 'standard' t = 'standard'
v = 'straight' v = 'straight'
w = 'straight' w = 'straight'