Optimize the appearance/widths of eleven characters under Quasi-Proportional. (#2609)

* Optimize the widths of eleven characters under QP.

* Unify metrics of related characters.
This commit is contained in:
John McWilliams 2024-12-06 05:50:00 -05:00 committed by GitHub
parent 930cd6c1e6
commit f21ad29050
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 96 additions and 80 deletions

View file

@ -3,7 +3,13 @@
- CYRILLIC CAPITAL LETTER TSHE (`U+040B`).
- CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS (`U+0468`).
- CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS (`U+046C`).
- CYRILLIC CAPITAL LETTER BASHKIR KA (`U+04A0`).
- CYRILLIC SMALL LETTER BASHKIR KA (`U+04A1`).
- CYRILLIC CAPITAL LIGATURE TE TSE (`U+04B4`).
- CYRILLIC SMALL LIGATURE TE TSE (`U+04B5`).
- CYRILLIC CAPITAL LETTER YERU WITH BACK YER (`U+A650`).
- CYRILLIC SMALL LETTER YERU WITH BACK YER (`U+A651`).
- CYRILLIC CAPITAL LETTER TCHE (`U+A692`).
- CYRILLIC SMALL LETTER TCHE (`U+A693`).
- LATIN EPIGRAPHIC LETTER ARCHAIC M (`U+A7FF`).
- MODIFIER LETTER CYRILLIC SMALL YERU WITH BACK YER (`U+1E06C`).

View file

@ -113,7 +113,7 @@ glyph-block Letter-Cyrillic-BigYus : begin
include sf.rb.outer
create-glyph 'cyrl/BigYusIotified' 0x46C : glyph-proc
local df : include : DivFrame [mix 1 para.diversityM 2] 4
local df : include : DivFrame (para.diversityM ** 2) 4
include : df.markSet.capital
include : CyrIotifiedBigYusShape true df CAP 0.575

View file

@ -39,11 +39,11 @@ glyph-block Letter-Cyrillic-Che : begin
__ : VBar.r df.rightSB 0 top sw
include : cheBowl.shape
left -- df.leftSB
right -- df.rightSB
top -- top
left -- df.leftSB
right -- df.rightSB
top -- top
bottom -- (bar - DToothlessRise - 0.5 * sw)
sw -- sw
sw -- sw
local sf : SerifFrame.fromDf df top 0
include : tagged 'serifLT' : match slabType
@ -102,19 +102,19 @@ glyph-block Letter-Cyrillic-Che : begin
define [CyrTcheShape] : with-params [df top pyBar bodyType slabType [teSerifs SLAB] [sw : AdviceStroke 2.75] [yBarOffset DToothlessRise]] : glyph-proc
local bar : top * [fallback pyBar 0.5] + yBarOffset
local left : [mix df.leftSB df.rightSB 0.2] - [HSwToV : 0.25 * sw] + OX
local left : [mix df.leftSB df.rightSB : if (df.div > 1) 0.25 0.2] - [HSwToV : 0.25 * sw] + OX
local right : df.rightSB - OX
include : tagged 'strokeR' : match bodyType
[Just BODY.TAILED] : RightwardTailedBar right 0 top (sw -- sw)
__ : VBar.r right 0 top sw
include : dispiro
widths.lhs sw
flat left top [heading Downward]
curl left (bar - DToothlessRise + ArchDepthB - HalfStroke)
arch.lhs.centerAt.ltr.b [mix left right 0.5] (bar - DToothlessRise - HalfStroke)
g4 (right - 1 / 16) (bar - HalfStroke) [heading Rightward]
include : cheBowl.shape
left -- left
right -- right
top -- top
bottom -- (bar - DToothlessRise - 0.5 * sw)
sw -- sw
local xTopBarLeft : df.leftSB - SideJut
local xTopBarRight : mix xTopBarLeft (left + [HSwToV : 0.5 * sw]) 2
@ -136,9 +136,9 @@ glyph-block Letter-Cyrillic-Che : begin
__ : glyph-proc
if teSerifs : begin
local swVJut : Math.min [AdviceStroke 4.5] (0.625 * (left - xTopBarLeft))
include : VSerif.dl xTopBarLeft top VJut swVJut
include : VSerif.dr xTopBarRight top VJut swVJut
local swVJut : Math.min (0.625 * (left - xTopBarLeft)) : AdviceStroke 4.5
include : VSerif.dl xTopBarLeft top VJut swVJut
include : VSerif.dr xTopBarRight top VJut swVJut
create-glyph 'cyrl/Che' 0x427 : glyph-proc
include : MarkSet.capital
@ -166,9 +166,10 @@ glyph-block Letter-Cyrillic-Che : begin
foreach { suffix { doST doSB } } [Object.entries TcheConfig] : do
create-glyph "cyrl/Tche.\(suffix)" : glyph-proc
include : MarkSet.capital
include : LeaningAnchor.Below.VBar.r RightSB
include : CyrTcheShape [DivFrame 1] CAP [if SLAB 0.45 0.35] BODY.STRAIGHT
local df : include : DivFrame para.diversityT
include : df.markSet.capital
include : LeaningAnchor.Below.VBar.r df.rightSB
include : CyrTcheShape df CAP [if SLAB 0.45 0.35] BODY.STRAIGHT
if SLAB SERIFS.ALL SERIFS.NONE
teSerifs -- doST
@ -199,14 +200,16 @@ glyph-block Letter-Cyrillic-Che : begin
include : CyrCcheShape df XH [if SLAB 0.45 0.4] body
if SLAB [if para.isItalic slabItalic slabUpright] SERIFS.NONE
DefineSelectorGlyph "cyrl/tche" suffix [DivFrame 1] 'e'
define cyrTcheDf : DivFrame para.diversityT
DefineSelectorGlyph "cyrl/tche" suffix cyrTcheDf 'e'
foreach { suffixTe { doST doSB } } [Object.entries TcheConfig] : do
create-glyph "cyrl/tche.\(suffix).\(suffixTe)" : glyph-proc
set-width 0
set-mark-anchor 'cvDecompose' 0 0
include : LeaningAnchor.Below.VBar.r RightSB
include : CyrTcheShape [DivFrame 1] XH [if SLAB 0.45 0.4] body
include : LeaningAnchor.Below.VBar.r cyrTcheDf.rightSB
include : CyrTcheShape cyrTcheDf XH [if SLAB 0.45 0.4] body
if SLAB [if para.isItalic slabItalic slabUpright] SERIFS.NONE
teSerifs -- doST
@ -232,7 +235,7 @@ glyph-block Letter-Cyrillic-Che : begin
return : VBar.m Middle (yc + LongVJut * 0.8) (yc - LongVJut * 0.8) SwCheVBar
derive-composites 'cyrl/CheVBar' 0x4B8 'cyrl/Che' [CheVBarBarShape CAP : if SLAB 0.45 0.35]
derive-composites 'cyrl/cheVBar' 0x4B9 'cyrl/che' [CheVBarBarShape XH : if SLAB 0.45 0.40]
derive-composites 'cyrl/cheVBar' 0x4B9 'cyrl/che' [CheVBarBarShape XH : if SLAB 0.45 0.4]
define ShhaConfig : object
serifless SERIFS.NONE

View file

@ -56,21 +56,22 @@ glyph-block Letter-Cyrillic-De : begin
return : object desc xTopLeft xTopRight
define [CyrSoftDeShape top left right _sw vSlab] : glyph-proc
local descenderOverflow : if SLAB SideJut ((right - left) * 0.075)
define [CyrSoftDeShape top df _sw vSlab] : glyph-proc
local descenderOverflow : if SLAB SideJut ((df.rightSB - df.leftSB) * 0.075)
local sw : fallback _sw Stroke
local xm : if SLAB
[mix left right 0.625] + [HSwToV : 0.25 * sw]
mix left right 0.75
local xTopRight : mix left xm : StrokeWidthBlend 0.95 0.96
[mix df.leftSB df.rightSB 0.625] + [HSwToV : 0.25 * sw]
mix df.leftSB df.rightSB : if (df.div > 1) (2 / 3) (3 / 4)
local xTopRight : mix df.leftSB xm : StrokeWidthBlend 0.95 0.96
local xTopBarRightEnd : mix df.width df.rightSB : if vSlab 0.25 0.375
include : CyrDeShape top left xm _sw
include : CyrDeShape top df.leftSB xm sw
include : if SLAB
then : HBar.t (xTopRight + descenderOverflow) right top sw
else : HBar.t xTopRight right top sw
then : HBar.t (xTopRight + descenderOverflow) xTopBarRightEnd top sw
else : HBar.t xTopRight xTopBarRightEnd top sw
if vSlab : include : VSerif.dr right top VJut (sw * VJutStroke / Stroke)
if vSlab : include : VSerif.dr xTopBarRightEnd top VJut (VJutStroke * sw / Stroke)
create-glyph 'cyrl/De' 0x414 : glyph-proc
include : MarkSet.capital
@ -90,13 +91,13 @@ glyph-block Letter-Cyrillic-De : begin
local df : include : DivFrame para.diversityM 3
include : df.markSet.capital
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape CAP df.leftSB df.rightSB df.mvs false
include : CyrSoftDeShape CAP df df.mvs false
create-glyph 'cyrl/DeSoft.topRightSerifed' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.capital
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape CAP df.leftSB df.rightSB df.mvs true
include : CyrSoftDeShape CAP df df.mvs true
select-variant 'cyrl/DeSoft' 0xA662 (follow -- 'cyrl/EnGhe/GhePart')
@ -104,13 +105,13 @@ glyph-block Letter-Cyrillic-De : begin
local df : include : DivFrame para.diversityM 3
include : df.markSet.e
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape XH df.leftSB df.rightSB df.mvs false
include : CyrSoftDeShape XH df df.mvs false
create-glyph 'cyrl/deSoft.topRightSerifed' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.e
include : ExtendBelowBaseAnchors BottomExtension
include : CyrSoftDeShape XH df.leftSB df.rightSB df.mvs true
include : CyrSoftDeShape XH df df.mvs true
select-variant 'cyrl/deSoft' 0xA663 (follow -- 'cyrl/enghe/ghePart')

View file

@ -35,7 +35,7 @@ glyph-block Letter-Cyrillic-El : begin
include : HBar.m xCutLeft right (top - halfSw) sw
include : LegShape
ztop -- [Point.fromXY Point.Type.Corner xCutLeft top]
zbot -- [Point.fromXY Point.Type.Corner [mix SB 0 [if SLAB 1 0.75]] 0]
zbot -- [Point.fromXY Point.Type.Corner [mix SB 0 : if SLAB 1 0.75] 0]
xb -- xCutLeft
fine -- sw
@ -55,15 +55,16 @@ glyph-block Letter-Cyrillic-El : begin
[Just SLAB-LOWER] : HSerif.rb right 0 SideJut sw
__ : glyph-proc
define [CyrSoftElShape left right top bodyType slabType _sw vSlab] : glyph-proc
define [CyrSoftElShape df top bodyType slabType _sw vSlab] : glyph-proc
local sw : fallback _sw Stroke
local xm : if SLAB
[mix left right 0.625] + [HSwToV : 0.25 * sw]
mix left right 0.75
[mix df.leftSB df.rightSB 0.625] + [HSwToV : 0.25 * sw]
mix df.leftSB df.rightSB : if (df.div > 1) (2 / 3) (3 / 4)
local xTopBarRightEnd : mix df.width df.rightSB : if vSlab 0.25 0.375
include : CyrElShape left xm top bodyType slabType _sw
include : HBar.t xm right top sw
if vSlab : include : VSerif.dr right top VJut (sw * VJutStroke / Stroke)
include : CyrElShape df.leftSB xm top bodyType slabType sw
include : HBar.t xm xTopBarRightEnd top sw
if vSlab : include : VSerif.dr xTopBarRightEnd top VJut (VJutStroke * sw / Stroke)
create-glyph 'cyrl/El' 0x41B : glyph-proc
include : MarkSet.capital
@ -84,12 +85,12 @@ glyph-block Letter-Cyrillic-El : begin
create-glyph 'cyrl/ElSoft.serifless' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.capital
include : CyrSoftElShape df.leftSB df.rightSB CAP BODY-STRAIGHT [if SLAB SLAB-ALL SLAB-NONE] df.mvs false
include : CyrSoftElShape df CAP BODY-STRAIGHT [if SLAB SLAB-ALL SLAB-NONE] df.mvs false
create-glyph 'cyrl/ElSoft.topRightSerifed' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.capital
include : CyrSoftElShape df.leftSB df.rightSB CAP BODY-STRAIGHT [if SLAB SLAB-ALL SLAB-NONE] df.mvs true
include : CyrSoftElShape df CAP BODY-STRAIGHT [if SLAB SLAB-ALL SLAB-NONE] df.mvs true
select-variant 'cyrl/ElSoft' 0xA664 (follow -- 'cyrl/EnGhe/GhePart')
@ -122,7 +123,7 @@ glyph-block Letter-Cyrillic-El : begin
create-glyph "cyrl/elSoft.\(suffix).\(suffixGhe)" : glyph-proc
set-width 0
set-mark-anchor 'cvDecompose' 0 0
include : CyrSoftElShape cyrSoftElDf.leftSB cyrSoftElDf.rightSB XH body [if SLAB [if para.isItalic slabItalic slabUpright] SLAB-NONE] cyrSoftElDf.mvs cyrSoftElVSlab
include : CyrSoftElShape cyrSoftElDf XH body [if SLAB [if para.isItalic slabItalic slabUpright] SLAB-NONE] cyrSoftElDf.mvs cyrSoftElVSlab
select-variant "cyrl/elSoft.\(suffix)" (follow -- 'cyrl/enghe/ghePart')

View file

@ -98,7 +98,7 @@ glyph-block Letter-Cyrillic-SmallYus : begin
include sf.rb.outer
create-glyph : glyph-proc
local df : include : DivFrame [mix 1 para.diversityM 2] 4
local df : include : DivFrame (para.diversityM ** 2) 4
include : df.markSet.capital
create-forked-glyph 'cyrl/SmallYusIotified.straight'
CyrIotifiedSmallYusShape false true df CAP true

View file

@ -42,12 +42,12 @@ glyph-block Letter-Cyrillic-Tse : begin
serifless { false false }
motionSerifed { true false }
define [CyrTeTseShape top teSerifs] : glyph-proc
define [CyrTeTseShape df top teSerifs] : glyph-proc
local sw : AdviceStroke 2.75
local left : [mix SB RightSB 0.2] - [HSwToV : 0.25 * sw] + OX
local right : RightSB - OX
local left : [mix df.leftSB df.rightSB : if (df.div > 1) 0.25 0.2] - [HSwToV : 0.25 * sw] + OX
local right : df.rightSB - OX
local xTopBarLeft : SB - SideJut
local xTopBarLeft : df.leftSB - SideJut
local xTopBarRight : mix xTopBarLeft (left + [HSwToV : 0.5 * sw]) 2
include : VBar.l left 0 top sw
@ -67,18 +67,20 @@ glyph-block Letter-Cyrillic-Tse : begin
include sf.rb.outer
if teSerifs : begin
local swVJut : Math.min [AdviceStroke 4.5] (0.625 * (left - xTopBarLeft))
include : VSerif.dl xTopBarLeft top VJut swVJut
include : VSerif.dr xTopBarRight top VJut swVJut
local swVJut : Math.min (0.625 * (left - xTopBarLeft)) : AdviceStroke 4.5
include : VSerif.dl xTopBarLeft top VJut swVJut
include : VSerif.dr xTopBarRight top VJut swVJut
foreach { suffix { doST doSB } } [Object.entries TeTseConfig] : do
create-glyph "cyrl/TeTse.\(suffix)" : glyph-proc
include : MarkSet.capital
include : CyrTeTseShape CAP doST
local df : include : DivFrame para.diversityT
include : df.markSet.capital
include : CyrTeTseShape df CAP doST
create-glyph "cyrl/tetse.upright.\(suffix)" : glyph-proc
include : MarkSet.e
include : CyrTeTseShape XH doST
local df : include : DivFrame para.diversityT
include : df.markSet.e
include : CyrTeTseShape df XH doST
select-variant 'cyrl/TeTse' 0x4B4 (follow -- 'T/rtailBase')
select-variant 'cyrl/tetse.upright' (follow -- 'T/rtailBase')

View file

@ -448,14 +448,16 @@ glyph-block Letter-Latin-K : begin
if slabLB : include : UpperKLBSerif CAP Stroke xBarLeft slabLB
define [BashkirKaShape df top] : glyph-proc
local left : if SLAB ([mix SB RightSB 0.35] - [HSwToV : 0.5 * df.mvs]) [mix SB RightSB 0.2]
local left : if SLAB
[mix df.leftSB df.rightSB 0.35] - [HSwToV : 0.5 * df.mvs]
mix df.leftSB df.rightSB : if (df.div > 1) 0.25 0.2
local leftNB : left - [KBalance SLAB straightBar]
local xTopBarLeftEnd : mix 0 SB [if SLAB 0.25 0.375]
local xTopBarLeftEnd : mix 0 df.leftSB : if SLAB 0.25 0.375
local sw : AdviceStroke 3
include : HBar.t xTopBarLeftEnd (Stroke * 0.1 + left) top
include : HBar.t xTopBarLeftEnd (left + 0.1 * Stroke) top
include : VBar.l left 0 top sw
include : LegsImpl false leftNB RightSB sw top SLAB slabLegs
include : LegsImpl false leftNB df.rightSB sw top SLAB slabLegs
if SLAB : begin
include : VSerif.dl xTopBarLeftEnd top VJut
Math.min (VJutStroke * df.mvs / Stroke) (0.625 * (left - xTopBarLeftEnd))
@ -463,12 +465,12 @@ glyph-block Letter-Latin-K : begin
if slabLB : include : UpperKLBSerif top sw left slabLB
create-glyph "cyrl/KaBashkir.\(suffix)" : glyph-proc
define df : include : DivFrame 1
define df : include : DivFrame para.diversityT
include : df.markSet.capital
include : BashkirKaShape df CAP
create-glyph "cyrl/kaBashkir.\(suffix)" : glyph-proc
define df : include : DivFrame 1
define df : include : DivFrame para.diversityT
include : df.markSet.e
include : BashkirKaShape df XH

View file

@ -297,12 +297,12 @@ glyph-block Letter-Latin-U : begin
create-glyph "uDieresisSidewaysBase.\(suffix)" : glyph-proc
local df : DivFrame (XH / Width) 2 (XH * 0.1 / SB)
include : df.markSet.e
local ww : Width * para.diversityM
local ww : Width * para.diversityT
set-width ww
set-base-anchor 'cvDecompose' 0 0
include : PointingTo ww XH ww 0 : function [] : glyph-proc
include : Base df (ww - SB - 0.75 * para.diversityM * AccentHeight) Stroke
include : Slabs df (ww - SB - 0.75 * para.diversityM * AccentHeight)
include : Base df (ww - SB - 0.75 * para.diversityT * AccentHeight) Stroke
include : Slabs df (ww - SB - 0.75 * para.diversityT * AccentHeight)
include : Translate 0 (SB / 2)
select-variant 'U' 'U'
@ -422,7 +422,7 @@ glyph-block Letter-Latin-U : begin
# Sideways dieresis for U+1D1E
derive-glyphs "uDieresisSidewaysMark" null "dieresisAboveAlwaysUpright" : function [gns] : glyph-proc
local ww : Width * para.diversityM
local ww : Width * para.diversityT
set-width 0
set-mark-anchor 'cvDecompose' 0 0
include : PointingTo ww XH ww 0 : function [] : glyph-proc

View file

@ -74,17 +74,17 @@ glyph-block Letter-Latin-Upper-H : begin
define [EnGheShape Body df top slabType vSlab] : glyph-proc
local sw : AdviceStroke 2.75
local xRightBar : Math.min (Width - df.leftSB) : if SLAB
[mix df.rightSB df.leftSB 0.35] + [HSwToV : 0.5 * df.mvs]
mix df.rightSB df.leftSB 0.2
local xTopRight : mix df.width df.rightSB [if SLAB 0.25 0.375]
local xm : Math.min (Width - df.leftSB) : if SLAB
[mix df.leftSB df.rightSB 0.625] + [HSwToV : 0.25 * df.mvs]
mix df.leftSB df.rightSB : if (df.div > 1) (2 / 3) (3 / 4)
local xTopBarRightEnd : mix df.width df.rightSB : if vSlab 0.25 0.375
include : Body df.leftSB xRightBar top sw
include : HBar.t (xRightBar + O) xTopRight top
include : Body df.leftSB xm top sw
include : HBar.t (xm + O) xTopBarRightEnd top
include : HSerifs slabType top 0 df.leftSB xRightBar sw
include : HSerifs slabType top 0 df.leftSB xm sw
if vSlab
then : include : VSerif.dr xTopRight top VJut (df.mvs / HVContrast)
then : include : VSerif.dr xTopBarRightEnd top VJut (df.mvs / HVContrast)
else : eject-contour 'serifRT'
define [HwairShape df top yend slabType] : glyph-proc

View file

@ -95,7 +95,8 @@ glyph-block Letter-Latin-Upper-M : begin
define [CyrSoftEmShape] : with-params [top df form slabType slanted vSlab] : glyph-proc
local subDf : df.slice 4 3
local sidesSlope : if slanted 0.04 0
local xRightTop : subDf.rightSB - top * sidesSlope
local xTopRight : subDf.rightSB - top * sidesSlope
local xTopBarRightEnd : mix df.width df.rightSB : if vSlab 0.25 0.375
local swSideBot : match form
[Just FORM-SAN-SMALL] : AdviceStroke 2.5 subDf.div
@ -106,8 +107,8 @@ glyph-block Letter-Latin-Upper-M : begin
include : MShape top subDf form slabType slanted (kMidHang -- df.div)
include : HBar.t xRightTop df.rightSB top swSideBot
if vSlab : include : VSerif.dr df.rightSB top VJut (swSideBot * VJutStroke / Stroke)
include : HBar.t xTopRight xTopBarRightEnd top swSideBot
if vSlab : include : VSerif.dr xTopBarRightEnd top VJut (VJutStroke * swSideBot / Stroke)
define MConfig : SuffixCfg.combine
SuffixCfg.weave
@ -154,8 +155,8 @@ glyph-block Letter-Latin-Upper-M : begin
include : LeaningAnchor.Below.VBar.l df.leftSB
include : MShape XH df form slab slanted
define cyrSoftEmDf : DivFrame [mix 1 para.diversityM 2] 4
define cyrSoftemDf : DivFrame [mix 1 para.diversityM 1.5] 4
define cyrSoftEmDf : DivFrame (para.diversityM ** 2) 4
define cyrSoftemDf : DivFrame (para.diversityT * para.diversityM) 4
DefineSelectorGlyph "cyrl/EmSoft" suffix cyrSoftEmDf 'capital'
DefineSelectorGlyph "cyrl/emSoft" suffix cyrSoftemDf 'e'