From 63b0e95b98c425f29e1c2fc73ea2c2bda0b35b43 Mon Sep 17 00:00:00 2001 From: John McWilliams <37010132+jmcwilliams403@users.noreply.github.com> Date: Thu, 22 May 2025 21:27:40 -0400 Subject: [PATCH] =?UTF-8?q?Optimize=20glyph=20of=20o-part=20of=20Numero=20?= =?UTF-8?q?sign=20(`=E2=84=96`).=20(#2780)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changes/33.2.4.md | 1 + packages/font-glyphs/src/letter/latin/o.ptl | 29 +++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/changes/33.2.4.md b/changes/33.2.4.md index 874f3dd8b..f215a2e29 100644 --- a/changes/33.2.4.md +++ b/changes/33.2.4.md @@ -11,6 +11,7 @@ - TENGE SIGN (`U+20B8`). - TURKISH LIRA SIGN (`U+20BA`). - MANAT SIGN (`U+20BC`). + - NUMERO SIGN (`U+2116`). - DOUBLE STRUCK CAPITAL GAMMA (`U+213E`). - LATIN CAPITAL LETTER LAMBDA WITH STROKE (`U+A7DC`). - LATIN SMALL LETTER SCRIPT R (`U+AB4B`). diff --git a/packages/font-glyphs/src/letter/latin/o.ptl b/packages/font-glyphs/src/letter/latin/o.ptl index 48483ba5e..e0b3623e0 100644 --- a/packages/font-glyphs/src/letter/latin/o.ptl +++ b/packages/font-glyphs/src/letter/latin/o.ptl @@ -8,7 +8,6 @@ glyph-module glyph-block Letter-Latin-O : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives - glyph-block-import Mark-Shared-Metrics : markHalfStroke glyph-block-import Mark-Horn-And-Angle : HornBaseAnchor glyph-block-import Mark-Above : RingDims RingShape glyph-block-import Mark-Adjustment : ExtendAboveBaseAnchors ExtendBelowBaseAnchors @@ -54,22 +53,20 @@ glyph-block Letter-Latin-O : begin define df : include : DivFrame para.advanceScaleT 3 include : df.markSet.capital local dist : df.rightSB - df.leftSB - local gap : Math.min + include : OShapeFlatTB CAP 0 df.leftSB df.rightSB df.mvs df.archDepthA df.archDepthB : Math.min Math.max (0.25 * dist) [HSwToV : Math.SQRT2 * rBroadOn] Math.max (dist - [HSwToV : 3 * df.mvs]) [HSwToV df.mvs] - include : OShapeFlatTB CAP 0 df.leftSB df.rightSB df.mvs df.archDepthA df.archDepthB gap - include : DotAt df.middle (df.mvs / 2 + O) rBroadOn + include : DotAt df.middle (0 + df.mvs / 2 + O) rBroadOn include : DotAt df.middle (CAP - df.mvs / 2 - O) rBroadOn create-glyph 'cyrl/broadOn' 0x47B : glyph-proc define df : include : DivFrame para.advanceScaleT 3 include : df.markSet.e local dist : df.rightSB - df.leftSB - local gap : Math.min + include : OShapeFlatTB XH 0 df.leftSB df.rightSB df.mvs df.smallArchDepthA df.smallArchDepthB : Math.min Math.max (0.25 * dist) [HSwToV : Math.SQRT2 * rBroadOn] Math.max (dist - [HSwToV : 3 * df.mvs]) [HSwToV df.mvs] - include : OShapeFlatTB XH 0 df.leftSB df.rightSB df.mvs df.smallArchDepthA df.smallArchDepthB gap - include : DotAt df.middle (df.mvs / 2 + O) rBroadOn + include : DotAt df.middle (0 + df.mvs / 2 + O) rBroadOn include : DotAt df.middle (XH - df.mvs / 2 - O) rBroadOn derive-multi-part-glyphs 'OHorn' 0x01A0 {'O' 'longHorn'} : function [srcs gr] : glyph-proc @@ -98,14 +95,16 @@ glyph-block Letter-Latin-O : begin local fine : 0.5 * OverlayStroke include [refer-glyph 'O'] AS_BASE include : dispiro - flat (SB + O + fine) [mix CAP 0 1.05] [widths.center : 2 * fine] + widths.center (2 * fine) + flat (SB + O + fine) [mix CAP 0 1.05] curl (RightSB - O - fine) [mix 0 CAP 1.05] create-glyph 'oSlash' 0xF8 : glyph-proc local fine : 0.5 * OverlayStroke include [refer-glyph 'o'] AS_BASE include : dispiro - flat (SB + O + fine) [mix XH 0 1.05] [widths.center : 2 * fine] + widths.center (2 * fine) + flat (SB + O + fine) [mix XH 0 1.05] curl (RightSB - O - fine) [mix 0 XH 1.05] create-glyph 'oSideways' 0x1D11 : glyph-proc @@ -119,7 +118,8 @@ glyph-block Letter-Latin-O : begin local fine : 0.5 * OverlayStroke include : OShape (Width - SB / 2) (SB / 2) (XH * 0.1) (XH * 0.9) nothing nothing nothing include : dispiro - flat (SB + O + fine) [mix Width 0 1.05] [widths.center : 2 * fine] + widths.center (2 * fine) + flat (SB + O + fine) [mix Width 0 1.05] curl (XH - SB - O - fine) [mix 0 Width 1.05] create-glyph 'Obar' 0x19F : glyph-proc @@ -272,8 +272,9 @@ glyph-block Letter-Latin-O : begin CreateAccentedComposition 'oDieresis' 0xF6 'o' 'dieresisAbove' create-glyph 'numeroRightHalf' : glyph-proc - include : OShape XH [Math.max (CAP * 0.1) (Stroke * 1.5)] SB RightSB Stroke ArchDepthA ArchDepthB - include : HBar.b SB RightSB 0 + local obot : Math.max (CAP * 0.1) (OverlayStroke + HalfStroke) + include : OShape XH obot SB RightSB [AdviceStroke2 2 2 (XH - obot)] nothing nothing + include : HBar.b SB RightSB 0 OverlayStroke CreateAccentedComposition 'oSbRsbUnderlineBelow' null 'o' 'sbRsbUnderlineBelow' @@ -309,7 +310,7 @@ glyph-block Letter-Latin-O : begin include : intersection OShapeOutline.NoOvershoot CAP 0 SB RightSB BBS ArchDepthA ArchDepthB union - VBar.l (SB + OX + BBD) 0 CAP BBS + VBar.l (SB + OX + BBD) 0 CAP BBS VBar.r (RightSB - OX - BBD) 0 CAP BBS create-glyph 'mathbb/o' 0x1D560 : glyph-proc @@ -318,5 +319,5 @@ glyph-block Letter-Latin-O : begin include : intersection OShapeOutline.NoOvershoot XH 0 SB RightSB BBS union - VBar.l (SB + OX + BBD) 0 XH BBS + VBar.l (SB + OX + BBD) 0 XH BBS VBar.r (RightSB - OX - BBD) 0 XH BBS