Skip to content

Commit

Permalink
Around 25 star/florette dingbats (#2623)
Browse files Browse the repository at this point in the history
* Maltese cross, eight pointed circle star

* other dingbat stars

* angle bracket ornament

* doc

* slightly thinner snowflakes

---------

Co-authored-by: Belleve <belleve@typeof.net>
  • Loading branch information
Logo121 and be5invis authored Dec 27, 2024
1 parent e860a79 commit 5a346de
Show file tree
Hide file tree
Showing 7 changed files with 351 additions and 30 deletions.
8 changes: 8 additions & 0 deletions changes/32.3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@
- LATIN SMALL LETTER HALF H (`U+2C76`).
- LATIN CAPITAL LETTER REVERSED HALF H (`U+A7F5`).
- LATIN SMALL LETTER REVERSED HALF H (`U+A7F6`).
* Fix shape of `U+276E` and `U+276E` (#2603).
* Add characters:
- OPEN CENTRE CROSS (`U+271B`).
- HEAVY OPEN CENTRE CROSS (`U+271C`).
- MALTESE CROSS (`U+2720`).
- FOUR TEARDROP-SPOKED ASTERISK (`U+2722`) ... FOUR CLUB-SPOKED ASTERISK (`U+2725`).
- OPEN CENTRE ASTERISK (`U+2732`).
- TEARDROP-SPOKED ASTERISK (`U+273B`) ... HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK (`U+274B`).
1 change: 1 addition & 0 deletions packages/font-glyphs/src/symbol/geometric.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export : define [apply] : begin
run-glyph-module "./geometric/plain.mjs"
run-glyph-module "./geometric/rounded.mjs"
run-glyph-module "./geometric/shaded.mjs"
run-glyph-module "./geometric/rotational.mjs"
run-glyph-module "./geometric/stars.mjs"
run-glyph-module "./geometric/sun-and-gear.mjs"
run-glyph-module "./geometric/dotted.mjs"
Expand Down
8 changes: 8 additions & 0 deletions packages/font-glyphs/src/symbol/geometric/masked.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,14 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
ExtLineLhs 4 OperatorStroke (Geom.MidX - Geom.Size) Geom.MidY Geom.MidX (Geom.MidY - Geom.Size)
ExtLineLhs 4 OperatorStroke Geom.MidX (Geom.MidY - Geom.Size) (Geom.MidX + Geom.Size) Geom.MidY

create-glyph [MangleName 'eightPointedCircledOpenCenterStar'] [MangleUnicode 0x2742] : glyph-proc
set-width Geom.Width
include : union
difference
refer-glyph : MangleName 'blackCircle'
refer-glyph : MangleName 'eightPointedStarMask'
refer-glyph : MangleName 'whiteSlightlySmallCircle'

do "Compositions"
glyph-block-import Symbol-Punctuation-Bar : BarShape

Expand Down
277 changes: 277 additions & 0 deletions packages/font-glyphs/src/symbol/geometric/rotational.ptl
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
$$include '../../meta/macros.ptl'

import [mix linreg clamp fallback] from "@iosevka/util"
import [DesignParameters] from "../../meta/aesthetics.mjs"

glyph-module

glyph-block Symbol-Geometric-Rotational : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes

define [OpenRadius sw sides] : sw / 2 / [Math.tan : Math.PI / sides]

define [Line sw] : lambda [r] : dispiro
widths.center sw
corner 0 0
corner r 0

define [Maltese sw sw2] : lambda [r] : lift-@ : spiro-outline
corner (@x1 = 0) (sw / 2)
flat (@x2 = TINY) (sw / 2)
curl (@x3 = [clamp (0.5 * r) (0.75 * r) : @x4 - (sw2 - sw)]) (sw / 2)
archv
corner (@x4 = r) sw2
corner @x4 (-sw2)
arcvh
flat @x3 (-sw / 2)
curl @x2 (-sw / 2)
corner @x1 (-sw / 2)

define [TeardropImpl r sw sw2 fPetal] : lift-@ : list
corner (@x1 = 0) (sw / 2)
if fPetal [list] : list
flat (@x2 = TINY) (sw / 2)
curl (@x3 = [clamp (2 * TINY) (0.4 * r) : r - (r - @x4) * 3]) (sw / 2)
alsoThru.g2 0.5 0.5
g4 (@x4 = [clamp (0.5 * r) (0.9 * r) : r - sw2 / 2]) (sw2 / 2)
archv
g4 r 0
arcvh
g4 @x4 (-sw2 / 2)
alsoThru.g2 0.5 0.5
if fPetal [list] : list
flat @x3 (-sw / 2)
curl @x2 (-sw / 2)
corner @x1 (-sw / 2)

define [Teardrop sw sw2] : lambda [r] : spiro-outline
TeardropImpl r sw sw2 0

define [PinwheelTeardrop sw sw2] : lambda [r] : union
intersection [MaskAbove 0] : dispiro [widths.rhs : sw / 2] : TeardropImpl r sw sw2 0
intersection [MaskBelow 0] : spiro-outline : TeardropImpl r sw sw2 0

define [Petal sw sw2] : lambda [r] : spiro-outline
TeardropImpl r sw sw2 1

define [WhitePetal sw sw2] : lambda [r] : dispiro
widths.rhs (sw / 2)
TeardropImpl r sw sw2 1

define [Balloon sw ballR] : lambda [r] : union
dispiro [widths.center sw] [corner 0 0] [corner (r - ballR) 0]
RingAt (r - ballR) 0 ballR

define [Club sw refBallR] : lambda [r] : glyph-proc
local ballR : (9 / 19) * refBallR
local clubCenter : r - refBallR
local clubRadius : refBallR - ballR
local cosAngle 0.5
local sinAngle : [Math.sqrt 3] / 2
include : union
dispiro [widths.center sw] [corner 0 0] [corner clubCenter 0]
RingAt (clubCenter + clubRadius) 0 ballR
RingAt (clubCenter - cosAngle * clubRadius) ( sinAngle * clubRadius) ballR
RingAt (clubCenter - cosAngle * clubRadius) (-sinAngle * clubRadius) ballR
spiro-outline
corner (clubCenter + clubRadius) 0
corner (clubCenter - cosAngle * clubRadius) ( sinAngle * clubRadius)
corner (clubCenter - cosAngle * clubRadius) (-sinAngle * clubRadius)

define [Snowflake sw sw2 sides fTight] : lambda [r] : glyph-proc
local sinAngle : Math.sin : 2 * Math.PI / sides
local cosAngle : Math.cos : 2 * Math.PI / sides
local branchPos : [if fTight 0.4 0.55] * r - sw2 / 2
local branchLen : [if fTight 1 0.45] * r
local shape : union
dispiro [widths.center sw] [corner 0 0] [corner r 0]
intersection [MaskAbove 0] : dispiro [disable-contrast] [widths.rhs sw2]
corner branchPos 0
corner (branchPos + branchLen * cosAngle) (branchLen * sinAngle)
intersection [MaskBelow 0] : dispiro [disable-contrast] [widths.lhs sw2]
corner branchPos 0
corner (branchPos + branchLen * cosAngle) (-branchLen * sinAngle)

if fTight
: then : begin
local sinHalfAngle : Math.sin : Math.PI / sides
local cosHalfAngle : Math.cos : Math.PI / sides

include : intersection shape : spiro-outline
corner 0 0
corner (2 * r * cosHalfAngle) ( 2 * r * sinHalfAngle)
corner (2 * r * cosHalfAngle) (-2 * r * sinHalfAngle)
: else : begin
include shape

for-width-kinds WideWidth1 : begin
define Geom : GeometricDim MosaicUnitWidth MosaicWidth

define lightSw : UnicodeWeightGrade 3 Geom.Scalar
define normalSw : UnicodeWeightGrade 4 Geom.Scalar
define semiBoldSw : UnicodeWeightGrade 6 Geom.Scalar
define boldSw : UnicodeWeightGrade 7 Geom.Scalar
define heavySw : UnicodeWeightGrade 9 Geom.Scalar

define [for-rotational-pointing sides phase mag gap fn] : begin
local shapes {}
foreach [j : range 0 sides] : begin
local angle : (j + phase) * 2 * Math.PI / sides
shapes.push : PointingTo
Geom.MidX + [Math.sin angle] * mag
Geom.MidY + [Math.cos angle] * mag
Geom.MidX + [Math.sin angle] * gap
Geom.MidY + [Math.cos angle] * gap
* fn

return shapes

define centerSw : heavySw * 1.2
define ballRad : Geom.Size * (1 / 7) + normalSw / 2
define bigBallRad : ballRad + centerSw / 2
define bigBallRad2 : ballRad + centerSw / 4
define teardropSw : Geom.Size * (2 / 7) + normalSw / 2
define teardropHeavySw : Geom.Size * (2 / 7) + boldSw / 2
define [BallCenter] : RingAt Geom.MidX Geom.MidY (centerSw / 2)
define [BallOpenCenter] : RingStrokeAt Geom.MidX Geom.MidY (centerSw / 2) (centerSw / 4)
define [BigBallCenter] : RingAt Geom.MidX Geom.MidY ballRad

# Open Center
create-glyph [MangleName 'openCenterCross'] [MangleUnicode 0x271B] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 4 0 Geom.Size [OpenRadius normalSw 4] : Line normalSw
create-glyph [MangleName 'openCenterCrossHeavy'] [MangleUnicode 0x271C] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 4 0 Geom.Size [OpenRadius heavySw 4] : Line heavySw
create-glyph [MangleName 'openCenterAsterisk6'] [MangleUnicode 0x2732] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 6 0 Geom.Size [OpenRadius normalSw 6] : Line normalSw

# Teardrop
create-glyph [MangleName 'teardropAsterisk4'] [MangleUnicode 0x2722] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 4 0 Geom.Size 0 : Teardrop normalSw teardropSw
BallCenter
create-glyph [MangleName 'teardropAsterisk6'] [MangleUnicode 0x273B] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : Teardrop normalSw teardropSw
BallCenter
create-glyph [MangleName 'teardropOpenAsterisk6'] [MangleUnicode 0x273C] : glyph-proc
set-width Geom.Width
include : union
difference
union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : Teardrop normalSw teardropSw
BallCenter
BallOpenCenter
create-glyph [MangleName 'teardropHeavyAsterisk6'] [MangleUnicode 0x273D] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : Teardrop normalSw teardropHeavySw
BallCenter
create-glyph [MangleName 'teardropHeavyPinwheelAsterisk6'] [MangleUnicode 0x2743] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : PinwheelTeardrop normalSw teardropHeavySw
BallCenter
create-glyph [MangleName 'teardropAsterisk8'] [MangleUnicode 0x274A] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 8 0 Geom.Size 0 : Teardrop normalSw teardropSw
BallCenter
create-glyph [MangleName 'teardropHeavyAsterisk8'] [MangleUnicode 0x274B] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 8 0 Geom.Size 0 : Teardrop normalSw teardropHeavySw
BallCenter

# Florette
create-glyph [MangleName 'blackAndWhiteFlorette6'] [MangleUnicode 0x273E] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 3 0.5 Geom.Size 0 : Petal normalSw (Geom.Size * 4.5 / 7)
union.apply null : for-rotational-pointing 3 0 Geom.Size 0 : WhitePetal normalSw (Geom.Size * 4.5 / 7)
BallCenter
create-glyph [MangleName 'blackFlorette5'] [MangleUnicode 0x273F] : glyph-proc
set-width Geom.Width
include : difference
union.apply null : for-rotational-pointing 5 0 Geom.Size 0 : Petal normalSw (Geom.Size * 5 / 7)
refer-glyph : MangleName 'blackSlightlySmallCircle'
create-glyph [MangleName 'whiteFlorette5'] [MangleUnicode 0x2740] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 5 0 Geom.Size 0 : WhitePetal normalSw (Geom.Size * 5 / 7)
refer-glyph : MangleName 'blackSlightlySmallCircle'
create-glyph [MangleName 'outlinedFlorette8'] [MangleUnicode 0x2741] : glyph-proc
set-width Geom.Width
local innerSw : clamp (normalSw / 2) normalSw (Geom.Size * 4 / 7 - normalSw * 2)
local offset : (Geom.Size * 4 / 7 - innerSw) / 2
include : union
difference
union
union.apply null : for-rotational-pointing 8 0 Geom.Size 0 : WhitePetal normalSw (Geom.Size * 4 / 7)
union.apply null : for-rotational-pointing 8 0 (Geom.Size - offset) 0 : Petal (innerSw / 2) innerSw
refer-glyph : MangleName 'blackSlightlySmallCircle'
refer-glyph : MangleName 'whiteSlightlySmallCircle'

# Balloon
create-glyph [MangleName 'balloonAsterisk4'] [MangleUnicode 0x2723] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 4 0 Geom.Size 0 : Balloon normalSw ballRad
create-glyph [MangleName 'balloonHeavyAsterisk4'] [MangleUnicode 0x2724] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 4 0 Geom.Size 0 : Balloon heavySw (ballRad * 1.35)
create-glyph [MangleName 'balloonAsterisk6'] [MangleUnicode 0x2749] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : Balloon normalSw ballRad

create-glyph [MangleName 'clubAsterisk4'] [MangleUnicode 0x2725] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 4 0 Geom.Size 0 : Club normalSw (ballRad * 1.35)

# Snowflake
create-glyph [MangleName 'snowflake'] [MangleUnicode 0x2744] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : Snowflake lightSw lightSw 6 0
create-glyph [MangleName 'snowflakeTight'] [MangleUnicode 0x2745] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : Snowflake lightSw lightSw 6 1
create-glyph [MangleName 'snowflakeHeavyChevron'] [MangleUnicode 0x2746] : glyph-proc
set-width Geom.Width
include : union.apply null : for-rotational-pointing 6 0 Geom.Size 0 : Snowflake lightSw semiBoldSw 6 0

# Sparkle
create-glyph [MangleName 'sparkle'] [MangleUnicode 0x2747] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 4 0 Geom.Size bigBallRad2 : Teardrop normalSw teardropSw
union.apply null : for-rotational-pointing 4 0.5 Geom.Size bigBallRad : Line normalSw
BigBallCenter
create-glyph [MangleName 'sparkleHeavy'] [MangleUnicode 0x2748] : glyph-proc
set-width Geom.Width
include : union
union.apply null : for-rotational-pointing 4 0 Geom.Size bigBallRad2 : Teardrop normalSw teardropHeavySw
union.apply null : for-rotational-pointing 4 0.5 Geom.Size bigBallRad : Line boldSw
BigBallCenter

glyph-block Symbol-Other-Rotational : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives

define [EternitySymbol sign] : glyph-proc
define sw : AdviceStroke 6.5
define radius : (RightSB - Middle) / 2

foreach [j : range 0 8] : do
local angle : sign * j * Math.PI / 4
local angle2 : sign * (j + 1) * Math.PI / 4
include : difference
Circle.Outline.At (Middle + radius * [Math.cos angle ]) (SymbolMid + radius * [Math.sin angle ]) radius sw
Circle.Outline.At (Middle + radius * [Math.cos angle ]) (SymbolMid + radius * [Math.sin angle ]) (radius - sw) sw
Circle.Outline.At (Middle + radius * [Math.cos angle2]) (SymbolMid + radius * [Math.sin angle2]) radius sw

create-glyph 'armn/eternitySignLeft' 0x58E : EternitySymbol 1
create-glyph 'armn/eternitySignRight' 0x58D : EternitySymbol (-1)
20 changes: 1 addition & 19 deletions packages/font-glyphs/src/symbol/geometric/stars.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ glyph-block Symbol-Geometric-Stars : for-width-kinds WideWidth1
* { .name 'sixPointedBlackStar' .unicode 0x2736 .sides 6 .skip 1 .pMag 1.05 .phase 0 .pShrink 0.4 }
* { .name 'eightPointedBlackStar' .unicode 0x2734 .sides 8 .skip 1 .pMag 1.15 .phase 0 .pShrink 0.25 }
* { .name 'eightPointedRectilinearBlackStar' .unicode 0x2737 .sides 8 .skip 1 .pMag 1.05 .phase (1/8) .pShrink 0.4 }
* { .name 'eightPointedStarMask' .sides 8 .skip 1 .pMag 1 .phase 0 .pShrink [GeometricSizes Geom].SlightlySmall.size}
* { .name 'heavyEightPointedRectilinearBlackStar' .unicode 0x2738 .sides 8 .skip 1 .pMag 1.05 .phase (1/8) .pShrink 0.5 }
* { .name 'twelvePointedBlackStar' .unicode 0x2739 .sides 12 .skip 1 .pMag 1.05 .phase 0 .pShrink 0.5 }
foreach [[object sides skip name unicode pMag phase pShrink] : items-of StarCfg] : do
Expand Down Expand Up @@ -172,22 +173,3 @@ glyph-block Symbol-Geometric-Stars : for-width-kinds WideWidth1
size -- (0.625 * Geom.Size + swInner)

include : ApparentTranslate Geom.MidX Geom.MidY

glyph-block Symbol-Other-Stars : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives

define [EternitySymbol sign] : glyph-proc
define sw : AdviceStroke 6.5
define radius : (RightSB - Middle) / 2

foreach [j : range 0 8] : do
local angle : sign * j * Math.PI / 4
local angle2 : sign * (j + 1) * Math.PI / 4
include : difference
Circle.Outline.At (Middle + radius * [Math.cos angle ]) (SymbolMid + radius * [Math.sin angle ]) radius sw
Circle.Outline.At (Middle + radius * [Math.cos angle ]) (SymbolMid + radius * [Math.sin angle ]) (radius - sw) sw
Circle.Outline.At (Middle + radius * [Math.cos angle2]) (SymbolMid + radius * [Math.sin angle2]) radius sw

create-glyph 'armn/eternitySignLeft' 0x58E : EternitySymbol 1
create-glyph 'armn/eternitySignRight' 0x58D : EternitySymbol (-1)
24 changes: 13 additions & 11 deletions packages/font-glyphs/src/symbol/pictograph/checking-marks.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,19 @@ glyph-block Symbol-Pictograph-Checking-Marks : begin
define xHeavySw : UnicodeWeightGrade 11 Geom.Scalar

define ExtBracketConfig : list
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 op} [items-of ExtBracketConfig] : begin
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 cor : DiagCor (PictTop - PictBot) (2 * (RightSB - SB))
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 (SB + sw / 2) (RightSB - sw / 2) op] PictTop [heading Downward]
corner [mix (SB + sw / 2) (RightSB - sw / 2) (1 - op)] SymbolMid [heading Downward]
corner [mix (SB + sw / 2) (RightSB - sw / 2) op] PictBot [heading Downward]
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]
Loading

0 comments on commit 5a346de

Please sign in to comment.