Skip to content

Commit

Permalink
Refine characters which use UpwardHookShape.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 committed Feb 3, 2025
1 parent 4021817 commit 070d4fd
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 54 deletions.
2 changes: 2 additions & 0 deletions changes/32.5.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
* Refine shape of the following characters:
- CYRILLIC CAPITAL LETTER KOMI DJE (`U+0502`) ... CYRILLIC SMALL LETTER KOMI ZJE (`U+0505`).
- CYRILLIC CAPITAL LETTER KOMI LJE (`U+0508`) ... CYRILLIC SMALL LETTER KOMI TJE (`U+050F`).
- ARMENIAN CAPITAL LETTER XEH (`U+053D`).
- ARMENIAN CAPITAL LETTER CA (`U+053E`).
- ARMENIAN CAPITAL LETTER HO (`U+0540`).
Expand Down
8 changes: 4 additions & 4 deletions packages/font-glyphs/src/letter/cyrillic/el.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ glyph-block Letter-Cyrillic-El : begin
left -- (df.middle - [HSwToV : 0.5 * df.mvs])
right -- df.rightSB
ybegin -- CAP
yend -- (CAP / 2)
yend -- (CAP / 2 + HalfStroke)
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- df.mvs
local sf2 : [SerifFrame.fromDf df (CAP / 2) 0].slice 1 2
local sf2 : [SerifFrame.fromDf df (CAP / 2 + HalfStroke) 0].slice 1 2
if SLAB : include sf2.rt.full

create-glyph 'cyrl/ljeKomi' 0x509 : glyph-proc
Expand All @@ -176,9 +176,9 @@ glyph-block Letter-Cyrillic-El : begin
left -- (df.middle - [HSwToV : 0.5 * df.mvs])
right -- df.rightSB
ybegin -- XH
yend -- (XH / 2)
yend -- (XH / 2 + HalfStroke)
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- df.mvs
local sf2 : [SerifFrame.fromDf df (XH / 2) 0].slice 1 2
local sf2 : [SerifFrame.fromDf df (XH / 2 + HalfStroke) 0].slice 1 2
if SLAB : include sf2.rt.full
6 changes: 3 additions & 3 deletions packages/font-glyphs/src/letter/cyrillic/yeri.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,14 @@ glyph-block Letter-Cyrillic-Yeri : begin
local xm : df.middle + [HSwToV : 0.5 * df.mvs]
include : RevYeri.RoundShape CAP df.leftSB xm df.mvs
include : UpwardHookShape
left -- df.middle - [HSwToV : 0.5 * df.mvs]
left -- (df.middle - [HSwToV : 0.5 * df.mvs])
right -- df.rightSB
ybegin -- CAP
yend -- (CAP / 2)
yend -- (CAP / 2 + HalfStroke)
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- df.mvs
if SLAB : begin
include : HSerif.mt df.middle CAP Jut df.mvs
local sf2 : [SerifFrame.fromDf df (CAP / 2) 0].slice 1 2
local sf2 : [SerifFrame.fromDf df (CAP / 2 + HalfStroke) 0].slice 1 2
include sf2.rt.full
8 changes: 4 additions & 4 deletions packages/font-glyphs/src/letter/greek/lower-epsilon.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,12 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
left -- (xm - OX * 2 - [HSwToV stroke])
right -- df.rightSB
ybegin -- [YSmoothMidR (midy + stroke / 2) 0]
yend -- (CAP / 2)
yend -- (CAP / 2 + HalfStroke)
ada -- (ArchDepthA * 0.6 * df.adws)
adb -- (ArchDepthB * 0.6 * df.adws)
sw -- stroke
include : ze.AutoStartSerifL
local sf2 : [SerifFrame.fromDf df (CAP / 2) 0].slice 1 2
local sf2 : [SerifFrame.fromDf df (CAP / 2 + HalfStroke) 0].slice 1 2
if SLAB : include sf2.rt.full

create-glyph "cyrl/zjeKomi.\(suffix)" : glyph-proc
Expand All @@ -332,12 +332,12 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
left -- (xm - OX * 2 - [HSwToV stroke])
right -- df.rightSB
ybegin -- [YSmoothMidR (midy + stroke / 2) 0]
yend -- (XH / 2)
yend -- (XH / 2 + HalfStroke)
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- stroke
include : ze.AutoStartSerifL
local sf2 : [SerifFrame.fromDf df (XH / 2) 0].slice 1 2
local sf2 : [SerifFrame.fromDf df (XH / 2 + HalfStroke) 0].slice 1 2
if SLAB : include sf2.rt.full

create-glyph "cyrl/KsiBase.\(suffix)" : glyph-proc
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/latin/lower-d.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ glyph-block Letter-Latin-Lower-D : begin
left -- dfHalf.leftSB
right -- dfHalf.rightSB
ybegin -- Ascender
yend -- (XH / 2)
yend -- (XH / 2 + HalfStroke)
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- df.mvs

if topSerif : include : topSerif dfHalf Ascender
if SLAB : begin
local sf2 : [SerifFrame.fromDf df (XH / 2) 0].slice 1 2
local sf2 : [SerifFrame.fromDf df (XH / 2 + HalfStroke) 0].slice 1 2
include sf2.rt.full

select-variant 'd' 'd'
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/latin/lower-m.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,13 @@ glyph-block Letter-Latin-Lower-M : begin
left -- (subDf.rightSB - [HSwToV subDf.mvs])
right -- df.rightSB
ybegin -- (XH / 2)
yend -- (XH / 2)
yend -- (XH / 2 + HalfStroke)
ada -- (SmallArchDepthA * 0.5 * df.adws)
adb -- (SmallArchDepthB * 0.5 * df.adws)
sw -- subDf.mvs
include : Serifs subDf XH 0 0 (XH / 2) true false
if SLAB : begin
local sf2 : [SerifFrame.fromDf df (XH / 2) 0].slice 2 3
local sf2 : [SerifFrame.fromDf df (XH / 2 + HalfStroke) 0].slice 2 3
include sf2.rt.full

create-glyph "cyrl/tje.italic/base/corner.\(suffix)" : glyph-proc
Expand Down
30 changes: 15 additions & 15 deletions packages/font-glyphs/src/letter/latin/upper-g.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ glyph-block Letter-Latin-Upper-G : begin
define SLAB-INWARD 2
define SLAB-HOOK-TOP 10

define [GShape toothShape slabShape crossBarShape top ada adb yBarOverride] : glyph-proc
define [GShape toothShape slabShape crossBarShape top ada adb hook yBarOverride] : glyph-proc
local yBar : fallback yBarOverride (top * 0.52 + QuarterStroke)
local fine ShoulderFine

local knots : match slabShape
([Just SLAB-LETTER] || [Just SLAB-HOOK-TOP]) : begin
SerifedArcStart.RtlLhs RightSB top Stroke Hook (slabShape === SLAB-HOOK-TOP)
[Just SLAB-INWARD] : InwardSlabArcStart.RtlLhs RightSB top Stroke Hook
__ : list [widths.lhs] [g4 RightSB (top - Hook)] [hookstart top]
SerifedArcStart.RtlLhs RightSB top Stroke hook (slabShape === SLAB-HOOK-TOP)
[Just SLAB-INWARD] : InwardSlabArcStart.RtlLhs RightSB top Stroke hook
__ : list [widths.lhs] [g4 RightSB (top - hook)] [hookstart top]

knots.push
flat (SB + OX) (top - ada)
Expand All @@ -54,16 +54,16 @@ glyph-block Letter-Latin-Upper-G : begin

include : union
dispiro.apply null knots
if (slabShape === SLAB-LETTER) [ArcStartSerif.R RightSB top Stroke Hook] [glyph-proc]
if (slabShape === SLAB-INWARD) [ArcStartSerif.InwardR RightSB top Stroke Hook] [glyph-proc]
if (slabShape === SLAB-LETTER) [ArcStartSerif.R RightSB top Stroke hook] [glyph-proc]
if (slabShape === SLAB-INWARD) [ArcStartSerif.InwardR RightSB top Stroke hook] [glyph-proc]
match crossBarShape
[Just CROSSBAR-NONE] : glyph-proc
[Just CROSSBAR-HOOKED] : HBar.t Middle RightSB yBar
[Just CROSSBAR-CAPPED] : HBar.t Middle [mix RightSB Width 0.625] yBar
match toothShape
[Just TOOTHED] : union
VBar.r RightSB (ada + O) yBar
VBar.r RightSB ada 0 [Math.max [AdviceStroke 5] (Stroke - fine / 2)]
VBar.r RightSB ada 0 [Math.max (Stroke - fine / 2) : AdviceStroke 5]
[Just TOOTHLESS-CORNER] : VBar.r RightSB DToothlessRise yBar
[Just TOOTHLESS-ROUNDED] : glyph-proc

Expand All @@ -90,19 +90,19 @@ glyph-block Letter-Latin-Upper-G : begin
foreach { suffix { shape slabType crossBarShape } } [Object.entries GConfig] : begin
create-glyph "G.\(suffix)" : glyph-proc
include : MarkSet.capital
include : GShape shape slabType crossBarShape CAP ArchDepthA ArchDepthB
include : GShape shape slabType crossBarShape CAP ArchDepthA ArchDepthB Hook
create-glyph "GHookTop.\(suffix)" : glyph-proc
include : MarkSet.capital
include : GShape shape SLAB-HOOK-TOP crossBarShape CAP ArchDepthA ArchDepthB
include : GShape shape SLAB-HOOK-TOP crossBarShape CAP ArchDepthA ArchDepthB Hook
include : TopHook.toRight.arcStart RightSB CAP Hook
include : ExtendAboveBaseAnchors (CAP + Ascender - XH)
include : LeaningAnchor.Above.VBar.r RightSB
create-glyph "smcpG.\(suffix)" : glyph-proc
include : MarkSet.e
include : GShape shape slabType crossBarShape XH ArchDepthA ArchDepthB
include : GShape shape slabType crossBarShape XH ArchDepthA ArchDepthB Hook
create-glyph "smcpGHookTop.\(suffix)" : glyph-proc
include : MarkSet.e
include : GShape shape SLAB-HOOK-TOP crossBarShape XH ArchDepthA ArchDepthB
include : GShape shape SLAB-HOOK-TOP crossBarShape XH ArchDepthA ArchDepthB Hook
include : TopHook.toRight.arcStart RightSB XH Hook
include : ExtendAboveBaseAnchors Ascender
include : LeaningAnchor.Above.VBar.r RightSB
Expand All @@ -128,16 +128,16 @@ glyph-block Letter-Latin-Upper-G : begin
foreach { suffix { slabType } } [Object.entries Config] : begin
create-glyph "cyrl/SjeKomi.\(suffix)" : glyph-proc
include : MarkSet.capital
include : GShape TOOTHLESS-ROUNDED slabType CROSSBAR-NONE CAP ArchDepthA ArchDepthB (CAP / 2)
include : GShape TOOTHLESS-ROUNDED slabType CROSSBAR-NONE CAP ArchDepthA ArchDepthB Hook (CAP / 2 + HalfStroke)
if SLAB : begin
local sf2 : SerifFrame.fromDf [DivFrame 1] (CAP / 2) 0
local sf2 : SerifFrame.fromDf [DivFrame 1] (CAP / 2 + HalfStroke) 0
include sf2.rt.full

create-glyph "cyrl/sjeKomi.\(suffix)" : glyph-proc
include : MarkSet.e
include : GShape TOOTHLESS-ROUNDED slabType CROSSBAR-NONE XH SmallArchDepthA SmallArchDepthB (XH / 2)
include : GShape TOOTHLESS-ROUNDED slabType CROSSBAR-NONE XH SmallArchDepthA SmallArchDepthB AHook (XH / 2 + HalfStroke)
if SLAB : begin
local sf2 : SerifFrame.fromDf [DivFrame 1] (XH / 2) 0
local sf2 : SerifFrame.fromDf [DivFrame 1] (XH / 2 + HalfStroke) 0
include sf2.rt.full

select-variant 'cyrl/SjeKomi' 0x50C (follow -- 'CTopSerifOnly')
Expand Down
24 changes: 12 additions & 12 deletions packages/font-glyphs/src/letter/latin/upper-h.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ glyph-block Letter-Latin-Upper-H : begin
define [HSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
return : match slabType
[Just SLAB-NONE] : glyph-proc
[Just SLAB-NONE] : glyph-proc
[Just SLAB-TOP-LEFT] : begin sf.lt.outer
[Just SLAB-TOP-LEFT-BOTTOM-RIGHT] : composite-proc sf.lt.outer sf.rb.outer
[Just SLAB-TAILED-CYRILLIC] : composite-proc sf.lt.full sf.rt.full sf.lb.full
Expand Down Expand Up @@ -91,13 +91,13 @@ glyph-block Letter-Latin-Upper-H : begin
include : VBar.l df.leftSB 0 top df.mvs
include : HBar.m SB df.middle (top / 2)
include : UpwardHookShape
left -- df.middle - [HSwToV : 0.5 * df.mvs]
right -- df.rightSB
left -- (df.middle - [HSwToV : 0.5 * df.mvs])
right -- df.rightSB
ybegin -- top
yend -- yend
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- df.mvs
yend -- yend
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- df.mvs
include : HSerifs slabType top 0 df.leftSB (df.middle + [HSwToV : 0.5 * df.mvs]) df.mvs

local sf2 : [SerifFrame.fromDf df yend 0].slice 1 2
Expand Down Expand Up @@ -206,12 +206,12 @@ glyph-block Letter-Latin-Upper-H : begin
create-glyph "cyrl/NjeKomi.\(suffix)" : glyph-proc
local df : include : DivFrame para.advanceScaleMM 3
include : df.markSet.capital
include : HwairShape df CAP (CAP / 2) slabType
include : HwairShape df CAP (CAP / 2 + HalfStroke) slabType

create-glyph "cyrl/njeKomi.\(suffix)" : glyph-proc
local df : include : DivFrame para.advanceScaleMM 3
include : df.markSet.e
include : HwairShape df XH (XH / 2) slabType
include : HwairShape df XH (XH / 2 + HalfStroke) slabType

create-glyph "HHookTop.\(suffix)" : glyph-proc
include [refer-glyph "H.\(suffix)"] AS_BASE ALSO_METRICS
Expand Down Expand Up @@ -293,7 +293,7 @@ glyph-block Letter-Latin-Upper-H : begin
select-variant 'HHookTop' 0xA7AA

select-variant 'HStroke' 0x126 (follow -- 'H')
select-variant 'smcpHStroke' null (follow -- 'H')
select-variant 'smcpHStroke' (follow -- 'H')

select-variant 'cyrl/EnMidHook' 0x0522 (follow -- 'cyrl/En')
select-variant 'cyrl/enMidHook' 0x0523 (follow -- 'cyrl/en')
Expand Down Expand Up @@ -338,9 +338,9 @@ glyph-block Letter-Latin-Upper-H : begin

create-glyph 'mathbb/H' 0x210D : glyph-proc
include : MarkSet.capital
include : VBar.l SB 0 CAP BBS
include : VBar.l SB 0 CAP BBS
include : VBar.r RightSB 0 CAP BBS
include : VBar.l (SB + BBD) 0 CAP BBS
include : VBar.l (SB + BBD) 0 CAP BBS
include : VBar.r (RightSB - BBD) 0 CAP BBS
include : HBar.m (SB + BBD) (RightSB - BBD) (CAP * HBarPos) BBS
include : HBar.t SB (SB + BBD) CAP BBS
Expand Down
25 changes: 13 additions & 12 deletions packages/font-glyphs/src/letter/latin/upper-t.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ glyph-block Letter-Latin-Upper-T : begin
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Blackboard : BBS BBD
glyph-block-import Letter-Latin-Lower-M
glyph-block-import Letter-Latin-Upper-F : EFVJutLength
glyph-block-import Letter-Shared : CreateAccentedComposition CreateTurnedLetter
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay UpwardHookShape
glyph-block-import Letter-Shared-Shapes : CyrDescender SerifFrame FlatHookDepth LeftHook RetroflexHook
Expand Down Expand Up @@ -45,15 +45,16 @@ glyph-block Letter-Latin-Upper-T : begin
left -- left
right -- df.rightSB
ybegin -- top
yend -- (top / 2)
yend -- (top / 2 + HalfStroke)
ada -- (SmallArchDepthA * 0.6 * df.adws)
adb -- (SmallArchDepthB * 0.6 * df.adws)
sw -- df.mvs

if doTopSerifs : begin
include : tagged 'serifRT' : VSerif.dr xTopBarRight top VJut
include : tagged 'serifLT' : VSerif.dl xTopBarLeft top VJut
local sf2 : [SerifFrame.fromDf df (top / 2) 0].slice 1 2
local { jutTop jutBot jutMid } : EFVJutLength top 0.5 df.mvs
include : tagged 'serifRT' : VSerif.dr xTopBarRight top jutTop
include : tagged 'serifLT' : VSerif.dl xTopBarLeft top jutTop
local sf2 : [SerifFrame.fromDf df (top / 2 + HalfStroke) 0].slice 1 2
if SLAB : include sf2.rt.full

define [TweUpperShape df top doTopSerifs] : glyph-proc
Expand All @@ -66,8 +67,8 @@ glyph-block Letter-Latin-Upper-T : begin
local xRight : df.width - 1.5 * df.leftSB
local xLeft : df.leftSB - ox

include : tagged 'strokeLT' : HBar.t xLeft xRight top
include : tagged 'strokeV' : VBar.r xRight 0 top
include : tagged 'strokeLT' : HBar.t xLeft xRight top
include : tagged 'strokeV' : VBar.r xRight 0 top

if doTopSerifs : begin
include : tagged 'serifLT' : VSerif.dl xLeft top VJut
Expand All @@ -82,7 +83,7 @@ glyph-block Letter-Latin-Upper-T : begin

glyph-block-export TConfig
define TConfig : object
serifless { 1 false false }
serifless { 1 false false }
motionSerifed { para.advanceScaleT true false }
serifed { para.advanceScaleT true true }

Expand Down Expand Up @@ -149,7 +150,7 @@ glyph-block Letter-Latin-Upper-T : begin
y -- 0
jut -- [if doSB MidJutCenter Jut]

create-glyph "TRTailBR.\(suffix)" : glyph-proc
create-glyph "TRTail.\(suffix)" : glyph-proc
local df : DivFrame adws
include [refer-glyph "T.\(suffix)"] AS_BASE ALSO_METRICS
include : df.markSet.capital
Expand Down Expand Up @@ -186,7 +187,7 @@ glyph-block Letter-Latin-Upper-T : begin
alias 'cyrl/te/reduced.upright' null 'smcpT'
select-variant 'cyrl/teDescender.upright' (follow -- 'T')

select-variant 'TRTailBR' 0x1AE (follow -- 'T/rtailBase')
select-variant 'TRTail' 0x1AE (follow -- 'T/rtailBase')

select-variant 'cyrl/TjeKomi' 0x50E (follow -- 'T/rtailBase')
select-variant 'cyrl/tjeKomi.upright' null (follow -- 'T/rtailBase')
Expand Down Expand Up @@ -215,8 +216,8 @@ glyph-block Letter-Latin-Upper-T : begin
if SLAB : begin
include : tagged 'serifRT' : VSerif.dr r CAP VJut
include : tagged 'serifLT' : VSerif.dl l CAP VJut
include : tagged 'serifRB' : VSerif.ur r 0 VJut
include : tagged 'serifLB' : VSerif.ul l 0 VJut
include : tagged 'serifRB' : VSerif.ur r 0 VJut
include : tagged 'serifLB' : VSerif.ul l 0 VJut

create-glyph 'mathbb/T' 0x1D54B : glyph-proc
local df : include : DivFrame 1
Expand Down

0 comments on commit 070d4fd

Please sign in to comment.