Random collection of geometric glyphs (#2497)

* random stuff

* log

* fix log

* fix composition

* fix counting rod width

* remove ideo tally
This commit is contained in:
Logo 2024-09-12 09:06:54 +08:00 committed by GitHub
parent 9a22719749
commit d319ad2c28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 185 additions and 24 deletions

View file

@ -1,2 +0,0 @@
- Fix Macedonian Cyrillic Gje under italics (#2493).
- Improve widths of overline marks of Serbian italic lower Ghe/Pe/Te.

11
changes/31.7.0.md Normal file
View file

@ -0,0 +1,11 @@
* Fix Macedonian Cyrillic Gje under italics (#2493).
* Improve widths of overline marks of Serbian italic lower Ghe/Pe/Te.
* Add Characters:
- COUNTING ROD UNIT DIGIT ONE (`U+1D360`) ... COUNTING ROD TENS DIGIT NINE (`U+1D371`).
- COMPOSITION SYMBOL (`U+2384`).
- HEAVY CIRCLED SALTIRE (`U+2B59`).
- DRIVE SLOW SIGN (`U+26DA`).
- WHITE DIAMOND IN SQUARE (`U+26CB`).
- SQUARED SALTIRE (`U+26DD`).
- FALLING DIAGONAL IN WHITE CIRCLE IN BLACK SQUARE (`U+26DE`).
- TOP HALF LEFT PARENTHESIS (`U+2E59`) ... BOTTOM HALF RIGHT PARENTHESIS (`U+2E5C`).

View file

@ -98,6 +98,7 @@ export : define [buildGlyphs para recursive] : begin
run-glyph-module "./symbol/math.mjs" run-glyph-module "./symbol/math.mjs"
run-glyph-module "./symbol/letter.mjs" run-glyph-module "./symbol/letter.mjs"
run-glyph-module "./symbol/braille.mjs" run-glyph-module "./symbol/braille.mjs"
run-glyph-module "./symbol/counting-rod.mjs"
run-glyph-module "./symbol/ligation.mjs" run-glyph-module "./symbol/ligation.mjs"
# Auto-builds # Auto-builds

View file

@ -0,0 +1,110 @@
$$include '../meta/macros.ptl'
import [mix linreg clamp fallback] from "@iosevka/util"
glyph-module
glyph-block Symbol-Counting-Rod : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
define isProportional : para.diversityII < 1
define rodDiv : mix 1 para.diversityM 2
define rodDf : DivFrame rodDiv 5
define rodSw rodDf.mvs
define hRodSw : AdviceStroke 3 rodDiv
define rodSpace : rodDf.width / 5
do "Counting Rod Ones"
define [RodY i sw] : mix (0 + sw / 2) (CAP - sw / 2) (i / 4)
create-glyph 'countingRod1' 0x1D360 : glyph-proc
local df : include : DivFrame rodDiv
include : df.markSet.capital
include : HBar.m df.leftSB df.rightSB [RodY 0 hRodSw] hRodSw
create-glyph 'countingRod2' 0x1D361 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod1' AS_BASE ALSO_METRICS
include : HBar.m df.leftSB df.rightSB [RodY 1 hRodSw] hRodSw
create-glyph 'countingRod3' 0x1D362 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod2' AS_BASE ALSO_METRICS
include : HBar.m df.leftSB df.rightSB [RodY 2 hRodSw] hRodSw
create-glyph 'countingRod4' 0x1D363 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod3' AS_BASE ALSO_METRICS
include : HBar.m df.leftSB df.rightSB [RodY 3 hRodSw] hRodSw
create-glyph 'countingRod5' 0x1D364 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod4' AS_BASE ALSO_METRICS
include : HBar.m df.leftSB df.rightSB [RodY 4 hRodSw] hRodSw
create-glyph 'countingRod6' 0x1D365 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod1' AS_BASE ALSO_METRICS
include : VBar.m df.middle [RodY 0 hRodSw] CAP rodSw
create-glyph 'countingRod7' 0x1D366 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod2' AS_BASE ALSO_METRICS
include : VBar.m df.middle [RodY 1 hRodSw] CAP rodSw
create-glyph 'countingRod8' 0x1D367 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod3' AS_BASE ALSO_METRICS
include : VBar.m df.middle [RodY 2 hRodSw] CAP rodSw
create-glyph 'countingRod9' 0x1D368 : glyph-proc
local df : include : DivFrame rodDiv
include : refer-glyph 'countingRod4' AS_BASE ALSO_METRICS
include : VBar.m df.middle [RodY 3 hRodSw] CAP rodSw
do "Counting Rod Tens"
define [rodTens nStrokes plusFive] : glyph-proc
local df : include : DivFrame rodDiv nStrokes
include : df.markSet.capital
if plusFive : include : HBar.t df.leftSB df.rightSB CAP hRodSw
if (nStrokes === 1) : begin
include : VBar.m df.middle 0 CAP rodSw
: else : begin
local radius : (rodSpace * (nStrokes - 1)) / 2
foreach [j : range 0 nStrokes] : do
include : VBar.m (df.middle + [mix (-radius) radius : j / (nStrokes - 1)]) 0 CAP rodSw
create-glyph 'countingRodTens1' 0x1D369 : glyph-proc
include : rodTens 1 0
create-glyph 'countingRodTens2' 0x1D36A : glyph-proc
include : rodTens 2 0
create-glyph 'countingRodTens3' 0x1D36B : glyph-proc
include : rodTens 3 0
create-glyph 'countingRodTens4' 0x1D36C : glyph-proc
include : rodTens 4 0
create-glyph 'countingRodTens5' 0x1D36D : glyph-proc
include : rodTens 5 0
create-glyph 'countingRodTens6' 0x1D36E : glyph-proc
include : rodTens 1 1
create-glyph 'countingRodTens7' 0x1D36F : glyph-proc
include : rodTens 2 1
create-glyph 'countingRodTens8' 0x1D370 : glyph-proc
include : rodTens 3 1
create-glyph 'countingRodTens9' 0x1D371 : glyph-proc
include : rodTens 4 1
do "Tally Marks"
create-glyph 'tallyMarkOne' 0x1D377 : glyph-proc
local df : include : DivFrame : if isProportional (rodDiv / 4) 1
include : df.markSet.capital
include : VBar.m df.middle 0 CAP df.mvs
create-glyph 'tallyMarkFive' 0x1D378 : glyph-proc
local df : include : DivFrame rodDiv 4
include : df.markSet.capital
local left : df.leftSB + [HSwToV : 0.5 * df.mvs]
local right : df.rightSB - [HSwToV : 0.5 * df.mvs]
include : VBar.m left 0 CAP df.mvs
include : VBar.m [mix left right (1/3)] 0 CAP df.mvs
include : VBar.m [mix left right (2/3)] 0 CAP df.mvs
include : VBar.m right 0 CAP df.mvs
include : dispiro
flat (left - LongJut / 2 + OX) (CAP * (1/3)) [widths.center df.mvs]
curl (right + LongJut / 2 - OX) (CAP * (2/3))

View file

@ -386,7 +386,41 @@ 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.Size) Geom.MidY Geom.MidX (Geom.MidY - Geom.Size)
ExtLineLhs 4 OperatorStroke Geom.MidX (Geom.MidY - Geom.Size) (Geom.MidX + Geom.Size) Geom.MidY ExtLineLhs 4 OperatorStroke Geom.MidX (Geom.MidY - Geom.Size) (Geom.MidX + Geom.Size) Geom.MidY
# Compositions
create-glyph [MangleName 'compositionSymbol'] [MangleUnicode 0x2384] : glyph-proc
set-width Geom.Width
local offsetX : Geom.Size * Size.Medium.size / 2 - GeometryStroke / 4
include : union
with-transform [Translate offsetX 0] : refer-glyph : MangleName 'whiteMediumCircle'
with-transform [Translate (-offsetX) 0] : refer-glyph : MangleName 'whiteMediumSquare'
create-glyph [MangleName 'whiteSquareVertLine'] [MangleUnicode 0x2385] : glyph-proc create-glyph [MangleName 'whiteSquareVertLine'] [MangleUnicode 0x2385] : glyph-proc
set-width Geom.Width set-width Geom.Width
include : refer-glyph : MangleName 'whiteSquare' include : refer-glyph : MangleName 'whiteSquare'
include : BarShape Geom.MidX ParenTop ParenBot include : BarShape Geom.MidX ParenTop ParenBot
create-glyph [MangleName 'whiteSquareContainingWhiteDiamond'] [MangleUnicode 0x26CB] : glyph-proc
set-width Geom.Width
include : union
refer-glyph : MangleName 'whiteSquare'
refer-glyph : MangleName 'whiteDiamond'
create-glyph [MangleName 'squaredSaltire'] [MangleUnicode 0x26DD] : glyph-proc
set-width Geom.Width
include : union
refer-glyph : MangleName 'whiteSquare'
intersection
refer-glyph : MangleName 'blackSquare'
union
dispiro [widths.center GeometryStroke] [flat Geom.Left Geom.Top] [curl Geom.Right Geom.Bot]
dispiro [widths.center GeometryStroke] [flat Geom.Left Geom.Bot] [curl Geom.Right Geom.Top]
create-glyph [MangleName 'uni26DE'] [MangleUnicode 0x26DE] : glyph-proc
set-width Geom.Width
include : union
difference
refer-glyph : MangleName 'blackSquare'
refer-glyph : MangleName 'blackCircle'
intersection
refer-glyph : MangleName 'blackSquare'
dispiro [widths.center GeometryStroke] [flat Geom.Left Geom.Top] [curl Geom.Right Geom.Bot]

View file

@ -24,6 +24,16 @@ glyph-block Symbol-Geometric-Square-Corners : for-width-kinds WideWidth1
intersection [MaskBelow (Geom.MidY + Geom.Size / 3)] [MaskAbove (Geom.MidY - Geom.Size / 3)] intersection [MaskBelow (Geom.MidY + Geom.Size / 3)] [MaskAbove (Geom.MidY - Geom.Size / 3)]
intersection [MaskLeft (Geom.MidX + Geom.Size / 3)] [MaskRight (Geom.MidX - Geom.Size / 3)] intersection [MaskLeft (Geom.MidX + Geom.Size / 3)] [MaskRight (Geom.MidX - Geom.Size / 3)]
create-glyph [MangleName 'driveSlowSign'] [MangleUnicode 0x26DA] : glyph-proc
set-width Geom.Width
include : intersection
refer-glyph : MangleName 'blackSquare'
union
RingAt Geom.Left Geom.Top (Geom.Size / 2)
RingAt Geom.Left Geom.Bot (Geom.Size / 2)
RingAt Geom.Right Geom.Top (Geom.Size / 2)
RingAt Geom.Right Geom.Bot (Geom.Size / 2)
create-glyph [MangleName 'squareCornersSaltires'] [MangleUnicode 0x1CC89] : glyph-proc create-glyph [MangleName 'squareCornersSaltires'] [MangleUnicode 0x1CC89] : glyph-proc
set-width Geom.Width set-width Geom.Width
include : intersection include : intersection
@ -102,3 +112,4 @@ glyph-block Symbol-Geometric-Square-Corners : for-width-kinds WideWidth1
widths.center lineWidth widths.center lineWidth
flat (Geom.MidX - Geom.Size - aperature) (Geom.MidY + Geom.Size) flat (Geom.MidX - Geom.Size - aperature) (Geom.MidY + Geom.Size)
curl (Geom.MidX + Geom.Size - aperature) (Geom.MidY - Geom.Size) curl (Geom.MidX + Geom.Size - aperature) (Geom.MidY - Geom.Size)

View file

@ -290,28 +290,6 @@ glyph-block Symbol-Letter : begin
flat (Middle + [HSwToV HalfStroke]) 0 [widths.lhs : AdviceStroke 3] flat (Middle + [HSwToV HalfStroke]) 0 [widths.lhs : AdviceStroke 3]
curl (RightSB - O) [mix 0 CAP 0.375] curl (RightSB - O) [mix 0 CAP 0.375]
do "Tally Marks"
create-glyph 'tallyMarkOne' 0x1D377 : glyph-proc
local df : include : DivFrame : if (para.diversityII < 1) ([mix 1 para.diversityM 2] / 4) 1
include : df.markSet.capital
include : VBar.m df.middle 0 CAP df.mvs
create-glyph 'tallyMarkFive' 0x1D378 : glyph-proc
local df : include : DivFrame [mix 1 para.diversityM 2] 4
include : df.markSet.capital
local left : df.leftSB + [HSwToV : 0.5 * df.mvs]
local right : df.rightSB - [HSwToV : 0.5 * df.mvs]
include : VBar.m left 0 CAP df.mvs
include : VBar.m [mix left right (1/3)] 0 CAP df.mvs
include : VBar.m [mix left right (2/3)] 0 CAP df.mvs
include : VBar.m right 0 CAP df.mvs
include : dispiro
flat (left - LongJut / 2 + OX) (CAP * (1/3)) [widths.center df.mvs]
curl (right + LongJut / 2 - OX) (CAP * (2/3))
glyph-block Symbol-Cyrl-Thousands : begin glyph-block Symbol-Cyrl-Thousands : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
create-glyph 'cyrlThousandsSign' 0x482 : glyph-proc create-glyph 'cyrlThousandsSign' 0x482 : glyph-proc

View file

@ -21,6 +21,15 @@ glyph-block Symbol-Pictograph-IEC-Power-And-Playback : for-width-kinds WideWidth
set-width df.width set-width df.width
include : RingStrokeAt df.middle SymbolMid squareRadiusFW GeometryStroke include : RingStrokeAt df.middle SymbolMid squareRadiusFW GeometryStroke
create-glyph [MangleName 'heavyCircledSaltire'] [MangleUnicode 0x2B59] : glyph-proc
set-width df.width
include : RingStrokeAt df.middle SymbolMid squareRadiusFW GeometryStroke
include : intersection
RingAt df.middle SymbolMid squareRadiusFW
union
dispiro [widths.center GeometryStroke] [flat leftFW topFW] [curl rightFW bottomFW]
dispiro [widths.center GeometryStroke] [flat leftFW bottomFW] [curl rightFW topFW]
create-glyph [MangleName 'powerOn'] [MangleUnicode 0x23FD] : glyph-proc create-glyph [MangleName 'powerOn'] [MangleUnicode 0x23FD] : glyph-proc
set-width df.width set-width df.width
include : Rect include : Rect

View file

@ -140,6 +140,15 @@ glyph-block Symbol-Punctuation-Brackets : begin
turned 'zNotationParenRight' 0x2988 'zNotationParenLeft' Middle SymbolMid turned 'zNotationParenRight' 0x2988 'zNotationParenLeft' Middle SymbolMid
create-glyph 'parenLeftUHalf' 0x2E59 : intersection
refer-glyph 'parenLeft'
MaskAbove SymbolMid
create-glyph 'parenLeftLHalf' 0x2E5B : intersection
refer-glyph 'parenLeft'
MaskBelow SymbolMid
turned 'parenRightUHalf' 0x2E5A 'parenLeftLHalf' Middle SymbolMid
turned 'parenRightLHalf' 0x2E5C 'parenLeftUHalf' Middle SymbolMid
define Bracket : namespace define Bracket : namespace
export : define [HDim barLeft ext] : namespace export : define [HDim barLeft ext] : namespace
export : define l : fallback barLeft : [mix SB RightSB DesignParameters.bracketOutside] - [HSwToV DesignParameters.bracketOutsideSwAdj] * Stroke export : define l : fallback barLeft : [mix SB RightSB DesignParameters.bracketOutside] - [HSwToV DesignParameters.bracketOutsideSwAdj] * Stroke