Add separate variant selector for capital Gamma (#849)

This commit is contained in:
be5invis 2021-01-29 19:10:43 -08:00
parent c4a7660acd
commit 2b2bbd7081
16 changed files with 154 additions and 106 deletions

View file

@ -19,3 +19,5 @@ export : define [apply] : begin
run-glyph-module './cyrillic/yeri.js'
run-glyph-module './cyrillic/yu.js'
run-glyph-module './cyrillic/zhe.js'
run-glyph-module './cyrillic/orthography.js'

View file

@ -57,6 +57,4 @@ glyph-block Letter-Cyrillic-De : begin
quadcontrols 0 0.8
g4 (SB + Stroke * 1.1) CAP
orthographic-italic 'cyrl/de' 0x434
alias 'cyrl/de.BGR' null 'g.singleStorey'

View file

@ -45,4 +45,3 @@ glyph-block Letter-Cyrillic-Dzhe : begin
include [refer-glyph 'descenderBarBelow']
select-variant 'cyrl/dzhe.italic'
orthographic-italic 'cyrl/dzhe' 0x45F

View file

@ -38,7 +38,6 @@ glyph-block Letter-Cyrillic-I : begin
select-variant 'cyrl/i.italic' (shapeFrom -- 'u')
alias 'cyrl/i.BGR' null 'cyrl/i.italic'
orthographic-italic 'cyrl/i' 0x438
with-related-glyphs 'cyrl/ibreve.BGR' null 'cyrl/i.BGR' : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS

View file

@ -0,0 +1,31 @@
$$include '../../../meta/macros.ptl'
import [mix barmixL linreg clamp fallback] from '../../../support/utils'
import [DesignParameters] from '../../../meta/aesthetics'
import '../../../support/point' as Point
glyph-module
glyph-block Letter-Cyrillic-Orthography : begin
glyph-block-import Common-Derivatives
orthographic-italic 'cyrl/de' 0x434
orthographic-italic 'cyrl/dzhe' 0x45F
orthographic-italic 'cyrl/i' 0x438
orthographic-italic 'cyrl/sha' 0x448
orthographic-italic 'cyrl/shcha' 0x449
orthographic-italic 'cyrl/te' 0x442
orthographic-italic 'cyrl/teDescender' 0x4AD
orthographic-italic 'cyrl/tse' 0x446
orthographic-italic 'cyrl/yat' 0x463
orthographic-italic 'cyrl/pe' 0x43f
orthographic-italic 'cyrl/ghe' 0x433
orthographic-italic 'cyrl/ge' 0x491
orthographic-italic 'cyrl/ghayn' 0x493
orthographic-italic 'cyrl/gheDescender' 0x4F7
orthographic-italic 'cyrl/ve' 0x432
orthographic-italic 'longs' 0x17F
orthographic-italic 'longsbar' 0x1E9D
orthographic-italic 'f_i' 0xFB01
orthographic-italic 'f_l' 0xFB02

View file

@ -66,7 +66,6 @@ glyph-block Letter-Cyrillic-Sha : begin
select-variant 'cyrl/sha.italic'
alias 'cyrl/sha.BGR' null 'cyrl/sha.italic'
orthographic-italic 'cyrl/sha' 0x448
define [CyrShchaShape top df] : glyph-proc
include : CyrShaShape top df
@ -98,7 +97,6 @@ glyph-block Letter-Cyrillic-Sha : begin
include : CyrDescender df.rightSB (shift -- 0.05)
select-variant 'cyrl/shcha.italic'
orthographic-italic 'cyrl/shcha' 0x449
alias 'cyrl/shcha.BGR' null 'cyrl/shcha.italic'
create-glyph 'cyrl/te.SRB' : glyph-proc
@ -106,5 +104,3 @@ glyph-block Letter-Cyrillic-Sha : begin
set-width df.width
include [refer-glyph 'cyrl/sha.italic.toothed'] AS_BASE
include : refer-glyph "macronAbove"
orthographic-italic 'cyrl/te' 0x442

View file

@ -40,4 +40,3 @@ glyph-block Letter-Cyrillic-Tse : begin
select-variant 'cyrl/tse.italic'
alias 'cyrl/tse.BGR' null 'cyrl/tse.italic'
orthographic-italic 'cyrl/tse' 0x446

View file

@ -140,8 +140,6 @@ glyph-block Letter-Cyrillic-Yeri : begin
LeftwardBottomSerif df.leftSB 0 SideJut
include : tagged 'serifLT' : LeftwardTopSerif df.leftSB XH SideJut
orthographic-italic 'cyrl/yat' 0x463
define [CyrYerShape top] : glyph-proc
local left : if SLAB ([mix SB RightSB 0.35] - MVertStroke / 2 * HVContrast) [mix SB RightSB 0.2]
local barleft : mix 0 SB [if SLAB 0.25 0.375]

View file

@ -48,7 +48,6 @@ glyph-block Letter-Greek-Pi : begin
include : refer-glyph "macronAbove"
alias 'cyrl/Pe' 0x41F 'grek/Pi'
orthographic-italic 'cyrl/pe' 0x43f
create-glyph 'grek/pi' 0x3C0 : glyph-proc
include : MarkSet.e

View file

@ -11,29 +11,41 @@ glyph-block Letter-Greek-Upper-Gamma: begin
glyph-block-import Letter-Shared-Shapes : nShoulder
glyph-block-import Letter-Blackboard : BBS BBD BBBarLeft
define SLAB-AUTO 0
define SLAB-MOTION 1
define GammaBarLeft (SB * 1.5)
define [GammaShape top] : glyph-proc
define [GammaShape top slabType] : glyph-proc
include : VBarLeft GammaBarLeft 0 top
include : HBarTop (GammaBarLeft - O) (RightSB - OX) top
if SLAB : begin
match slabType
[Just SLAB-AUTO] : if SLAB : begin
include : LeftwardTopSerif GammaBarLeft top SideJut
include : LeftwardBottomSerif (GammaBarLeft + HVContrast * HalfStroke) 0 Jut
include : RightwardBottomSerif (GammaBarLeft + HVContrast * HalfStroke) 0 MidJutSide
include : tagged 'serifRT' : DownwardRightSerif (RightSB - OX) top VJut
[Just SLAB-MOTION] : begin
include : tagged 'serifRT' : DownwardRightSerif (RightSB - OX) top VJut
create-glyph 'grek/Gamma' 0x393 : glyph-proc
define GammaConfig : object
standard { SLAB-AUTO }
motionSerifed { SLAB-MOTION }
foreach { suffix { slabType } } [Object.entries GammaConfig] : do
create-glyph "grek/Gamma.\(suffix)" : glyph-proc
include : MarkSet.capital
include : GammaShape CAP
include : GammaShape CAP slabType
create-glyph 'mathbb/grek/Gamma' 0x213E : glyph-proc
include : MarkSet.capital
include : BBBarLeft GammaBarLeft 0 CAP
include : HBarTop GammaBarLeft RightSB CAP BBS
create-glyph "cyrl/ghe.upright.\(suffix)" : glyph-proc
include : MarkSet.e
include : GammaShape XH slabType
alias 'cyrl/Ghe' 0x413 'grek/Gamma'
select-variant 'grek/Gamma' 0x393
select-variant 'cyrl/Ghe' 0x413 (shapeFrom -- 'grek/Gamma')
select-variant 'cyrl/ghe.upright'
create-glyph 'cyrl/GheHook' 0x494 : glyph-proc
include [refer-glyph 'cyrl/Ghe'] AS_BASE ALSO_METRICS
with-related-glyphs 'cyrl/GheHook' 0x494 'cyrl/Ghe' : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : nShoulder
left -- (GammaBarLeft + Stroke)
right -- RightSB
@ -43,12 +55,8 @@ glyph-block Letter-Greek-Upper-Gamma: begin
smb -- SmoothB
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'cyrl/ghe.upright' : glyph-proc
include : MarkSet.e
include : GammaShape XH
create-glyph 'cyrl/gheHook' 0x495 : glyph-proc
include [refer-glyph 'cyrl/ghe.upright'] AS_BASE ALSO_METRICS
with-related-glyphs 'cyrl/gheHook' 0x495 'cyrl/ghe.upright' : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : nShoulder
left -- (GammaBarLeft + Stroke)
right -- RightSB
@ -58,11 +66,24 @@ glyph-block Letter-Greek-Upper-Gamma: begin
smb -- SmoothB * [Math.pow HBarPos 0.3]
include : VerticalHook (RightSB - HalfStroke * HVContrast) 0 (-HookX) Hook
create-glyph 'cyrl/ghe.SRB' : glyph-proc
include [refer-glyph 'dotlessi'] AS_BASE
include : refer-glyph "macronAbove"
with-related-glyphs 'cyrl/Ghayn' 0x492 'cyrl/Ghe' : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (CAP * (1 - OverlayPos))
orthographic-italic 'cyrl/ghe' 0x433
with-related-glyphs 'cyrl/ghayn.upright' null 'cyrl/ghe.upright' : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (XH * (1 - OverlayPos))
with-related-glyphs 'cyrl/GheDescender' 0x4F6 'cyrl/Ghe' : lambda [src sel] : composite-proc
refer-glyph src
CyrDescender (GammaBarLeft + Stroke * HVContrast) (sideJut -- MidJutCenter - HalfStroke * HVContrast)
MarkSet.if
with-related-glyphs 'cyrl/gheDescender.upright' null 'cyrl/ghe.upright' : lambda [src sel] : composite-proc
refer-glyph src
CyrDescender (GammaBarLeft + Stroke * HVContrast) (sideJut -- MidJutCenter - HalfStroke * HVContrast)
MarkSet.p
define [CyrGeShape top] : glyph-proc
include : GammaShape top
@ -77,29 +98,8 @@ glyph-block Letter-Greek-Upper-Gamma: begin
include : MarkSet.e
include : CyrGeShape XH
create-glyph 'cyrl/Ghayn' 0x492 : glyph-proc
include [refer-glyph 'cyrl/Ghe'] AS_BASE
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (CAP * (1 - OverlayPos))
create-glyph 'cyrl/ghayn.upright' : glyph-proc
include [refer-glyph 'cyrl/ghe.upright'] AS_BASE
include : HOverlayBar (SB * 0.3) [mix (SB + Stroke) (RightSB - Stroke) 0.55] (XH * (1 - OverlayPos))
create-glyph 'cyrl/ghayn.italic' : glyph-proc
include [refer-glyph 'cyrl/ghe.italic'] AS_BASE
include : FlatSlashShape Middle (XH / 2) (OverlayStroke / 2) (-0.2) 0.75
orthographic-italic 'cyrl/ge' 0x491
orthographic-italic 'cyrl/ghayn' 0x493
create-glyph 'cyrl/GheDescender' 0x4F6 : composite-proc
refer-glyph 'cyrl/Ghe'
CyrDescender (GammaBarLeft + Stroke * HVContrast) (sideJut -- MidJutCenter - HalfStroke * HVContrast)
MarkSet.if
create-glyph 'cyrl/gheDescender.upright' : composite-proc
refer-glyph 'cyrl/ghe'
CyrDescender (GammaBarLeft + Stroke * HVContrast) (sideJut -- MidJutCenter - HalfStroke * HVContrast)
MarkSet.p
orthographic-italic 'cyrl/gheDescender' 0x4F7
create-glyph 'mathbb/grek/Gamma' 0x213E : glyph-proc
include : MarkSet.capital
include : BBBarLeft GammaBarLeft 0 CAP
include : HBarTop GammaBarLeft RightSB CAP BBS

View file

@ -76,8 +76,6 @@ glyph-block Letter-Latin-Lower-F : begin
alias 'esh' 0x283 'longs.italic'
orthographic-italic 'longs' 0x17F
orthographic-italic 'longsbar' 0x1E9D
create-glyph 'eshcurlytail' 0x286 : glyph-proc
include : MarkSet.if
@ -340,17 +338,23 @@ glyph-block Letter-Latin-Lower-F : begin
local barr RightSB
local hbarleft (SB + shift + Stroke * [if para.slopeAngle 0.5 0.25])
create-glyph 'f_i' 0xFB01 : glyph-proc
create-glyph 'f_i.upright' : glyph-proc
include : MarkSet.b
include : new-glyph : glyph-proc
include : refer-glyph "longs"
include : refer-glyph "longs.upright"
include : Translate shift 0
include : VBarRight barr 0 fbar
include : HBarTop hbarleft barr fbar
if SLAB : begin
if para.isItalic
: then : include : tagged 'serifRB' : RightwardBottomSerif barr 0 SideJut
: else : include : tagged 'serifRB' : CenterBottomSerif (barr - HalfStroke * HVContrast) 0 Jut
if SLAB : include : tagged 'serifRB' : CenterBottomSerif (barr - HalfStroke * HVContrast) 0 Jut
create-glyph 'f_i.italic' : glyph-proc
include : MarkSet.b
include : new-glyph : glyph-proc
include : refer-glyph "longs.italic"
include : Translate shift 0
include : VBarRight barr 0 fbar
include : HBarTop hbarleft barr fbar
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif barr 0 SideJut
create-glyph 'f_l.upright' : glyph-proc
local m : Middle - JBalance - HalfStroke * HVContrast + shift
@ -376,5 +380,3 @@ glyph-block Letter-Latin-Lower-F : begin
include : VBarRight barr 0 CAP
include : HBarTop hbarleft [mix SB barr 0.65] fbar
if SLAB : include : tagged 'serifRB' : RightwardBottomSerif barr 0 SideJut
orthographic-italic 'f_l' 0xFB02

View file

@ -212,6 +212,10 @@ glyph-block Letter-Latin-Lower-I : begin
turned 'turni' 0x1D09 'i' [lambda [] : this.advanceWidth / 2] (XH / 2) [MarkSet.p]
with-related-glyphs 'cyrl/ghe.SRB' null 'dotlessi' : lambda [src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : refer-glyph "macronAbove"
glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
create-glyph 'mathbb/dotlessi' : glyph-proc
include : MarkSet.e

View file

@ -307,13 +307,16 @@ glyph-block Letter-Latin-S : begin
local start : currentGlyph.gizmo.unapply stroke.lhsKnots.0
include : VBarLeft start.x start.y (XH + Accent)
create-glyph 'cyrl/ghayn.italic' : glyph-proc
include [refer-glyph 'revs'] AS_BASE
include : FlatSlashShape Middle (XH / 2) (OverlayStroke / 2) (-0.2) 0.75
create-glyph 'cyrl/gheDescender.italic' : glyph-proc
include : MarkSet.b
local stroke : include : RevSmallSStroke
local start : currentGlyph.gizmo.unapply stroke.rhsKnots.(0)
include : VBarRight start.x (-Accent) start.y
create-glyph 'dollar.open' : glyph-proc
include : MarkSet.capital
define top : CAP * 0.95

View file

@ -275,7 +275,6 @@ glyph-block Letter-Latin-Upper-B : begin
select-variant 'cyrl/ve.upright'
orthographic-italic 'cyrl/ve' 0x432
alias 'smcpB' 0x299 'cyrl/ve.upright'
alias 'closeturnepsilon' 0x25E 'cyrl/ve.italic'

View file

@ -70,14 +70,12 @@ glyph-block Letter-Latin-Upper-T : begin
select-variant "Thookleft" 0x1AC (follow -- 'T')
select-variant "cyrl/TeDescender" 0x4AC (follow -- 'T')
alias 'grek/Tau' 0x3A4 'T'
alias 'cyrl/Te' 0x422 'T'
turned 'turnT' 0xA7B1 'T' Middle (CAP / 2)
alias 'cyrl/te.upright' null 'smcpT'
select-variant 'cyrl/teDescender.upright' (follow -- 'T')
orthographic-italic 'cyrl/teDescender' 0x4AD
create-glyph 'grek/tau' 0x3C4 : glyph-proc
include : MarkSet.e

View file

@ -2544,10 +2544,30 @@ selector."grek/Delta" = "curly"
[prime.capital-gamma]
sampler = "Γ"
tag = "cv53"
[prime.capital-gamma.variants.standard]
rank = 1
description = "Standard capital Gamma (`Γ`)"
selector."grek/Gamma" = "standard"
selector."cyrl/Ghe" = "standard"
selector."cyrl/ghe.upright" = "standard"
[prime.capital-gamma.variants.motion-serifed]
rank = 2
description = "Standard capital Gamma (`Γ`) with motion serifs"
selector."grek/Gamma" = "motionSerifed"
selector."cyrl/Ghe" = "motionSerifed"
selector."cyrl/ghe.upright" = "motionSerifed"
[prime.lambda]
sampler = "λ"
samplerExplain = "Greek small Lambda"
tag = "cv53"
tag = "cv54"
[prime.lambda.variants.straight]
rank = 1
@ -2564,7 +2584,7 @@ selector."grek/lambda" = "curly"
[prime.cyrl-capital-u]
sampler = "У"
samplerExplain = "Cyrillic Capital U"
tag = "cv54"
tag = "cv55"
[prime.cyrl-capital-u.variants.straight]
rank = 1
@ -2600,7 +2620,7 @@ selector."cyrl/U" = "cursiveFlatHook"
[prime.zero]
sampler = "0"
tag = "cv55"
tag = "cv56"
[prime.zero.variants.unslashed]
rank = 1
@ -2656,7 +2676,7 @@ selector.zero = "longDottedOval"
[prime.one]
sampler = "1"
tag = "cv56"
tag = "cv57"
[prime.one.variants.nobase]
rank = 1
@ -2697,7 +2717,7 @@ selector.one = "baseFlatTopSerif"
[prime.two]
sampler = "2"
tag = "cv57"
tag = "cv58"
[prime.two.variants.straight-neck]
rank = 1
@ -2713,7 +2733,7 @@ selector.two = "curlyNeck"
[prime.three]
sampler = "3"
tag = "cv58"
tag = "cv59"
[prime.three.variants.flattop]
rank = 1
@ -2729,7 +2749,7 @@ selector.three = "twoarcs"
[prime.four]
sampler = "4"
tag = "cv59"
tag = "cv60"
[prime.four.variants.closed]
rank = 1
@ -2765,7 +2785,7 @@ selector.four = "openNonCrossing"
[prime.five]
sampler = "5"
tag = "cv60"
tag = "cv61"
[prime.five.variants.vertical-upper-left-bar]
rank = 1
@ -2781,7 +2801,7 @@ selector.five = "obliqueUpperLeftBar"
[prime.six]
sampler = "6"
tag = "cv61"
tag = "cv62"
[prime.six.variants.closed-contour]
rank = 1
@ -2802,7 +2822,7 @@ selector.six = "straightBar"
[prime.seven]
sampler = "7"
tag = "cv62"
tag = "cv63"
[prime.seven.variants.noserif]
rank = 1
@ -2828,7 +2848,7 @@ selector.seven = "crossbarSerifed"
[prime.eight]
sampler = "8"
tag = "cv63"
tag = "cv64"
[prime.eight.variants.crossing]
rank = 1
@ -2844,7 +2864,7 @@ selector.eight = "twoCircles"
[prime.nine]
sampler = "9"
tag = "cv64"
tag = "cv65"
[prime.nine.variants.closed-contour]
rank = 1
@ -2865,7 +2885,7 @@ selector.nine = "straightBar"
[prime.tilde]
sampler = "~"
tag = "cv65"
tag = "cv66"
[prime.tilde.variants.high]
rank = 1
@ -2881,7 +2901,7 @@ selector.asciiTilde = "low"
[prime.asterisk]
sampler = "*"
tag = "cv66"
tag = "cv67"
[prime.asterisk.variants.high]
rank = 1
@ -2923,7 +2943,7 @@ selector."asterisk/lowered" = "turnPentaLow"
[prime.underscore]
sampler = "_"
tag = "cv67"
tag = "cv68"
[prime.underscore.variants.high]
rank = 1
@ -2944,7 +2964,7 @@ selector.underscore = "aboveBaseline"
[prime.paragraph-sign]
sampler = "¶"
tag = "cv68"
tag = "cv69"
[prime.paragraph-sign.variants.high]
rank = 1
@ -2962,7 +2982,7 @@ selector.revertParagraph = "low"
[prime.caret]
sampler = "^"
tag = "cv69"
tag = "cv70"
[prime.caret.variants.high]
rank = 1
@ -2978,7 +2998,7 @@ selector.asciiCaret = "low"
[prime.paren]
sampler = "( )"
tag = "cv70"
tag = "cv71"
[prime.paren.variants.normal]
rank = 1
@ -2996,7 +3016,7 @@ selector.parenRight = "largeContour"
[prime.brace]
sampler = "{ }"
tag = "cv71"
tag = "cv72"
[prime.brace.variants.straight]
rank = 1
@ -3014,7 +3034,7 @@ selector.braceRight = "curly"
[prime.number-sign]
sampler = "#"
tag = "cv72"
tag = "cv73"
[prime.number-sign.variants.upright]
rank = 1
@ -3040,7 +3060,7 @@ selector.numberSign = "slantedOpen"
[prime.ampersand]
sampler = "&"
tag = "cv73"
tag = "cv74"
[prime.ampersand.variants.closed]
rank = 1
@ -3081,7 +3101,7 @@ selector.ampersand = "flatTop"
[prime.at]
sampler = "@"
tag = "cv74"
tag = "cv75"
[prime.at.variants.threefold]
rank = 1
@ -3102,7 +3122,7 @@ selector.at = "short"
[prime.dollar]
sampler = "$"
tag = "cv75"
tag = "cv76"
[prime.dollar.variants.open]
rank = 1
@ -3128,7 +3148,7 @@ selector.dollar = "throughcap"
[prime.percent]
sampler = "%"
tag = "cv76"
tag = "cv77"
[prime.percent.variants.dots]
rank = 1
@ -3158,7 +3178,7 @@ selector.permille = "ringsContinuousSlash"
[prime.bar]
sampler = "|"
tag = "cv77"
tag = "cv78"
slopeDependent = true
[prime.bar.variants.natural-slope]
@ -3175,7 +3195,7 @@ selector."bar.italic" = "forceUpright"
[prime.lig-ltgteq]
sampler = "<= >="
tag = "cv78"
tag = "cv79"
[prime.lig-ltgteq.variants.flat]
rank = 1
@ -3193,7 +3213,7 @@ selector."eq.at-gteq.lig2" = "slanted"
[prime.ascii-single-quote]
sampler = '"'
tag = "cv79"
tag = "cv80"
[prime.ascii-single-quote.variants.straight]
rank = 1
@ -3209,7 +3229,7 @@ selector.asciiSingleQuote = "raisedComma"
[prime.ascii-grave]
sampler = "`"
tag = "cv80"
tag = "cv81"
[prime.ascii-grave.variants.straight]
rank = 1
@ -3230,7 +3250,7 @@ selector.asciiGrave = "raisedTurnComma"
[prime.question]
sampler = "?"
tag = "cv81"
tag = "cv82"
[prime.question.variants.smooth]
rank = 1
@ -3303,6 +3323,7 @@ z = "standard"
# Non-latin
turn-v = "straight"
eszet = "sulzbacher"
capital-gamma = 'standard'
lambda = "straight"
cyrl-capital-u = "straight"
# Digits