Skip to content

Commit

Permalink
Add straight-bar Six and Nine (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Jun 12, 2020
1 parent d23a26f commit 51dd2b7
Show file tree
Hide file tree
Showing 4 changed files with 325 additions and 72 deletions.
51 changes: 42 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,20 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i
# Override default building widths
# When buildPlans.<plan name>.widths is absent, all widths would built and mapped to
# default values.
# IMPORTANT : Currently "shape" property only supports integers between 3 and 9 (inclusive), while
# "menu" only supports integers between 1 and 9 (inclusive).
# If you decide to use custom widths you have to define all the widths you
# plan to use otherwise they will not be built.
# IMPORTANT : Currently "shape" property only supports numbers between 434 and 664 (inclusive),
# while "menu" only supports integers between 1 and 9 (inclusive).
# The "shape" parameter specifies the unit width, measured in 1/1000 em. The glyphs'
# width are equal to, or a simple multiple of the unit width.
# If you decide to use custom widths you have to define all the widths you plan to use,
# otherwise they will not be built.
[buildPlans.iosevka-custom.widths.normal]
shape = 5 # Width grade of glyph shapes. NOT actual character width.
menu = 5 # Width grade for the font's names. NOT actual character width.
shape = 500 # Unit Width, measured in 1/1000 em.
menu = 5 # Width grade for the font's names.
css = "normal" # "font-stretch' property of webfont CSS.
[buildPlans.iosevka-custom.widths.extended]
shape = 7
shape = 576
menu = 7
css = "expanded"
Expand Down Expand Up @@ -193,7 +195,7 @@ Since version 2.0, Iosevka would no longer support building via `makefile`. To i

<!-- END Section-Private-Build-Plan-Sample -->

3. Run `npm run build -- contents::<your plan name>` and the built fonts would be avaliable in `dist/`. Aside from `contents::<plan>`, other options are:

Expand Down Expand Up @@ -345,6 +347,9 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* Styles for `m`:
* `v-m-normal`, `cv25`: `m` with normal middle leg, touching the baseline (default).
* `v-m-shortleg`, `cv26`: `m` with shorter middle leg, like Ubuntu Mono.
* Styles for `q`:
* `v-q-straight`, `VXAZ`: `q` with straight bar (default).
* `v-q-tailed`, `VXBA`: `q` with tail.
* Styles for `r`:
* `v-r-straight`, `cv85`: Straight, serif-less `r` (default for Sans).
* `v-r-serifed`, `cv86`: `r` with serif at both top and bottom (default for Slab Upright).
Expand All @@ -371,6 +376,9 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* Styles for `A`, `Λ`, `Δ`:
* `v-turn-v-straight`, `cv73`: Standard, straight `A`, `Λ`, `Δ` (default).
* `v-turn-v-curly`, `cv74`: Slightly curly `A`, `Λ`, `Δ`, like Iosevka 2.x.
* Styles for `B`:
* `v-capital-b-standard`, `VXAP`: Standard `B` (default).
* `v-capital-b-more-asymmetric`, `VXAQ`: More asymmetric `B` to differentiate with `8`.
* Styles for `G`:
* `v-capital-g-tooth`, `cv91`: Toothed G (default).
* `v-capital-g-toothless`, `cv92`: Toothless G.
Expand All @@ -392,15 +400,30 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* Styles for `1`:
* `v-one-nobase`, `cv50`: `1` with bottom serif (default for Sans).
* `v-one-base`, `cv51`: `1` without bottom serif (default for Slab).
* `v-one-line`, `VXAM`: `1` drawn just like a straight line.
* Styles for `3`:
* `v-three-flattop`, `cv46`: Flat top `3` (Like Museo Sans / Montserrat).
* `v-three-twoarcs`, `cv47`: Arched top `3` (default).
* Styles for `4`:
* `v-four-closed`, `VXAR`: `4` with closed contour (default).
* `v-four-closed-non-crossing`, `VXAS`: `4` with closed contour but the horizontal bar does not overflow the vertical bar.
* `v-four-semi-open`, `VXAT`: `4` with semi-open contour.
* `v-four-semi-open-non-crossing`, `VXAU`: `4` with semi-open contour but the horizontal bar does not overflow the vertical bar.
* `v-four-open`, `VXAV`: `4` with open contour.
* `v-four-open-non-crossing`, `VXAW`: `4` with open contour but the horizontal bar does not overflow the vertical bar.
* Styles for `6`:
* `v-six-closed-contour`, `VXAE`: `6` with a more closed.
* `v-six-open-contour`, `VXAF`: `6` with a more open contour (default).
* `v-six-straight-bar`, `VXBB`: `6` with a straight bar.
* Styles for `7`:
* `v-seven-noserif`, `cv64`: `7` without serif (default for Sans).
* `v-seven-serifed`, `cv65`: `7` with initial serif (default for Slab).
* `v-seven-crossbar`, `VXAX`: `7` with crossbar.
* `v-seven-crossbar-serifed`, `VXAY`: `7` with crossbar and initial serif.
* Styles for `9`:
* `v-nine-closed-contour`, `cv96`: `9` with a more closed (default).
* `v-nine-turned-six`, `cv97`: `9` with a more open contour like a turned `6`.
* `v-nine-open-contour`, `cv97`: `9` with a more open contour.
* `v-nine-straight-bar`, `VXBC`: `9` with a straight bar.
* Styles for `ß`:
* `v-eszet-traditional`, `cv34`: Traditional, Fraktur-like Eszet.
* `v-eszet-sulzbacher`, `cv35`: A more modern, beta-like Eszet (default).
Expand All @@ -426,12 +449,22 @@ The current available styles for `design`/`upright`/`italic`/`oblique` options a
* Styles for `^`:
* `v-caret-high`, `cv29`: Higher circumflex `^` (default).
* `v-caret-low`, `cv30`: Lower circumflex `^`.
* Styles for `(`, `)`:
* `v-paren-normal`, `VXAN`: Parenthesis with normal contour (default).
* `v-paren-large-contour`, `VXAO`: Parenthesis with larger contour, like that in Monaco.
* Styles for `{`, `}`:
* `v-brace-straight`, `cv36`: More straight braces.
* `v-brace-curly`, `cv37`: More curly braces (default).
* Styles for `#`:
* `v-numbersign-upright`, `cv44`: Number sign with vertical bars (default).
* `v-numbersign-slanted`, `cv45`: Number sign with slanted bars.
* Styles for `&`:
* `v-ampersand-closed`, `VXAG`: Ampersand (`&`) with a closed contour (default).
* `v-ampersand-upper-open`, `VXAH`: Ampersand (`&`) with an open contour at upper half.
* `v-ampersand-lower-open`, `VXAI`: Ampersand (`&`) with an open contour at lower half.
* `v-ampersand-et`, `VXAJ`: Ampersand (`&`) drawn like a ligature of Ɛ and t.
* `v-ampersand-et-toothed`, `VXAK`: Ampersand (`&`) drawn like a ligature of Ɛ and t with tooth.
* `v-ampersand-flat-top`, `VXAL`: Ampersand (`&`) drawn with a flat top.
* Styles for `@`:
* `v-at-threefold`, `cv31`: The long, three-fold At symbol (`@`) (default).
* `v-at-fourfold`, `cv32`: The traditional, four-fold At symbol (`@`).
Expand Down
89 changes: 73 additions & 16 deletions glyphs/numbers.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -256,23 +256,24 @@ glyph-block Numbers : begin
if SLAB : begin
include : CenterBottomSerif (xVertBar - HalfStroke * HVContrast) 0 Jut

define [FourOpenShape top] : glyph-construction
local bar (top * 0.4)
local vert0 : mix SB RightSB 0.825
local p 1
define [FourOpenShape top crossing] : glyph-construction
local yBar (top * 0.4)
local fine : adviceBlackness 3

include : HBarTop SB RightSB bar
include : VBarRight vert0 0 [mix (bar - Stroke) top 0.75]
include : VBarLeft SB bar top
define xVertBar : mix SB RightSB [if crossing 0.825 0.9125]
define xHBarTerminal : if crossing RightSB xVertBar

include : HBarTop SB xHBarTerminal yBar
include : VBarRight xVertBar 0 [mix (yBar - Stroke) top 0.75]
include : VBarLeft SB yBar top
if SLAB : begin
include : CenterBottomSerif (RightSB - HalfStroke * HVContrast) 0 Jut
include : CenterBottomSerif (xVertBar - HalfStroke * HVContrast) 0 Jut

create-glyph 'four.lnum.closed' : glyph-construction
include MarkSet.capital
include : FourStdShape CAP false true

create-glyph 'four.lnum.openNonCrossing' : glyph-construction
create-glyph 'four.lnum.closedNonCrossing' : glyph-construction
include MarkSet.capital
include : FourStdShape CAP false false

Expand All @@ -286,14 +287,18 @@ glyph-block Numbers : begin

create-glyph 'four.lnum.open' : glyph-construction
include MarkSet.capital
include : FourOpenShape CAP
include : FourOpenShape CAP true

create-glyph 'four.lnum.openNonCrossing' : glyph-construction
include MarkSet.capital
include : FourOpenShape CAP false

create-glyph 'four.onum.closed' : glyph-construction
include MarkSet.p
include : FourStdShape (XH - Descender) false true
include : ShiftDown

create-glyph 'four.onum.openNonCrossing' : glyph-construction
create-glyph 'four.onum.closedNonCrossing' : glyph-construction
include MarkSet.capital
include : FourStdShape (XH - Descender) false false
include : ShiftDown
Expand All @@ -310,7 +315,12 @@ glyph-block Numbers : begin

create-glyph 'four.onum.open' : glyph-construction
include MarkSet.p
include : FourOpenShape (XH - Descender)
include : FourOpenShape (XH - Descender) true
include : ShiftDown

create-glyph 'four.onum.openNonCrossing' : glyph-construction
include MarkSet.p
include : FourOpenShape (XH - Descender) false
include : ShiftDown

select-variant 'four.lnum' '4' (follow -- 'four')
Expand Down Expand Up @@ -361,11 +371,11 @@ glyph-block Numbers : begin
save 'zhuangtonefive' 0x1BD

define [OpenContourSixShape charTop] : glyph-construction
local oTop (charTop * 0.6)
local oTop : charTop * 0.55 + Stroke / 2
local ymiddlea : (oTop - SmallSmoothA + SmallSmoothB) / 2
local ymiddleb : (oTop - SmallSmoothB + SmallSmoothA) / 2
local fine : adviceBlackness 5.5
local coFine : adviceBlackness 3.5
local fine : Stroke * CThinB
local coFine : Math.max [adviceBlackness 3.5] (Stroke - fine / 2)
include : dispiro
widths.rhs fine
g4.left.start (Middle + CorrectionOMidS - TanSlope * (Stroke - fine)) (O + Stroke - fine)
Expand All @@ -384,7 +394,7 @@ glyph-block Numbers : begin

define [ClosedContourNineShape top] : glyph-construction
local u top
local d : Math.min (u - SmallSmoothA - SmallSmoothB - 0.1) (top * 0.425 - HalfStroke)
local d : Math.min (u - SmallSmoothA - SmallSmoothB - 0.1) (top * 0.45 - HalfStroke)
local l (SB + OX)
local r (RightSB - OX)
local ymiddlea : mix u d 0.5
Expand All @@ -405,6 +415,35 @@ glyph-block Numbers : begin
hookend O
g4 SB Hook

define [StraightBarSixShape charTop] : begin
local oTop : charTop * 0.55 + Stroke / 2
local ymiddlea : (oTop - SmallSmoothA + SmallSmoothB) / 2
local ymiddleb : (oTop - SmallSmoothB + SmallSmoothA) / 2
local fine : Stroke * CThinB
local coFine : Math.max [adviceBlackness 3.5] (Stroke - fine / 2)

local xTerminal : [mix SB RightSB 0.6] - 0.5 * Stroke * HVContrast
local xMockBarStart 0
local yMockBarStart : ymiddlea + Stroke * 0.3
local pStraightBarStart : 0.75 - (Stroke / charTop)
return : intersection
Rect charTop (-charTop) (-Width) (2 * Width)
dispiro
widths.rhs fine
g4.left.start (Middle + CorrectionOMidS - TanSlope * (Stroke - fine)) (O + Stroke - fine)
archv
g4 (SB + OX + (Stroke - fine) * HVContrast) ymiddlea
arcvh
g4 (Middle - CorrectionOMidS) (oTop - O) [widths.rhs]
archv
g4.down.mid (RightSB - OX) ymiddleb
arcvh
g4.left.mid (Middle + CorrectionOMidS) (O)
archv
g4.up.mid (SB + OX) (ymiddlea + Stroke * 0.3) [widths.rhs coFine]
flat [mix xMockBarStart xTerminal pStraightBarStart] [mix yMockBarStart charTop pStraightBarStart] [widths.rhs]
curl [mix xMockBarStart xTerminal 2] [mix yMockBarStart charTop 2]

sketch # six
include MarkSet.capital
include : OpenContourSixShape CAP
Expand All @@ -419,6 +458,12 @@ glyph-block Numbers : begin
save 'six.lnum.closedContour'
save 'six.onum.closedContour'

sketch # six
include MarkSet.capital
include : StraightBarSixShape CAP
save 'six.lnum.straightBar'
save 'six.onum.straightBar'

select-variant 'six.lnum' '6' (follow -- 'six')
select-variant 'six.onum' (follow -- 'six')

Expand Down Expand Up @@ -550,6 +595,18 @@ glyph-block Numbers : begin
include : FlipAround (Middle) (XH / 2)
save 'nine.onum.openContour'

sketch
include MarkSet.capital
include : StraightBarSixShape CAP
include : FlipAround (Middle) (CAP / 2)
save 'nine.lnum.straightBar'

sketch
include MarkSet.p
include : StraightBarSixShape CAP
include : FlipAround (Middle) (XH / 2)
save 'nine.onum.straightBar'

select-variant 'nine.lnum' '9' (follow -- 'nine')
select-variant 'nine.onum' (follow -- 'nine')

Expand Down
Loading

0 comments on commit 51dd2b7

Please sign in to comment.