Skip to content

Commit 152edad

Browse files
Improve serifs of two extended Cyrillic letters under italics. (#2627)
* Improve serifs of Cyrillic Tall Te. * Improve serifs of Cyrillic Iotified Yat. * Cleanup of `zhe.ptl`. * Cleanup of `w.ptl`.
1 parent b0318ce commit 152edad

File tree

5 files changed

+44
-38
lines changed

5 files changed

+44
-38
lines changed

packages/font-glyphs/src/letter/cyrillic/orthography.ptl

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ glyph-block Letter-Cyrillic-Orthography : begin
3232
orthographic-italic 'cyrl/peDescender' 0x525
3333
orthographic-italic 'cyrl/dzzhe' 0x52B
3434
orthographic-italic 'cyrl/dche' 0x52D
35-
orthographic-italic 'cyrl/teTall' 0x1C84
3635
orthographic-italic 'cyrl/teThreeLeg' 0x1C85
3736
orthographic-italic 'cyrl/tje' 0x1C8A
3837
orthographic-italic 'cyrl/este' null

packages/font-glyphs/src/letter/cyrillic/yat.ptl

+24-21
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ glyph-block Letter-Cyrillic-Yat : begin
1212
glyph-block-import Letter-Shared : CreateDependentComposite
1313
glyph-block-import Letter-Shared-Metrics : BowlXDepth
1414
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay
15-
glyph-block-import Letter-Cyrillic-Yeri : YeriConfig
15+
glyph-block-import Letter-Cyrillic-Yeri : YeriConfig YeriBarPos
1616
glyph-block-import Letter-Cyrillic-Iotified-A : Iotified
1717

1818
define [xBarLeft df] : Math.max (df.rightSB - (RightSB - SB)) : if SLAB
1919
Just ([mix df.leftSB df.rightSB 0.35] - [HSwToV : 0.5 * df.mvs])
2020
Just [mix df.leftSB df.rightSB 0.2]
2121

22-
define [YatShape] : with-params [df Yeri top [pBar 0.5] [fLowerCase false] [sw df.mvs] [xCrossbarLeftOverride nothing] [yCrossbarOverride nothing]] : glyph-proc
22+
define [YatShape] : with-params [df Yeri top [pBar YeriBarPos] [fLowerCase false] [fIotifiedBase false] [sw df.mvs] [xCrossbarLeftOverride nothing] [yCrossbarOverride nothing]] : glyph-proc
2323
local xYeriLeft : xBarLeft df
2424

2525
include : Yeri top
26-
left -- xYeriLeft
27-
right -- (df.rightSB - O * 2)
28-
pBar -- pBar
26+
left -- xYeriLeft
27+
right -- (df.rightSB - O * 2)
28+
pBar -- pBar
2929
stroke -- sw
3030

3131
local cTop : if SLAB (top - Stroke / 2) top
@@ -44,25 +44,24 @@ glyph-block Letter-Cyrillic-Yat : begin
4444

4545
if fLowerCase : begin
4646
eject-contour 'serifYeriLT'
47-
include : tagged 'serifLT' : HSerif.lt xYeriLeft top SideJut sw
47+
include : tagged 'serifLT' : if (fIotifiedBase && para.isItalic) [glyph-proc] [HSerif.lt xYeriLeft top SideJut sw]
4848

49-
define [IotifiedYatShape] : with-params [df Yeri top [pBar 0.5] [fLowerCase false]] : glyph-proc
50-
local gap : 0.25 * (df.width - 2 * df.leftSB - [if SLAB 2.5 4.5] * df.mvs)
51-
define divSub : (df.width - gap - df.mvs) / Width
49+
define [IotifiedYatShape] : with-params [df Yeri top [pBar YeriBarPos] [fLowerCase false] [sw df.mvs]] : glyph-proc
50+
local gap : 0.25 * (df.width - 2 * df.leftSB - [if SLAB 2.5 4.5] * sw)
51+
define divSub : (df.width - gap - sw) / Width
5252
define dfSub : DivFrame divSub 2
5353

5454
local shift : Width * (df.div - divSub)
5555
include : with-transform [ApparentTranslate shift 0]
5656
YatShape dfSub Yeri top
57-
pBar -- pBar
58-
fLowerCase -- fLowerCase
59-
sw -- df.mvs
57+
pBar -- pBar
58+
fLowerCase -- fLowerCase
59+
fIotifiedBase -- true
60+
sw -- sw
6061
xCrossbarLeftOverride -- (df.leftSB - shift)
6162
eject-contour 'serifDL'
6263

63-
if fLowerCase
64-
include : Iotified.ascender df top 0 (fCapital -- false)
65-
include : Iotified.full df top 0 (fCapital -- true)
64+
include : Iotified.[if fLowerCase 'ascender' 'full'] df top 0 (fCapital -- (!fLowerCase))
6665

6766
foreach { suffix { Uc Lc } } [pairs-of YeriConfig] : do
6867
create-glyph "cyrl/Yat.\(suffix)" : glyph-proc
@@ -75,27 +74,31 @@ glyph-block Letter-Cyrillic-Yat : begin
7574
local df : include : DivFrame para.diversityT
7675
include : df.markSet.b
7776
include : YatShape df Lc Ascender
78-
pBar -- (0.55 * XH / Ascender)
77+
pBar -- (YeriBarPos * XH / Ascender)
7978
fLowerCase -- true
8079

8180
create-glyph "cyrl/yatTall.\(suffix)" : glyph-proc
8281
local df : include : DivFrame para.diversityT
8382
include : df.markSet.b
84-
include : ExtendAboveBaseAnchors (Ascender + 0.5 * AccentStackOffset)
85-
include : YatShape df Lc (Ascender + 0.5 * AccentStackOffset)
86-
pBar -- (0.55 * XH / (Ascender + 0.5 * AccentStackOffset))
83+
local asc : Ascender + 0.5 * AccentStackOffset
84+
include : ExtendAboveBaseAnchors asc
85+
include : YatShape df Lc asc
86+
pBar -- (YeriBarPos * XH / asc)
8787
fLowerCase -- true
8888
yCrossbarOverride -- (Ascender - [if SLAB (0.25 * df.mvs) 0])
8989

9090
create-glyph "cyrl/YatIotified.\(suffix)" : glyph-proc
9191
local df : include : DivFrame para.diversityM 3
9292
include : df.markSet.capital
93-
include : IotifiedYatShape df Uc CAP (pBar -- 0.5)
93+
include : IotifiedYatShape df Uc CAP
94+
pBar -- 0.5
9495

9596
create-glyph "cyrl/yatIotified.\(suffix)" : glyph-proc
9697
local df : include : DivFrame para.diversityM 3
9798
include : df.markSet.b
98-
include : IotifiedYatShape df Lc Ascender (pBar -- 0.375) (fLowerCase -- true)
99+
include : IotifiedYatShape df Lc Ascender
100+
pBar -- 0.375
101+
fLowerCase -- true
99102

100103
# Italic Yat
101104
create-glyph "cyrl/yat.italic/yeri.\(suffix)" : glyph-proc

packages/font-glyphs/src/letter/cyrillic/zhe.ptl

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ glyph-block Letter-Cyrillic-Zhe : begin
2121
include : VBar.m df.middle bot midTop fine
2222
if fSlab : begin
2323
local fBGR : midTop > top
24-
local fEnoughSpaceForFullSerifs : df.width > 7 * para.refJut
25-
if (!para.isItalic && fEnoughSpaceForFullSerifs) : begin
24+
if (!para.isItalic && (df.width > 7 * para.refJut)) : begin
2625
include : HSerif.mb df.middle bot Jut
2726
if (!fBGR) : include : HSerif.mt df.middle midTop Jut
2827
if fBGR : include : HSerif.lt (df.middle - [HSwToV : 0.5 * fine]) midTop SideJut
@@ -32,8 +31,8 @@ glyph-block Letter-Cyrillic-Zhe : begin
3231
define fineK 0.1
3332
if fSlab : begin
3433
if (!fHalf) : begin
35-
include : HSerif.lt (df.leftSB + fine * fineK) top SideJut fine
36-
include : HSerif.lb (df.leftSB + fine * fineK) bot SideJut fine
34+
include : HSerif.lt (df.leftSB + fine * fineK) top SideJut fine
35+
include : HSerif.lb (df.leftSB + fine * fineK) bot SideJut fine
3736
include : HSerif.rt (df.rightSB - fine * fineK) top SideJut fine
3837
include : HSerif.rb (df.rightSB - fine * fineK) bot SideJut fine
3938

packages/font-glyphs/src/letter/latin/upper-t.ptl

+16-11
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ glyph-block Letter-Latin-Upper-T : begin
1515
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay UpwardHookShape
1616
glyph-block-import Letter-Shared-Shapes : CyrDescender SerifFrame FlatHookDepth LeftHook RetroflexHook
1717

18-
define [TLeftX df] : df.leftSB + 0.75 * OX
19-
define [TRightX df] : df.rightSB - 0.75 * OX
18+
define ox : 0.75 * OX
19+
define [TLeftX df] : df.leftSB + ox
20+
define [TRightX df] : df.rightSB - ox
2021
define [TShape df top doTopSerifs doBottomSerifs] : glyph-proc
2122
include : tagged 'strokeV' : VBar.m df.middle 0 top
2223
local l : TLeftX df
@@ -60,19 +61,25 @@ glyph-block Letter-Latin-Upper-T : begin
6061
eject-contour 'strokeV'
6162

6263
define [CyrlTallTeShape df top doTopSerifs doBottomSerifs] : glyph-proc
64+
define doFullSerifs : doTopSerifs && doBottomSerifs && !para.isItalic
65+
6366
local xRight : df.width - 1.5 * df.leftSB
64-
local xLeft : df.leftSB - 0.75 * OX
67+
local xLeft : df.leftSB - ox
6568

66-
include : HBar.t xLeft xRight top
67-
include : VBar.r xRight 0 top
69+
include : tagged 'strokeLT' : HBar.t xLeft xRight top
70+
include : tagged 'strokeV' : VBar.r xRight 0 top
6871

6972
if doTopSerifs : begin
7073
include : tagged 'serifLT' : VSerif.dl xLeft top VJut
7174
if doBottomSerifs : begin
72-
include : tagged 'serifMB' : HSerif.rb (xRight - [HSwToV HalfStroke]) 0 Jut
73-
include : tagged 'serifMB' : HSerif.lb (xRight - [HSwToV HalfStroke]) 0 MidJutSide
75+
include : tagged 'serifMB' : if para.isItalic [HSerif.rb xRight 0 SideJut] : composite-proc
76+
HSerif.rb (xRight - [HSwToV HalfStroke]) 0 Jut
77+
HSerif.lb (xRight - [HSwToV HalfStroke]) 0 MidJutSide
78+
if doFullSerifs : begin
7479
include : tagged 'serifRT' : HSerif.rt xRight top SideJut
7580

81+
include : LeaningAnchor.Below.VBar.r xRight
82+
7683
glyph-block-export TConfig
7784
define TConfig : object
7885
serifless { 1 false false }
@@ -158,11 +165,10 @@ glyph-block Letter-Latin-Upper-T : begin
158165
include : df.markSet.e
159166
include : TjeShape df XH doST
160167

161-
create-glyph "cyrl/teTall.upright.\(suffix)" : glyph-proc
168+
create-glyph "cyrl/teTall.\(suffix)" : glyph-proc
162169
local df : include : DivFrame 1
163170
include : df.markSet.b
164171
include : CyrlTallTeShape df Ascender doST doSB
165-
include : LeaningAnchor.Below.VBar.r (df.width - 1.5 * df.leftSB)
166172

167173
select-variant 'T' 'T'
168174
link-reduced-variant 'T/sansSerif' 'T' MathSansSerif
@@ -191,8 +197,7 @@ glyph-block Letter-Latin-Upper-T : begin
191197

192198
select-variant 'currency/tengeSign' 0x20B8 (follow -- 'T')
193199

194-
select-variant 'cyrl/teTall.upright' (follow -- 'T')
195-
select-variant 'cyrl/teTall.italic' (shapeFrom -- 'cyrl/teTall.upright') (follow -- 'T/rtailBase')
200+
select-variant 'cyrl/teTall' 0x1C84 (follow -- 'T')
196201

197202
CreateAccentedComposition 'TCedilla' 0x0162 'T' 'cedillaBelow'
198203
CreateAccentedComposition 'TComma' 0x021A 'T' 'commaBelow'

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ glyph-block Letter-Latin-W : begin
387387
include : implT df XH bodyType slabType
388388

389389
create-glyph "ww.\(suffix)": glyph-proc
390-
local df : include : DivFrame [if (Ldiv / para.diversityM < 1) para.diversityF 1] 3
390+
local df : include : DivFrame [if (Ldiv < para.diversityM) para.diversityF 1] 3
391391
include : df.markSet.capital
392392

393393
local gap : CAP * 0.05

0 commit comments

Comments
 (0)