Add oval slashed / dotted variants for 0 (#834).

This commit is contained in:
be5invis 2021-01-25 22:04:35 -08:00
parent 9315b98531
commit d1adbfc7f9
3 changed files with 128 additions and 44 deletions

View file

@ -1,3 +1,4 @@
* Fix the incorrect order of `capital-s` (`cv17`) and `capital-t` (`cv18`) variants (#831). * Fix the incorrect order of `capital-s` (`cv17`) and `capital-t` (`cv18`) variants (#831).
* Fix Misplaced serif in Slab `cyrl/e` (#832). * Fix Misplaced serif in Slab `cyrl/e` (#832).
* Fix variant selector for `cyrl/shcha` (#833). * Fix variant selector for `cyrl/shcha` (#833).
* Add oval slashed / dotted variants for `0` (#834).

View file

@ -11,21 +11,33 @@ glyph-block Digits-Zero : begin
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Digits-Shared : OnumHeight OnumMarks CodeLnum CodeOnum glyph-block-import Digits-Shared : OnumHeight OnumMarks CodeLnum CodeOnum
define [ZeroSlashShape top] : begin define [OvalShapeT sink offsetY offsetX t b l r] : let [m : mix l r 0.5] : sink
local fine : 0.5 * OverlayStroke widths.rhs
return : intersection g4 (m - CorrectionOMidS) (t - offsetY)
OShapeOutline.NoOvershoot top 0 SB RightSB archv
dispiro g4 (r - offsetX) [YSmoothMidR t b SmallSmoothA SmallSmoothB]
flat 0 (top * (1 - 0.77)) [widths fine fine] arcvh
curl Width (top * 0.77) g4 (m + CorrectionOMidS) (b + offsetY)
archv
g4 (l + offsetX) [YSmoothMidL t b SmallSmoothA SmallSmoothB]
arcvh
close
define [ZeroReverseSlashShape top] : begin define [ZeroSlash top] : dispiro
local fine : 0.5 * OverlayStroke flat 0 (top * (1 - 0.77)) [widths.center OverlayStroke]
return : intersection curl Width (top * 0.77)
OShapeOutline.NoOvershoot top 0 SB RightSB
dispiro define [ZeroReverseSlash top] : dispiro
flat 0 (top * 0.77) [widths fine fine] flat 0 (top * 0.77) [widths.center OverlayStroke]
curl Width (top * (1 - 0.77)) curl Width (top * (1 - 0.77))
define [ZeroSlashShape top] : intersection
OShapeOutline.NoOvershoot top 0 SB RightSB
ZeroSlash top
define [ZeroReverseSlashShape top] : intersection
OShapeOutline.NoOvershoot top 0 SB RightSB
ZeroReverseSlash top
define [ZeroDotShape top] : begin define [ZeroDotShape top] : begin
local halfDotWidth : Math.min DotRadius ((RightSB - SB - HVContrast * Stroke * 2) / 4) local halfDotWidth : Math.min DotRadius ((RightSB - SB - HVContrast * Stroke * 2) / 4)
@ -51,17 +63,28 @@ glyph-block Digits-Zero : begin
SmoothAOf halfDotWidth (halfDotWidth * 2) SmoothAOf halfDotWidth (halfDotWidth * 2)
SmoothBOf halfDotWidth (halfDotWidth * 2) SmoothBOf halfDotWidth (halfDotWidth * 2)
define [ZeroOvalShape top] : dispiro define [ZeroOvalShapeT sink offsetX offsetY top] : OvalShapeT sink (OX + offsetX) (O + offsetY) top 0 SB RightSB
widths.rhs
g4 (Middle - CorrectionOMidS) (CAP - O) define [ZeroOvalShape top] : ZeroOvalShapeT dispiro 0 0 top
archv define [ZeroOvalShapeMask top] : ZeroOvalShapeT dispiro 1 1 top
g4 (RightSB - OX) [YSmoothMidR CAP 0 SmallSmoothA SmallSmoothB]
arcvh define [ZeroOvalDotShape top] : begin
g4 (Middle + CorrectionOMidS) O local halfDotWidth : Math.min DotRadius ((RightSB - SB - HVContrast * Stroke * 2) / 4)
archv return : OvalShapeT spiro-outline OX O
g4 (SB + OX) [YSmoothMidL CAP 0 SmallSmoothA SmallSmoothB] top / 2 + DotRadius
arcvh top / 2 - DotRadius
close Middle - halfDotWidth
Middle + halfDotWidth
define [ZeroOvalLongDotShape top] : begin
local circleInnerWidth : RightSB - SB - HVContrast * Stroke * 2
local halfDotWidth : Math.min HalfStroke (circleInnerWidth / 4)
local halfDotHeight : Math.max DotRadius : Math.min ((top - Stroke * 2) / 4) ((top - Stroke * 2 - (circleInnerWidth - halfDotWidth * 2)) / 2)
return : OvalShapeT spiro-outline OX O
top / 2 + halfDotHeight
top / 2 - halfDotHeight
Middle - halfDotWidth
Middle + halfDotWidth
create-glyph 'zero.lnum.unslashed' : glyph-proc create-glyph 'zero.lnum.unslashed' : glyph-proc
include : MarkSet.capital include : MarkSet.capital
@ -76,21 +99,41 @@ glyph-block Digits-Zero : begin
include : refer-glyph "zero.lnum.unslashed" include : refer-glyph "zero.lnum.unslashed"
include : ZeroSlashShape CAP include : ZeroSlashShape CAP
create-glyph 'zero.lnum.reverse-slashed' : glyph-proc create-glyph 'zero.lnum.slashedOval' : glyph-proc
include : MarkSet.capital
include : refer-glyph "zero.lnum.unslashedOval"
include : intersection [ZeroOvalShapeMask CAP] [ZeroSlash CAP]
create-glyph 'zero.lnum.reverseSlashed' : glyph-proc
include : MarkSet.capital include : MarkSet.capital
include : refer-glyph "zero.lnum.unslashed" include : refer-glyph "zero.lnum.unslashed"
include : ZeroReverseSlashShape CAP include : ZeroReverseSlashShape CAP
create-glyph 'zero.lnum.reverseSlashedOval' : glyph-proc
include : MarkSet.capital
include : refer-glyph "zero.lnum.unslashedOval"
include : intersection [ZeroOvalShapeMask CAP] [ZeroReverseSlash CAP]
create-glyph 'zero.lnum.dotted' : glyph-proc create-glyph 'zero.lnum.dotted' : glyph-proc
include : MarkSet.capital include : MarkSet.capital
include : refer-glyph "zero.lnum.unslashed" include : refer-glyph "zero.lnum.unslashed"
include : ZeroDotShape CAP include : ZeroDotShape CAP
create-glyph 'zero.lnum.dottedOval' : glyph-proc
include : MarkSet.capital
include : refer-glyph "zero.lnum.unslashedOval"
include : ZeroOvalDotShape CAP
create-glyph 'zero.lnum.longDotted' : glyph-proc create-glyph 'zero.lnum.longDotted' : glyph-proc
include : MarkSet.capital include : MarkSet.capital
include : refer-glyph "zero.lnum.unslashed" include : refer-glyph "zero.lnum.unslashed"
include : ZeroLongDotShape CAP include : ZeroLongDotShape CAP
create-glyph 'zero.lnum.longDottedOval' : glyph-proc
include : MarkSet.capital
include : refer-glyph "zero.lnum.unslashedOval"
include : ZeroOvalLongDotShape CAP
create-glyph 'zero.onum.unslashed' : glyph-proc create-glyph 'zero.onum.unslashed' : glyph-proc
include : OnumMarks.e include : OnumMarks.e
include : OShape OnumHeight 0 SB RightSB include : OShape OnumHeight 0 SB RightSB
@ -104,21 +147,41 @@ glyph-block Digits-Zero : begin
include : refer-glyph "zero.onum.unslashed" include : refer-glyph "zero.onum.unslashed"
include : ZeroSlashShape OnumHeight include : ZeroSlashShape OnumHeight
create-glyph 'zero.onum.reverse-slashed' : glyph-proc create-glyph 'zero.onum.slashedOval' : glyph-proc
include : OnumMarks.e
include : refer-glyph "zero.onum.unslashedOval"
include : intersection [ZeroOvalShapeMask OnumHeight] [ZeroSlash OnumHeight]
create-glyph 'zero.onum.reverseSlashed' : glyph-proc
include : OnumMarks.e include : OnumMarks.e
include : refer-glyph "zero.onum.unslashed" include : refer-glyph "zero.onum.unslashed"
include : ZeroReverseSlashShape OnumHeight include : ZeroReverseSlashShape OnumHeight
create-glyph 'zero.onum.reverseSlashedOval' : glyph-proc
include : OnumMarks.e
include : refer-glyph "zero.onum.unslashedOval"
include : intersection [ZeroOvalShapeMask OnumHeight] [ZeroReverseSlash OnumHeight]
create-glyph 'zero.onum.dotted' : glyph-proc create-glyph 'zero.onum.dotted' : glyph-proc
include : OnumMarks.e include : OnumMarks.e
include : refer-glyph "zero.onum.unslashed" include : refer-glyph "zero.onum.unslashed"
include : ZeroDotShape OnumHeight include : ZeroDotShape OnumHeight
create-glyph 'zero.onum.dottedOval' : glyph-proc
include : OnumMarks.e
include : refer-glyph "zero.onum.unslashedOval"
include : ZeroOvalDotShape OnumHeight
create-glyph 'zero.onum.longDotted' : glyph-proc create-glyph 'zero.onum.longDotted' : glyph-proc
include : OnumMarks.e include : OnumMarks.e
include : refer-glyph "zero.onum.unslashed" include : refer-glyph "zero.onum.unslashed"
include : ZeroLongDotShape OnumHeight include : ZeroLongDotShape OnumHeight
create-glyph 'zero.onum.longDottedOval' : glyph-proc
include : OnumMarks.e
include : refer-glyph "zero.onum.unslashedOval"
include : ZeroOvalLongDotShape OnumHeight
select-variant 'zero.lnum' [CodeLnum '0'] (follow -- 'zero') select-variant 'zero.lnum' [CodeLnum '0'] (follow -- 'zero')
select-variant 'zero.onum' [CodeOnum '0'] (follow -- 'zero') select-variant 'zero.onum' [CodeOnum '0'] (follow -- 'zero')

View file

@ -2354,36 +2354,56 @@ selector."cyrl/U" = "cursiveFlatHook"
sampler = '0' sampler = '0'
tag = 'cv53' tag = 'cv53'
[prime.zero.variants.slashed]
rank = 1
description = 'Slashed Zero `0`'
selector.zero = 'slashed'
[prime.zero.variants.dotted]
rank = 2
description = 'Dotted Zero `0`'
selector.zero = 'dotted'
[prime.zero.variants.unslashed] [prime.zero.variants.unslashed]
rank = 3 rank = 1
description = 'O-like `0`' description = 'O-like Zero (`0`)'
selector.zero = 'unslashed' selector.zero = 'unslashed'
[prime.zero.variants.slashed]
rank = 2
description = 'Slashed Zero (`0`)'
selector.zero = 'slashed'
[prime.zero.variants.reverse-slashed] [prime.zero.variants.reverse-slashed]
rank = 3
description = 'Reverse-slashed Zero (`0`)'
selector.zero = 'reverseSlashed'
[prime.zero.variants.dotted]
rank = 4 rank = 4
description = 'Reverse-slashed `0`' description = 'Dotted Zero (`0`)'
selector.zero = 'reverse-slashed' selector.zero = 'dotted'
[prime.zero.variants.long-dotted] [prime.zero.variants.long-dotted]
rank = 5 rank = 5
description = 'Long-dotted Zero `0` like Hack' description = 'Long-dotted Zero (`0`) like Hack'
selector.zero = 'longDotted' selector.zero = 'longDotted'
[prime.zero.variants.unslashed-oval] [prime.zero.variants.unslashed-oval]
rank = 6 rank = 6
description = 'O-like `0` but more round' description = 'O-like Zero (`0`) but more round'
selector.zero = 'unslashedOval' selector.zero = 'unslashedOval'
[prime.zero.variants.slashed-oval]
rank = 7
description = 'Slashed Zero (`0`) but more round'
selector.zero = 'slashedOval'
[prime.zero.variants.reverse-slashed-oval]
rank = 8
description = 'Reverse-slashed Zero (`0`) but more round'
selector.zero = 'reverseSlashedOval'
[prime.zero.variants.dotted-oval]
rank = 9
description = 'Dotted Zero (`0`)'
selector.zero = 'dottedOval'
[prime.zero.variants.long-dotted-oval]
rank = 10
description = 'Long-dotted Zero (`0`) like Hack'
selector.zero = 'longDottedOval'
[prime.one] [prime.one]