Skip to content

Commit

Permalink
Added v-underscore-above-baseline (cv99) and redefined the `v-und…
Browse files Browse the repository at this point in the history
…erscore-high` to the right-below-baseline variant (#515).
  • Loading branch information
be5invis committed May 21, 2020
1 parent 25e7f4c commit 5f7137e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
3 changes: 2 additions & 1 deletion changes/3.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
* Add proper support for IPA tone letters (#508).
* Moved low caret upward a little to make it more legible (#526).
* Add support for WHITE SUN WITH RAYS (U+263C, ☼, #521).
* Add preview image building in release notes.
* Add preview image building in release notes.
* Added `v-underscore-above-baseline` (`cv99`) and redefined the `v-underscore-high` to the right-below-baseline variant (#515).
2 changes: 1 addition & 1 deletion glyphs/symbol-math.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ glyph-block Symbol-Math-APL : begin
composite [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlaytilde'] [refer-glyph 'nabla']] [into-unicode 0x236B]
composite [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlaytilde'] [refer-glyph 'zero.lnum.unslashed']] [into-unicode 0x236C]
composite [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlaytilde'] [refer-glyph 'bar']] [into-unicode 0x236D]
composite [refer-glyph 'enquad'] [Overlay [refer-glyph 'semicolon'] [refer-glyph 'underscore.belowBaseline']] [into-unicode 0x236E]
composite [refer-glyph 'enquad'] [Overlay [refer-glyph 'semicolon'] [refer-glyph 'underscore.high']] [into-unicode 0x236E]
composite [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'notequal'] [into-unicode 0x236F]
composite [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'question'] [into-unicode 0x2370]
composite [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlaytilde'] [refer-glyph 'vee']] [into-unicode 0x2371]
Expand Down
27 changes: 17 additions & 10 deletions glyphs/symbol-punctuation.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -843,36 +843,43 @@ glyph-block Symbol-Punctuation : begin

do 'Dashes'
do 'underscore'
define openBoxGap : STROKE + [Math.max STROKE (XH / 6)]
define openBoxGap : Math.max (STROKE * 1.25) (XH / 4)
define [OpenBoxSide y] : begin
return : union
VBarLeft SB y (y + openBoxGap)
VBarRight RIGHTSB y (y + openBoxGap)
sketch # underscore.high

sketch # underscore.aboveBaseline
set-width WIDTH
include : HBarBottom SB RIGHTSB 0
save 'underscore.high'
save 'underscore.aboveBaseline'
branch
include : HBarBottom SB RIGHTSB (-openBoxGap)
save 'doubleUnderscore.high'
save 'doubleUnderscore.aboveBaseline'
branch
include : OpenBoxSide 0
save 'openBox.high'
include : OpenBoxSide (STROKE / 2)
save 'openBox.aboveBaseline'

sketch # underscore.belowBaseline
set-width WIDTH
include : HBarTop SB RIGHTSB 0
save 'underscore.belowBaseline'
save 'underscore.high'
branch
include : HBarTop SB RIGHTSB (-openBoxGap)
save 'doubleUnderscore.high'
branch
include : OpenBoxSide (-STROKE / 2)
save 'openBox.high'

sketch # underscore.low
set-width WIDTH
include : HBarTop SB RIGHTSB (DESCENDER * 0.9)
include : HBarBottom SB RIGHTSB DESCENDER
save 'underscore.low'
branch
include : HBarTop SB RIGHTSB (DESCENDER * 0.9 - openBoxGap)
include : HBarBottom SB RIGHTSB (DESCENDER - openBoxGap)
save 'doubleUnderscore.low'
branch
include : OpenBoxSide (DESCENDER * 0.9)
include : OpenBoxSide (DESCENDER + STROKE / 2)
save 'openBox.low'

select-variant 'underscore' '_'
Expand Down
10 changes: 8 additions & 2 deletions variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,21 @@ asterisk = "hexlow"
[simple.v-underscore-high]
tag = 'cv20'
sampler = '_'
description = 'Higher underscore `_`, at baseline'
description = 'Higher underscore `_`, placed right below baseline'
underscore = 'high'

[simple.v-underscore-low]
tag = 'cv21'
sampler = '_'
description = 'Lower underscore `_`, below baseline'
description = 'Lower underscore `_`, placed right above descender line'
underscore = 'low'

[simple.v-underscore-above-baseline]
tag = 'cv99'
sampler = '_'
description = 'Extra-high `_`, placed right below baseline'
underscore = 'aboveBaseline'

[simple.v-paragraph-high]
tag = 'cv22'
sampler = ''
Expand Down

0 comments on commit 5f7137e

Please sign in to comment.