From b355392ed7736aec4b693bedeaa6ea936d561705 Mon Sep 17 00:00:00 2001 From: be5invis Date: Sat, 18 Jan 2025 10:30:55 -0800 Subject: [PATCH] Add variant selector for decorative angle brackets (U+276C...U+2771) (#2603, #2623) --- changes/32.5.0.md | 1 + .../src/symbol/pictograph/checking-marks.ptl | 51 ++++++++++++------- params/variants.toml | 23 +++++++++ 3 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 changes/32.5.0.md diff --git a/changes/32.5.0.md b/changes/32.5.0.md new file mode 100644 index 0000000000..bb9ccef262 --- /dev/null +++ b/changes/32.5.0.md @@ -0,0 +1 @@ +* Add variant selector for decorative angle brackets (U+276C...U+2771) (#2603, #2623). diff --git a/packages/font-glyphs/src/symbol/pictograph/checking-marks.ptl b/packages/font-glyphs/src/symbol/pictograph/checking-marks.ptl index 1438e54b62..6ed74bb639 100644 --- a/packages/font-glyphs/src/symbol/pictograph/checking-marks.ptl +++ b/packages/font-glyphs/src/symbol/pictograph/checking-marks.ptl @@ -68,26 +68,41 @@ glyph-block Symbol-Pictograph-Checking-Marks : begin alsoThru 0.47 0.5 g4 ptRSB [mix ptBot ptTop 0.42] - do "Ext angle brackets" + do "Decorative angular brackets" define Geom : GeometricDim Width Width define mediumSw : UnicodeWeightGrade 5 Geom.Scalar define heavySw : UnicodeWeightGrade 9 Geom.Scalar define xHeavySw : UnicodeWeightGrade 11 Geom.Scalar - define ExtBracketConfig : list - list 0x276C mediumSw 1 SB PictTop - list 0x276D mediumSw 0 SB PictTop - list 0x276E heavySw 1 [mix SB Middle 0.45] [mix SymbolMid ParenTop 0.5] - list 0x276F heavySw 0 [mix SB Middle 0.45] [mix SymbolMid ParenTop 0.5] - list 0x2770 xHeavySw 1 SB PictTop - list 0x2771 xHeavySw 0 SB PictTop - foreach {unicode sw op left top} [items-of ExtBracketConfig] : begin - create-glyph [NameUni unicode] unicode : glyph-proc - local bot : 2 * SymbolMid - top - local right : 2 * Middle - left - local cor : DiagCor (top - bot) (2 * (right - left)) - include : dispiro - widths.center (sw * cor) - corner [mix (left + sw / 2) (right - sw / 2) op] top [heading Downward] - corner [mix (left + sw / 2) (right - sw / 2) (1 - op)] SymbolMid [heading Downward] - corner [mix (left + sw / 2) (right - sw / 2) op] bot [heading Downward] + define HeightConfig : object + # suffix width scale height scale + tall { 1.00 1.00 } + medium { 0.80 0.75 } + short { 0.55 0.50 } + + define CharConfig : list + # unicode sw side + list 0x276C mediumSw 1 + list 0x276D mediumSw 0 + list 0x276E heavySw 1 + list 0x276F heavySw 0 + list 0x2770 xHeavySw 1 + list 0x2771 xHeavySw 0 + + foreach { unicode sw side } [items-of CharConfig] : begin + foreach { suffix { widthScale heightScale } } [pairs-of HeightConfig] : begin + create-glyph "\[NameUni unicode].\(suffix)" : glyph-proc + local top : mix SymbolMid ParenTop heightScale + local bot : mix SymbolMid ParenBot heightScale + local left : mix Middle SB widthScale + local right : mix Middle RightSB widthScale + local cor : DiagCor (top - bot) (2 * (right - left)) + local swC : sw * cor + local shift : 0.5 * swC + OX + include : dispiro + widths.center swC + corner [mix (left + shift) (right - shift) side] top [heading Downward] + corner [mix (left + shift) (right - shift) (1 - side)] SymbolMid [heading Downward] + corner [mix (left + shift) (right - shift) side] bot [heading Downward] + + select-variant [NameUni unicode] unicode (follow -- 'decorativeAngleBracket') diff --git a/params/variants.toml b/params/variants.toml index 0f0e6fff33..7a04b16d31 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -8556,6 +8556,28 @@ selectorAffix."micro" = "serifed" +[prime.decorative-angle-brackets] +sampler = "❮ ❯" +samplerExplain = "Decorative angle brackets (U+276C...U+2771)" +tagKind = "symbol" + +[prime.decorative-angle-brackets.variants.tall] +rank = 1 +description = "Tall decorative angle brackets, sharing same height as conventional brackets" +selector."decorativeAngleBracket" = "tall" + +[prime.decorative-angle-brackets.variants.middle] +rank = 2 +description = "Middle-height decorative angle brackets" +selector."decorativeAngleBracket" = "medium" + +[prime.decorative-angle-brackets.variants.short] +rank = 3 +description = "Short decorative angle brackets, sharing same height as guillemts" +selector."decorativeAngleBracket" = "short" + + + [prime.lig-ltgteq] sampler = "<= >=" samplerExplain = "Less-equal and Greater-equal ligations" @@ -8882,6 +8904,7 @@ question = "smooth" pilcrow = "high" partial-derivative = "curly-bar" micro-sign = "toothed-serifless" +decorative-angle-brackets = "tall" lig-ltgteq = "flat" lig-neq = "slightly-slanted" lig-equal-chain = "with-notch"