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`.
This commit is contained in:
John McWilliams 2024-12-31 19:50:52 -05:00 committed by GitHub
parent b0318ce711
commit 152edad706
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 45 additions and 39 deletions

View file

@ -32,7 +32,6 @@ glyph-block Letter-Cyrillic-Orthography : begin
orthographic-italic 'cyrl/peDescender' 0x525 orthographic-italic 'cyrl/peDescender' 0x525
orthographic-italic 'cyrl/dzzhe' 0x52B orthographic-italic 'cyrl/dzzhe' 0x52B
orthographic-italic 'cyrl/dche' 0x52D orthographic-italic 'cyrl/dche' 0x52D
orthographic-italic 'cyrl/teTall' 0x1C84
orthographic-italic 'cyrl/teThreeLeg' 0x1C85 orthographic-italic 'cyrl/teThreeLeg' 0x1C85
orthographic-italic 'cyrl/tje' 0x1C8A orthographic-italic 'cyrl/tje' 0x1C8A
orthographic-italic 'cyrl/este' null orthographic-italic 'cyrl/este' null

View file

@ -12,20 +12,20 @@ glyph-block Letter-Cyrillic-Yat : begin
glyph-block-import Letter-Shared : CreateDependentComposite glyph-block-import Letter-Shared : CreateDependentComposite
glyph-block-import Letter-Shared-Metrics : BowlXDepth glyph-block-import Letter-Shared-Metrics : BowlXDepth
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay glyph-block-import Letter-Shared-Shapes : LetterBarOverlay
glyph-block-import Letter-Cyrillic-Yeri : YeriConfig glyph-block-import Letter-Cyrillic-Yeri : YeriConfig YeriBarPos
glyph-block-import Letter-Cyrillic-Iotified-A : Iotified glyph-block-import Letter-Cyrillic-Iotified-A : Iotified
define [xBarLeft df] : Math.max (df.rightSB - (RightSB - SB)) : if SLAB define [xBarLeft df] : Math.max (df.rightSB - (RightSB - SB)) : if SLAB
Just ([mix df.leftSB df.rightSB 0.35] - [HSwToV : 0.5 * df.mvs]) Just ([mix df.leftSB df.rightSB 0.35] - [HSwToV : 0.5 * df.mvs])
Just [mix df.leftSB df.rightSB 0.2] Just [mix df.leftSB df.rightSB 0.2]
define [YatShape] : with-params [df Yeri top [pBar 0.5] [fLowerCase false] [sw df.mvs] [xCrossbarLeftOverride nothing] [yCrossbarOverride nothing]] : glyph-proc define [YatShape] : with-params [df Yeri top [pBar YeriBarPos] [fLowerCase false] [fIotifiedBase false] [sw df.mvs] [xCrossbarLeftOverride nothing] [yCrossbarOverride nothing]] : glyph-proc
local xYeriLeft : xBarLeft df local xYeriLeft : xBarLeft df
include : Yeri top include : Yeri top
left -- xYeriLeft left -- xYeriLeft
right -- (df.rightSB - O * 2) right -- (df.rightSB - O * 2)
pBar -- pBar pBar -- pBar
stroke -- sw stroke -- sw
local cTop : if SLAB (top - Stroke / 2) top local cTop : if SLAB (top - Stroke / 2) top
@ -44,25 +44,24 @@ glyph-block Letter-Cyrillic-Yat : begin
if fLowerCase : begin if fLowerCase : begin
eject-contour 'serifYeriLT' eject-contour 'serifYeriLT'
include : tagged 'serifLT' : HSerif.lt xYeriLeft top SideJut sw include : tagged 'serifLT' : if (fIotifiedBase && para.isItalic) [glyph-proc] [HSerif.lt xYeriLeft top SideJut sw]
define [IotifiedYatShape] : with-params [df Yeri top [pBar 0.5] [fLowerCase false]] : glyph-proc define [IotifiedYatShape] : with-params [df Yeri top [pBar YeriBarPos] [fLowerCase false] [sw df.mvs]] : glyph-proc
local gap : 0.25 * (df.width - 2 * df.leftSB - [if SLAB 2.5 4.5] * df.mvs) local gap : 0.25 * (df.width - 2 * df.leftSB - [if SLAB 2.5 4.5] * sw)
define divSub : (df.width - gap - df.mvs) / Width define divSub : (df.width - gap - sw) / Width
define dfSub : DivFrame divSub 2 define dfSub : DivFrame divSub 2
local shift : Width * (df.div - divSub) local shift : Width * (df.div - divSub)
include : with-transform [ApparentTranslate shift 0] include : with-transform [ApparentTranslate shift 0]
YatShape dfSub Yeri top YatShape dfSub Yeri top
pBar -- pBar pBar -- pBar
fLowerCase -- fLowerCase fLowerCase -- fLowerCase
sw -- df.mvs fIotifiedBase -- true
sw -- sw
xCrossbarLeftOverride -- (df.leftSB - shift) xCrossbarLeftOverride -- (df.leftSB - shift)
eject-contour 'serifDL' eject-contour 'serifDL'
if fLowerCase include : Iotified.[if fLowerCase 'ascender' 'full'] df top 0 (fCapital -- (!fLowerCase))
include : Iotified.ascender df top 0 (fCapital -- false)
include : Iotified.full df top 0 (fCapital -- true)
foreach { suffix { Uc Lc } } [pairs-of YeriConfig] : do foreach { suffix { Uc Lc } } [pairs-of YeriConfig] : do
create-glyph "cyrl/Yat.\(suffix)" : glyph-proc create-glyph "cyrl/Yat.\(suffix)" : glyph-proc
@ -75,27 +74,31 @@ glyph-block Letter-Cyrillic-Yat : begin
local df : include : DivFrame para.diversityT local df : include : DivFrame para.diversityT
include : df.markSet.b include : df.markSet.b
include : YatShape df Lc Ascender include : YatShape df Lc Ascender
pBar -- (0.55 * XH / Ascender) pBar -- (YeriBarPos * XH / Ascender)
fLowerCase -- true fLowerCase -- true
create-glyph "cyrl/yatTall.\(suffix)" : glyph-proc create-glyph "cyrl/yatTall.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityT local df : include : DivFrame para.diversityT
include : df.markSet.b include : df.markSet.b
include : ExtendAboveBaseAnchors (Ascender + 0.5 * AccentStackOffset) local asc : Ascender + 0.5 * AccentStackOffset
include : YatShape df Lc (Ascender + 0.5 * AccentStackOffset) include : ExtendAboveBaseAnchors asc
pBar -- (0.55 * XH / (Ascender + 0.5 * AccentStackOffset)) include : YatShape df Lc asc
pBar -- (YeriBarPos * XH / asc)
fLowerCase -- true fLowerCase -- true
yCrossbarOverride -- (Ascender - [if SLAB (0.25 * df.mvs) 0]) yCrossbarOverride -- (Ascender - [if SLAB (0.25 * df.mvs) 0])
create-glyph "cyrl/YatIotified.\(suffix)" : glyph-proc create-glyph "cyrl/YatIotified.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityM 3 local df : include : DivFrame para.diversityM 3
include : df.markSet.capital include : df.markSet.capital
include : IotifiedYatShape df Uc CAP (pBar -- 0.5) include : IotifiedYatShape df Uc CAP
pBar -- 0.5
create-glyph "cyrl/yatIotified.\(suffix)" : glyph-proc create-glyph "cyrl/yatIotified.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityM 3 local df : include : DivFrame para.diversityM 3
include : df.markSet.b include : df.markSet.b
include : IotifiedYatShape df Lc Ascender (pBar -- 0.375) (fLowerCase -- true) include : IotifiedYatShape df Lc Ascender
pBar -- 0.375
fLowerCase -- true
# Italic Yat # Italic Yat
create-glyph "cyrl/yat.italic/yeri.\(suffix)" : glyph-proc create-glyph "cyrl/yat.italic/yeri.\(suffix)" : glyph-proc

View file

@ -21,8 +21,7 @@ glyph-block Letter-Cyrillic-Zhe : begin
include : VBar.m df.middle bot midTop fine include : VBar.m df.middle bot midTop fine
if fSlab : begin if fSlab : begin
local fBGR : midTop > top local fBGR : midTop > top
local fEnoughSpaceForFullSerifs : df.width > 7 * para.refJut if (!para.isItalic && (df.width > 7 * para.refJut)) : begin
if (!para.isItalic && fEnoughSpaceForFullSerifs) : begin
include : HSerif.mb df.middle bot Jut include : HSerif.mb df.middle bot Jut
if (!fBGR) : include : HSerif.mt df.middle midTop Jut if (!fBGR) : include : HSerif.mt df.middle midTop Jut
if fBGR : include : HSerif.lt (df.middle - [HSwToV : 0.5 * fine]) midTop SideJut if fBGR : include : HSerif.lt (df.middle - [HSwToV : 0.5 * fine]) midTop SideJut
@ -32,8 +31,8 @@ glyph-block Letter-Cyrillic-Zhe : begin
define fineK 0.1 define fineK 0.1
if fSlab : begin if fSlab : begin
if (!fHalf) : begin if (!fHalf) : begin
include : HSerif.lt (df.leftSB + fine * fineK) top SideJut fine include : HSerif.lt (df.leftSB + fine * fineK) top SideJut fine
include : HSerif.lb (df.leftSB + fine * fineK) bot SideJut fine include : HSerif.lb (df.leftSB + fine * fineK) bot SideJut fine
include : HSerif.rt (df.rightSB - fine * fineK) top SideJut fine include : HSerif.rt (df.rightSB - fine * fineK) top SideJut fine
include : HSerif.rb (df.rightSB - fine * fineK) bot SideJut fine include : HSerif.rb (df.rightSB - fine * fineK) bot SideJut fine

View file

@ -15,8 +15,9 @@ glyph-block Letter-Latin-Upper-T : begin
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay UpwardHookShape glyph-block-import Letter-Shared-Shapes : LetterBarOverlay UpwardHookShape
glyph-block-import Letter-Shared-Shapes : CyrDescender SerifFrame FlatHookDepth LeftHook RetroflexHook glyph-block-import Letter-Shared-Shapes : CyrDescender SerifFrame FlatHookDepth LeftHook RetroflexHook
define [TLeftX df] : df.leftSB + 0.75 * OX define ox : 0.75 * OX
define [TRightX df] : df.rightSB - 0.75 * OX define [TLeftX df] : df.leftSB + ox
define [TRightX df] : df.rightSB - ox
define [TShape df top doTopSerifs doBottomSerifs] : glyph-proc define [TShape df top doTopSerifs doBottomSerifs] : glyph-proc
include : tagged 'strokeV' : VBar.m df.middle 0 top include : tagged 'strokeV' : VBar.m df.middle 0 top
local l : TLeftX df local l : TLeftX df
@ -60,19 +61,25 @@ glyph-block Letter-Latin-Upper-T : begin
eject-contour 'strokeV' eject-contour 'strokeV'
define [CyrlTallTeShape df top doTopSerifs doBottomSerifs] : glyph-proc define [CyrlTallTeShape df top doTopSerifs doBottomSerifs] : glyph-proc
local xRight : df.width - 1.5 * df.leftSB define doFullSerifs : doTopSerifs && doBottomSerifs && !para.isItalic
local xLeft : df.leftSB - 0.75 * OX
include : HBar.t xLeft xRight top local xRight : df.width - 1.5 * df.leftSB
include : VBar.r xRight 0 top local xLeft : df.leftSB - ox
include : tagged 'strokeLT' : HBar.t xLeft xRight top
include : tagged 'strokeV' : VBar.r xRight 0 top
if doTopSerifs : begin if doTopSerifs : begin
include : tagged 'serifLT' : VSerif.dl xLeft top VJut include : tagged 'serifLT' : VSerif.dl xLeft top VJut
if doBottomSerifs : begin if doBottomSerifs : begin
include : tagged 'serifMB' : HSerif.rb (xRight - [HSwToV HalfStroke]) 0 Jut include : tagged 'serifMB' : if para.isItalic [HSerif.rb xRight 0 SideJut] : composite-proc
include : tagged 'serifMB' : HSerif.lb (xRight - [HSwToV HalfStroke]) 0 MidJutSide HSerif.rb (xRight - [HSwToV HalfStroke]) 0 Jut
HSerif.lb (xRight - [HSwToV HalfStroke]) 0 MidJutSide
if doFullSerifs : begin
include : tagged 'serifRT' : HSerif.rt xRight top SideJut include : tagged 'serifRT' : HSerif.rt xRight top SideJut
include : LeaningAnchor.Below.VBar.r xRight
glyph-block-export TConfig glyph-block-export TConfig
define TConfig : object define TConfig : object
serifless { 1 false false } serifless { 1 false false }
@ -158,11 +165,10 @@ glyph-block Letter-Latin-Upper-T : begin
include : df.markSet.e include : df.markSet.e
include : TjeShape df XH doST include : TjeShape df XH doST
create-glyph "cyrl/teTall.upright.\(suffix)" : glyph-proc create-glyph "cyrl/teTall.\(suffix)" : glyph-proc
local df : include : DivFrame 1 local df : include : DivFrame 1
include : df.markSet.b include : df.markSet.b
include : CyrlTallTeShape df Ascender doST doSB include : CyrlTallTeShape df Ascender doST doSB
include : LeaningAnchor.Below.VBar.r (df.width - 1.5 * df.leftSB)
select-variant 'T' 'T' select-variant 'T' 'T'
link-reduced-variant 'T/sansSerif' 'T' MathSansSerif link-reduced-variant 'T/sansSerif' 'T' MathSansSerif
@ -191,8 +197,7 @@ glyph-block Letter-Latin-Upper-T : begin
select-variant 'currency/tengeSign' 0x20B8 (follow -- 'T') select-variant 'currency/tengeSign' 0x20B8 (follow -- 'T')
select-variant 'cyrl/teTall.upright' (follow -- 'T') select-variant 'cyrl/teTall' 0x1C84 (follow -- 'T')
select-variant 'cyrl/teTall.italic' (shapeFrom -- 'cyrl/teTall.upright') (follow -- 'T/rtailBase')
CreateAccentedComposition 'TCedilla' 0x0162 'T' 'cedillaBelow' CreateAccentedComposition 'TCedilla' 0x0162 'T' 'cedillaBelow'
CreateAccentedComposition 'TComma' 0x021A 'T' 'commaBelow' CreateAccentedComposition 'TComma' 0x021A 'T' 'commaBelow'

View file

@ -387,7 +387,7 @@ glyph-block Letter-Latin-W : begin
include : implT df XH bodyType slabType include : implT df XH bodyType slabType
create-glyph "ww.\(suffix)": glyph-proc create-glyph "ww.\(suffix)": glyph-proc
local df : include : DivFrame [if (Ldiv / para.diversityM < 1) para.diversityF 1] 3 local df : include : DivFrame [if (Ldiv < para.diversityM) para.diversityF 1] 3
include : df.markSet.capital include : df.markSet.capital
local gap : CAP * 0.05 local gap : CAP * 0.05