Add white squares and circles with quadrants (U+25F0 ... U+25F7) and white diagonal half triangles (U+25F8 ... U+25FA, U+25FF).

This commit is contained in:
be5invis 2020-09-19 03:49:53 -07:00
parent 0be50f0434
commit 30e511b0d5
2 changed files with 52 additions and 1 deletions

View file

@ -1,2 +1,2 @@
* Add dice symbols (`U+2680` ... `U+2685`).
* Add medium and extra-small squares (`U+25FB` ... `U+25FE`).
* Add medium and extra-small squares (`U+25FB` ... `U+25FE`), white squares and circles with quadrants (`U+25F0` ... `U+25F7`) and white diagonal half triangles (`U+25F8` ... `U+25FA`, `U+25FF`).

View file

@ -827,6 +827,57 @@ glyph-block Symbol-Geometric : begin
if LTh : include : UpperLeftHalfMark
if RBh : include : LowerRightHalfMark
# Quarter-line square and circle
define quarterLineParts : list
list 0x25F0 'whiteSquare' 1 1 0 0
list 0x25F1 'whiteSquare' 0 1 1 0
list 0x25F2 'whiteSquare' 0 0 1 1
list 0x25F3 'whiteSquare' 1 0 0 1
list 0x25F4 'whiteCircle' 1 1 0 0
list 0x25F5 'whiteCircle' 0 1 1 0
list 0x25F6 'whiteCircle' 0 0 1 1
list 0x25F7 'whiteCircle' 1 0 0 1
foreach { u frame T L B R } [items-of quarterLineParts] : begin
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
local hh : GeometryStroke / 2 * HVContrast
local hv : GeometryStroke / 2
local s GeometryStroke
set-width MosaicWidth
include : union
refer-glyph [MangleName frame]
if L [HBar (MosaicMiddle - squareRadiusFW + hh) (MosaicMiddle + hh) SymbolMid s] [glyph-proc]
if R [HBar (MosaicMiddle + squareRadiusFW - hh) (MosaicMiddle - hh) SymbolMid s] [glyph-proc]
if T [VBar MosaicMiddle (SymbolMid + squareRadiusFW - hv) (SymbolMid - hv) s] [glyph-proc]
if B [VBar MosaicMiddle (SymbolMid - squareRadiusFW + hv) (SymbolMid + hv) s] [glyph-proc]
# White diagonal-half square
define whiteHalfTriangleParts : list
list 0x25F8 1 0 0 0 1 0
list 0x25F9 0 1 0 0 0 1
list 0x25FA 0 0 1 0 0 1
list 0x25FF 0 0 0 1 1 0
foreach { u LT RT LB RB P Q } [items-of whiteHalfTriangleParts] : begin
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
set-width MosaicWidth
include : intersection
intersection
refer-glyph [MangleName 'blackSquare']
union
if LT [UpperLeftHalfMark] [glyph-proc]
if RT [UpperRightHalfMark] [glyph-proc]
if LB [LowerLeftHalfMark] [glyph-proc]
if RB [LowerRightHalfMark] [glyph-proc]
union
refer-glyph [MangleName 'whiteSquare']
if [not P] [glyph-proc] : dispiro
widths.center (GeometryStroke * 2)
corner (MosaicMiddle - squareRadiusFW * 2) (SymbolMid - squareRadiusFW * 2)
corner (MosaicMiddle + squareRadiusFW * 2) (SymbolMid + squareRadiusFW * 2)
if [not Q] [glyph-proc] : dispiro
widths.center (GeometryStroke * 2)
corner (MosaicMiddle + squareRadiusFW * 2) (SymbolMid - squareRadiusFW * 2)
corner (MosaicMiddle - squareRadiusFW * 2) (SymbolMid + squareRadiusFW * 2)
create-glyph [MangleName 'dottedWhiteTriangle'] [MangleUnicode 0x25EC] : glyph-proc
set-width MosaicWidth
include : refer-glyph : MangleName 'whiteTriangleUp'