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

Make unsplit variants of Cyrillic Lower Ef and non-cursive variants of Greek Lower Phi use SmallArchDepth{A|B}. #2649

Merged
merged 1 commit into from
Jan 20, 2025
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
1 change: 1 addition & 0 deletions changes/32.5.0.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Add variant selector for decorative angle brackets (U+276C...U+2771) (#2603, #2623).
* Optimize metrics for bowl of Cyrillic Lower Ef (`ф`) and Greek Small Letter Phi Symbol (`ϕ`).
27 changes: 13 additions & 14 deletions packages/font-glyphs/src/letter/greek/phi.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ glyph-block Letter-Greek-Phi : begin
glyph-block-import Mark-Adjustment : ExtendAboveBaseAnchors ExtendBelowBaseAnchors
glyph-block-import Letter-Shared-Shapes : FlatHookDepth DiagTail OBarLeft OBarRight

define [VarPhiRing fFlatTB df y2 y3] : glyph-proc
define [VarPhiRing fFlatTB df y2 y3 ada adb] : glyph-proc
include : VBar.m df.middle y2 y3 df.mvs
include : if fFlatTB
OShapeFlatTB y3 y2 df.leftSB df.rightSB df.mvs df.archDepthA df.archDepthB
OShapeFlatTB y3 y2 df.leftSB df.rightSB df.mvs ada adb
Math.max (0.25 * (df.rightSB - df.leftSB)) : HSwToV df.mvs
OShape y3 y2 df.leftSB df.rightSB df.mvs df.archDepthA df.archDepthB
OShape y3 y2 df.leftSB df.rightSB df.mvs ada adb

define [CyrlEfSplitRing fFlatTB df y2 y3] : glyph-proc
local subDf : df.slice 3 2 OX
define [CyrlEfSplitRing fFlatTB df y2 y3 ada adb] : glyph-proc
include : VBar.m df.middle y2 y3 df.mvs
include : union
include : let [subDf : df.slice 3 2 OX] : union
OBarRight.shape
top -- y3
bot -- y2
Expand All @@ -39,7 +38,7 @@ glyph-block Letter-Greek-Phi : begin
ada -- subDf.smallArchDepthA
adb -- subDf.smallArchDepthB

define [GrekLowerPhiCursiveRing fFlatTB df y2 y3] : glyph-proc
define [GrekLowerPhiCursiveRing fFlatTB df y2 y3 ada adb] : glyph-proc
local l : df.leftSB + OX * 2
local r : df.width - l
include : dispiro
Expand Down Expand Up @@ -104,7 +103,7 @@ glyph-block Letter-Greek-Phi : begin
define [GrekCapitalPhiImpl fFlatTB df] : glyph-proc
local y2 : mix [if SLAB Stroke 0] [if SLAB (CAP - Stroke) CAP] 0.125
local y3 : mix [if SLAB Stroke 0] [if SLAB (CAP - Stroke) CAP] 0.875
include : VarPhiRing fFlatTB df y2 y3
include : VarPhiRing fFlatTB df y2 y3 df.archDepthA df.archDepthB
include : StraightBar df 0 y2 y3 CAP

if SLAB : begin
Expand Down Expand Up @@ -133,7 +132,7 @@ glyph-block Letter-Greek-Phi : begin
include : ExtendAboveBaseAnchors top
include : ExtendBelowBaseAnchors bot

include : VarPhiRing true df 0 CAP
include : VarPhiRing true df 0 CAP df.archDepthA df.archDepthB
include : StraightBar df bot 0 CAP top

if SLAB : begin
Expand All @@ -143,24 +142,24 @@ glyph-block Letter-Greek-Phi : begin
create-glyph 'taillessphi' 0x2C77 : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.e
include : GrekLowerPhiCursiveRing false df 0 XH
include : GrekLowerPhiCursiveRing false df 0 XH df.smallArchDepthA df.smallArchDepthB

create-glyph 'grek/phi.cursive' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.p
include : GrekLowerPhiCursiveRing false df 0 XH
include : GrekLowerPhiCursiveRing false df 0 XH df.smallArchDepthA df.smallArchDepthB
include : VBar.m df.middle Descender (0.2 * df.mvs)

create-glyph 'grek/phi.straight' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.bp
include : VarPhiRing false df 0 XH
include : VarPhiRing false df 0 XH df.smallArchDepthA df.smallArchDepthB
include : StraightBar df Descender 0 XH Ascender

create-glyph 'grek/phi.neohellenic' : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.p
include : VarPhiRing false df 0 XH
include : VarPhiRing false df 0 XH df.smallArchDepthA df.smallArchDepthB
include : VBar.m df.middle Descender (0.2 * df.mvs)

select-variant 'grek/phi' 0x3C6
Expand Down Expand Up @@ -189,7 +188,7 @@ glyph-block Letter-Greek-Phi : begin
create-glyph "cyrl/ef.\(suffix)" : glyph-proc
local df : include : DivFrame div 3
include : df.markSet.bp
include : Bowl true df 0 XH
include : Bowl true df 0 XH df.smallArchDepthA df.smallArchDepthB
local vs : fallback barSw df.mvs
include : Bar df Descender 0 XH Ascender vs
if sMT : include : sMT df Ascender vs
Expand Down
Loading