Skip to content

Commit

Permalink
Optimize glyphs/widths for five characters under Quasi-Proportional. (#…
Browse files Browse the repository at this point in the history
…2615)

* Optimize glyphs for Gha and Cyrillic Dche.

* Make two characters slightly wider.

* Cleanup of `upper-ae-oe.ptl`.

* Fix broken glyph for `cyrl/Dje` under heavy italic slab.

* Shrink diagonal tail of `cyrl/ef` under QP.
  • Loading branch information
jmcwilliams403 authored Dec 12, 2024
1 parent 8ad0efe commit 95db38b
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 33 deletions.
8 changes: 3 additions & 5 deletions changes/32.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- LATIN CAPITAL LETTER W WITH CIRCUMFLEX (`U+0174`) ... LATIN SMALL LETTER W WITH CIRCUMFLEX (`U+0175`).
- LATIN SMALL LETTER HV (`U+0195`).
- LATIN CAPITAL LETTER TURNED M (`U+019C`).
- LATIN CAPITAL LETTER GHA (`U+01A2`) ... LATIN SMALL LETTER GHA (`U+01A3`).
- LATIN CAPITAL LETTER AE WITH MACRON (`U+01E2`) ... LATIN SMALL LETTER AE WITH MACRON (`U+01E3`).
- LATIN CAPITAL LETTER HWAIR (`U+01F6`).
- LATIN CAPITAL LETTER AE WITH ACUTE (`U+01FC`) ... LATIN SMALL LETTER AE WITH ACUTE (`U+01FD`).
Expand Down Expand Up @@ -57,6 +56,8 @@
- LATIN CAPITAL LETTER W WITH GRAVE (`U+1E80`) ... LATIN SMALL LETTER W WITH DOT BELOW (`U+1E89`).
- LATIN SMALL LETTER W WITH RING ABOVE (`U+1E98`).
- LATIN SUBSCRIPT SMALL LETTER M (`U+2098`).
- TELEPHONE SIGN (`U+2121`).
- FACSIMILE SIGN (`U+213B`).
- MILL SIGN (`U+20A5`).
- WON SIGN (`U+20A9`).
- SMALL ROMAN NUMERAL ONE THOUSAND (`U+217F`) ... ROMAN NUMERAL ONE THOUSAND C D (`U+2180`).
Expand Down Expand Up @@ -91,8 +92,6 @@
- CYRILLIC SUBSCRIPT SMALL LETTER EF (`U+1E060`).
- CYRILLIC SUBSCRIPT SMALL LETTER SHA (`U+1E064`).
* Add characters:
- DOUBLE INTERSECTION (`U+22D2`).
- DOUBLE UNION (`U+22D3`).
- LEFT OUTER JOIN (`U+27D5`) ... FULL OUTER JOIN (`U+27D7`).
- Z NOTATION LEFT BINDING BRACKET (`U+2989`).
- Z NOTATION RIGHT BINDING BRACKET (`U+298A`).
Expand All @@ -111,6 +110,5 @@
- Z NOTATION RANGE ANTIRESTRICTION (`U+2A65`).
- SMALLER THAN (`U+2AAA`) ... LARGER THAN OR EQUAL TO (`U+2AAD`).
- CLOSED SUBSET (`U+2ACF`) ... CLOSED SUPERSET OR EQUAL TO (`U+2AD2`).
- ANTICLOCKWISE TRIANGLE-HEADED RIGHT U-SHAPED ARROW (`U+2B8C`) ... ANTICLOCKWISE TRIANGLE-HEADED TOP U-SHAPED ARROW (`U+2B8F`).
- RETURN LEFT (`U+2B90`) ... FOUR CORNER ARROWS CIRCLING ANTICLOCKWISE (`U+2B94`).
- ANTICLOCKWISE TRIANGLE-HEADED RIGHT U-SHAPED ARROW (`U+2B8C`) ... FOUR CORNER ARROWS CIRCLING ANTICLOCKWISE (`U+2B94`).
- DOWNWARDS TRIANGLE-HEADED ARROW WITH LONG TIP LEFTWARDS (`U+2BA0`) ... RIGHTWARDS TRIANGLE-HEADED ARROW WITH LONG TIP DOWNWARDS (`U+2BA7`).
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/auto-build/composite.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ glyph-block Autobuild-Pnonetic-Ligatures : begin
list 0xFB03 { 'f/compLigLeft1' 'f/compLigLeft1' 'dotlessi/compLigRight' } null
list 0xFB04 { 'f/compLigLeft3' 'f/compLigLeft2' 'l/compLigRight' } null

createPhoneticLigatures ToLetter 'phoneticSmcp' para.diversityMM 3 1 0.5 : list
createPhoneticLigatures ToLetter 'phoneticSmcp' (para.diversityT * para.diversityMM) 3 1 0.5 : list
list 0x2121 { 'smcpT' 'smcpE' 'smcpL' } 'e'
list 0x213B { 'smcpF' 'smcpA' 'smcpX' } 'e'

Expand Down
10 changes: 6 additions & 4 deletions packages/font-glyphs/src/letter/cyrillic/dche.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ glyph-block Letter-Cyrillic-Dche : begin
create-glyph 'cyrl/Dche' 0x52C : glyph-proc
include : MarkSet.capital
include : ExtendBelowBaseAnchors BottomExtension
include : CyrCheShape [DivFrame 1] CAP [if SLAB 0.5 0.4] BODY.STRAIGHT
include : CyrCheShape [DivFrame 1] CAP [if SLAB 0.45 0.4] BODY.STRAIGHT
if SLAB SERIFS.TOP SERIFS.NONE
include : CyrDeBottom SB RightSB

Expand All @@ -26,7 +26,7 @@ glyph-block Letter-Cyrillic-Dche : begin
create-glyph 'cyrl/dche.upright' : glyph-proc
include : MarkSet.e
include : ExtendBelowBaseAnchors BottomExtension
include : CyrCheShape [DivFrame 1] XH [if SLAB 0.5 0.4] BODY.STRAIGHT
include : CyrCheShape [DivFrame 1] XH [if SLAB 0.45 0.4] BODY.STRAIGHT
if SLAB SERIFS.TOP SERIFS.NONE
include : CyrDeBottom SB RightSB

Expand All @@ -40,10 +40,12 @@ glyph-block Letter-Cyrillic-Dche : begin
define df : include : DivFrame para.diversityM 3
include : df.markSet.e

local subDf : df.slice 3 2 OX
local gap : 0.375 * (df.width - 2 * df.leftSB - 2.5 * df.mvs) - [HSwToV : 0.25 * df.mvs]
local divSub : (df.width - gap - df.mvs) / Width
local subDf : DivFrame divSub 2
include : CyrDeItalicShapeT dispiro subDf df.mvs
include : difference
CyrCheShape df XH 0.5 body [if SLAB slabItalic SERIFS.NONE] (sw -- df.mvs)
MaskLeft df.middle
MaskLeft : subDf.rightSB - [HSwToV : 0.5 * df.mvs]

select-variant 'cyrl/dche.italic' (follow -- 'cyrl/che')
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/cyrillic/dje.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ glyph-block Letter-Cyrillic-Dje : begin
include : MidHook.general
left -- (left + [HSwToV sw])
right -- right
top -- [Math.min XH : if SLAB (CAP - 1.25 * VJut) XH]
top -- [Math.min XH : if SLAB (CAP - VJut - sw / 4) XH]
bottom -- (Hook + sw / 2 + O)
ada -- ArchDepthA
adb -- ArchDepthB
Expand Down
2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/cyrillic/tshe.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ glyph-block Letter-Cyrillic-Tshe : begin
include : nShoulder.shape
left -- (left + [HSwToV sw])
right -- right
top -- [Math.min XH : if SLAB (CAP - 1.25 * VJut) XH]
top -- [Math.min XH : if SLAB (CAP - VJut - sw / 4) XH]
stroke -- sw
include : VBar.l left 0 CAP sw
include : HBar.t xTopBarLeft xTopBarRight CAP sw
Expand Down
8 changes: 4 additions & 4 deletions packages/font-glyphs/src/letter/greek/phi.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ glyph-block Letter-Greek-Phi : begin
define [CursiveBar df y1 y2 y3 y4 sw] : glyph-proc
local hd : FlatHookDepth df

local xCrossLeft : mix 0 df.leftSB [mix 1 df.div 2]
local xCrossRight : mix df.width df.rightSB [mix 1 df.div 2]
local xCrossLeft : mix 0 df.leftSB : mix 1 df.div 2
local xCrossRight : mix df.width df.rightSB : mix 1 df.div 2

local xBarLeft : df.middle - [HSwToV : 0.5 * sw]
local xBarRight : df.middle + [HSwToV : 0.5 * sw]
Expand All @@ -88,7 +88,7 @@ glyph-block Letter-Greek-Phi : begin
define [DiagonalTailCursiveBar df y1 y2 y3 y4 sw] : glyph-proc
local hd : FlatHookDepth df

local xCrossRight : mix df.width df.rightSB [mix 1 df.div 2]
local xCrossRight : mix df.width df.rightSB : mix 1 df.div 2
local xBarLeft : df.middle - [HSwToV : 0.5 * sw]

include : dispiro
Expand All @@ -100,7 +100,7 @@ glyph-block Letter-Greek-Phi : begin

include : dispiro
flat df.middle (y2 - O) [widths.center.heading sw Downward]
DiagTail.L df.middle y1 [DiagTail.StdDepth df sw] sw
DiagTail.L df.middle y1 [DiagTail.StdDepth [DivFrame para.diversityF] sw] sw

define [MtSerif df y sw] : tagged 'serifMT' : HSerif.lt df.middle y Jut sw
define [MbSerif df y sw] : tagged 'serifMB' : HSerif.mb df.middle y Jut sw
Expand Down
25 changes: 14 additions & 11 deletions packages/font-glyphs/src/letter/latin-ext/gha.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ glyph-block Letter-Latin-Gha : begin
define TERMINAL-TAILED 1
define TERMINAL-DIAG 2

define [GhaShape df terminal top bot slab] : glyph-proc
local abarRight : df.middle + [HSwToV : 0.5 * df.mvs]
local ada : ArchDepthAOf [Math.max (df.mvs * 1.125) (SmallArchDepth * 0.6 * df.div)] (Width * df.div)
local adb : ArchDepthBOf [Math.max (df.mvs * 1.125) (SmallArchDepth * 0.6 * df.div)] (Width * df.div)
include : OShape top 0 df.leftSB abarRight df.mvs ada adb
define [GhaShape df terminal top bot _ada _adb slab] : glyph-proc
local gap : 0.375 * (df.width - 2 * df.leftSB - 2.5 * df.mvs) - [HSwToV : 0.25 * df.mvs]
local divSub : (df.width - gap - df.mvs) / Width
local subDf : DivFrame divSub 2

local ada : _ada * 0.7 * df.div
local adb : _adb * 0.7 * df.div
include : OShape top 0 subDf.leftSB subDf.rightSB df.mvs ada adb
include : match terminal
[Just TERMINAL-NORMAL] : VBar.r (df.rightSB - O) bot top df.mvs
[Just TERMINAL-TAILED] : RightwardTailedBar (df.rightSB - O) bot top df.mvs
[Just TERMINAL-DIAG] : RDiagTailedBar (df.rightSB - O) bot top df.mvs
include : dispiro
widths.lhs df.mvs
flat df.middle (top - adb) [heading Rightward]
curl (df.middle + 1) (top - adb) [heading Rightward]
flat (subDf.rightSB - [HSwToV : 0.5 * df.mvs]) (top - adb) [heading Rightward]
curl (subDf.rightSB - [HSwToV : 0.5 * df.mvs] + TINY) (top - adb) [heading Rightward]
alsoThru 0.5 0.15
g4 (df.rightSB - O - [HSwToV df.mvs]) top [widths 0 df.mvs]

Expand All @@ -44,15 +47,15 @@ glyph-block Letter-Latin-Gha : begin

foreach { suffix { terminal doSerif } } [Object.entries GhaConfig] : do
create-glyph "Gha.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityMM 3
local df : include : DivFrame para.diversityM 3
include : df.markSet.capDesc
include : GhaShape df terminal CAP Descender doSerif
include : GhaShape df terminal CAP Descender ArchDepthA ArchDepthB doSerif
include : LeaningAnchor.Below.VBar.r (df.rightSB - O)

create-glyph "gha.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityMM 3
local df : include : DivFrame para.diversityM 3
include : df.markSet.p
include : GhaShape df terminal XH Descender doSerif
include : GhaShape df terminal XH Descender SmallArchDepthA SmallArchDepthB doSerif
include : LeaningAnchor.Below.VBar.r (df.rightSB - O)

select-variant 'Gha' 0x1A2 (follow -- 'gha')
Expand Down
12 changes: 6 additions & 6 deletions packages/font-glyphs/src/letter/latin-ext/upper-ae-oe.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ glyph-block Letter-Latin-Upper-AE-OE : begin


define [AEAHalfStraight df top eleft sw] : glyph-proc
define StraightSbShrink : mix 1 (DesignParameters.straightVShapeSbShrink * [StrokeWidthBlend 1 0.75]) [if SLAB 0.75 1]
define StraightSbShrink : mix 1 (DesignParameters.straightVShapeSbShrink * [StrokeWidthBlend 1 0.75]) : if SLAB 0.75 1
define fine : sw * CThin * 1.15
define pInktrap : 2 / 3
define clearance : 0 - OX
Expand Down Expand Up @@ -76,13 +76,13 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
define ada : df.archDepthA ArchDepth sw
define adb : df.archDepthB ArchDepth sw

local yMidDepth : if (top > ada + adb) ada (top * (ada / (ada + adb)))
local yMidLeft : if (top > ada + adb) (top - ada) : mix top 0 (ada / (ada + adb))

include : HBar.t df.leftSB eleft (XH * 0.75 / CAP * top) sw
include : dispiro
widths.rhs sw
flat df.leftSB 0 [heading Upward]
curl df.leftSB (top - yMidDepth)
curl df.leftSB yMidLeft
arcvh
straight.right.end eleft top [heading Rightward]

Expand Down Expand Up @@ -111,7 +111,7 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
define eBarPos DesignParameters.upperEBarPos
define sw : AESW df top
define eleft : df.middle - [HSwToV : 0.25 * sw]
define swVJut : Math.min sw ((df.rightSB - eleft - [HSwToV sw]) * (4 / 5))
define swVJut : Math.min sw : (df.rightSB - eleft - [HSwToV sw]) * (4 / 5)

local xMidRight : df.rightSB - sw / 4
local yBar : top * eBarPos
Expand All @@ -132,8 +132,8 @@ glyph-block Letter-Latin-Upper-AE-OE : begin
local fine : swVJut * [AdviceStroke 3.5] / Stroke
include : VBar.r xMidRight (yBar - jutMid) (yBar + jutMid) fine

do "P/Ya Half"
glyph-block-import Letter-Latin-Upper-P : PShape PBarPosY
do "Ya Half"
glyph-block-import Letter-Latin-Upper-P : PShape
glyph-block-import Letter-Latin-Upper-R : RevRShape RConfig RBarPos

foreach { suffix { legShape fOpen fTailed {slabs revSlabs doLegSlab} } } [Object.entries RConfig] : begin
Expand Down

0 comments on commit 95db38b

Please sign in to comment.