Skip to content

Commit 18e96df

Browse files
Cleanup of #2845 . (#2847)
1 parent bbbee17 commit 18e96df

File tree

3 files changed

+56
-43
lines changed

3 files changed

+56
-43
lines changed

packages/font-glyphs/src/letter/cyrillic/iotified-a.ptl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ glyph-block Letter-Cyrillic-Iotified-A : begin
183183
include : with-transform [ApparentTranslate shift 0]
184184
body subDf XH
185185
stroke -- df.mvs
186+
hook -- AHook
186187
ada -- (SmallArchDepthA * 0.7 * df.adws)
187188
adb -- (SmallArchDepthB * 0.7 * df.adws)
188189

packages/font-glyphs/src/letter/latin-ext/lower-ae-oe.ptl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
113113
return : with-transform [ApparentTranslate shift 0]
114114
body subDf XH
115115
stroke -- df.mvs
116+
hook -- AHook
116117
ada -- subDf.smallArchDepthA
117118
adb -- subDf.smallArchDepthB
118119

@@ -122,6 +123,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
122123
with-transform [FlipAround subDf.middle (XH / 2)]
123124
revbody subDf XH
124125
stroke -- df.mvs
126+
hook -- AHook
125127
ada -- subDf.smallArchDepthA
126128
adb -- subDf.smallArchDepthB
127129
ccw -- true

packages/font-glyphs/src/letter/latin/lower-e.ptl

Lines changed: 53 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,32 @@ glyph-block Letter-Latin-Lower-E : begin
1616
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
1717
glyph-block-import Letter-Latin-C : CConfig
1818

19-
define [EHook top] : Math.min Hook : AHook * (top / XH)
20-
21-
define [HookHeight top stroke doSwash] : Math.min [EHook top]
22-
if doSwash top : stroke + 0.277 * (top - stroke * 3)
19+
define [SmallEHook top stroke hook doSwash] : Math.min hook : if doSwash top : mix stroke (top * DesignParameters.eBarPos - stroke / 2) 0.554
2320

2421
define SLAB-NONE 0
2522
define SLAB-CLASSICAL 1
2623
define SLAB-INWARD 2
2724

28-
define [SmallESerifedTerminalShape df top stroke tailSlab isStart] : match tailSlab
25+
define [SmallESerifedTerminalShape df top stroke hook tailSlab isStart] : match tailSlab
2926
[Just SLAB-CLASSICAL] : begin
30-
SerifedArcEnd.LtrLhs df.rightSB 0 stroke [EHook top]
27+
SerifedArcEnd.LtrLhs df.rightSB 0 stroke hook
3128
[Just SLAB-INWARD] : begin
32-
InwardSlabArcEnd.LtrLhs df.rightSB 0 stroke [EHook top]
29+
InwardSlabArcEnd.LtrLhs df.rightSB 0 stroke hook
3330
__ : list
3431
hookend 0 (sw -- stroke) (suppressSwash -- isStart)
35-
g4 (df.rightSB - [if (!isStart && para.isItalic && (para.slopeAngle > 0)) 0 0.5] * OX) [HookHeight top stroke (!isStart && para.isItalic && (para.slopeAngle > 0))]
32+
g4 (df.rightSB - [if (!isStart && para.isItalic && (para.slopeAngle > 0)) 0 0.5] * OX) [SmallEHook top stroke hook (!isStart && para.isItalic && (para.slopeAngle > 0))]
3633

37-
define [SmallETerminalSerif df top stroke tailSlab isStart] : match tailSlab
38-
[Just SLAB-CLASSICAL] : ArcEndSerif.R df.rightSB 0 stroke [EHook top]
39-
[Just SLAB-INWARD] : ArcEndSerif.InwardR df.rightSB 0 stroke [EHook top]
34+
define [SmallETerminalSerif df top stroke hook tailSlab isStart] : match tailSlab
35+
[Just SLAB-CLASSICAL] : ArcEndSerif.R df.rightSB 0 stroke hook
36+
[Just SLAB-INWARD] : ArcEndSerif.InwardR df.rightSB 0 stroke hook
4037
__ : no-shape
4138

4239
glyph-block-export SmallEShape
4340
define [SmallEShape] : with-params [
44-
df top [stroke [AdviceStroke2 2 3 top]] [barpos DesignParameters.eBarPos] [bbd 0]
41+
df top [stroke [AdviceStroke2 2 3 top]] [hook AHook] [bbd 0]
4542
[ada SmallArchDepthA] [adb SmallArchDepthB] [tailSlab nothing] [cw false]
4643
] : glyph-proc
47-
local barBottom : top * barpos - (stroke / 2)
44+
local barBottom : top * DesignParameters.eBarPos - (stroke / 2)
4845

4946
include : HBar.b ((df.leftSB + OX) + (stroke / 2) + bbd) ((df.rightSB - OX) - (stroke / 2)) barBottom stroke
5047
local path : include : dispiro
@@ -53,18 +50,18 @@ glyph-block Letter-Latin-Lower-E : begin
5350
curl (df.rightSB - OX) (top - adb)
5451
arch.lhs top (sw -- stroke)
5552
flatside.ld df.leftSB 0 top ada adb
56-
SmallESerifedTerminalShape df top stroke tailSlab cw
53+
SmallESerifedTerminalShape df top stroke hook tailSlab cw
5754

58-
include : SmallETerminalSerif df top stroke tailSlab cw
55+
include : SmallETerminalSerif df top stroke hook tailSlab cw
5956

6057
return path.rhsKnots.[path.rhsKnots.length - 1]
6158

6259
glyph-block-export RevSmallEShape
6360
define [RevSmallEShape] : with-params [
64-
df top [stroke [AdviceStroke2 2 3 top]] [barpos DesignParameters.eBarPos]
61+
df top [stroke [AdviceStroke2 2 3 top]] [hook AHook]
6562
[ada SmallArchDepthA] [adb SmallArchDepthB] [ccw false]
6663
] : glyph-proc
67-
local barBottom : top * barpos - (stroke / 2)
64+
local barBottom : top * DesignParameters.eBarPos - (stroke / 2)
6865

6966
include : HBar.b ((df.leftSB + OX) + (stroke / 2)) ((df.rightSB - OX) - (stroke / 2)) barBottom stroke
7067
include : dispiro
@@ -74,18 +71,18 @@ glyph-block Letter-Latin-Lower-E : begin
7471
arch.rhs top (sw -- stroke)
7572
flatside.rd df.rightSB 0 top ada adb
7673
hookend 0 (sw -- stroke) (suppressSwash -- ccw)
77-
g4 (df.leftSB + [if (!ccw && para.isItalic && (para.slopeAngle < 0)) 0 0.5] * OX) [HookHeight top stroke (!ccw && para.isItalic && (para.slopeAngle < 0))]
74+
g4 (df.leftSB + [if (!ccw && para.isItalic && (para.slopeAngle < 0)) 0 0.5] * OX) [SmallEHook top stroke hook (!ccw && para.isItalic && (para.slopeAngle < 0))]
7875

7976
glyph-block-export SmallERoundedShape
8077
define [SmallERoundedShape] : with-params [
81-
df top [stroke [AdviceStroke2 2 3 top]] [barpos DesignParameters.eBarPos]
78+
df top [stroke [AdviceStroke2 2 3 top]] [hook AHook]
8279
[ada SmallArchDepthA] [adb SmallArchDepthB] [tailSlab nothing] [cw false]
8380
] : glyph-proc
84-
local barBottom : top * (barpos * [if para.isItalic 1 0.95]) - (stroke / 2)
81+
local barBottom : top * (DesignParameters.eBarPos * [if para.isItalic 1 0.95]) - (stroke / 2)
8582
local xStart : df.leftSB + [HSwToV : 0.125 * stroke]
8683
local extraCurliness : if para.isItalic (0.1 * (top - barBottom)) 0
87-
local ada2 : ArchDepthAOf : (1 - barpos) * SmallArchDepth
88-
local adb2 : ArchDepthBOf : (1 - barpos) * SmallArchDepth
84+
local ada2 : ArchDepthAOf : (1 - DesignParameters.eBarPos) * SmallArchDepth
85+
local adb2 : ArchDepthBOf : (1 - DesignParameters.eBarPos) * SmallArchDepth
8986
local path : include : dispiro
9087
widths.lhs stroke
9188
[if para.isItalic g2 flat] xStart (barBottom + (2/3) * extraCurliness)
@@ -94,22 +91,22 @@ glyph-block Letter-Latin-Lower-E : begin
9491
g4 (df.rightSB - OX) [YSmoothMidR top barBottom ada2 adb2]
9592
arch.lhs top (sw -- stroke)
9693
flatside.ld df.leftSB 0 top ada adb
97-
SmallESerifedTerminalShape df top stroke tailSlab cw
94+
SmallESerifedTerminalShape df top stroke hook tailSlab cw
9895

99-
include : SmallETerminalSerif df top stroke tailSlab cw
96+
include : SmallETerminalSerif df top stroke hook tailSlab cw
10097

10198
return path.rhsKnots.[path.rhsKnots.length - 1]
10299

103100
glyph-block-export RevSmallERoundedShape
104101
define [RevSmallERoundedShape] : with-params [
105-
df top [stroke [AdviceStroke2 2 3 top]] [barpos DesignParameters.eBarPos]
102+
df top [stroke [AdviceStroke2 2 3 top]] [hook AHook]
106103
[ada SmallArchDepthA] [adb SmallArchDepthB] [ccw false]
107104
] : glyph-proc
108-
local barBottom : top * (barpos * [if para.isItalic 1 0.95]) - (stroke / 2)
105+
local barBottom : top * (DesignParameters.eBarPos * [if para.isItalic 1 0.95]) - (stroke / 2)
109106
local xStart : df.rightSB - [HSwToV : 0.125 * stroke]
110107
local extraCurliness : if para.isItalic (0.1 * (top - barBottom)) 0
111-
local ada2 : ArchDepthAOf : (1 - barpos) * SmallArchDepth
112-
local adb2 : ArchDepthBOf : (1 - barpos) * SmallArchDepth
108+
local ada2 : ArchDepthAOf : (1 - DesignParameters.eBarPos) * SmallArchDepth
109+
local adb2 : ArchDepthBOf : (1 - DesignParameters.eBarPos) * SmallArchDepth
113110
include : dispiro
114111
widths.rhs stroke
115112
[if para.isItalic g2 flat] xStart (barBottom + (2/3) * extraCurliness)
@@ -119,18 +116,18 @@ glyph-block Letter-Latin-Lower-E : begin
119116
arch.rhs top (sw -- stroke)
120117
flatside.rd df.rightSB 0 top ada adb
121118
hookend 0 (sw -- stroke) (suppressSwash -- ccw)
122-
g4 (df.leftSB + [if (!ccw && para.isItalic && (para.slopeAngle < 0)) 0 0.5] * OX) [HookHeight top stroke (!ccw && para.isItalic && (para.slopeAngle < 0))]
119+
g4 (df.leftSB + [if (!ccw && para.isItalic && (para.slopeAngle < 0)) 0 0.5] * OX) [SmallEHook top stroke hook (!ccw && para.isItalic && (para.slopeAngle < 0))]
123120

124121
define [AbkCheShape] : with-params [
125-
fDesc Body df top [stroke [Math.min df.mvs : AdviceStroke2 2 3 top]] [barpos DesignParameters.eBarPos]
122+
fDesc Body df top [stroke [Math.min df.mvs : AdviceStroke2 2 3 top]] [hook AHook]
126123
[ada SmallArchDepthA] [adb SmallArchDepthB] [tailSlab nothing]
127124
] : glyph-proc
128125
local gap : 0.375 * (df.width - 2 * df.leftSB - 2.5 * stroke) - [HSwToV : 0.25 * stroke]
129126
define divSub : (df.width - gap - stroke) / Width
130127
define subDf : DivFrame divSub 2
131128
include : Body subDf top
132129
stroke -- stroke
133-
barpos -- barpos
130+
hook -- hook
134131
ada -- (ada * 0.7 * df.adws)
135132
adb -- (adb * 0.7 * df.adws)
136133
tailSlab -- tailSlab
@@ -144,7 +141,7 @@ glyph-block Letter-Latin-Lower-E : begin
144141
include : Translate shift 0
145142

146143
local hd : FlatHookDepth df
147-
local barBottom : top * barpos - (stroke / 2)
144+
local barBottom : top * DesignParameters.eBarPos - (stroke / 2)
148145
include : intersection [MaskLeft : subDf.leftSB + shift] : dispiro
149146
widths.lhs stroke
150147
flat (df.leftSB - [HSwToV : 0.25 * stroke]) (barBottom + Hook) [heading Downward]
@@ -161,12 +158,14 @@ glyph-block Letter-Latin-Lower-E : begin
161158
create-glyph "e.\(suffix)" : glyph-proc
162159
include : MarkSet.e
163160
include : Body [DivFrame 1] XH
161+
hook -- AHook
164162
ada -- SmallArchDepthA
165163
adb -- SmallArchDepthB
166164

167165
create-glyph "eOgonek.\(suffix)" : glyph-proc
168166
include : MarkSet.e
169167
local lastKnot : include : Body [DivFrame 1] XH
168+
hook -- AHook
170169
ada -- SmallArchDepthA
171170
adb -- SmallArchDepthB
172171
include : refer-glyph 'ogonekTR/spacer'
@@ -175,7 +174,7 @@ glyph-block Letter-Latin-Lower-E : begin
175174
local fine : AdviceStroke 8
176175
local depth : (-Descender) - markStroke
177176
local extL : (7 / 16) * depth + 0.25 * markStress
178-
local extR : Math.max (0.0625 * markExtend) (1.5 * TanSlope * markStroke)
177+
local extR : Math.max (0.0625 * markExtend) (TanSlope * (1.5 * markStroke))
179178
local beginCoSlope : if para.isItalic 0.2 0
180179

181180
set-base-anchor 'trailing' (RightSB + extR) ((-depth) + 0.5 * O - markStroke)
@@ -203,6 +202,7 @@ glyph-block Letter-Latin-Lower-E : begin
203202
create-glyph "eWithNotch.\(suffix)" : glyph-proc
204203
include : MarkSet.e
205204
local lastKnot : include : Body [DivFrame 1] XH
205+
hook -- AHook
206206
ada -- SmallArchDepthA
207207
adb -- SmallArchDepthB
208208
local sw : AdviceStroke 4
@@ -218,6 +218,7 @@ glyph-block Letter-Latin-Lower-E : begin
218218
create-glyph "eRetroflexHook.\(suffix)" : glyph-proc
219219
include : MarkSet.e
220220
include : Body [DivFrame 1] XH
221+
hook -- AHook
221222
ada -- SmallArchDepthA
222223
adb -- SmallArchDepthB
223224
tailSlab -- SLAB-CLASSICAL
@@ -229,6 +230,7 @@ glyph-block Letter-Latin-Lower-E : begin
229230
create-glyph "Schwa.\(suffix)" : glyph-proc
230231
include : MarkSet.capital
231232
include : Body [DivFrame 1] CAP
233+
hook -- Hook
232234
ada -- ArchDepthA
233235
adb -- ArchDepthB
234236
include : FlipAround Middle (CAP / 2)
@@ -240,44 +242,45 @@ glyph-block Letter-Latin-Lower-E : begin
240242
create-glyph "schwaRhoticHook.\(suffix)" : glyph-proc
241243
local df : include : DivFrame para.advanceScaleM 1
242244
include : df.markSet.e
243-
local divSub : Math.min 1 : 0.85 * para.advanceScaleM
244-
local dfSub : DivFrame divSub 2
245-
local stroke : AdviceStroke2 2 3 XH divSub
245+
local dfSub : DivFrame [Math.min 1 : 0.85 * para.advanceScaleM] 2
246+
local stroke : dfSub.adviceStroke2 2 3 XH
246247
include : Body dfSub XH
247248
stroke -- stroke
249+
hook -- AHook
248250
ada -- [dfSub.archDepthAOf SmallArchDepth stroke]
249251
adb -- [dfSub.archDepthBOf SmallArchDepth stroke]
250252
include : FlipAround dfSub.middle (XH / 2)
251-
include : RhoticHookShape (dfSub.rightSB - [HSwToV : 1.25 * markFine]) df.width (XH * 0.5) (XH * 0.2)
253+
include : RhoticHookShape (dfSub.rightSB - [HSwToV : 1.25 * markFine]) df.width (XH * DesignParameters.eBarPos) (0.4 * (XH * DesignParameters.eBarPos))
252254

253255
create-glyph "schwaRetroflexHook.\(suffix)" : glyph-proc
254256
local df : include : DivFrame para.advanceScaleM 1
255257
include : df.markSet.e
256-
local divSub : Math.min 1 : 0.85 * para.advanceScaleM
257-
local dfSub : DivFrame divSub 2
258-
local stroke : AdviceStroke2 2 3 XH divSub
258+
local dfSub : DivFrame [Math.min 1 : 0.85 * para.advanceScaleM] 2
259+
local stroke : dfSub.adviceStroke2 2 3 XH
259260
include : Body dfSub XH
260261
stroke -- stroke
262+
hook -- AHook
261263
ada -- [dfSub.archDepthAOf SmallArchDepth stroke]
262264
adb -- [dfSub.archDepthBOf SmallArchDepth stroke]
263265
include : FlipAround dfSub.middle (XH / 2)
264266
include : RetroflexHook.r
265267
x -- [mix RightSB df.width 0.5]
266268
y -- 0
267-
yAttach -- (XH / 2 - HalfStroke)
269+
yAttach -- (XH * DesignParameters.eBarPos - HalfStroke)
268270
xLink -- (dfSub.rightSB - [HSwToV : 0.5 * stroke])
269271
refSw -- [AdviceStroke 4]
270272

271273
create-glyph "eRev.\(suffix)" : glyph-proc
272274
include : MarkSet.e
273275
include : RevBody [DivFrame 1] XH
276+
hook -- AHook
274277
ada -- SmallArchDepthA
275278
adb -- SmallArchDepthB
276279

277280
create-glyph "eBar.\(suffix)" : glyph-proc
278281
include [refer-glyph "e.\(suffix)"] AS_BASE ALSO_METRICS
279-
include : HBar.m [mix SB 0 0.7] [mix RightSB Width 0.7] (XH * 0.25 + QuarterStroke)
280-
Math.min (0.25 * (XH - 3 * Stroke)) : AdviceStroke 5
282+
local yBar : mix Stroke (XH * DesignParameters.eBarPos - HalfStroke) 0.5
283+
include : HBar.m [mix SB 0 0.7] [mix RightSB Width 0.7] yBar [Math.min (yBar - Stroke) : AdviceStroke 5]
281284

282285
DefineSelectorGlyph "cyrl/Schwa" suffix [DivFrame 1] 'capital'
283286
DefineSelectorGlyph "cyrl/schwa" suffix [DivFrame 1] 'e'
@@ -294,6 +297,7 @@ glyph-block Letter-Latin-Lower-E : begin
294297
set-width 0
295298
set-mark-anchor 'cvDecompose' 0 0
296299
include : Body [DivFrame 1] CAP
300+
hook -- Hook
297301
ada -- ArchDepthA
298302
adb -- ArchDepthB
299303
tailSlab -- styTop
@@ -303,6 +307,7 @@ glyph-block Letter-Latin-Lower-E : begin
303307
set-width 0
304308
set-mark-anchor 'cvDecompose' 0 0
305309
include : Body [DivFrame 1] XH
310+
hook -- AHook
306311
ada -- SmallArchDepthA
307312
adb -- SmallArchDepthB
308313
tailSlab -- styTop
@@ -313,27 +318,31 @@ glyph-block Letter-Latin-Lower-E : begin
313318
set-width 0
314319
set-mark-anchor 'cvDecompose' 0 0
315320
include : AbkCheShape false Body abkCheDf CAP
321+
hook -- Hook
316322
ada -- ArchDepthA
317323
adb -- ArchDepthB
318324
tailSlab -- styBot
319325
create-glyph "cyrl/abk/che.\(suffix).\(suffixSerif)" : glyph-proc
320326
set-width 0
321327
set-mark-anchor 'cvDecompose' 0 0
322328
include : AbkCheShape false Body abkCheDf XH
329+
hook -- AHook
323330
ada -- SmallArchDepthA
324331
adb -- SmallArchDepthB
325332
tailSlab -- styBot
326333
create-glyph "cyrl/abk/CheDescender.\(suffix).\(suffixSerif)" : glyph-proc
327334
set-width 0
328335
set-mark-anchor 'cvDecompose' 0 0
329336
include : AbkCheShape true Body abkCheDf CAP
337+
hook -- Hook
330338
ada -- ArchDepthA
331339
adb -- ArchDepthB
332340
tailSlab -- styBot
333341
create-glyph "cyrl/abk/cheDescender.\(suffix).\(suffixSerif)" : glyph-proc
334342
set-width 0
335343
set-mark-anchor 'cvDecompose' 0 0
336344
include : AbkCheShape true Body abkCheDf XH
345+
hook -- AHook
337346
ada -- SmallArchDepthA
338347
adb -- SmallArchDepthB
339348
tailSlab -- styBot
@@ -378,6 +387,7 @@ glyph-block Letter-Latin-Lower-E : begin
378387
include : MarkSet.e
379388
include : SmallEShape [DivFrame 1] XH
380389
stroke -- BBS
390+
hook -- AHook
381391
bbd -- BBD
382392
ada -- SmallArchDepthA
383393
adb -- SmallArchDepthB

0 commit comments

Comments
 (0)