From bf8131cd0bba6762cf29c677d79006b084c3062b Mon Sep 17 00:00:00 2001 From: John McWilliams <37010132+jmcwilliams403@users.noreply.github.com> Date: Mon, 20 Jan 2025 11:16:39 -0500 Subject: [PATCH] Make Cyrillic Lower Ef and Greek Phi Symbol use `SmallArchDepth`. (#2649) --- changes/32.5.0.md | 1 + packages/font-glyphs/src/letter/greek/phi.ptl | 27 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/changes/32.5.0.md b/changes/32.5.0.md index bb9ccef26..a1a2c82ba 100644 --- a/changes/32.5.0.md +++ b/changes/32.5.0.md @@ -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 (`ϕ`). diff --git a/packages/font-glyphs/src/letter/greek/phi.ptl b/packages/font-glyphs/src/letter/greek/phi.ptl index b20354dbb..dacf3d8a0 100644 --- a/packages/font-glyphs/src/letter/greek/phi.ptl +++ b/packages/font-glyphs/src/letter/greek/phi.ptl @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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