Skip to content

Commit

Permalink
Export compact r to CV system
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Dec 27, 2020
1 parent a659de4 commit abed5ab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build-plans.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
22 changes: 11 additions & 11 deletions font-src/glyphs/letter/latin.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
12 changes: 7 additions & 5 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"



Expand Down

0 comments on commit abed5ab

Please sign in to comment.