Skip to content

Commit 632be92

Browse files
Cleanup/optimization of a few loosely-related Cyrillic letters. (#2600)
* Cleanup and optimization of Bulgarian Cyrillic Ef. * Stabilize arch depth of Abkhasian Che. * Code cleanup of `lower-epsilon.ptl`. * Optimize archdepth of stretchedC, width of eswide.
1 parent 803a720 commit 632be92

File tree

5 files changed

+84
-92
lines changed

5 files changed

+84
-92
lines changed

changes/32.2.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
- MODIFIER LETTER SMALL CAPITAL OE (`U+107A3`).
1616
- MODIFIER LETTER CYRILLIC SMALL EM (`U+1E03B`).
1717
* Make LATIN SMALL LIGATURE FF (`U+FB00`) ... LATIN SMALL LIGATURE FFL (`U+FB04`) slightly narrower under Quasi-Proportional.
18+
* Optimize glyphs for Bulgarian Cyrillic Capital/Small Letter Ef (`U+0424`, `U+0444`).

packages/font-glyphs/src/letter/greek/lower-epsilon.ptl

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -246,18 +246,20 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
246246

247247
create-glyph "cyrl/Dhe.\(suffix)" : glyph-proc
248248
include [refer-glyph "cyrl/Ze.\(suffix)"] AS_BASE ALSO_METRICS
249-
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
249+
local desc : (-LongJut) + HalfStroke
250+
include : ExtendBelowBaseAnchors desc
250251
include : let [zeNoO : CyrZe slabTop slabBot CAP 0 (hook -- Hook) (xo -- 0) (yo -- 0)]
251252
difference
252-
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
253+
VBar.m [arch.adjust-x.bot Middle] desc (Stroke + O) [AdviceStroke 3.5]
253254
zeNoO.ShapeMask
254255

255256
create-glyph "cyrl/dhe.\(suffix)" : glyph-proc
256257
include [refer-glyph "cyrl/ze.\(suffix)"] AS_BASE ALSO_METRICS
257-
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
258+
local desc : (-LongJut) + HalfStroke
259+
include : ExtendBelowBaseAnchors desc
258260
include : let [zeNoO : CyrZe slabTop slabBot XH 0 (hook -- SHook) (xo -- 0) (yo -- 0)]
259261
difference
260-
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
262+
VBar.m [arch.adjust-x.bot Middle] desc (Stroke + O) [AdviceStroke 3.5]
261263
zeNoO.ShapeMask
262264

263265
create-glyph "cyrl/DzjeKomi.\(suffix)" : glyph-proc
@@ -376,38 +378,38 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
376378
do "Volapuk AE"
377379
glyph-block-import Letter-Latin-Lower-A : SingleStorey
378380

379-
define [FullBarBody df height bar hook ada adb] : glyph-proc
380-
local eps : SmallEpsilon CLOSED-STEM CLOSED-STEM height 0
381+
define [FullBarBody df top bar hook ada adb] : glyph-proc
382+
local eps : SmallEpsilon CLOSED-STEM CLOSED-STEM top 0
381383
blend -- VolBlend
382384
hook -- hook
383385
overflow -- 0
384386
ada2 -- ada
385387
adb2 -- adb
386388
define [object stroke] : eps.Dim
387389
include : eps.Shape
388-
include : bar df height stroke
390+
include : bar df top stroke
389391

390-
define [EarlessCornerBody df height bar hook ada adb] : glyph-proc
391-
local eps : SmallEpsilon SLAB-INWARD CLOSED-STEM height 0
392+
define [EarlessCornerBody df top bar hook ada adb] : glyph-proc
393+
local eps : SmallEpsilon SLAB-INWARD CLOSED-STEM top 0
392394
blend -- VolBlend
393395
hook -- hook
394396
overflow -- 0
395397
ada2 -- ada
396398
adb2 -- adb
397399
define [object stroke] : eps.Dim
398400
include : eps.Shape
399-
include : bar df (height - DToothlessRise) stroke
401+
include : bar df (top - DToothlessRise) stroke
400402

401-
define [EarlessRoundedBody df height bar hook ada adb] : glyph-proc
402-
local eps : SmallEpsilon CLOSED-ROUND CLOSED-STEM height 0
403+
define [EarlessRoundedBody df top bar hook ada adb] : glyph-proc
404+
local eps : SmallEpsilon CLOSED-ROUND CLOSED-STEM top 0
403405
blend -- VolBlend
404406
hook -- hook
405407
overflow -- 0
406408
ada2 -- ada
407409
adb2 -- adb
408410
define [object stroke] : eps.Dim
409411
include : eps.Shape
410-
include : bar df (height - adb) stroke
412+
include : bar df (top - adb) stroke
411413

412414
define SingleStoreyConfig : object
413415
singleStoreySerifless { FullBarBody SingleStorey.SeriflessBar }
@@ -440,55 +442,55 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
440442
glyph-block-import Letter-Latin-U : USerifs
441443
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar
442444

443-
define [UToothed df height slab hook ada adb] : glyph-proc
445+
define [UToothed df top slab hook ada adb] : glyph-proc
444446
set-base-anchor 'trailing' df.rightSB 0
445-
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM height 0
447+
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM top 0
446448
blend -- VolBlend
447449
hook -- hook
448450
overflow -- 0
449451
ada2 -- ada
450452
adb2 -- adb
451453
define [object stroke] : eps.Dim
452454
include : eps.Shape
453-
include : VBar.r df.rightSB 0 height stroke
454-
include : slab df height
455+
include : VBar.r df.rightSB 0 top stroke
456+
include : slab df top
455457

456-
define [UTailed df height slab hook ada adb] : glyph-proc
458+
define [UTailed df top slab hook ada adb] : glyph-proc
457459
set-base-anchor 'trailing' (df.rightSB + SideJut) 0
458-
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM height 0
460+
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-STEM top 0
459461
blend -- VolBlend
460462
hook -- hook
461463
overflow -- 0
462464
ada2 -- ada
463465
adb2 -- adb
464466
define [object stroke] : eps.Dim
465467
include : eps.Shape
466-
include : RightwardTailedBar df.rightSB 0 height stroke
467-
include : slab df height
468+
include : RightwardTailedBar df.rightSB 0 top stroke
469+
include : slab df top
468470

469-
define [UToothlessRounded df height slab hook ada adb] : glyph-proc
470-
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-ROUND height 0
471+
define [UToothlessRounded df top slab hook ada adb] : glyph-proc
472+
local eps : SmallEpsilon OPEN-VERTICAL CLOSED-ROUND top 0
471473
blend -- VolBlend
472474
hook -- hook
473475
overflow -- 0
474476
ada2 -- ada
475477
adb2 -- adb
476478
define [object stroke] : eps.Dim
477479
include : eps.Shape
478-
include : VBar.r df.rightSB ada height stroke
479-
include : slab df height
480+
include : VBar.r df.rightSB ada top stroke
481+
include : slab df top
480482

481-
define [UToothlessCorner df height slab hook ada adb] : glyph-proc
482-
local eps : SmallEpsilon OPEN-VERTICAL SLAB-INWARD height 0
483+
define [UToothlessCorner df top slab hook ada adb] : glyph-proc
484+
local eps : SmallEpsilon OPEN-VERTICAL SLAB-INWARD top 0
483485
blend -- VolBlend
484486
hook -- hook
485487
overflow -- 0
486488
ada2 -- ada
487489
adb2 -- adb
488490
define [object stroke] : eps.Dim
489491
include : eps.Shape
490-
include : VBar.r df.rightSB DToothlessRise height stroke
491-
include : slab df height stroke
492+
include : VBar.r df.rightSB DToothlessRise top stroke
493+
include : slab df top stroke
492494

493495
define SmallUConfig : SuffixCfg.weave
494496
object # body

packages/font-glyphs/src/letter/greek/phi.ptl

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ glyph-block Letter-Greek-Phi : begin
4444
adb -- adb
4545

4646
define [GrekLowerPhiCursiveRing fFlatTB df y2 y3] : glyph-proc
47-
local df : include : DivFrame para.diversityM 3
48-
include : df.markSet.e
49-
5047
local l : df.leftSB + OX * 2
5148
local r : df.width - l
5249
include : dispiro
@@ -121,26 +118,26 @@ glyph-block Letter-Greek-Phi : begin
121118
create-glyph 'grek/Phi' 0x3A6 : glyph-proc
122119
local df : include : DivFrame para.diversityM 3
123120
include : df.markSet.capital
124-
include : GrekCapitalPhiImpl 0 df
121+
include : GrekCapitalPhiImpl false df
125122

126123
create-glyph 'cyrl/Ef' 0x424 : glyph-proc
127124
local df : include : DivFrame para.diversityM 3
128125
include : df.markSet.capital
129-
include : GrekCapitalPhiImpl 1 df
126+
include : GrekCapitalPhiImpl true df
130127

131128
create-glyph 'cyrl/Ef.BGR' : glyph-proc
132129
local df : include : DivFrame para.diversityM 3
133130
include : df.markSet.capital
134131

135-
local vJut : Math.max (LongJut - 0.5 * Stroke) : if SLAB (1.5 * Stroke) 0
132+
local vJut : Math.max (LongJut - HalfStroke) : if SLAB (1.5 * Stroke) 0
136133

137134
local top : CAP + vJut
138-
local bot : 0 - vJut
135+
local bot : 0 - vJut
139136

140137
include : ExtendAboveBaseAnchors top
141138
include : ExtendBelowBaseAnchors bot
142139

143-
include : VarPhiRing 0 df 0 CAP
140+
include : VarPhiRing true df 0 CAP
144141
include : StraightBar df bot 0 CAP top
145142

146143
if SLAB : begin
@@ -150,24 +147,24 @@ glyph-block Letter-Greek-Phi : begin
150147
create-glyph 'taillessphi' 0x2C77 : glyph-proc
151148
local df : include : DivFrame para.diversityM 3
152149
include : df.markSet.e
153-
include : GrekLowerPhiCursiveRing 0 df 0 XH
150+
include : GrekLowerPhiCursiveRing false df 0 XH
154151

155152
create-glyph 'grek/phi.cursive' : glyph-proc
156153
local df : include : DivFrame para.diversityM 3
157154
include : df.markSet.p
158-
include : GrekLowerPhiCursiveRing 0 df 0 XH
155+
include : GrekLowerPhiCursiveRing false df 0 XH
159156
include : VBar.m df.middle Descender (0.2 * df.mvs)
160157

161158
create-glyph 'grek/phi.straight' : glyph-proc
162159
local df : include : DivFrame para.diversityM 3
163160
include : df.markSet.bp
164-
include : VarPhiRing 0 df 0 XH
161+
include : VarPhiRing false df 0 XH
165162
include : StraightBar df Descender 0 XH Ascender
166163

167164
create-glyph 'grek/phi.neohellenic' : glyph-proc
168165
local df : include : DivFrame para.diversityM 3
169166
include : df.markSet.p
170-
include : VarPhiRing 0 df 0 XH
167+
include : VarPhiRing false df 0 XH
171168
include : VBar.m df.middle Descender (0.2 * df.mvs)
172169

173170
select-variant 'grek/phi' 0x3C6
@@ -183,8 +180,8 @@ glyph-block Letter-Greek-Phi : begin
183180

184181
define CyrlLowerEfConfig : SuffixCfg.weave
185182
object # bowl
186-
"" { VarPhiRing Stroke }
187-
splitBowl { CyrlEfSplitRing [DivFrame para.diversityM 3].mvs }
183+
"" { VarPhiRing Stroke }
184+
splitBowl { CyrlEfSplitRing nothing }
188185
object # bar
189186
serifless { StraightBar nothing nothing }
190187
topSerifed { StraightBar MtSerif nothing }
@@ -196,17 +193,11 @@ glyph-block Letter-Greek-Phi : begin
196193
create-glyph "cyrl/ef.\(suffix)" : glyph-proc
197194
local df : include : DivFrame para.diversityM 3
198195
include : df.markSet.bp
199-
include : Bowl 1 df 0 XH
200-
include : Bar df Descender 0 XH Ascender barSw
201-
if sMT : include : sMT df Ascender barSw
202-
if sMB : include : sMB df Descender barSw
203-
create-glyph "cyrl/ef.BGR.\(suffix)" : glyph-proc
204-
local df : include : DivFrame para.diversityM 3
205-
include : df.markSet.bp
206-
include : VarPhiRing 0 df 0 XH
207-
include : Bar df Descender 0 XH Ascender barSw
208-
if sMT : include : sMT df Ascender barSw
209-
if sMB : include : sMB df Descender barSw
196+
include : Bowl true df 0 XH
197+
local mvs : fallback barSw df.mvs
198+
include : Bar df Descender 0 XH Ascender mvs
199+
if sMT : include : sMT df Ascender mvs
200+
if sMB : include : sMB df Descender mvs
210201

211202
select-variant 'cyrl/ef' 0x444
212-
select-variant 'cyrl/ef.BGR'
203+
select-variant 'cyrl/ef.BGR' (shapeFrom -- 'cyrl/ef')

packages/font-glyphs/src/letter/latin/c.ptl

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ glyph-block Letter-Latin-C : begin
3737
g4 (df.rightSB - offset) (top - [fallback hook Hook])
3838
hookstart (top - offset) (sw -- sw)
3939

40-
flat (df.leftSB + OX + offset) (top - ada)
41-
curl (df.leftSB + OX + offset) (bot + adb)
40+
flatside.ld (df.leftSB + offset) bot top ada adb
4241

4342
match sb
4443
[Just SLAB-CLASSICAL] : SerifedArcEnd.LtrLhs (df.rightSB - offset) bot sw [fallback hook Hook] origBar
@@ -64,8 +63,7 @@ glyph-block Letter-Latin-C : begin
6463
g4 (df.leftSB + offset) (top - [fallback hook Hook])
6564
hookstart (top - offset) (sw -- sw)
6665

67-
flat (df.rightSB - OX + offset) (top - ada)
68-
curl (df.rightSB - OX + offset) (bot + adb)
66+
flatside.rd (df.rightSB + offset) bot top ada adb
6967

7068
match sb
7169
[Just SLAB-CLASSICAL] : SerifedArcEnd.RtlRhs (df.leftSB + offset) bot sw [fallback hook Hook]
@@ -107,8 +105,7 @@ glyph-block Letter-Latin-C : begin
107105
[Just SLAB-CLASSICAL] : SerifedArcStart.RtlLhs RightSB XH sw Hook
108106
[Just SLAB-INWARD] : InwardSlabArcStart.RtlLhs RightSB XH sw Hook
109107
__ : list [g4 RightSB (XH - Hook) [widths.lhs sw]] [hookstart XH (sw -- sw)]
110-
flat (SB + OX) (XH - SmallArchDepthA)
111-
curl (SB + OX) SmallArchDepthB
108+
flatside.ld SB 0 XH SmallArchDepthA SmallArchDepthB
112109
CurlyTail.n fine 0 RightSB 0 0 (yLoopTop -- XH * 0.45)
113110

114111
glyph-block-export CLetterForm
@@ -214,13 +211,13 @@ glyph-block Letter-Latin-C : begin
214211
include : Translate 0 (SB / 2)
215212

216213
create-glyph "cyrl/esWide.\(suffix)" : glyph-proc
217-
local df : include : DivFrame para.diversityM 3
214+
local df : include : DivFrame para.diversityT 3
218215
include : df.markSet.e
219-
local desc : -LongJut + 0.5 * Stroke
216+
local desc : (-LongJut) + HalfStroke
220217
include : ExtendBelowBaseAnchors desc
221218
local lf : CLetterForm df sty styBot XH desc
222-
ada -- [df.archDepthA SmallArchDepth df.mvs]
223-
adb -- [df.archDepthB SmallArchDepth df.mvs]
219+
ada -- [df.archDepthA SmallArchDepth Stroke]
220+
adb -- [df.archDepthB SmallArchDepth Stroke]
224221
include : lf.full
225222

226223
create-glyph "cHookTop.\(suffix)" : glyph-proc
@@ -240,10 +237,12 @@ glyph-block Letter-Latin-C : begin
240237
create-glyph "stretchedC.\(suffix)" : glyph-proc
241238
include : MarkSet.p
242239
local lf : CLetterForm [DivFrame 1] sty styBot XH Descender
240+
ada -- SmallArchDepthA
241+
adb -- SmallArchDepthB
243242
include : lf.full
244243

245244
define [KoppaShapeT styTop styBot top base] : union
246-
VBar.r (Middle + [HSwToV Stroke]) Descender (Stroke / 2)
245+
VBar.r (Middle + [HSwToV Stroke]) Descender HalfStroke
247246
difference base
248247
Rect (top / 2) Descender (Middle + [HSwToV Stroke]) (Width * 4)
249248
Rect (XH / 2) [mix Stroke Hook 0.5] Middle (Width * 4)
@@ -357,9 +356,10 @@ glyph-block Letter-Latin-C : begin
357356

358357
derive-glyphs 'cyrl/The' 0x4AA "cyrl/Es" : function [src gr] : glyph-proc
359358
include [refer-glyph src] AS_BASE ALSO_METRICS
360-
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
359+
local desc : (-LongJut) + HalfStroke
360+
include : ExtendBelowBaseAnchors desc
361361
include : difference
362-
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
362+
VBar.m [arch.adjust-x.bot Middle] desc (Stroke + O) [AdviceStroke 3.5]
363363
OShapeOutline.NoOvershoot CAP 0 SB RightSB Stroke ArchDepthA ArchDepthB
364364

365365
derive-multi-part-glyphs 'cyrl/The.BSH' null { 'cyrl/Es' 'invCommaBelow' } : lambda [srcs gr] : glyph-proc
@@ -373,9 +373,10 @@ glyph-block Letter-Latin-C : begin
373373

374374
derive-glyphs 'cyrl/the' 0x4AB "cyrl/es" : function [src gr] : glyph-proc
375375
include [refer-glyph src] AS_BASE ALSO_METRICS
376-
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
376+
local desc : (-LongJut) + HalfStroke
377+
include : ExtendBelowBaseAnchors desc
377378
include : difference
378-
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
379+
VBar.m [arch.adjust-x.bot Middle] desc (Stroke + O) [AdviceStroke 3.5]
379380
OShapeOutline.NoOvershoot XH 0 SB RightSB Stroke SmallArchDepthA SmallArchDepthB
380381

381382
derive-multi-part-glyphs 'cyrl/the.BSH' null { 'cyrl/es' 'invCommaBelow' } : lambda [srcs gr] : glyph-proc
@@ -441,12 +442,12 @@ glyph-block Letter-Latin-C : begin
441442
curl df.middle [mix bot top 0.5] [widths.center.heading swBarFine Upward]
442443

443444
define [OutlineMask df] : spiro-outline
444-
curl (df.leftSB + 0.5 * Stroke) (post@ <-> SmallArchDepthA)
445-
arch.rhs (sw -- Stroke) (tMask - 0.5 * Stroke)
446-
flat (df.rightSB - 0.5 * Stroke) (pre@ <-> SmallArchDepthB)
447-
curl pre@ (post@ <+> SmallArchDepthA)
448-
arch.rhs (sw -- Stroke) (bMask + 0.5 * Stroke)
449-
flat post@ (pre@ <+> SmallArchDepthB)
445+
curl (df.leftSB + HalfStroke) (post@ <-> SmallArchDepthA)
446+
arch.rhs (sw -- Stroke) (tMask - HalfStroke)
447+
flat (df.rightSB - HalfStroke) (pre@ <-> SmallArchDepthB)
448+
curl pre@ (post@ <+> SmallArchDepthA)
449+
arch.rhs (sw -- Stroke) (bMask + HalfStroke)
450+
flat post@ (pre@ <+> SmallArchDepthB)
450451

451452
define [InterruptMask df] : begin
452453
define gap : Math.max (XH / 8) [AdviceStroke2 6 6 XH]

0 commit comments

Comments
 (0)