From a81fef91c3eb09c3be33518922c9cd5c79db9b0d Mon Sep 17 00:00:00 2001 From: John McWilliams <37010132+jmcwilliams403@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:33:37 -0400 Subject: [PATCH] Miscellanious composite character tweaks. (#2491) * Make Combining Square Below slightly narrower. * Improve glyph visual of Combining Suspension Mark. * Make Combining Number Sign Above always short. * Improve widths of a few `cyrl/o`-derived letters. --- changes/31.6.0.md | 4 + .../font-glyphs/src/auto-build/composite.ptl | 4 +- .../src/auto-build/transformed.ptl | 4 +- packages/font-glyphs/src/letter/latin/o.ptl | 120 ++++++++++-------- .../font-glyphs/src/letter/latin/upper-y.ptl | 4 +- packages/font-glyphs/src/marks/above.ptl | 2 +- packages/font-glyphs/src/marks/below.ptl | 13 +- .../punctuation/slashes-and-number-sign.ptl | 1 + params/variants.toml | 17 +++ 9 files changed, 104 insertions(+), 65 deletions(-) diff --git a/changes/31.6.0.md b/changes/31.6.0.md index 545c3b4fc..5a2a23856 100644 --- a/changes/31.6.0.md +++ b/changes/31.6.0.md @@ -1 +1,5 @@ * Add Latin localization forms for Polish and Romanian. +* Make Combining Square Below (`U+033B`) slightly narrower. +* Improve glyph visual for Combining Suspension Mark (`U+1DC3`). +* Make Cyrillic Capital/Small Letter Uk (`U+0478`..`U+0479`) slightly narrower under Quasi-Proportional. +* Make Cyrillic Capital/Small Letter Round Omega (`U+047A`..`U+047B`) slightly wider under Quasi-Proportional. diff --git a/packages/font-glyphs/src/auto-build/composite.ptl b/packages/font-glyphs/src/auto-build/composite.ptl index f9ba437e6..f94520fb1 100644 --- a/packages/font-glyphs/src/auto-build/composite.ptl +++ b/packages/font-glyphs/src/auto-build/composite.ptl @@ -1471,8 +1471,8 @@ glyph-block Autobuild-Ligatures : begin list 0x1F1 { 'D' 'Z' } list 0x1F2 { 'D' 'z' } list 0x1F3 { 'd' 'z' } - list 0x478 { 'cyrl/O' 'cyrl/u' } - list 0x479 { 'cyrl/o' 'cyrl/u' } + list 0x478 { 'cyrl/Uk/O' 'cyrl/u' } + list 0x479 { 'cyrl/uk/o' 'cyrl/u' } list 0x20A7 { 'P' 't' } list 0x20A8 { 'R' 's' } list 0x20AF { 'D' 'grek/rho' } diff --git a/packages/font-glyphs/src/auto-build/transformed.ptl b/packages/font-glyphs/src/auto-build/transformed.ptl index 2f9c9cda8..dedb4f9b4 100644 --- a/packages/font-glyphs/src/auto-build/transformed.ptl +++ b/packages/font-glyphs/src/auto-build/transformed.ptl @@ -336,7 +336,7 @@ glyph-block Autobuild-Transformed : begin list 0x1E050 'cyrl/palochka' list 0x1E06B 'cyrl/the' list 0x1E06C 'cyrl/yeryBack' - list 0x1E06D 'cyrl/uShortKazakh' + list 0x1E06D 'cyrl/uo' list 0x1FBCC 'smallBracketLeft' createSuperscripts 'numerator' NumeratorForm : list @@ -558,7 +558,7 @@ glyph-block Autobuild-Transformed : begin createMedievalCombs 0 CAP : list list 0x365 'i' list 0x36D 't' - list 0x1AC6 'numberSign' + list 0x1AC6 'numberSign/cap' list 0x1DD8 'dInsular' list 0x1DD9 'eth' list 0x1DDC 'k' diff --git a/packages/font-glyphs/src/letter/latin/o.ptl b/packages/font-glyphs/src/letter/latin/o.ptl index 35d5d6397..aeee919f9 100644 --- a/packages/font-glyphs/src/letter/latin/o.ptl +++ b/packages/font-glyphs/src/letter/latin/o.ptl @@ -28,61 +28,52 @@ glyph-block Letter-Latin-O : begin include : MarkSet.e include : OShape XH 0 SB RightSB nothing nothing nothing - create-glyph 'cyrl/oNarrow' 0x1C82 : glyph-proc - local df : include : DivFrame para.diversityF 2 - include : df.markSet.e - local subDf : DivFrame 0.75 2 - local ada : subDf.archDepthA SmallArchDepth subDf.mvs - local adb : subDf.archDepthB SmallArchDepth subDf.mvs - - include : with-transform [ApparentTranslate (0.5 * (df.width - subDf.width)) 0] - OShape XH 0 subDf.leftSB subDf.rightSB subDf.mvs ada adb - - create-glyph 'oSideways' 0x1D11 : glyph-proc - include : MarkSet.e - include : PointingTo Width XH Width 0 : function [] - OShape (Width - SB / 2) (SB / 2) (XH * 0.1) (XH * 0.9) nothing nothing nothing - - define rBroadOn : DotRadius * [StrokeWidthBlend 1.625 1] - create-glyph 'cyrl/BroadOn' 0x47A : glyph-proc - define df : DivFrame 1 3 - include : MarkSet.capital - include : OShape CAP 0 SB RightSB df.mvs ArchDepthA ArchDepthB - include : DotAt Middle (df.mvs / 2 + O) rBroadOn - include : DotAt Middle (CAP - df.mvs / 2 - O) rBroadOn - - create-glyph 'cyrl/broadOn' 0x47B : glyph-proc - define df : DivFrame 1 3 - include : MarkSet.e - include : OShape XH 0 SB RightSB df.mvs nothing nothing - include : DotAt Middle (df.mvs / 2 + O) rBroadOn - include : DotAt Middle (XH - df.mvs / 2 - O) rBroadOn - create-glyph 'grek/Omicron' 0x39F : glyph-proc include [refer-glyph 'O'] AS_BASE ALSO_METRICS include : SetGrekUpperTonos 0 - alias 'cyrl/O' 0x41E 'O' alias 'grek/omicron' 0x3BF 'o' - alias 'cyrl/o' 0x43e 'o' - create-glyph 'mathbb/O' 0x1D546 : glyph-proc - include : MarkSet.capital - include : OShape CAP 0 SB RightSB BBS ArchDepthA ArchDepthB - include : intersection - OShapeOutline.NoOvershoot CAP 0 SB RightSB BBS ArchDepthA ArchDepthB - union - VBar.l (SB + OX + BBD) 0 CAP BBS - VBar.r (RightSB - OX - BBD) 0 CAP BBS + alias 'cyrl/O' 0x41E 'O' + alias 'cyrl/o' 0x43E 'o' - create-glyph 'mathbb/o' 0x1D560 : glyph-proc - include : MarkSet.e - include : OShape XH 0 SB RightSB BBS - include : intersection - OShapeOutline.NoOvershoot XH 0 SB RightSB BBS - union - VBar.l (SB + OX + BBD) 0 XH BBS - VBar.r (RightSB - OX - BBD) 0 XH BBS + create-glyph 'cyrl/Uk/O' : glyph-proc + local df : include : DivFrame para.diversityF 2 + include : df.markSet.capital + local ada : df.archDepthA ArchDepth df.mvs + local adb : df.archDepthB ArchDepth df.mvs + include : OShape CAP 0 df.leftSB df.rightSB df.mvs ada adb + + create-glyph 'cyrl/uk/o' : glyph-proc + local df : include : DivFrame para.diversityF 2 + include : df.markSet.e + local ada : df.archDepthA SmallArchDepth df.mvs + local adb : df.archDepthB SmallArchDepth df.mvs + include : OShape XH 0 df.leftSB df.rightSB df.mvs ada adb + + create-glyph 'cyrl/oNarrow' 0x1C82 : glyph-proc + local df : include : DivFrame para.diversityF 2 + include : df.markSet.e + local subDf : DivFrame (5 / 6) 2 + local ada : subDf.archDepthA SmallArchDepth subDf.mvs + local adb : subDf.archDepthB SmallArchDepth subDf.mvs + include : with-transform [ApparentTranslate (0.5 * (df.width - subDf.width)) 0] + OShape XH 0 subDf.leftSB subDf.rightSB subDf.mvs ada adb + + define rBroadOn : DotRadius * [StrokeWidthBlend 1.625 1] + create-glyph 'cyrl/BroadOn' 0x47A : glyph-proc + define df : include : DivFrame [mix 1 para.diversityM 0.5] 3 + include : df.markSet.capital + include : OShape CAP 0 df.leftSB df.rightSB df.mvs ArchDepthA ArchDepthB + include : DotAt df.middle (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 [mix 1 para.diversityM 0.5] 3 + include : df.markSet.e + include : OShape XH 0 df.leftSB df.rightSB df.mvs nothing nothing + include : DotAt df.middle (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 local { base horn } srcs @@ -120,6 +111,11 @@ glyph-block Letter-Latin-O : begin flat (SB + O + fine) [mix XH 0 1.05] [widths.center : 2 * fine] curl (RightSB - O - fine) [mix 0 XH 1.05] + create-glyph 'oSideways' 0x1D11 : glyph-proc + include : MarkSet.e + include : PointingTo Width XH Width 0 : function [] + OShape (Width - SB / 2) (SB / 2) (XH * 0.1) (XH * 0.9) nothing nothing nothing + create-glyph 'oSlashSideways' 0x1D13 : glyph-proc include : MarkSet.e include : PointingTo Width XH Width 0 : function [] : glyph-proc @@ -137,10 +133,16 @@ glyph-block Letter-Latin-O : begin include [refer-glyph 'o'] AS_BASE include : HBar.m (SB + OX + 1) (RightSB - OX - 1) (XH * 0.5) OverlayStroke + alias 'grek/capSymbolTheta' 0x3F4 'Obar' + + alias 'cyrl/Oe' 0x4E8 'Obar' + alias 'cyrl/oe' 0x4E9 'obar' + derive-composites 'cyrl/OMonocular' 0xA668 'O' 'innerDot' derive-composites 'cyrl/oMonocular' 0xA669 'o' 'innerDotSmall' derive-composites 'cyrl/OBinocular' 0xA66A 'O' 'innerDoubleDot' derive-composites 'cyrl/oBinocular' 0xA66B 'o' 'innerDoubleDotSmall' + alias 'bullEye' 0x298 'cyrl/OMonocular' create-glyph 'cyrl/OCross' 0xA69A : glyph-proc @@ -201,10 +203,6 @@ glyph-block Letter-Latin-O : begin include : OShape (CAP - 2 * heightGap) (0 + 2 * heightGap) arcXL2 arcXR2 df.mvs adaInner2 adbInner2 include : VBar.m df.middle (df.mvs / 2) (CAP - df.mvs / 2) df.mvs - alias 'cyrl/Oe' 0x4E8 'Obar' - alias 'grek/capSymbolTheta' 0x3F4 'Obar' - alias 'cyrl/oe' 0x4E9 'obar' - create-glyph 'oupperhalf' 0x1D16 : glyph-proc include : MarkSet.e include : dispiro @@ -278,3 +276,21 @@ glyph-block Letter-Latin-O : begin x -- [mix [arch.adjust-x.bot Middle] SB 0.75] y -- 0 yAttach -- [mix O SmallArchDepthB : archv.yFromX 0.75] + + create-glyph 'mathbb/O' 0x1D546 : glyph-proc + include : MarkSet.capital + include : OShape CAP 0 SB RightSB BBS ArchDepthA ArchDepthB + include : intersection + OShapeOutline.NoOvershoot CAP 0 SB RightSB BBS ArchDepthA ArchDepthB + union + VBar.l (SB + OX + BBD) 0 CAP BBS + VBar.r (RightSB - OX - BBD) 0 CAP BBS + + create-glyph 'mathbb/o' 0x1D560 : glyph-proc + include : MarkSet.e + include : OShape XH 0 SB RightSB BBS + include : intersection + OShapeOutline.NoOvershoot XH 0 SB RightSB BBS + union + VBar.l (SB + OX + BBD) 0 XH BBS + VBar.r (RightSB - OX - BBD) 0 XH BBS diff --git a/packages/font-glyphs/src/letter/latin/upper-y.ptl b/packages/font-glyphs/src/letter/latin/upper-y.ptl index 2e6e64b9d..fc52d7ffc 100644 --- a/packages/font-glyphs/src/letter/latin/upper-y.ptl +++ b/packages/font-glyphs/src/letter/latin/upper-y.ptl @@ -138,8 +138,8 @@ glyph-block Letter-Latin-Upper-Y : begin select-variant 'cyrl/Ue' 0x4AE (shapeFrom -- 'Y') select-variant 'cyrl/ue' 0x4AF - CreateAccentedComposition 'cyrl/UShortKazakh' 0x4B0 'cyrl/Ue' 'barOver' - CreateAccentedComposition 'cyrl/uShortKazakh' 0x4B1 'cyrl/ue' 'barOver' + CreateAccentedComposition 'cyrl/Uo' 0x4B0 'cyrl/Ue' 'barOver' + CreateAccentedComposition 'cyrl/uo' 0x4B1 'cyrl/ue' 'barOver' create-glyph 'YStroke/Overlay' : HOverlayBar ([mix 0 SB 0.5]) ([mix Width RightSB 0.5]) [mix 0 CAP 0.75] derive-composites 'YStroke' 0x24E 'Y' 'YStroke/Overlay' diff --git a/packages/font-glyphs/src/marks/above.ptl b/packages/font-glyphs/src/marks/above.ptl index fbe20640d..654e8de6e 100644 --- a/packages/font-glyphs/src/marks/above.ptl +++ b/packages/font-glyphs/src/marks/above.ptl @@ -1220,7 +1220,7 @@ glyph-block Mark-Above : begin arcvh g2.right.mid markMiddle (aboveMarkBot + markHalfStroke) [heading Rightward] alsoThru.g2 0.5 0.5 - g2.right.end rightEnd ([mix aboveMarkTop aboveMarkBot 0.5] + markHalfStroke) [heading Rightward] + g2.right.end rightEnd (aboveMarkTop - markHalfStroke) [heading Rightward] create-glyph 'deletionMarkAbove' 0x1DFB : glyph-proc set-width 0 diff --git a/packages/font-glyphs/src/marks/below.ptl b/packages/font-glyphs/src/marks/below.ptl index 7ad0ff985..42e0bbe2f 100644 --- a/packages/font-glyphs/src/marks/below.ptl +++ b/packages/font-glyphs/src/marks/below.ptl @@ -118,14 +118,15 @@ glyph-block Mark-Below : begin create-glyph 'boxBelow' 0x33B : glyph-proc set-width 0 - include : StdAnchors.wide + include : StdAnchors.mediumWide - local boxsw : Math.min (markFine * 2) ((belowMarkTop - belowMarkBot) / 3) + local boxhs : Math.min (markFine * 2) ((belowMarkTop - belowMarkBot) / 3) + local boxvs : Math.min (markFine * 2) (markExtend * 2 / 3) - include : VBar.m (markMiddle - markExtend) belowMarkBot belowMarkTop (markFine * 2) - include : VBar.m (markMiddle + markExtend) belowMarkBot belowMarkTop (markFine * 2) - include : HBar.b (markMiddle - markExtend) (markMiddle + markExtend) belowMarkBot boxsw - include : HBar.t (markMiddle - markExtend) (markMiddle + markExtend) belowMarkTop boxsw + include : VBar.l (markMiddle - markExtend) belowMarkBot belowMarkTop boxvs + include : VBar.r (markMiddle + markExtend) belowMarkBot belowMarkTop boxvs + include : HBar.b (markMiddle - markExtend) (markMiddle + markExtend) belowMarkBot boxhs + include : HBar.t (markMiddle - markExtend) (markMiddle + markExtend) belowMarkTop boxhs create-glyph 'equalBelow' 0x347 : glyph-proc set-width 0 diff --git a/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl b/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl index a50217a20..86ae8133b 100644 --- a/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl +++ b/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl @@ -191,3 +191,4 @@ glyph-block Symbol-Punctuation-Slashes-And-Number-Sign : begin select-variant 'numberSign' '#' select-variant 'numberSign.jr' (follow -- 'numberSign') + select-variant 'numberSign/cap' (shapeFrom -- 'numberSign') diff --git a/params/variants.toml b/params/variants.toml index b5ab20ba7..987cfcab9 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -7985,41 +7985,49 @@ tagKind = "symbol" rank = 1 description = "Number sign with vertical bars" selector.numberSign = "upright" +selector."numberSign/cap" = "upright" [prime.number-sign.variants.slanted] rank = 2 description = "Number sign with slanted bars" selector.numberSign = "slanted" +selector."numberSign/cap" = "slanted" [prime.number-sign.variants.upright-open] rank = 3 description = "Number sign with vertical bars and open inner" selector.numberSign = "uprightOpen" +selector."numberSign/cap" = "uprightOpen" [prime.number-sign.variants.slanted-open] rank = 4 description = "Number sign with slanted bars and open inner" selector.numberSign = "slantedOpen" +selector."numberSign/cap" = "slantedOpen" [prime.number-sign.variants.upright-tall] rank = 5 description = "Number sign with vertical bars and taller than digits" selector.numberSign = "uprightTall" +selector."numberSign/cap" = "upright" [prime.number-sign.variants.slanted-tall] rank = 6 description = "Number sign with slanted bars and taller than digits" selector.numberSign = "slantedTall" +selector."numberSign/cap" = "slanted" [prime.number-sign.variants.upright-open-tall] rank = 7 description = "Number sign with vertical bars, open inner, and taller than digits" selector.numberSign = "uprightOpenTall" +selector."numberSign/cap" = "uprightOpen" [prime.number-sign.variants.slanted-open-tall] rank = 8 description = "Number sign with slanted bars, open inner, and taller than digits" selector.numberSign = "slantedOpenTall" +selector."numberSign/cap" = "slantedOpen" @@ -9050,6 +9058,7 @@ diacritic-dot = "square" asterisk = "hex-low" brace = "straight" guillemet = "straight" +number-sign = "upright" at = "fourfold" cent = "through-cap" percent = "rings-continuous-slash" @@ -9259,6 +9268,7 @@ cyrl-u = "straight-turn-serifless" cyrl-ef = "serifless" cyrl-yeri = "corner" cyrl-yery = "corner" +zero = "tall-slashed" one = "base" two = "straight-neck-serifless" four = "closed-serifless" @@ -9569,6 +9579,7 @@ cyrl-u = "straight-turn-serifless" cyrl-ef = "serifless" cyrl-yeri = "corner" cyrl-yery = "corner" +zero = "tall-slashed" one = "base" four = "closed-serifless" six = "closed-contour" @@ -9906,6 +9917,7 @@ nine = "straight-bar" tittle = "square" underscore = "low" guillemet = "straight" +number-sign = "upright" at = "threefold" dollar = "through-cap" cent = "slanted-through" @@ -9970,6 +9982,7 @@ one = "base" two = "straight-neck-serifless" three = "flat-top-serifless" four = "closed-serifless" +five = "upright-arched-serifless" six = "closed-contour" seven = "straight-serifless" eight = "two-circles" @@ -9977,9 +9990,12 @@ nine = "closed-contour" braille-dot = "square" tilde = "high" asterisk = "hex-high" +underscore = "high" caret = "high" brace = "straight" guillemet = "straight" +number-sign = "upright" +ampersand = "closed" at = "threefold" dollar = "through-cap" cent = "through-cap" @@ -9989,6 +10005,7 @@ percent = "rings-continuous-slash" two = "straight-neck-serifed" three = "flat-top-serifed" four = "closed-serifed" +five = "upright-arched-serifed" seven = "straight-serifed"