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
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
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
include : MarkSet.capital
include : GammaShape CAP
define GammaConfig : object
standard { SLAB-AUTO }
motionSerifed { SLAB-MOTION }
create-glyph 'mathbb/grek/Gamma' 0x213E : glyph-proc
include : MarkSet.capital
include : BBBarLeft GammaBarLeft 0 CAP
include : HBarTop GammaBarLeft RightSB CAP BBS
foreach { suffix { slabType } } [Object.entries GammaConfig] : do
create-glyph "grek/Gamma.\(suffix)" : glyph-proc
include : MarkSet.capital
include : GammaShape CAP slabType
alias 'cyrl/Ghe' 0x413 'grek/Gamma'
create-glyph "cyrl/ghe.upright.\(suffix)" : glyph-proc
include : MarkSet.e
include : GammaShape XH slabType
create-glyph 'cyrl/GheHook' 0x494 : glyph-proc
include [refer-glyph 'cyrl/Ghe'] AS_BASE ALSO_METRICS
select-variant 'grek/Gamma' 0x393
select-variant 'cyrl/Ghe' 0x413 (shapeFrom -- 'grek/Gamma')
select-variant 'cyrl/ghe.upright'
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