Make APL derivatives to follow math operator dimensions (#1456)

This commit is contained in:
be5invis 2022-12-19 21:54:36 -08:00
parent 560dec10eb
commit 5b6a3b8c6a
2 changed files with 16 additions and 15 deletions

View file

@ -13,19 +13,19 @@ glyph-block Symbol-Geometric-Dice : for-width-kinds WideWidth1
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
define diceCombinations : list
list 0x2680 'whiteSquare' { { 1 1 } }
list 0x2681 'whiteSquare' { { 0 0 } { 2 2 } }
list 0x2682 'whiteSquare' { { 0 0 } { 1 1 } { 2 2 } }
list 0x2683 'whiteSquare' { { 0 0 } { 2 0 } { 0 2 } { 2 2 } }
list 0x2684 'whiteSquare' { { 0 0 } { 2 0 } { 1 1 } { 0 2 } { 2 2 } }
list 0x2685 'whiteSquare' { { 0 0 } { 0 1 } { 0 2 } { 2 0 } { 2 1 } { 2 2 } }
list 0x2686 'whiteCircle' { { (5 / 3) 1 } }
list 0x2687 'whiteCircle' { { (1 / 3) 1 } { (5 / 3) 1 } }
list 0x2680 'whiteSquare' 7 { { 1 1 } }
list 0x2681 'whiteSquare' 7 { { 0 0 } { 2 2 } }
list 0x2682 'whiteSquare' 7 { { 0 0 } { 1 1 } { 2 2 } }
list 0x2683 'whiteSquare' 7 { { 0 0 } { 2 0 } { 0 2 } { 2 2 } }
list 0x2684 'whiteSquare' 7 { { 0 0 } { 2 0 } { 1 1 } { 0 2 } { 2 2 } }
list 0x2685 'whiteSquare' 7 { { 0 0 } { 0 1 } { 0 2 } { 2 0 } { 2 1 } { 2 2 } }
list 0x2686 'whiteCircle' 4.5 { { (5 / 3) 1 } }
list 0x2687 'whiteCircle' 4.5 { { (1 / 3) 1 } { (5 / 3) 1 } }
foreach { u frame dots } [items-of diceCombinations] : begin
foreach { u frame dotSizeFactor dots } [items-of diceCombinations] : begin
create-glyph [MangleName : NameUni u] [MangleUnicode u] : glyph-proc
include [refer-glyph : MangleName frame] AS_BASE ALSO_METRICS
define dr : DotRadius / Stroke * [AdviceStroke 7 Geom.Scalar]
define dr : DotRadius / Stroke * [Math.min [AdviceStroke dotSizeFactor Geom.Scalar] [AdviceStroke 7 2]]
define xLeftEx : Geom.MidX - Geom.Size + GeometryStroke
define xRightEx : Geom.MidX + Geom.Size - GeometryStroke
define yBottomEx : Geom.MidY + Geom.Size - GeometryStroke

View file

@ -137,8 +137,8 @@ glyph-block Symbol-Math-APL : begin
# Boxed
create-glyph 0x2338 : aplBoxed : refer-glyph 'equal'
create-glyph 0x233A : aplBoxed : refer-glyph 'whiteDiamond.NWID'
create-glyph 0x233B : aplBoxed : refer-glyph 'whiteSmallCircle.NWID'
create-glyph 0x233A : aplBoxed : refer-glyph 'whiteDiamondOperator'
create-glyph 0x233B : aplBoxed : refer-glyph 'mathSmallCircle'
create-glyph 0x233C : aplBoxed : refer-glyph 'whiteCircle.NWID'
create-glyph 0x2341 : aplBoxed : refer-glyph 'slash'
create-glyph 0x2342 : aplBoxed : refer-glyph 'backslash'
@ -184,17 +184,18 @@ glyph-block Symbol-Math-APL : begin
begin marks
refer-glyph srcs.1
clear-anchors
AplAccented 0x2362 'nabla.aplForm' 'dieresisAbove' [MarkSet.tack]
AplAccented 0x2361 'top' 'dieresisAbove' [MarkSet.tack]
AplAccented 0x2363 'asterisk.pentaSMid' 'dieresisAbove' [MarkSet.plus]
AplAccented 0x2364 'whiteSmallCircle.NWID' 'dieresisAbove' [MarkSet.plus]
AplAccented 0x2364 'mathSmallCircle' 'dieresisAbove' [MarkSet.plus]
AplAccented 0x2365 'whiteCircle.NWID' 'dieresisAbove' [MarkSet.plus]
AplAccented 0x2368 'asciiTilde.low' 'dieresisAbove' [MarkSet.plus]
AplAccented 0x2369 'greater.narrow' 'dieresisAbove' [MarkSet.plus]
AplAccented 0x234A 'bot' 'underlineBelow' [MarkSet.tack]
AplAccented 0x2358 'asciiSingleQuote/body/straight' 'underlineBelow' [MarkSet.plus]
AplAccented 0x235A 'whiteDiamond.NWID' 'underlineBelow' [MarkSet.plus]
AplAccented 0x235B 'whiteSmallCircle.NWID' 'underlineBelow' [MarkSet.plus]
AplAccented 0x235A 'whiteDiamondOperator' 'underlineBelow' [MarkSet.plus]
AplAccented 0x235B 'mathSmallCircle' 'underlineBelow' [MarkSet.plus]
AplAccented 0x235C 'whiteCircle.NWID' 'underlineBelow' [MarkSet.plus]
AplAccented 0x2377 'smallElement' 'underlineBelow' [MarkSet.plus]