Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous optimizations for metrics of certain phonetic/etc. characters. #2504

Merged
merged 5 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changes/31.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Improve widths of overline marks of Serbian italic lower Ghe/Pe/Te.
* Remove crossbar variants for `Z`/`z` when under Polish locale (`PLK`) to avoid confusion with the handwritten `Ż`/`ż` allograph, `Ƶ`/`ƶ`.
* Make serif variants for Latin Capital/Small Schwa (`Ə`/`ə`) only appear under Turkic (Turkish/Azerbaijani/etc.) locales (`TRK`, `AZE`, `GAG`, `KAZ`, `TAT`, `CRT`) as other languages that use Latin Schwa (including the IPA) unify its metrics with Open O (`Ɔ`/`ɔ`) or a literal Turned E (`Ǝ`/`ǝ`).
* Make serifs of Latin Letter Small Capital I (`ɪ`) slightly wider under Quasi-Proportional.
* Make Cyrillic Small Letter Komi Dje (`ԃ`) slightly wider under Quasi-Proportional.
* Make Latin Capital Letter Small Capital I (`Ɪ`) slightly wider under Etoile.
* Add Characters:
- CYRILLIC CAPITAL LETTER TJE (`U+1C89`) ... CYRILLIC SMALL LETTER TJE (`U+1C8A`).
- COMPOSITION SYMBOL (`U+2384`).
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/cyrillic/tje.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ glyph-block Letter-Cyrillic-Tje : begin
left -- [mix df.leftSB df.rightSB 0.3] + OX
right -- df.rightSB
stroke -- df.mvs
bowl -- [Math.min (YeriBarPos * top + HalfStroke) (top - 1.25 * jutTop)]
bowl -- YeriBarPos * top + [Math.min HalfStroke jutMid]
eject-contour 'serifYeriLT'
eject-contour 'serifYeriLB'

Expand Down
7 changes: 3 additions & 4 deletions packages/font-glyphs/src/letter/greek/lower-epsilon.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ glyph-block Letter-Greek-Lower-Epsilon : begin

glyph-block-export CyrZe
define [CyrZe] : with-params [
slabTop slabBot top bot left right blend hook _stroke
slabTop slabBot top bot left right blend hook [stroke : AdviceStroke2 2 3 (top - bot)]
[xo OX] [yo O] [op OverlayPos] [ada2 SmallArchDepthA] [adb2 SmallArchDepthB]
] : namespace
export : define [Dim] : begin
local stroke : fallback _stroke : AdviceStroke2 2 3 (top - bot)
local midx : mix right left blend
local midy : mix bot top op
local topHeight : top - bot
Expand Down Expand Up @@ -247,15 +246,15 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
include : let [zeNoO : CyrZe slabTop slabBot CAP 0 SB RightSB StdBlend Hook (xo -- 0) (yo -- 0)]
difference
VBar.m Middle (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
zeNoO.ShapeMask

create-glyph "cyrl/dhe.\(suffix)" : glyph-proc
include [refer-glyph "cyrl/ze.\(suffix)"] AS_BASE ALSO_METRICS
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
include : let [zeNoO : CyrZe slabTop slabBot XH 0 SB RightSB StdBlend SHook (xo -- 0) (yo -- 0)]
difference
VBar.m Middle (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
zeNoO.ShapeMask

create-glyph "cyrl/DzjeKomi.\(suffix)" : glyph-proc
Expand Down
4 changes: 2 additions & 2 deletions packages/font-glyphs/src/letter/latin/c.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ glyph-block Letter-Latin-C : begin
include [refer-glyph src] AS_BASE ALSO_METRICS
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
include : difference
VBar.m Middle (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
OShapeOutline.NoOvershoot CAP 0 SB RightSB Stroke ArchDepthA ArchDepthB

derive-multi-part-glyphs 'cyrl/The.BSH' null { 'cyrl/Es' 'invCommaBelow' } : lambda [srcs gr] : glyph-proc
Expand All @@ -375,7 +375,7 @@ glyph-block Letter-Latin-C : begin
include [refer-glyph src] AS_BASE ALSO_METRICS
include : ExtendBelowBaseAnchors (-LongJut + 0.5 * Stroke)
include : difference
VBar.m Middle (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
VBar.m [arch.adjust-x.bot Middle] (-LongJut + 0.5 * Stroke) (Stroke + O) [AdviceStroke 3.5]
OShapeOutline.NoOvershoot XH 0 SB RightSB Stroke SmallArchDepthA SmallArchDepthB

derive-multi-part-glyphs 'cyrl/the.BSH' null { 'cyrl/es' 'invCommaBelow' } : lambda [srcs gr] : glyph-proc
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/latin/lower-d.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ glyph-block Letter-Latin-Lower-D : begin
include : LeaningAnchor.Above.VBar.r df.rightSB

if [not bottomSerif] : create-glyph "cyrl/djeKomi.\(suffix)" : glyph-proc
local df : DivFrame 1 3
local df : include : DivFrame para.diversityM 3
include : df.markSet.b

local dfHalf : df.slice 3 2
Expand Down
16 changes: 9 additions & 7 deletions packages/font-glyphs/src/letter/latin/upper-i.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ glyph-block Letter-Latin-Upper-I : begin
define [ISeriflessShape df top bot jut] : glyph-proc
include : VBar.m df.middle bot top

define [ISerifShape df top bot jut] : glyph-proc
define [ISerifShapeImpl df top bot jut] : glyph-proc
include : VBar.m df.middle bot top
include : HSerif.mb df.middle bot (jut * df.div)
include : HSerif.mt df.middle top (jut * df.div)
set-base-anchor 'trailing' (df.middle + jut * df.div) bot
include : HSerif.mb df.middle bot jut
include : HSerif.mt df.middle top jut
set-base-anchor 'trailing' (df.middle + jut) bot

define [ISerifShape df top bot jut] : ISerifShapeImpl df top bot (jut * df.div)

define UpperIConfig : object
'straight' { para.diversityI ISeriflessShape LongJut }
Expand Down Expand Up @@ -63,13 +65,13 @@ glyph-block Letter-Latin-Upper-I : begin
create-glyph 'smcpI' 0x26A : glyph-proc
local df : include : DivFrame para.diversityI
include : df.markSet.e
include : ISerifShape df XH 0 MidJutCenter
include : ISerifShapeImpl df XH 0 MidJutCenter

CreateAccentedComposition 'smcpIBarOver' 0x1D7B 'smcpI' 'barOver'

glyph-block-import Letter-Blackboard : BBS BBD BBBarCenter
create-glyph 'mathbb/I' 0x1D540 : glyph-proc
include : MarkSet.capital
include : BBBarCenter Middle 0 CAP
include : HBar.t (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) CAP BBS
include : HBar.b (Middle - BBD / 2 - Jut) (Middle + BBD / 2 + Jut) 0 BBS

CreateAccentedComposition 'smcpIBarOver' 0x1D7B 'smcpI' 'barOver'
18 changes: 9 additions & 9 deletions packages/font-glyphs/src/letter/latin/upper-t.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,8 @@ glyph-block Letter-Latin-Upper-T : begin
CreateAccentedComposition 'TCedilla' 0x0162 'T' 'cedillaBelow'
CreateAccentedComposition 'TComma' 0x021A 'T' 'commaBelow'

create-glyph 'mathbb/T' 0x1D54B : glyph-proc
local df : DivFrame 1
include : df.markSet.capital
include : HBar.t [TLeftX df] [TRightX df] CAP BBS
include : VBar.m (df.middle - BBD / 2) 0 CAP BBS
include : VBar.m (df.middle + BBD / 2) 0 CAP BBS
include : HBar.b (df.middle - BBD / 2) (df.middle + BBD / 2) 0 BBS

create-glyph 'capitalSmcpI' 0xA7AE : glyph-proc
local df : include : DivFrame 1
local df : include : DivFrame [if SLAB [mix 1 para.diversityM 0.5] 1]
include : df.markSet.capital
local l : TLeftX df
local r : TRightX df
Expand All @@ -218,3 +210,11 @@ glyph-block Letter-Latin-Upper-T : begin
include : tagged 'serifLT' : VSerif.dl l CAP VJut
include : tagged 'serifRB' : VSerif.ur r 0 VJut
include : tagged 'serifLB' : VSerif.ul l 0 VJut

create-glyph 'mathbb/T' 0x1D54B : glyph-proc
local df : DivFrame 1
include : df.markSet.capital
include : HBar.t [TLeftX df] [TRightX df] CAP BBS
include : VBar.m (df.middle - BBD / 2) 0 CAP BBS
include : VBar.m (df.middle + BBD / 2) 0 CAP BBS
include : HBar.b (df.middle - BBD / 2) (df.middle + BBD / 2) 0 BBS
24 changes: 15 additions & 9 deletions packages/font-glyphs/src/symbol/punctuation/brackets.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,26 @@ glyph-block Symbol-Punctuation-Brackets : begin
turned "parenRight.\(suffix)" null "parenLeft.\(suffix)" Middle SymbolMid
turned "doubleParenRight.\(suffix)" null "doubleParenLeft.\(suffix)" Middle SymbolMid

create-glyph "parenLeftUHalf.\(suffix)" : intersection
refer-glyph "parenLeft.\(suffix)"
MaskAbove SymbolMid
create-glyph "parenLeftLHalf.\(suffix)" : intersection
refer-glyph "parenLeft.\(suffix)"
MaskBelow SymbolMid

turned "parenRightUHalf.\(suffix)" null "parenLeftLHalf.\(suffix)" Middle SymbolMid
turned "parenRightLHalf.\(suffix)" null "parenLeftUHalf.\(suffix)" Middle SymbolMid

select-variant 'parenLeft' '('
select-variant 'parenRight' ')'
select-variant 'doubleParenLeft' 0x2E28 (follow -- 'parenLeft')
select-variant 'doubleParenRight' 0x2E29 (follow -- 'parenRight')

select-variant 'parenLeftUHalf' 0x2E59 (follow -- 'parenLeft')
select-variant 'parenRightUHalf' 0x2E5A (follow -- 'parenRight')
select-variant 'parenLeftLHalf' 0x2E5B (follow -- 'parenLeft')
select-variant 'parenRightLHalf' 0x2E5C (follow -- 'parenRight')

alias 'flattenedParenLeft' 0x27EE 'parenLeft.flatArc'
alias 'flattenedParenRight' 0x27EF 'parenRight.flatArc'

Expand Down Expand Up @@ -140,15 +155,6 @@ glyph-block Symbol-Punctuation-Brackets : begin

turned 'zNotationParenRight' 0x2988 'zNotationParenLeft' Middle SymbolMid

create-glyph 'parenLeftUHalf' 0x2E59 : intersection
refer-glyph 'parenLeft'
MaskAbove SymbolMid
create-glyph 'parenLeftLHalf' 0x2E5B : intersection
refer-glyph 'parenLeft'
MaskBelow SymbolMid
turned 'parenRightUHalf' 0x2E5A 'parenLeftLHalf' Middle SymbolMid
turned 'parenRightLHalf' 0x2E5C 'parenLeftUHalf' Middle SymbolMid

define Bracket : namespace
export : define [HDim barLeft ext] : namespace
export : define l : fallback barLeft : [mix SB RightSB DesignParameters.bracketOutside] - [HSwToV DesignParameters.bracketOutsideSwAdj] * Stroke
Expand Down