Skip to content

Commit

Permalink
Refine arch height of Cyrillic Capital Shha. (#2303)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 authored Apr 20, 2024
1 parent 0d52f8a commit 3c64e3a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 44 deletions.
1 change: 1 addition & 0 deletions changes/29.2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Refine shape of CYRILLIC CAPITAL LETTER SHHA (`U+04BA`).
47 changes: 24 additions & 23 deletions packages/font-glyphs/src/letter/cyrillic/che.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,47 @@ glyph-block Letter-Cyrillic-Che : begin
glyph-block-export SERIFS
define SERIFS : object
NONE 0
ALL 1
LOWER 2
TOP 3
BOT 4
TAILED-I 5
TL 1
BR 2
TL-BR 3
ALL 4
TOP 5
ALL-BGR 6
TAILED-BGR 7
TOP-BGR 7

glyph-block-export CyrCheShape
define [CyrCheShape] : with-params [df top pyBar bodyType slabType [sw df.mvs]] : glyph-proc
local bar : top * [fallback pyBar 0.5]
define [CyrCheShape] : with-params [df top pyBar bodyType slabType [sw df.mvs] [yBarOffset DToothlessRise]] : glyph-proc
local bar : top * [fallback pyBar 0.5] + yBarOffset
include : match bodyType
[Just BODY.TAILED] : RightwardTailedBar df.rightSB 0 top (sw -- sw)
__ : VBar.r df.rightSB 0 top sw
include : dispiro
widths.lhs sw
flat df.leftSB top [heading Downward]
curl df.leftSB (bar + ArchDepthB - HalfStroke)
g4 (df.middle + CorrectionOMidS) (bar - HalfStroke)
g4 (df.rightSB - 1 / 16) (bar - HalfStroke + DToothlessRise) [heading Rightward]
curl df.leftSB (bar - DToothlessRise + ArchDepthB - HalfStroke)
g4 (df.middle + CorrectionOMidS) (bar - DToothlessRise - HalfStroke)
g4 (df.rightSB - 1 / 16) (bar - HalfStroke) [heading Rightward]

local sf : SerifFrame.fromDf df top 0
include : tagged 'serifLT' : match slabType
[Just SERIFS.ALL] sf.lt.full
[Just SERIFS.TOP] sf.lt.full
[Just SERIFS.ALL-BGR] sf.lt.outer
[Just SERIFS.TAILED-BGR] sf.lt.outer
[Just SERIFS.LOWER] sf.lt.outer
[Just SERIFS.TAILED-I] sf.lt.outer
[Just SERIFS.TOP-BGR] sf.lt.outer
[Just SERIFS.TL-BR] sf.lt.outer
[Just SERIFS.TL] sf.lt.outer
__ : glyph-proc
include : tagged 'SerifRT' : match slabType
[Just SERIFS.ALL] sf.rt.full
[Just SERIFS.TOP] sf.rt.full
[Just SERIFS.ALL-BGR] sf.rt.inner
[Just SERIFS.TAILED-BGR] sf.rt.inner
[Just SERIFS.TOP-BGR] sf.rt.inner
__ : glyph-proc
include : tagged 'SerifRB' : match slabType
[Just SERIFS.ALL] sf.rb.fullSide
[Just SERIFS.ALL-BGR] sf.rb.fullSide
[Just SERIFS.LOWER] sf.rb.outer
[Just SERIFS.BOT] sf.rb.outer
[Just SERIFS.TL-BR] sf.rb.outer
[Just SERIFS.BR] sf.rb.outer
__ : glyph-proc

create-glyph 'cyrl/Che' 0x427 : glyph-proc
Expand All @@ -78,8 +78,8 @@ glyph-block Letter-Cyrillic-Che : begin

glyph-block-export ItalicConfig
define ItalicConfig : object
standard { BODY.STRAIGHT SERIFS.ALL SERIFS.ALL-BGR SERIFS.LOWER }
tailed { BODY.TAILED SERIFS.TOP SERIFS.TAILED-BGR SERIFS.TAILED-I }
standard { BODY.STRAIGHT SERIFS.ALL SERIFS.ALL-BGR SERIFS.TL-BR }
tailed { BODY.TAILED SERIFS.TOP SERIFS.TOP-BGR SERIFS.TL }

foreach { suffix { body slabUpright slabUprightBGR slabItalic } } [pairs-of ItalicConfig] : do
create-glyph "cyrl/che.\(suffix)" : glyph-proc
Expand Down Expand Up @@ -114,18 +114,19 @@ glyph-block Letter-Cyrillic-Che : begin

define ShhaConfig : object
serifless SERIFS.NONE
topLeftSerifed SERIFS.BOT
topLeftBottomRightSerifed SERIFS.LOWER
topLeftSerifed SERIFS.BR
topLeftBottomRightSerifed SERIFS.TL-BR
serifed SERIFS.ALL

foreach { suffix serifs } [pairs-of ShhaConfig] : do
create-glyph "cyrl/Shha.\(suffix)" : glyph-proc
include : MarkSet.capital
include : LeaningAnchor.Above.VBar.l SB
include : CyrCheShape [DivFrame 1] CAP 0.4 BODY.STRAIGHT serifs
include : CyrCheShape [DivFrame 1] CAP (1 - HBarPos) BODY.STRAIGHT serifs
yBarOffset -- [HSwToV : Math.pow Stroke 2] / (RightSB - SB)
include : FlipAround Middle (CAP / 2)

select-variant 'cyrl/Shha' 0x4BA (follow -- 'H')
select-variant 'cyrl/Shha/descBase' (shapeFrom -- 'cyrl/Shha') (follow -- 'H/descenderBase')
select-variant 'cyrl/Shha/descBase' (shapeFrom -- 'cyrl/Shha') (follow -- 'H/descBase')

derive-composites 'cyrl/ShhaDescender' 0x526 'cyrl/Shha/descBase' [CyrDescender.rSideJut RightSB 0]
22 changes: 11 additions & 11 deletions packages/font-glyphs/src/letter/latin/upper-h.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ glyph-block Letter-Latin-Upper-H : begin

select-variant 'H' 'H'
link-reduced-variant 'H/sansSerif' 'H' MathSansSerif
select-variant 'H/descenderBase' (shapeFrom -- 'H')
select-variant 'H/descBase' (shapeFrom -- 'H')
select-variant 'grek/Eta' 0x397 (follow -- 'H')
select-variant 'HTurned' 0xA78D (follow -- 'H')
link-reduced-variant 'grek/Eta/sansSerif' 'grek/Eta' MathSansSerif (follow -- 'H/sansSerif')
alias 'cyrl/En' 0x41D 'H'
alias 'cyrl/En/descenderBase' null 'H/descenderBase'
alias 'cyrl/En/descBase' null 'H/descBase'
select-variant 'leftHalfH' 0x2C75
select-variant 'rightHalfH' 0xA7F5
select-variant 'grek/Heta' 0x370 (shapeFrom -- 'leftHalfH')
Expand All @@ -253,17 +253,17 @@ glyph-block Letter-Latin-Upper-H : begin
select-variant 'leftHalfSmcpH' 0x2C76 (follow -- 'leftHalfH')
select-variant 'rightHalfSmcpH' 0xA7F6 (follow -- 'rightHalfH')
select-variant 'cyrl/en' 0x43D (shapeFrom -- 'smcpH')
select-variant 'cyrl/en/descenderBase' (shapeFrom -- 'smcpH')
select-variant 'cyrl/en/descBase' (shapeFrom -- 'smcpH')
select-variant 'cyrl/en.BGR' (shapeFrom -- 'smcpH')
select-variant 'grek/heta' 0x371 (shapeFrom -- 'leftHalfSmcpH')

derive-composites 'HDescender' 0x2C67 'H/descenderBase' [CyrDescender.rSideJut RightSB 0]
derive-composites 'HDescender' 0x2C67 'H/descBase' [CyrDescender.rSideJut RightSB 0]

derive-composites 'cyrl/EnDescender' 0x4A2 'cyrl/En/descenderBase' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/enDescender' 0x4A3 'cyrl/en/descenderBase' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/EnDescender' 0x4A2 'cyrl/En/descBase' [CyrDescender.rSideJut RightSB 0]
derive-composites 'cyrl/enDescender' 0x4A3 'cyrl/en/descBase' [CyrDescender.rSideJut RightSB 0]

derive-composites 'cyrl/EnTail' 0x4C9 'cyrl/En/descenderBase' [CyrTailDescender.rSideJut RightSB 0]
derive-composites 'cyrl/enTail' 0x4CA 'cyrl/en/descenderBase' [CyrTailDescender.rSideJut RightSB 0]
derive-composites 'cyrl/EnTail' 0x4C9 'cyrl/En/descBase' [CyrTailDescender.rSideJut RightSB 0]
derive-composites 'cyrl/enTail' 0x4CA 'cyrl/en/descBase' [CyrTailDescender.rSideJut RightSB 0]

CreateSelectorVariants 'cyrl/EnGhe' 0x4A4 [Object.keys HConfig] (follow -- 'H')
CreateSelectorVariants 'cyrl/enghe' 0x4A5 [Object.keys HConfig] (follow -- 'cyrl/en')
Expand Down Expand Up @@ -313,9 +313,9 @@ glyph-block Letter-Latin-Upper-H : begin
eject-contour 'serifRB'
include : EngHook RightSB 0 Descender

derive-glyphs 'Heng' 0xA726 'H/descenderBase' DProcCapitalHeng
derive-glyphs 'cyrl/EnHook' 0x4C7 'cyrl/En/descenderBase' DProcCapitalHeng
derive-glyphs 'cyrl/enHook' 0x4C8 'cyrl/en/descenderBase' DProcSmallHeng
derive-glyphs 'Heng' 0xA726 'H/descBase' DProcCapitalHeng
derive-glyphs 'cyrl/EnHook' 0x4C7 'cyrl/En/descBase' DProcCapitalHeng
derive-glyphs 'cyrl/enHook' 0x4C8 'cyrl/en/descBase' DProcSmallHeng

derive-glyphs 'cyrl/EnLHook' 0x528 'cyrl/En' : lambda [src srl] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
Expand Down
20 changes: 10 additions & 10 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ rank = 1
description = "H without serifs"
selector.H = "serifless"
selector."H/sansSerif" = "serifless"
selector."H/descenderBase" = "serifless"
selector."H/descBase" = "serifless"
selector.leftHalfH = "serifless"
selector.rightHalfH = "serifless"
selector."grek/Heta" = "serifless"
Expand All @@ -409,7 +409,7 @@ rank = 2
description = "H with serif only at top left"
selector.H = "topLeftSerifed"
selector."H/sansSerif" = "serifless"
selector."H/descenderBase" = "topLeftSerifed"
selector."H/descBase" = "topLeftSerifed"
selector.leftHalfH = "topLeftSerifed"
selector.rightHalfH = "serifless"
selector."grek/Heta" = "topLeftSerifed"
Expand All @@ -424,7 +424,7 @@ rank = 3
description = "H with serif only at top left and bottom right"
selector.H = "topLeftBottomRightSerifed"
selector."H/sansSerif" = "serifless"
selector."H/descenderBase" = "topLeftSerifed"
selector."H/descBase" = "topLeftSerifed"
selector.leftHalfH = "topLeftSerifed"
selector.rightHalfH = "topLeftBottomRightSerifed"
selector."grek/Heta" = "topLeftSerifed"
Expand All @@ -439,7 +439,7 @@ rank = 4
description = "H with serifs"
selector.H = "serifed"
selector."H/sansSerif" = "serifless"
selector."H/descenderBase" = "serifed"
selector."H/descBase" = "serifed"
selector.leftHalfH = "serifed"
selector.rightHalfH = "serifed"
selector."grek/Heta" = "serifed"
Expand Down Expand Up @@ -5630,7 +5630,7 @@ rank = 1
keyAffix = ""
selectorAffix."cyrl/en" = ""
selectorAffix."cyrl/en.BGR" = ""
selectorAffix."cyrl/en/descenderBase" = ""
selectorAffix."cyrl/en/descBase" = ""
selectorAffix."cyrl/nje/leftHalf" = ""
selectorAffix."cyrl/nje/leftHalf/reduced" = ""
selectorAffix."cyrl/njeKomi" = ""
Expand All @@ -5640,7 +5640,7 @@ rank = 2
descriptionAffix = "tail"
selectorAffix."cyrl/en" = "tailed"
selectorAffix."cyrl/en.BGR" = "tailed"
selectorAffix."cyrl/en/descenderBase" = ""
selectorAffix."cyrl/en/descBase" = ""
selectorAffix."cyrl/nje/leftHalf" = ""
selectorAffix."cyrl/nje/leftHalf/reduced" = ""
selectorAffix."cyrl/njeKomi" = ""
Expand All @@ -5651,7 +5651,7 @@ descriptionAffix = "serifs"
descriptionJoiner = "without"
selectorAffix."cyrl/en" = "serifless"
selectorAffix."cyrl/en.BGR" = "serifless"
selectorAffix."cyrl/en/descenderBase" = "serifless"
selectorAffix."cyrl/en/descBase" = "serifless"
selectorAffix."cyrl/nje/leftHalf" = "serifless"
selectorAffix."cyrl/nje/leftHalf/reduced" = "serifless"
selectorAffix."cyrl/njeKomi" = "serifless"
Expand All @@ -5661,7 +5661,7 @@ rank = 2
descriptionAffix = "serifs at top left"
selectorAffix."cyrl/en" = "topLeftSerifed"
selectorAffix."cyrl/en.BGR" = "topLeftSerifed"
selectorAffix."cyrl/en/descenderBase" = "topLeftSerifed"
selectorAffix."cyrl/en/descBase" = "topLeftSerifed"
selectorAffix."cyrl/nje/leftHalf" = "topLeftSerifed"
selectorAffix."cyrl/nje/leftHalf/reduced" = "topLeftSerifed"
selectorAffix."cyrl/njeKomi" = "topLeftSerifed"
Expand All @@ -5672,7 +5672,7 @@ disableIf = [{ tail = "tailed" }]
descriptionAffix = "serifs at top left and bottom right"
selectorAffix."cyrl/en" = "topLeftBottomRightSerifed"
selectorAffix."cyrl/en.BGR" = "topLeftBottomRightSerifed"
selectorAffix."cyrl/en/descenderBase" = "topLeftSerifed"
selectorAffix."cyrl/en/descBase" = "topLeftSerifed"
selectorAffix."cyrl/nje/leftHalf" = "topLeftSerifed"
selectorAffix."cyrl/nje/leftHalf/reduced" = "topLeftSerifed"
selectorAffix."cyrl/njeKomi" = "topLeftSerifed"
Expand All @@ -5682,7 +5682,7 @@ rank = 4
descriptionAffix = "serifs"
selectorAffix."cyrl/en" = "serifed"
selectorAffix."cyrl/en.BGR" = "serifedBGR"
selectorAffix."cyrl/en/descenderBase" = "serifed"
selectorAffix."cyrl/en/descBase" = "serifed"
selectorAffix."cyrl/nje/leftHalf" = "serifed"
selectorAffix."cyrl/nje/leftHalf/reduced" = "serifedExceptBottomRight"
selectorAffix."cyrl/njeKomi" = "serifedExceptBottomRight"
Expand Down

0 comments on commit 3c64e3a

Please sign in to comment.