Skip to content

Commit

Permalink
Add support for open number sign (VXBI and VXBJ, #621).
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Jun 26, 2020
1 parent 7000df1 commit 80e8841
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 24 deletions.
3 changes: 2 additions & 1 deletion changes/3.3.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Change shape of Peseta sign to `P` with crossbar (#451).
* Add Cyrillic Fita (#617).
* Add a more rounded variant of `D` (#616).
* Add a more rounded variant of `D` (#616).
* Add support for open number sign (`VXBI` and `VXBJ`, #621).
71 changes: 48 additions & 23 deletions glyphs/symbol-punctuation.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -1010,29 +1010,54 @@ glyph-block Symbol-Punctuation-Slashes-And-Number-Sign : begin
save 'backslash.right'

do "numbersign"
local nsTop : mix symbolMid parenTop 0.85
local nsBot : mix symbolMid parenBot 0.85
local fine : adviceBlackness 3.5
local l : SB - fine / 2
local r : RightSB + fine / 2
local hsp : ((r - l) - (fine * 2 * HVContrast)) * 0.3

sketch # numbersign.upright
include : HBar l r [mix nsTop nsBot 0.3]
include : HBar l r [mix nsTop nsBot 0.7]
include : VBarLeft (l + hsp) nsBot nsTop fine
include : VBarRight (r - hsp) nsBot nsTop fine
save 'numbersign.upright'

sketch # numbersign.slanted
local x : hsp + fine / 2 * HVContrast
local w : (r - l) * 0.15
local shift : w / 3
include : HBar (l + shift) (r + shift) [mix nsTop nsBot 0.3]
include : HBar (l - shift) (r - shift) [mix nsTop nsBot 0.7]
include : SlashShape (l + x - w) (l + x + w) nsTop nsBot fine
include : SlashShape (r - x - w) (r - x + w) nsTop nsBot fine
save 'numbersign.slanted'
define nsTop : mix symbolMid parenTop 0.85
define nsBot : mix symbolMid parenBot 0.85
define fine : adviceBlackness 3.5

define pFineOpen (1 / 8)
define l : SB - fine / 2
define r : RightSB + fine / 2
define hsp : ((r - l) - (fine * 2 * HVContrast)) * 0.3

define [UprightHBars] : union
HBar l r [mix nsTop nsBot 0.3]
HBar l r [mix nsTop nsBot 0.7]
define [UprightVBars p] : union
VBarLeft (l + hsp + p * fine) nsBot nsTop fine
VBarRight (r - hsp - p * fine) nsBot nsTop fine


create-glyph 'numbersign.upright' : union
UprightHBars
UprightVBars 0

create-glyph 'numbersign.uprightOpen' : union
UprightVBars pFineOpen
difference
UprightHBars
Rect nsTop nsBot (l + hsp + fine * (0.5 + pFineOpen)) (r - hsp - fine * (0.5 + pFineOpen))

define x : hsp + fine / 2 * HVContrast
define w : (r - l) * 0.15
define shift : w / 3
define [SlantedHBars] : union
HBar (l + shift) (r + shift) [mix nsTop nsBot 0.3]
HBar (l - shift) (r - shift) [mix nsTop nsBot 0.7]
define [SlantedVBars p] : union
SlashShape (l + x - w + p * fine) (l + x + w + p * fine) nsTop nsBot fine
SlashShape (r - x - w - p * fine) (r - x + w - p * fine) nsTop nsBot fine

create-glyph 'numbersign.slanted' : union [SlantedHBars] [SlantedVBars 0]
create-glyph 'numbersign.slantedOpen' : union
SlantedVBars pFineOpen
difference
SlantedHBars
spiro-outline
corner (l + x + w + pFineOpen * fine) nsTop
corner (r - x + w - pFineOpen * fine) nsTop
corner (r - x - w - pFineOpen * fine) nsBot
corner (l + x - w + pFineOpen * fine) nsBot


select-variant 'numbersign' '#'

Expand Down
12 changes: 12 additions & 0 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,18 @@ sampler = '#'
description = 'Number sign with slanted bars'
variant.numbersign = 'slanted'

[simple.v-numbersign-upright-open]
tag = 'VXBI'
sampler = '#'
description = 'Number sign with vertical bars and open inner'
variant.numbersign = 'uprightOpen'

[simple.v-numbersign-slanted-open]
tag = 'VXBJ'
sampler = '#'
description = 'Number sign with slanted bars and open inner'
variant.numbersign = 'slantedOpen'

[simple.v-ampersand-closed]
tag = 'VXAG'
sampler = '&'
Expand Down

0 comments on commit 80e8841

Please sign in to comment.