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

Add variant selector for decorative angle brackets (U+276C...U+2771) (#2603, #2623) #2648

Merged
merged 3 commits into from
Jan 18, 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
@@ -0,0 +1 @@
* Add variant selector for decorative angle brackets (U+276C...U+2771) (#2603, #2623).
51 changes: 33 additions & 18 deletions packages/font-glyphs/src/symbol/pictograph/checking-marks.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
middle { 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')
23 changes: 23 additions & 0 deletions params/variants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" = "middle"

[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"
Expand Down Expand Up @@ -8882,6 +8904,7 @@ question = "smooth"
pilcrow = "high"
partial-derivative = "curly-bar"
micro-sign = "toothed-serifless"
decorative-angle-brackets = "middle"
lig-ltgteq = "flat"
lig-neq = "slightly-slanted"
lig-equal-chain = "with-notch"
Expand Down
Loading