1635 lines
60 KiB
Text
1635 lines
60 KiB
Text
###### Other symbols
|
|
$$include '../meta/macros.ptl'
|
|
|
|
import [mix linreg clamp fallback] from '../support/utils'
|
|
import [designParameters] from '../meta/aesthetics'
|
|
import '../support/transform' as Transform
|
|
import '../support/mask-bit' as maskBit
|
|
|
|
glyph-module
|
|
|
|
glyph-block Symbol-Other-Phonetic : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
local triangleSize : Math.min (PeriodRadius) (XH / 5)
|
|
|
|
sketch # trianglecolon
|
|
include : union
|
|
spiro-outline
|
|
corner (Middle - triangleSize * 1.35) XH
|
|
corner Middle (XH - triangleSize * 2.75)
|
|
corner (Middle + triangleSize * 1.35) XH
|
|
spiro-outline
|
|
corner (Middle - triangleSize * 1.35) 0
|
|
corner Middle (0 + triangleSize * 2.75)
|
|
corner (Middle + triangleSize * 1.35) 0
|
|
save 'trianglecolon' 0x2D0
|
|
|
|
sketch # halftrianglecolon
|
|
include : spiro-outline
|
|
corner (Middle - triangleSize * 1.35) XH
|
|
corner Middle (XH - triangleSize * 2.75)
|
|
corner (Middle + triangleSize * 1.35) XH
|
|
save 'halftrianglecolon' 0x2D1
|
|
|
|
define [yOfTone tone] : mix (OperatorStroke / 2) (CAP - OperatorStroke / 2) (tone / 4)
|
|
define [yOfToneNeutral tone] : mix DotRadius (CAP - DotRadius) (tone / 4)
|
|
|
|
foreach tone [range 4 downtill 0] : begin
|
|
create-glyph ('tone' + tone) : glyph-construction
|
|
assign-unicode (0x2E5 + 4 - tone)
|
|
include : VBarRight [mix SB RightSB 0.9] 0 CAP OperatorStroke
|
|
include : HBar [mix SB RightSB 0.1] ([mix SB RightSB 0.9] - 1) [yOfTone tone] OperatorStroke
|
|
create-glyph ('toneSandhi' + tone) : glyph-construction
|
|
assign-unicode (0xA712 + 4 - tone)
|
|
include : VBarLeft [mix SB RightSB 0.1] 0 CAP OperatorStroke
|
|
include : HBar [mix SB RightSB 0.1] ([mix SB RightSB 0.9] - 1) [yOfTone tone] OperatorStroke
|
|
create-glyph ('toneNeutral' + tone) : glyph-construction
|
|
assign-unicode (0xA708 + 4 - tone)
|
|
include : VBarRight [mix SB RightSB 0.9] 0 CAP OperatorStroke
|
|
include : DotAt ([mix SB RightSB 0.1] + DotRadius) [yOfToneNeutral tone] DotRadius
|
|
create-glyph ('toneSandhiNeutral' + tone) : glyph-construction
|
|
assign-unicode (0xA70D + 4 - tone)
|
|
include : VBarLeft [mix SB RightSB 0.1] 0 CAP OperatorStroke
|
|
include : DotAt ([mix SB RightSB 0.9] - DotRadius) [yOfToneNeutral tone] DotRadius
|
|
|
|
foreach toneStart [range 4 downtill 0] : foreach toneEnd [range 4 downtill 0] : begin
|
|
create-glyph ('toneStart' + toneStart + toneEnd) : glyph-construction
|
|
include : intersection
|
|
Rect CAP 0 Middle Width
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (Width / 2) [yOfTone toneStart]
|
|
corner (Width + Width / 2) [yOfTone toneEnd]
|
|
create-glyph ('toneSandhiStart' + toneStart + toneEnd) : glyph-construction
|
|
include : intersection
|
|
Rect CAP 0 Middle Width
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (0 - Width / 2) [yOfTone : mix toneEnd toneStart 2]
|
|
corner (Width + Width / 2) [yOfTone toneEnd]
|
|
include : VBar Middle 0 CAP OperatorStroke
|
|
|
|
foreach toneStart [range 4 downtill 0] : foreach toneEnd [range 4 downtill 0] : begin
|
|
create-glyph ('toneEnd' + toneStart + toneEnd) : glyph-construction
|
|
include : intersection
|
|
Rect CAP 0 0 Middle
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (0 - Width / 2) [yOfTone toneStart]
|
|
corner (Width + Width / 2) [yOfTone : mix toneStart toneEnd 2]
|
|
include : VBar Middle 0 CAP OperatorStroke
|
|
create-glyph ('toneSandhiEnd' + toneStart + toneEnd) : glyph-construction
|
|
include : intersection
|
|
Rect CAP 0 0 Width
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (0 - Width / 2) [yOfTone toneStart]
|
|
corner (Width / 2) [yOfTone toneEnd]
|
|
|
|
foreach toneStart [range 4 downtill 0] : foreach toneMid [range 4 downtill 0] : foreach toneEnd [range 4 downtill 0] : begin
|
|
create-glyph ('toneMid' + toneStart + toneMid + toneEnd) : glyph-construction
|
|
include : intersection
|
|
Rect CAP 0 0 Width
|
|
union
|
|
intersection
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (0 - Width / 2) [yOfTone toneStart]
|
|
corner (Width + Width / 2) [yOfTone : mix toneStart toneMid 2]
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (0 - Width / 2) [yOfTone : mix toneEnd toneMid 2]
|
|
corner (Width + Width / 2) [yOfTone toneEnd]
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (0 - Width / 2) [yOfTone toneStart]
|
|
corner (Width / 2) [yOfTone toneMid]
|
|
dispiro
|
|
widths.center OperatorStroke
|
|
corner (Width / 2) [yOfTone toneMid]
|
|
corner (Width + Width / 2) [yOfTone toneEnd]
|
|
create-glyph ('toneSandhiMid' + toneStart + toneMid + toneEnd) : glyph-construction
|
|
include [refer-glyph ('toneMid' + toneStart + toneMid + toneEnd)] AS_BASE ALSO_METRICS
|
|
|
|
glyph-block Symbol-Other-Suit-Cards : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
local df : DivFrame para.diversityM
|
|
local suitTop : mix symbolMid pictTop 0.75
|
|
local suitBot : mix symbolMid pictBot 0.75
|
|
local suitRight : df.middle + [mix RightSB Width (1 / 2)] - Middle
|
|
local suitLeft : df.middle - (suitRight - df.middle)
|
|
local sw : adviceBlackness 4.25
|
|
|
|
|
|
define [wrap g] : glyph-construction
|
|
set-width df.width
|
|
include g AS_BASE
|
|
|
|
define heartTop : mix suitBot suitTop 0.975
|
|
define [HeartInnerShape top sw tip ext] : begin
|
|
local y2 : mix suitBot top 0.75
|
|
local y3 : mix suitBot top 0.75
|
|
return : spiro-outline
|
|
corner df.middle (suitBot + sw * tip)
|
|
quadcontrols 1 (2 / 3)
|
|
g4 (suitRight - O - sw) y2
|
|
arcvh
|
|
g4 [mix df.middle suitRight 0.5] (top - sw * tip / 1.75)
|
|
archv
|
|
if sw
|
|
: then : list
|
|
corner (df.middle + sw / 3) (y3 - sw * ext)
|
|
corner (df.middle - sw / 3) (y3 - sw * ext)
|
|
: else : corner df.middle (y3 - sw)
|
|
arcvh
|
|
g4 [mix df.middle suitLeft 0.5] (top - sw * tip / 1.75)
|
|
archv
|
|
g4 (suitLeft + O + sw) y2
|
|
quadcontrols 0 (1 / 3)
|
|
close
|
|
|
|
create-glyph 'heartSuit' 0x2665 : wrap : HeartInnerShape heartTop 0 0 0
|
|
|
|
create-glyph 'whiteHeartSuit' 0x2661 : wrap : difference [refer-glyph 'heartSuit'] [HeartInnerShape heartTop sw 1.75 0.8]
|
|
|
|
create-glyph 'spadeSuit' 0x2660 : wrap : union
|
|
sketch
|
|
include : HeartInnerShape suitTop 0 0 0
|
|
apply-transform : Upright
|
|
apply-transform : Translate (-df.middle) (-suitBot)
|
|
apply-transform : Scale 1 (-0.75)
|
|
apply-transform : Translate df.middle suitTop
|
|
apply-transform : Italify
|
|
HBarBottom [mix SB df.rightSB 0.25] [mix df.rightSB SB 0.25] suitBot sw
|
|
VBar df.middle suitBot [mix suitBot suitTop (1 - 0.75 * 0.75)] sw
|
|
|
|
create-glyph 'whiteSpadeSuit' 0x2664 : wrap : difference [refer-glyph 'spadeSuit'] : sketch
|
|
include : HeartInnerShape suitTop sw 2 0
|
|
apply-transform : Upright
|
|
apply-transform : Translate (-df.middle) (-suitBot)
|
|
apply-transform : Scale 1 (-0.75)
|
|
apply-transform : Translate df.middle suitTop
|
|
apply-transform : Italify
|
|
|
|
local clubTopY : mix suitTop suitBot 0.22
|
|
local clubTriangleHeight : (suitTop - suitBot) * 0.3
|
|
define [ClubTriangles r] : union
|
|
RingAt df.middle clubTopY r
|
|
RingAt (df.middle - clubTriangleHeight / [Math.sqrt 3]) (clubTopY - clubTriangleHeight) r
|
|
RingAt (df.middle + clubTriangleHeight / [Math.sqrt 3]) (clubTopY - clubTriangleHeight) r
|
|
spiro-outline
|
|
corner df.middle clubTopY
|
|
corner (df.middle - clubTriangleHeight / [Math.sqrt 3]) (clubTopY - clubTriangleHeight)
|
|
corner (df.middle + clubTriangleHeight / [Math.sqrt 3]) (clubTopY - clubTriangleHeight)
|
|
|
|
define [ClubShape r] : sketch
|
|
include : ClubTriangles r
|
|
include : HBarBottom [mix SB df.rightSB 0.25] [mix df.rightSB SB 0.25] suitBot sw
|
|
include : VBar df.middle suitBot [mix suitBot suitTop 0.45] sw
|
|
|
|
local circleRadius : (suitTop - suitBot) * 0.18
|
|
|
|
create-glyph 'clubSuit' 0x2663 : wrap : ClubShape circleRadius
|
|
|
|
create-glyph 'whiteClubSuit' 0x2667 : wrap : glyph-construction
|
|
local ro : circleRadius + sw / 2
|
|
local ri : circleRadius - sw / 2
|
|
include : difference [ClubShape ro] [ClubTriangles ri]
|
|
|
|
create-glyph 'diamondSuit' 0x2666 : wrap : spiro-outline
|
|
corner df.middle suitTop
|
|
corner (suitRight - O) symbolMid
|
|
corner df.middle suitBot
|
|
corner (suitLeft + O) symbolMid
|
|
|
|
create-glyph 'whiteDiamondSuit' 0x2662 : wrap : intersection [refer-glyph 'diamondSuit']
|
|
union
|
|
dispiro [widths.rhs sw] [flat df.middle suitTop] [curl (suitRight - O) symbolMid]
|
|
dispiro [widths.rhs sw] [flat (suitRight - O) symbolMid] [curl df.middle suitBot]
|
|
dispiro [widths.rhs sw] [flat df.middle suitBot] [curl (suitLeft + O) symbolMid]
|
|
dispiro [widths.rhs sw] [flat (suitLeft + O) symbolMid] [curl df.middle suitTop]
|
|
|
|
|
|
glyph-block Symbol-Other-Planets : begin
|
|
glyph-block-import CommonShapes
|
|
glyph-block-import Symbol-Arrow : ArrowShape
|
|
|
|
sketch # venus
|
|
local obot : pictTop - RightSB + SB
|
|
include : OShape pictTop obot SB RightSB OperatorStroke
|
|
include : VBar Middle pictBot obot OperatorStroke
|
|
include : HBar SB RightSB [mix pictBot (obot + OperatorStroke) 0.5] OperatorStroke
|
|
|
|
save 'venus' 0x2640
|
|
turned 'earth' 0x2641 'venus' Middle symbolMid
|
|
|
|
sketch # mars
|
|
local otop : pictBot + RightSB - SB
|
|
include : OShape otop pictBot SB RightSB OperatorStroke
|
|
include : ArrowShape Middle (otop - OperatorStroke / 3) Middle pictTop ((RightSB - SB) * 0.4)
|
|
save 'mars' 0x2642
|
|
|
|
glyph-block Symbol-Other-Musical : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
define fine : adviceBlackness 6
|
|
define noteSize : Width * 0.4 + fine / 2
|
|
define noteCompress 0.8
|
|
define commonNoteBottom : pictBot + noteCompress / 2 * noteSize
|
|
define [BandShape z1 z2 l r h] : begin
|
|
local slope : (z2.y - z1.y) / (z2.x - z1.x)
|
|
local yl : z1.y + (l - z1.x) * slope
|
|
local yr : z1.y + (r - z1.x) * slope
|
|
return : spiro-outline
|
|
corner l yl
|
|
corner r yr
|
|
corner r (yr + h)
|
|
corner l (yl + h)
|
|
define [MusicalNoteAt size x y] : glyph-construction
|
|
include : Ring (- noteCompress / 2 * size) (noteCompress / 2 * size) (-size) 0
|
|
include : Upright
|
|
include : new Transform 1 0 0.15 1 0 0
|
|
include : Translate x y
|
|
include : Italify
|
|
|
|
create-glyph 'crotchet' 0x2669 : union
|
|
MusicalNoteAt noteSize (Middle + noteSize / 6 + fine / 2 * HVContrast) commonNoteBottom
|
|
VBar (Middle + noteSize / 6) commonNoteBottom pictTop fine
|
|
|
|
create-glyph 'quaver' 0x266A : glyph-construction
|
|
local x3 : mix Middle RightSB 0.35
|
|
local y3 : mix pictBot pictTop 0.25
|
|
local y2 : mix y3 pictTop 0.25
|
|
include : union
|
|
MusicalNoteAt noteSize Middle commonNoteBottom
|
|
VBarRight Middle commonNoteBottom pictTop fine
|
|
dispiro
|
|
widths.rhs fine
|
|
g4.down.start Middle pictTop
|
|
g4.down.mid RightSB y2
|
|
g4 x3 y3
|
|
|
|
do "Beamed Notes"
|
|
local x1 : Middle - noteSize / 6
|
|
local x2 : x1 + noteSize * 7 / 6
|
|
local deltaY : noteCompress * noteSize / 2
|
|
local lb1 : pictBot + noteCompress / 2 * noteSize
|
|
local bandWidth : noteSize * noteCompress * 0.75
|
|
|
|
create-glyph 'beamQuaver' 0x266B : difference
|
|
union
|
|
MusicalNoteAt noteSize x1 commonNoteBottom
|
|
VBarRight x1 commonNoteBottom (pictTop - deltaY) fine
|
|
MusicalNoteAt noteSize x2 (commonNoteBottom + deltaY)
|
|
VBarRight x2 (commonNoteBottom + deltaY) pictTop fine
|
|
BandShape
|
|
object [x x1] [y : pictTop - deltaY]
|
|
object [x x2] [y pictTop]
|
|
x1 - fine * HVContrast
|
|
x2 + 0
|
|
0 - bandWidth
|
|
BandShape
|
|
object [x x1] [y : pictTop - deltaY]
|
|
object [x x2] [y pictTop]
|
|
x1 - fine * HVContrast
|
|
x2 + 0
|
|
0 + bandWidth
|
|
|
|
create-glyph 'beamSemiQuaver' 0x266C : union [refer-glyph 'beamQuaver']
|
|
BandShape
|
|
object [x x1] [y : pictTop - deltaY - 1.5 * bandWidth]
|
|
object [x x2] [y : pictTop - 1.5 * bandWidth]
|
|
x1 - fine * HVContrast
|
|
x2 + 0
|
|
0 - bandWidth
|
|
|
|
do "sharp, flat and neutral"
|
|
local nsTop pictTop
|
|
local nsBot pictBot
|
|
local fine : adviceBlackness 3.5
|
|
local fine2 : adviceBlackness 4
|
|
local l : SB - fine * 0
|
|
local r : RightSB + fine * 0
|
|
local hsp : ((r - l) - (fine * 2 * HVContrast)) * 0.3
|
|
local skew 0.2
|
|
|
|
create-glyph 'sharpTone' 0x266F : glyph-construction
|
|
include : dispiro
|
|
widths.center
|
|
flat l ([mix nsTop nsBot 0.3] - (Middle - l) * skew) [heading Rightward]
|
|
curl r ([mix nsTop nsBot 0.3] - (Middle - r) * skew) [heading Rightward]
|
|
include : dispiro
|
|
widths.center
|
|
flat l ([mix nsTop nsBot 0.7] - (Middle - l) * skew) [heading Rightward]
|
|
curl r ([mix nsTop nsBot 0.7] - (Middle - r) * skew) [heading Rightward]
|
|
include : VBarLeft (l + hsp) (nsBot - (Middle - l - hsp) * skew) (nsTop - (Middle - l - hsp) * skew) fine
|
|
include : VBarRight (r - hsp) (nsBot - (Middle - r + hsp) * skew) (nsTop - (Middle - r + hsp) * skew) fine
|
|
|
|
create-glyph 'flatTone' 0x266D : glyph-construction
|
|
local yTerminal : mix nsBot nsTop 0.55
|
|
local curly 0.65
|
|
local curly2 1.1
|
|
local curly3 0.3
|
|
local l [mix SB RightSB 0.07]
|
|
local r [mix RightSB SB 0.07]
|
|
include : difference
|
|
union
|
|
VBarLeft l nsBot nsTop fine
|
|
dispiro
|
|
widths.lhs fine
|
|
g4 l (nsBot - 1)
|
|
alsoThru 0.5 curly3
|
|
g4.up.mid (r - O + 1) ([mix nsBot yTerminal curly] + (r - l) * skew - TanSlope * SmoothAdjust) [widths.lhs (fine + 1)]
|
|
g4.left.mid ([mix l r 0.5] - CorrectionOMidX * fine) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2 + 1)
|
|
g4 l (yTerminal + 1)
|
|
difference
|
|
spiro-outline
|
|
corner l (nsBot - UPM)
|
|
corner l nsBot
|
|
alsoThru 0.5 curly3
|
|
g4.up.mid (r - O) ([mix nsBot yTerminal curly] + (r - l) * skew - TanSlope * SmoothAdjust)
|
|
g4.left.mid ([mix l r 0.5] - CorrectionOMidX * fine) ([mix nsBot yTerminal curly2] + (r - l) * skew / 2)
|
|
corner l yTerminal
|
|
corner l (yTerminal + 1)
|
|
corner l nsTop
|
|
corner Width nsTop
|
|
corner Width (nsBot - UPM)
|
|
spiro-outline
|
|
corner 0 yTerminal
|
|
corner 0 nsTop
|
|
corner (l + fine * HVContrast) nsTop
|
|
corner (l + fine * HVContrast) yTerminal
|
|
spiro-outline
|
|
corner l (nsBot - UPM)
|
|
corner l nsTop
|
|
corner (l - UPM) nsTop
|
|
corner (l - UPM) (nsBot - UPM)
|
|
|
|
create-glyph 'neutralTone' 0x266E : glyph-construction
|
|
local k : 0.25 - (Stroke * 0.25 / (nsTop - nsBot))
|
|
local kr 0.5
|
|
local ll (l + hsp * kr)
|
|
local rr (r - hsp * kr)
|
|
|
|
local barLeft : VBarLeft ll [mix nsBot nsTop k] nsTop fine
|
|
local barRight : VBarRight rr nsBot [mix nsBot nsTop (1 - k)] fine
|
|
local diagLow : dispiro
|
|
widths.lhs fine
|
|
flat ll [mix nsBot nsTop k]
|
|
curl rr ([mix nsBot nsTop k] + (rr - ll) * skew)
|
|
local belowDiagLow : spiro-outline
|
|
corner ll [mix nsBot nsTop k]
|
|
corner rr ([mix nsBot nsTop k] + (rr - ll) * skew)
|
|
corner rr nsBot
|
|
corner ll nsBot
|
|
local diagHigh : dispiro
|
|
widths.lhs fine
|
|
flat rr [mix nsBot nsTop (1 - k)]
|
|
curl ll ([mix nsBot nsTop (1 - k)] - (rr - ll) * skew)
|
|
local aboveDiagHigh : spiro-outline
|
|
corner rr [mix nsBot nsTop (1 - k)]
|
|
corner ll ([mix nsBot nsTop (1 - k)] - (rr - ll) * skew)
|
|
corner ll nsTop
|
|
corner rr nsTop
|
|
local outsideBars : difference
|
|
spiro-outline
|
|
corner (ll - UPM) (nsBot - UPM)
|
|
corner (ll - UPM) (nsTop + UPM)
|
|
corner (rr + UPM) (nsTop + UPM)
|
|
corner (rr + UPM) (nsBot - UPM)
|
|
spiro-outline
|
|
corner ll nsBot
|
|
corner ll nsTop
|
|
corner rr nsTop
|
|
corner rr nsBot
|
|
|
|
include : union
|
|
difference barLeft belowDiagLow
|
|
difference barRight aboveDiagHigh
|
|
difference diagLow barLeft barRight outsideBars
|
|
difference diagHigh barLeft barRight outsideBars
|
|
|
|
glyph-block Symbol-Other-Metric-Marks : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
sketch # metmark
|
|
include : VBar Middle (-fontMetrics.OS_2.usWinDescent) (fontMetrics.OS_2.usWinAscent) ShoulderFine
|
|
include : HBar Middle Width 0 ShoulderFine
|
|
include : HBar Middle Width CAP ShoulderFine
|
|
include : HBar Middle Width XH ShoulderFine
|
|
include : HBar Middle Width Descender ShoulderFine
|
|
include : HBar 0 Middle symbolMid ShoulderFine
|
|
include : HBar 0 Middle parenTop ShoulderFine
|
|
include : HBar 0 Middle parenBot ShoulderFine
|
|
save 'metmark' 0xE09F
|
|
|
|
define MosaicTop fontMetrics.OS_2.sTypoAscender
|
|
define MosaicBottom fontMetrics.OS_2.sTypoDescender
|
|
define MarkerSize (UPM / 12)
|
|
define MarkerBarWidth (UPM / 50)
|
|
|
|
sketch # boxMarkLeft
|
|
set-width 0
|
|
include : spiro-outline
|
|
corner 0 parenTop
|
|
corner 0 (parenTop + MarkerSize * 1.5)
|
|
corner (-MarkerSize * 1.5) parenTop
|
|
include : spiro-outline
|
|
corner 0 parenBot
|
|
corner 0 (parenBot - MarkerSize * 1.5)
|
|
corner (-MarkerSize * 1.5) parenBot
|
|
save 'boxMarkLeft' 0xE096
|
|
|
|
sketch # boxMarkRight
|
|
set-width 0
|
|
include : spiro-outline
|
|
corner 0 parenTop
|
|
corner 0 (parenTop + MarkerSize * 1.5)
|
|
corner (+MarkerSize * 1.5) parenTop
|
|
include : spiro-outline
|
|
corner 0 parenBot
|
|
corner 0 (parenBot - MarkerSize * 1.5)
|
|
corner (+MarkerSize * 1.5) parenBot
|
|
save 'boxMarkRight' 0xE097
|
|
|
|
sketch # mosaicMarkLeft
|
|
set-width 0
|
|
include : spiro-outline
|
|
corner 0 MosaicTop
|
|
corner 0 (MosaicTop + MarkerSize * 1.5)
|
|
corner (-MarkerSize * 1.5) MosaicTop
|
|
include : spiro-outline
|
|
corner 0 MosaicBottom
|
|
corner 0 (MosaicBottom - MarkerSize * 1.5)
|
|
corner (-MarkerSize * 1.5) MosaicBottom
|
|
save 'mosaicMarkLeft' 0xE098
|
|
|
|
sketch # mosaicMarkRight
|
|
set-width 0
|
|
include : spiro-outline
|
|
corner 0 MosaicTop
|
|
corner 0 (MosaicTop + MarkerSize * 1.5)
|
|
corner (+MarkerSize * 1.5) MosaicTop
|
|
include : spiro-outline
|
|
corner 0 MosaicBottom
|
|
corner 0 (MosaicBottom - MarkerSize * 1.5)
|
|
corner (+MarkerSize * 1.5) MosaicBottom
|
|
save 'mosaicMarkRight' 0xE099
|
|
|
|
sketch # baselineMarkUnder
|
|
set-width 0
|
|
include : HBar (-Width * 2) (Width * 2) 0 MarkerBarWidth
|
|
save 'baselineMarkUnder' 0xE09A
|
|
|
|
sketch # baselineMarkLeft
|
|
set-width 0
|
|
include : spiro-outline
|
|
corner 0 0
|
|
corner (-MarkerSize * 1.5) (+MarkerSize * 1.5)
|
|
corner (-MarkerSize * 1.5) (-MarkerSize * 1.5)
|
|
save 'baselineMarkLeft' 0xE09B
|
|
|
|
sketch # baselineMarkRight
|
|
set-width 0
|
|
include : spiro-outline
|
|
corner 0 0
|
|
corner (+MarkerSize * 1.5) (+MarkerSize * 1.5)
|
|
corner (+MarkerSize * 1.5) (-MarkerSize * 1.5)
|
|
save 'baselineMarkRight' 0xE09C
|
|
|
|
glyph-block Symbol-Other-Fags : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
local sw : adviceBlackness 5
|
|
local flagDown : 0.07 * (parenTop - parenBot)
|
|
local delta 1
|
|
local curliness 0.85
|
|
define [FlagBar] : VBar SB pictBot pictTop sw
|
|
sketch # Black flag
|
|
include : spiro-outline
|
|
corner SB pictTop
|
|
curl (SB + delta) pictTop
|
|
alsoThru 0.5 (1 - curliness)
|
|
g4 Middle (pictTop - flagDown / 2)
|
|
alsoThru 0.5 curliness
|
|
flat (RightSB - delta) (pictTop - flagDown)
|
|
corner RightSB (pictTop - flagDown)
|
|
corner RightSB (symbolMid - flagDown)
|
|
curl (RightSB - delta) (symbolMid - flagDown)
|
|
alsoThru 0.5 (1 - curliness)
|
|
g4 Middle (symbolMid - flagDown / 2)
|
|
alsoThru 0.5 curliness
|
|
flat (SB + delta) symbolMid
|
|
corner SB symbolMid
|
|
close
|
|
include : Translate (sw / 2 * HVContrast) 0
|
|
include : FlagBar
|
|
save 'blackflag' 0x2691
|
|
sketch # White flag
|
|
include : VBarRight RightSB (symbolMid - flagDown) (pictTop - flagDown) sw
|
|
include : dispiro
|
|
widths.rhs sw
|
|
flat SB pictTop [heading Rightward]
|
|
curl (SB + delta) pictTop [heading Rightward]
|
|
alsoThru 0.5 (1 - curliness)
|
|
g4 Middle (pictTop - flagDown / 2)
|
|
alsoThru 0.5 curliness
|
|
flat (RightSB - delta) (pictTop - flagDown) [heading Rightward]
|
|
curl RightSB (pictTop - flagDown) [heading Rightward]
|
|
include : dispiro
|
|
widths.rhs sw
|
|
flat RightSB ((symbolMid - sw / 2) - flagDown) [heading Leftward]
|
|
curl (RightSB - delta) ((symbolMid - sw / 2) - flagDown) [heading Leftward]
|
|
alsoThru 0.5 (1 - curliness)
|
|
g4 Middle ((symbolMid - sw / 2) - flagDown / 2)
|
|
alsoThru 0.5 curliness
|
|
flat (SB + delta) (symbolMid - sw / 2) [heading Leftward]
|
|
curl SB (symbolMid - sw / 2) [heading Leftward]
|
|
include : Translate (sw / 2 * HVContrast) 0
|
|
include : FlagBar
|
|
save 'whiteflag' 0x2690
|
|
|
|
glyph-block Symbol-Other-Typographic : begin
|
|
glyph-block-import CommonShapes
|
|
sketch # Kome
|
|
local sw : adviceBlackness 3.75
|
|
local radius : (RightSB - SB) / 2
|
|
include : dispiro
|
|
widths.center sw
|
|
flat (Middle - radius) (symbolMid - radius)
|
|
curl (Middle + radius) (symbolMid + radius)
|
|
|
|
include : dispiro
|
|
widths.center sw
|
|
flat (Middle + radius) (symbolMid - radius)
|
|
curl (Middle - radius) (symbolMid + radius)
|
|
local r0 : Math.min ((RightSB - SB + (sw / [Math.sqrt 2]) - sw * 3) / 4) DotRadius
|
|
local r : radius - r0 + (sw / 2 / [Math.sqrt 2])
|
|
include : RingAt (Middle + r) symbolMid r0
|
|
include : RingAt (Middle - r) symbolMid r0
|
|
include : RingAt Middle (symbolMid + r) r0
|
|
include : RingAt Middle (symbolMid - r) r0
|
|
save 'kome' 0x203B
|
|
|
|
sketch
|
|
local sw : [adviceBlackness 3] / 2
|
|
local kInside 0.5
|
|
local kOutside 2.5
|
|
local l : mix SB RightSB 0.1
|
|
local r : mix RightSB SB 0.1
|
|
include : spiro-outline
|
|
corner [mix l r 0.6] pictTop
|
|
corner (l - sw * kInside) (symbolMid - sw)
|
|
corner (r - sw * kOutside) (symbolMid - sw)
|
|
corner [mix r l 0.6] pictBot
|
|
corner (r + sw * kInside) (symbolMid + sw)
|
|
corner (l + sw * kOutside) (symbolMid + sw)
|
|
save 'boltSymbol' 0x26A1
|
|
|
|
for-width-kinds WideWidth1
|
|
define faceTop : mix symbolMid pictTop 0.75
|
|
define faceBot : mix symbolMid pictBot 0.75
|
|
define faceWidth : Math.min (MosaicWidth - SB * 2) (faceTop - faceBot)
|
|
define faceMiddle : MosaicWidth / 2
|
|
define faceLeft : faceMiddle - faceWidth / 2
|
|
define faceRight : faceMiddle + faceWidth / 2
|
|
define faceSma : SmoothAOf (SmallSmooth * MosaicWidthScalar) MosaicWidth
|
|
define faceSmb : SmoothBOf (SmallSmooth * MosaicWidthScalar) MosaicWidth
|
|
|
|
define faceStroke : adviceBlackness 5 ((faceWidth + SB * 2) / Width)
|
|
define faceInnerStroke : adviceBlackness 8 ((faceWidth + SB * 2) / Width)
|
|
define eyeRadius : DotRadius / Stroke * faceInnerStroke
|
|
define eyeHeight 0.625
|
|
define mouthDepth : 0.025 * [Math.sqrt MosaicWidthScalar]
|
|
|
|
define [FaceRing F] : F faceTop faceBot faceLeft faceRight faceStroke faceSma faceSmb
|
|
define [SmileFace width] : union
|
|
DotAt (faceMiddle - width / 2 + eyeRadius / 2) [mix faceBot faceTop eyeHeight] eyeRadius
|
|
DotAt (faceMiddle + width / 2 - eyeRadius / 2) [mix faceBot faceTop eyeHeight] eyeRadius
|
|
dispiro
|
|
widths.center faceInnerStroke
|
|
g4 (faceMiddle - width / 2) [mix faceBot faceTop (1 - eyeHeight + mouthDepth)]
|
|
g4 (faceMiddle) [mix faceBot faceTop (1 - eyeHeight - mouthDepth)]
|
|
g4 (faceMiddle + width / 2) [mix faceBot faceTop (1 - eyeHeight + mouthDepth)]
|
|
|
|
create-glyph [MangleName 'whiteSmileFace'] [MangleUnicode 0x263a] : glyph-construction
|
|
set-width MosaicWidth
|
|
include : FaceRing OShape
|
|
include : SmileFace : 0.6 * (faceWidth - faceStroke * 2)
|
|
|
|
create-glyph [MangleName 'blackSmileFace'] [MangleUnicode 0x263B] : glyph-construction
|
|
set-width MosaicWidth
|
|
include : FaceRing OShapeOutline
|
|
include : SmileFace : 0.6 * (faceWidth - faceStroke * 2)
|
|
|
|
|
|
glyph-block Symbol-Other-IEC-Power-And-Playback : for-width-kinds WideWidth1 : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
define leftFW : 0 + SB * MosaicWidthScalar
|
|
define rightFW : MosaicWidth - SB * MosaicWidthScalar
|
|
define squareRadiusFW : (rightFW - leftFW) / (2 * [Math.pow MosaicWidthScalar 0.3])
|
|
define topFW : symbolMid + squareRadiusFW
|
|
define bottomFW : symbolMid - squareRadiusFW
|
|
|
|
define df : DivFrame MosaicWidthScalar
|
|
define gap : Math.max (squareRadiusFW / 8 * MosaicWidthScalar) GeometryStroke
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : RingStrokeAt df.middle symbolMid squareRadiusFW GeometryStroke
|
|
save [MangleName 'powerOff'] [MangleUnicode 0x2B58]
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : Rect
|
|
symbolMid + squareRadiusFW
|
|
symbolMid - squareRadiusFW
|
|
df.middle - GeometryStroke / 2 * HVContrast
|
|
df.middle + GeometryStroke / 2 * HVContrast
|
|
save [MangleName 'powerOn'] [MangleUnicode 0x23FD]
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : refer-glyph [MangleName 'powerOff']
|
|
include : Rect
|
|
symbolMid + squareRadiusFW - GeometryStroke - gap
|
|
symbolMid - squareRadiusFW + GeometryStroke + gap
|
|
df.middle - GeometryStroke / 2 * HVContrast
|
|
df.middle + GeometryStroke / 2 * HVContrast
|
|
save [MangleName 'powerOnOff'] [MangleUnicode 0x23FC]
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : union
|
|
difference
|
|
refer-glyph [MangleName 'powerOff']
|
|
spiro-outline
|
|
corner df.middle symbolMid
|
|
corner (df.middle - gap * 2 - GeometryStroke * HVContrast) (symbolMid + squareRadiusFW * 2)
|
|
corner (df.middle + gap * 2 + GeometryStroke * HVContrast) (symbolMid + squareRadiusFW * 2)
|
|
Rect
|
|
symbolMid + 1.5 * squareRadiusFW
|
|
symbolMid - 0.0 * squareRadiusFW
|
|
df.middle - GeometryStroke / 2 * HVContrast
|
|
df.middle + GeometryStroke / 2 * HVContrast
|
|
save [MangleName 'powerStandby'] [MangleUnicode 0x23FB]
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : difference
|
|
CircleRingAt df.middle symbolMid squareRadiusFW
|
|
CircleRingAt
|
|
df.middle + squareRadiusFW * 0.5
|
|
symbolMid + squareRadiusFW * 0.35
|
|
squareRadiusFW * 1.1
|
|
apply-transform : Translate (squareRadiusFW * 0.15) 0
|
|
save [MangleName 'powerSleep'] [MangleUnicode 0x23FE]
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : RingAt df.middle symbolMid squareRadiusFW GeometryStroke
|
|
save [MangleName 'playback/record'] [MangleUnicode 0x23FA]
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : Rect (symbolMid + squareRadiusFW) (symbolMid - squareRadiusFW) (df.middle - squareRadiusFW) (df.middle + squareRadiusFW)
|
|
save [MangleName 'playback/stop'] [MangleUnicode 0x23F9]
|
|
|
|
sketch
|
|
set-width df.width
|
|
include : Rect (symbolMid + squareRadiusFW) (symbolMid - squareRadiusFW) (df.middle - squareRadiusFW) (df.middle - squareRadiusFW / 3)
|
|
include : Rect (symbolMid + squareRadiusFW) (symbolMid - squareRadiusFW) (df.middle + squareRadiusFW / 3) (df.middle + squareRadiusFW)
|
|
save [MangleName 'playback/pause'] [MangleUnicode 0x23F8]
|
|
|
|
local trigRad : squareRadiusFW + O * 2
|
|
sketch
|
|
set-width df.width
|
|
include : spiro-outline
|
|
corner (df.middle - trigRad) (symbolMid + trigRad / 2)
|
|
corner (df.middle + trigRad) (symbolMid + trigRad / 2)
|
|
corner (df.middle) (symbolMid - trigRad / 2)
|
|
save [MangleName 'playback/down'] [MangleUnicode 0x23F7]
|
|
sketch
|
|
set-width df.width
|
|
include : spiro-outline
|
|
corner (df.middle - trigRad) (symbolMid - trigRad / 2)
|
|
corner (df.middle + trigRad) (symbolMid - trigRad / 2)
|
|
corner (df.middle) (symbolMid + trigRad / 2)
|
|
save [MangleName 'playback/up'] [MangleUnicode 0x23F6]
|
|
sketch
|
|
set-width df.width
|
|
include : spiro-outline
|
|
corner (df.middle - trigRad / 2) (symbolMid - trigRad)
|
|
corner (df.middle - trigRad / 2) (symbolMid + trigRad)
|
|
corner (df.middle + trigRad / 2) (symbolMid)
|
|
save [MangleName 'playback/right'] [MangleUnicode 0x23F5]
|
|
sketch
|
|
set-width df.width
|
|
include : spiro-outline
|
|
corner (df.middle + trigRad / 2) (symbolMid - trigRad)
|
|
corner (df.middle + trigRad / 2) (symbolMid + trigRad)
|
|
corner (df.middle - trigRad / 2) (symbolMid)
|
|
save [MangleName 'playback/left'] [MangleUnicode 0x23F4]
|
|
|
|
|
|
glyph-block Symbol-Other-Powerline-And-GUI : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
define uiFigTop : mix parenBot parenTop 0.95
|
|
define uiFigBot : mix parenBot parenTop 0.05
|
|
|
|
sketch # branch
|
|
local fine : adviceBlackness 3.5
|
|
local y1 : mix uiFigBot uiFigTop 0.8
|
|
local y2 : mix uiFigBot uiFigTop 0.2
|
|
include : VBarLeft SB uiFigBot uiFigTop fine
|
|
include : dispiro
|
|
widths.rhs fine
|
|
flat RightSB y1
|
|
curl RightSB [mix y1 y2 0.4]
|
|
g4 (SB + fine * HVContrast) y2 [heading Leftward]
|
|
include : DotAt (RightSB - fine * HVContrast / 2) y1 [Math.max (fine * 1.5) PeriodRadius]
|
|
save 'branch' 0xE0A0
|
|
|
|
sketch # pwlLock
|
|
local fine : adviceBlackness 3.5
|
|
local lockTop : mix uiFigBot uiFigTop 0.6
|
|
local lockLeft : SB / 2
|
|
local lockRight : Width - SB / 2
|
|
local lockHoleWidth : 1 / 5
|
|
local lockHoleLeft : mix lockLeft lockRight (1 / 2 - lockHoleWidth / 2)
|
|
local lockHoleRight : mix lockLeft lockRight (1 / 2 + lockHoleWidth / 2)
|
|
local lockHoleTop : mix uiFigBot lockTop 0.75
|
|
local lockHoleBottom : mix uiFigBot lockTop 0.25
|
|
include : union
|
|
intersection
|
|
spiro-outline
|
|
corner 0 (2 * uiFigTop)
|
|
corner Width (2 * uiFigTop)
|
|
corner Width (lockTop - 1)
|
|
corner 0 (lockTop - 1)
|
|
close
|
|
OShape uiFigTop uiFigBot SB RightSB fine (SmallSmoothA) (SmallSmoothB)
|
|
difference
|
|
spiro-outline
|
|
corner lockLeft lockTop
|
|
corner lockRight lockTop
|
|
corner lockRight uiFigBot
|
|
corner lockLeft uiFigBot
|
|
close
|
|
OShapeOutline lockHoleTop lockHoleBottom lockHoleLeft lockHoleRight fine (SmallSmoothA * lockHoleWidth) (SmallSmoothB * lockHoleWidth)
|
|
|
|
save 'pwlLock' 0xE0A2
|
|
|
|
for-width-kinds WideWidth2
|
|
do "arrowheadShapedPointer"
|
|
define scaffold : object
|
|
set scaffold.top : mix uiFigBot uiFigTop 0.85
|
|
set scaffold.bot : mix uiFigBot uiFigTop 0.15
|
|
set scaffold.width : (Middle - SB) * 2 * [Math.pow (MosaicWidth / Width) 0.3]
|
|
set scaffold.xMiddle : MosaicWidth / 2
|
|
set scaffold.xLeft : scaffold.xMiddle - scaffold.width / 2
|
|
set scaffold.xRight : scaffold.xMiddle + scaffold.width / 2
|
|
sketch # arrowheadShapedPointer
|
|
set-width MosaicWidth
|
|
include : spiro-outline
|
|
corner scaffold.xLeft scaffold.top
|
|
corner scaffold.xRight [mix scaffold.bot scaffold.top (1 / 4)]
|
|
corner [mix scaffold.xLeft scaffold.xRight (2 / 5)] [mix scaffold.bot scaffold.top (1 / 4)]
|
|
corner scaffold.xLeft scaffold.bot
|
|
save [MangleName 'arrowheadShapedPointer'] [MangleUnicode 0x1FBB0]
|
|
|
|
do "Split graphics"
|
|
define mLeft SB
|
|
define mRight : MosaicWidth - SB
|
|
|
|
define [RoundSegW n hs he] : lambda [h1 v1 h2 v2 cl cr] : glyph-construction
|
|
local sw : adviceBlackness 4
|
|
local left mLeft
|
|
local right : mRight + MosaicWidth * (n - 1)
|
|
include : dispiro
|
|
widths.center sw
|
|
corner [mix left right h1] [mix uiFigBot uiFigTop v1] hs
|
|
corner [mix left right h2] [mix uiFigBot uiFigTop v2] he
|
|
end : function [set this.contrast 1]
|
|
if cl : include : CircleDotAt [mix left right h1] [mix uiFigBot uiFigTop v1] (sw / 2)
|
|
if cr : include : CircleDotAt [mix left right h2] [mix uiFigBot uiFigTop v2] (sw / 2)
|
|
|
|
define [ArcVHW n] : lambda [h1 v1 h2 v2 cl cr] : glyph-construction
|
|
local sw : adviceBlackness 4
|
|
local left mLeft
|
|
local right : mRight + MosaicWidth * (n - 1)
|
|
include : dispiro
|
|
widths.center sw
|
|
corner [mix left right h1] [mix uiFigBot uiFigTop v1] [heading : if (v2 > v1) Upward Downward]
|
|
arcvh
|
|
corner [mix left right h2] [mix uiFigBot uiFigTop v2] [heading : if (h2 > h1) Rightward Leftward]
|
|
end : function [set this.contrast 1]
|
|
if cl : include : CircleDotAt [mix left right h1] [mix uiFigBot uiFigTop v1] (sw / 2)
|
|
if cr : include : CircleDotAt [mix left right h2] [mix uiFigBot uiFigTop v2] (sw / 2)
|
|
|
|
define [ArcHVW n] : lambda [h1 v1 h2 v2 cl cr] : glyph-construction
|
|
local sw : adviceBlackness 4
|
|
local left mLeft
|
|
local right : mRight + MosaicWidth * (n - 1)
|
|
include : dispiro
|
|
widths.center sw
|
|
corner [mix left right h1] [mix uiFigBot uiFigTop v1] [heading : if (h2 > h1) Rightward Leftward]
|
|
archv
|
|
corner [mix left right h2] [mix uiFigBot uiFigTop v2] [heading : if (v2 > v1) Upward Downward]
|
|
end : function [set this.contrast 1]
|
|
if cl : include : CircleDotAt [mix left right h1] [mix uiFigBot uiFigTop v1] (sw / 2)
|
|
if cr : include : CircleDotAt [mix left right h2] [mix uiFigBot uiFigTop v2] (sw / 2)
|
|
|
|
define [BoxW n] : lambda [h1 v1 h2 v2] : glyph-construction
|
|
local sw : adviceBlackness 4
|
|
local left mLeft
|
|
local right : mRight + MosaicWidth * (n - 1)
|
|
include : spiro-outline
|
|
corner [mix left right h1] [mix uiFigBot uiFigTop v1]
|
|
corner [mix left right h2] [mix uiFigBot uiFigTop v1]
|
|
corner [mix left right h2] [mix uiFigBot uiFigTop v2]
|
|
corner [mix left right h1] [mix uiFigBot uiFigTop v2]
|
|
|
|
define [CircW n] : lambda [h1 v1 r] : glyph-construction
|
|
local sw : adviceBlackness 4
|
|
local left mLeft
|
|
local right : mRight + MosaicWidth * (n - 1)
|
|
include : DotAt [mix left right h1] [mix uiFigBot uiFigTop v1] (r * (uiFigTop - uiFigBot))
|
|
|
|
define [Nop] : begin
|
|
define RoundSeg2 : RoundSegW 2 Nop Nop
|
|
define Box2 : BoxW 2
|
|
define Circ2 : CircW 2
|
|
define RoundSeg3 : RoundSegW 3 Nop Nop
|
|
define RoundSeg3H : RoundSegW 3 [heading Rightward] [heading Rightward]
|
|
define RoundSeg3V : RoundSegW 3 [heading Downward] [heading Downward]
|
|
define ArcVH3 : ArcVHW 3
|
|
define ArcHV3 : ArcHVW 3
|
|
define Box3 : BoxW 3
|
|
define Circ3 : CircW 3
|
|
|
|
define [MosaicWidthMask] : spiro-outline
|
|
corner 0 [mix parenBot parenTop (-1)]
|
|
corner MosaicWidth [mix parenBot parenTop (-1)]
|
|
corner MosaicWidth [mix parenBot parenTop (+2)]
|
|
corner 0 [mix parenBot parenTop (+2)]
|
|
|
|
define [RunningManBody xOffset] : glyph-construction
|
|
include : union
|
|
RoundSeg2 (0 / 16) (3 / 8) (3 / 16) (5 / 8) 1 1
|
|
RoundSeg2 (3 / 16) (5 / 8) (10 / 16) (5 / 8)
|
|
RoundSeg2 (10 / 16) (5 / 8) (13 / 16) (7 / 8) 1 1
|
|
RoundSeg2 (4 / 16) (3 / 8) (9 / 16) (3 / 8) 1 1
|
|
RoundSeg2 (9 / 16) (3 / 8) (13 / 16) (0 / 8)
|
|
RoundSeg2 (13 / 16) (0 / 8) (15 / 16) (0 / 8) 1 1
|
|
RoundSeg2 (4 / 16) (6 / 16) (6 / 16) (3 / 16)
|
|
RoundSeg2 (6 / 16) (3 / 16) (0 / 16) (3 / 16) 1 1
|
|
RoundSeg2 (0 / 16) (3 / 16) (2 / 16) (0 / 8) 0 1
|
|
Box2 (4 / 16) (6 / 16) (8 / 16) (5 / 8)
|
|
apply-transform : Translate xOffset 0
|
|
|
|
define [RunningManHead xOffset] : glyph-construction
|
|
include : Circ2 (6 / 16) (14 / 16) (5 / 32)
|
|
apply-transform : Translate xOffset 0
|
|
|
|
sketch # runningManLeft
|
|
set-width MosaicWidth
|
|
include : RunningManHead 0
|
|
include : intersection
|
|
MosaicWidthMask
|
|
RunningManBody 0
|
|
save [MangleName 'runningManLeft'] [MangleUnicode 0x1FBB2]
|
|
|
|
sketch # runningManRight
|
|
set-width MosaicWidth
|
|
include : intersection
|
|
MosaicWidthMask
|
|
RunningManBody (-MosaicWidth)
|
|
save [MangleName 'runningManRight'] [MangleUnicode 0x1FBB3]
|
|
|
|
define [FolderBody xOffset] : glyph-construction
|
|
include : union
|
|
RoundSeg2 (0 / 16) (1 / 8) (0 / 16) (11 / 16)
|
|
RoundSeg2 (0 / 16) (11 / 16) (3 / 16) (7 / 8) 1 1
|
|
RoundSeg2 (3 / 16) (7 / 8) (6 / 16) (7 / 8)
|
|
RoundSeg2 (6 / 16) (7 / 8) (9 / 16) (11 / 16) 1 1
|
|
RoundSeg2 (9 / 16) (11 / 16) (16 / 16) (11 / 16) 0 1
|
|
RoundSeg2 (16 / 16) (11 / 16) (16 / 16) (1 / 8)
|
|
RoundSeg2 (0 / 16) (1 / 8) (16 / 16) (1 / 8) 1 1
|
|
apply-transform : Translate xOffset 0
|
|
|
|
sketch # folderLeft
|
|
set-width MosaicWidth
|
|
include : intersection
|
|
MosaicWidthMask
|
|
FolderBody 0
|
|
save [MangleName 'folderLeft'] [MangleUnicode 0x1FBB9]
|
|
|
|
sketch # folderRight
|
|
set-width MosaicWidth
|
|
include : intersection
|
|
MosaicWidthMask
|
|
FolderBody (-MosaicWidth)
|
|
save [MangleName 'folderRight'] [MangleUnicode 0x1FBBA]
|
|
|
|
define [PointingHandBody xOffset] : glyph-construction
|
|
include : union
|
|
RoundSeg3 (0 / 24) (0 / 8) (0 / 24) (8 / 8) 1 1
|
|
RoundSeg3 (3 / 24) (7 / 8) (0 / 24) (8 / 8)
|
|
RoundSeg3 (3 / 24) (1 / 8) (0 / 24) (0 / 8)
|
|
RoundSeg3V (3 / 24) (7 / 8) (3 / 24) (1 / 8)
|
|
ArcVH3 (3 / 24) (7 / 8) (6 / 24) (8 / 8)
|
|
ArcVH3 (3 / 24) (1 / 8) (6 / 24) (0 / 8)
|
|
RoundSeg3H (6 / 24) (8 / 8) (22 / 24) (8 / 8)
|
|
ArcHV3 (22 / 24) (8 / 8) (24 / 24) (7 / 8)
|
|
ArcVH3 (24 / 24) (7 / 8) (22 / 24) (6 / 8)
|
|
RoundSeg3H (14 / 24) (6 / 8) (22 / 24) (6 / 8)
|
|
ArcHV3 (11 / 24) (8 / 8) (14 / 24) (6 / 8)
|
|
ArcVH3 (14 / 24) (6 / 8) (12 / 24) (5 / 8)
|
|
RoundSeg3H (9 / 24) (5 / 8) (12 / 24) (5 / 8) 1 0
|
|
ArcVH3 (9 / 24) (5 / 8) (3 / 24) (2 / 8)
|
|
ArcHV3 (15 / 24) (6 / 8) (17 / 24) (5 / 8)
|
|
ArcVH3 (17 / 24) (5 / 8) (15 / 24) (4 / 8)
|
|
RoundSeg3H (11 / 24) (4 / 8) (15 / 24) (4 / 8) 1 0
|
|
ArcHV3 (14 / 24) (4 / 8) (16 / 24) (3 / 8)
|
|
ArcVH3 (16 / 24) (3 / 8) (14 / 24) (2 / 8)
|
|
RoundSeg3H (8 / 24) (2 / 8) (14 / 24) (2 / 8) 1 0
|
|
ArcHV3 (13 / 24) (2 / 8) (15 / 24) (1 / 8)
|
|
ArcVH3 (15 / 24) (1 / 8) (13 / 24) (0 / 8)
|
|
RoundSeg3H (6 / 24) (0 / 8) (13 / 24) (0 / 8)
|
|
apply-transform : Translate xOffset 0
|
|
|
|
sketch # pointingHand1
|
|
set-width MosaicWidth
|
|
include : intersection
|
|
MosaicWidthMask
|
|
PointingHandBody 0
|
|
save [MangleName 'pointingHand1'] [MangleUnicode 0x1FBC1]
|
|
|
|
sketch # pointingHand2
|
|
set-width MosaicWidth
|
|
include : intersection
|
|
MosaicWidthMask
|
|
PointingHandBody (-MosaicWidth)
|
|
save [MangleName 'pointingHand2'] [MangleUnicode 0x1FBC2]
|
|
|
|
sketch # pointingHand3
|
|
set-width MosaicWidth
|
|
include : intersection
|
|
MosaicWidthMask
|
|
PointingHandBody (-MosaicWidth * 2)
|
|
save [MangleName 'pointingHand3'] [MangleUnicode 0x1FBC3]
|
|
|
|
do "Stick Man"
|
|
define scaffold : object
|
|
set scaffold.top uiFigTop
|
|
set scaffold.bot uiFigBot
|
|
set scaffold.xMiddle : MosaicWidth / 2
|
|
set scaffold.headSize : (uiFigTop - uiFigBot) / 2.5
|
|
set scaffold.legSize : (Middle - SB) * 2
|
|
set scaffold.armSize : (Middle - SB / 2) * 2
|
|
set scaffold.stroke : adviceBlackness 3.5
|
|
set scaffold.armRaiseK 0.4
|
|
set scaffold.yPelvis : scaffold.bot + scaffold.legSize / 2
|
|
set scaffold.xLeftFoot : scaffold.xMiddle - scaffold.legSize / 2
|
|
set scaffold.xRightFoot : scaffold.xMiddle + scaffold.legSize / 2
|
|
set scaffold.yNeck : scaffold.top - scaffold.headSize
|
|
set scaffold.xLeftHead : scaffold.xMiddle - scaffold.headSize / 2
|
|
set scaffold.xRightHead : scaffold.xMiddle + scaffold.headSize / 2
|
|
set scaffold.xLeftArm : scaffold.xMiddle - scaffold.armSize / 2
|
|
set scaffold.xRightArm : scaffold.xMiddle + scaffold.armSize / 2
|
|
set scaffold.yShoulder : lambda [p] : mix scaffold.yPelvis scaffold.yNeck p
|
|
|
|
define [StickManHead] : OShape (scaffold.top - O) (scaffold.yNeck + O) (scaffold.xLeftHead + O) (scaffold.xRightHead - O) scaffold.stroke
|
|
define [StickManArms p kl kr] : union
|
|
dispiro
|
|
widths.center scaffold.stroke
|
|
corner scaffold.xMiddle [scaffold.yShoulder p]
|
|
corner scaffold.xLeftArm ([scaffold.yShoulder p] + scaffold.armSize / 2 * kl)
|
|
dispiro
|
|
widths.center scaffold.stroke
|
|
corner scaffold.xMiddle [scaffold.yShoulder p]
|
|
corner scaffold.xRightArm ([scaffold.yShoulder p] + scaffold.armSize / 2 * kr)
|
|
|
|
define [StickManBody kl kr] : glyph-construction
|
|
include : StickManHead
|
|
include : VBar scaffold.xMiddle scaffold.yPelvis scaffold.yNeck
|
|
include : dispiro
|
|
widths.center scaffold.stroke
|
|
corner scaffold.xMiddle scaffold.yPelvis
|
|
corner scaffold.xLeftFoot scaffold.bot
|
|
include : dispiro
|
|
widths.center scaffold.stroke
|
|
corner scaffold.xMiddle scaffold.yPelvis
|
|
corner scaffold.xRightFoot scaffold.bot
|
|
include : StickManArms 0.6 kl kr
|
|
|
|
define [StickManDressBody kl kr] : glyph-construction
|
|
include : OShape (scaffold.top - O) (scaffold.yNeck + O) (scaffold.xLeftHead + O) (scaffold.xRightHead - O) scaffold.stroke
|
|
define p 0.7
|
|
define dressBottom : [mix scaffold.bot scaffold.yNeck 0.25] - scaffold.stroke / 2
|
|
define dressLeft : scaffold.xLeftFoot - scaffold.stroke / 2
|
|
define dressRight : scaffold.xRightFoot + scaffold.stroke / 2
|
|
include : StickManArms p kl kr
|
|
include : VBar scaffold.xMiddle [scaffold.yShoulder p] scaffold.yNeck
|
|
include : intersection
|
|
spiro-outline
|
|
corner scaffold.xMiddle ([scaffold.yShoulder p] + scaffold.stroke)
|
|
corner dressRight dressBottom
|
|
corner dressLeft dressBottom
|
|
union
|
|
dispiro
|
|
widths.rhs scaffold.stroke
|
|
corner scaffold.xMiddle ([scaffold.yShoulder p] + scaffold.stroke)
|
|
corner dressRight dressBottom
|
|
dispiro
|
|
widths.rhs scaffold.stroke
|
|
corner dressRight dressBottom
|
|
corner dressLeft dressBottom
|
|
dispiro
|
|
widths.rhs scaffold.stroke
|
|
corner dressLeft dressBottom
|
|
corner scaffold.xMiddle ([scaffold.yShoulder p] + scaffold.stroke)
|
|
include : VBar [mix dressLeft dressRight 0.3] scaffold.bot (dressBottom - O) scaffold.stroke
|
|
include : VBar [mix dressLeft dressRight 0.7] scaffold.bot (dressBottom - O) scaffold.stroke
|
|
|
|
# Stick Man Figure
|
|
sketch
|
|
set-width MosaicWidth
|
|
include : StickManBody 0 0
|
|
save [MangleName 'stickManFigure'] [MangleUnicode 0x1FBC5]
|
|
sketch
|
|
set-width MosaicWidth
|
|
include : StickManBody scaffold.armRaiseK scaffold.armRaiseK
|
|
save [MangleName 'stickManFigureArmsRaised'] [MangleUnicode 0x1FBC6]
|
|
sketch
|
|
set-width MosaicWidth
|
|
include : StickManBody (-scaffold.armRaiseK) scaffold.armRaiseK
|
|
save [MangleName 'stickManFigureLeaningLeft'] [MangleUnicode 0x1FBC7]
|
|
sketch
|
|
set-width MosaicWidth
|
|
include : StickManBody scaffold.armRaiseK (-scaffold.armRaiseK)
|
|
save [MangleName 'stickManFigureLeaningRight'] [MangleUnicode 0x1FBC8]
|
|
sketch
|
|
set-width MosaicWidth
|
|
include : StickManDressBody 0 0
|
|
save [MangleName 'stickManWithDress'] [MangleUnicode 0x1FBC9]
|
|
|
|
do "upPointingChevron"
|
|
define scaffold : object
|
|
set scaffold.top : mix uiFigBot uiFigTop 0.85
|
|
set scaffold.bot : mix uiFigBot uiFigTop 0.15
|
|
set scaffold.slope 0.6
|
|
set scaffold.width : (Middle - SB) * 2 * [Math.pow (MosaicWidth / Width) 0.5]
|
|
set scaffold.stroke : adviceBlackness 3.5
|
|
set scaffold.xMiddle : MosaicWidth / 2
|
|
set scaffold.xLeft : scaffold.xMiddle - scaffold.width / 2
|
|
set scaffold.xRight : scaffold.xMiddle + scaffold.width / 2
|
|
set scaffold.xLeft2 : scaffold.xMiddle - scaffold.width
|
|
set scaffold.xRight2 : scaffold.xMiddle + scaffold.width
|
|
set scaffold.slopeRise : scaffold.slope * scaffold.width / 2
|
|
|
|
define [ChevronUpperHalf flat] : intersection
|
|
spiro-outline
|
|
corner scaffold.xMiddle scaffold.top
|
|
corner scaffold.xLeft (scaffold.top - scaffold.slopeRise)
|
|
corner scaffold.xLeft (scaffold.bot + scaffold.stroke)
|
|
if flat {} : list
|
|
corner scaffold.xMiddle (scaffold.bot + scaffold.stroke + scaffold.slopeRise)
|
|
corner scaffold.xRight (scaffold.bot + scaffold.stroke)
|
|
corner scaffold.xRight (scaffold.top - scaffold.slopeRise)
|
|
union
|
|
VBarLeft scaffold.xLeft scaffold.bot scaffold.top scaffold.stroke
|
|
VBarRight scaffold.xRight scaffold.bot scaffold.top scaffold.stroke
|
|
dispiro
|
|
widths.lhs scaffold.stroke
|
|
corner scaffold.xMiddle scaffold.top
|
|
corner scaffold.xLeft (scaffold.top - scaffold.slopeRise)
|
|
dispiro
|
|
widths.rhs scaffold.stroke
|
|
corner scaffold.xMiddle scaffold.top
|
|
corner scaffold.xRight (scaffold.top - scaffold.slopeRise)
|
|
|
|
sketch
|
|
set-width MosaicWidth
|
|
include : ChevronUpperHalf false
|
|
include : intersection
|
|
spiro-outline
|
|
corner scaffold.xLeft scaffold.top
|
|
corner scaffold.xLeft (scaffold.bot - scaffold.stroke)
|
|
corner scaffold.xRight (scaffold.bot - scaffold.stroke)
|
|
corner scaffold.xRight scaffold.top
|
|
union
|
|
dispiro
|
|
widths.lhs scaffold.stroke
|
|
corner scaffold.xMiddle (scaffold.bot + scaffold.slopeRise + scaffold.stroke)
|
|
corner scaffold.xLeft2 (scaffold.bot - scaffold.slopeRise + scaffold.stroke)
|
|
dispiro
|
|
widths.rhs scaffold.stroke
|
|
corner scaffold.xMiddle (scaffold.bot + scaffold.slopeRise + scaffold.stroke)
|
|
corner scaffold.xRight2 (scaffold.bot - scaffold.slopeRise + scaffold.stroke)
|
|
save [MangleName "upPointingChevron"] [MangleUnicode 0x1FBCA]
|
|
|
|
sketch
|
|
set-width MosaicWidth
|
|
include : ChevronUpperHalf true
|
|
include : HBarBottom scaffold.xLeft scaffold.xRight scaffold.stroke
|
|
save [MangleName "upPointingHouse"] [MangleUnicode 0x2302]
|
|
|
|
do "Segmented digits"
|
|
define scaffold : object
|
|
set scaffold.gap : Width / 16
|
|
set scaffold.stroke : [adviceBlackness 2] / 2
|
|
set scaffold.top : [mix uiFigBot uiFigTop 0.9] - scaffold.stroke
|
|
set scaffold.mid : mix uiFigBot uiFigTop 0.5
|
|
set scaffold.bot : [mix uiFigBot uiFigTop 0.1] + scaffold.stroke
|
|
set scaffold.width : (Middle - SB) * 2 * [Math.pow (MosaicWidth / Width) 0.5]
|
|
set scaffold.left : (MosaicWidth / 2) - scaffold.width / 2 + scaffold.stroke / 2
|
|
set scaffold.right : (MosaicWidth / 2) + scaffold.width / 2 - scaffold.stroke / 2
|
|
define [StrokeV x yt yb] : spiro-outline
|
|
corner x (yt - scaffold.gap)
|
|
corner (x + scaffold.stroke) (yt - scaffold.gap - scaffold.stroke)
|
|
corner (x + scaffold.stroke) (yb + scaffold.gap + scaffold.stroke)
|
|
corner x (yb + scaffold.gap)
|
|
corner (x - scaffold.stroke) (yb + scaffold.gap + scaffold.stroke)
|
|
corner (x - scaffold.stroke) (yt - scaffold.gap - scaffold.stroke)
|
|
define [StrokeH xl xr y s] : spiro-outline
|
|
corner (xl + scaffold.gap) y
|
|
corner (xl + scaffold.gap + scaffold.stroke) (y + scaffold.stroke)
|
|
corner (xr - scaffold.gap - scaffold.stroke) (y + scaffold.stroke)
|
|
corner (xr - scaffold.gap) y
|
|
corner (xr - scaffold.gap - scaffold.stroke) (y - scaffold.stroke)
|
|
corner (xl + scaffold.gap + scaffold.stroke) (y - scaffold.stroke)
|
|
define [SegmentedDigit unicode a b c d e f g] : sketch
|
|
set-width MosaicWidth
|
|
if a : include : StrokeH scaffold.left scaffold.right scaffold.top
|
|
if b : include : StrokeV scaffold.left scaffold.top scaffold.mid
|
|
if c : include : StrokeV scaffold.right scaffold.top scaffold.mid
|
|
if d : include : StrokeH scaffold.left scaffold.right scaffold.mid
|
|
if e : include : StrokeV scaffold.left scaffold.mid scaffold.bot
|
|
if f : include : StrokeV scaffold.right scaffold.mid scaffold.bot
|
|
if g : include : StrokeH scaffold.left scaffold.right scaffold.bot
|
|
save [MangleName : NameUni unicode] [MangleUnicode unicode]
|
|
|
|
SegmentedDigit 0x1FBF0 1 1 1 0 1 1 1
|
|
SegmentedDigit 0x1FBF1 0 0 1 0 0 1 0
|
|
SegmentedDigit 0x1FBF2 1 0 1 1 1 0 1
|
|
SegmentedDigit 0x1FBF3 1 0 1 1 0 1 1
|
|
SegmentedDigit 0x1FBF4 0 1 1 1 0 1 0
|
|
SegmentedDigit 0x1FBF5 1 1 0 1 0 1 1
|
|
SegmentedDigit 0x1FBF6 1 1 0 1 1 1 1
|
|
SegmentedDigit 0x1FBF7 1 1 1 0 0 1 0
|
|
SegmentedDigit 0x1FBF8 1 1 1 1 1 1 1
|
|
SegmentedDigit 0x1FBF9 1 1 1 1 0 1 1
|
|
|
|
do "voidedGreekCross"
|
|
sketch
|
|
set-width MosaicWidth
|
|
local sw : adviceBlackness 4
|
|
local gap : [Math.max (Width / 8) (Width / 6 - sw / 2) ([adviceBlackness 3] - sw / 2)] / 2
|
|
local mid : MosaicWidth / 2
|
|
local size : [Math.min (MosaicWidth - SB * 2) (uiFigTop - uiFigBot)] / 2
|
|
include : union
|
|
VBarRight (mid - gap) (symbolMid + gap) (symbolMid + size) sw
|
|
VBarRight (mid - gap) (symbolMid - gap) (symbolMid - size) sw
|
|
VBarLeft (mid + gap) (symbolMid + gap) (symbolMid + size) sw
|
|
VBarLeft (mid + gap) (symbolMid - gap) (symbolMid - size) sw
|
|
HBarBottom (mid - size) (mid - gap) (symbolMid + gap) sw
|
|
HBarBottom (mid + size) (mid + gap) (symbolMid + gap) sw
|
|
HBarTop (mid - size) (mid - gap) (symbolMid - gap) sw
|
|
HBarTop (mid + size) (mid + gap) (symbolMid - gap) sw
|
|
|
|
save [MangleName "voidedGreekCross"] [MangleUnicode 0x1FBBB]
|
|
|
|
|
|
glyph-block Symbol-Other-Checking-Marks : begin
|
|
glyph-block-import CommonShapes
|
|
local light : adviceBlackness 4.5
|
|
local medium : Math.max (light * 1.75) (Width * 0.2)
|
|
local heavy : Math.max (light * 2.5) (Width * 0.3)
|
|
local shapesize 0.8
|
|
local shapesizeCheck : shapesize * 1.1
|
|
foreach [{unicode sw} : items-of {{0x2713 light} {0x2714 medium}}] : sketch
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 SB [mix symbolMid [mix pictBot pictTop 0.46] shapesizeCheck]
|
|
alsoThru 0.5 0.4
|
|
g4 [mix SB RightSB 0.4] [mix symbolMid [mix pictBot pictTop 0.05] shapesizeCheck] [heading Downward]
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 [mix SB RightSB 0.4] [mix symbolMid [mix pictBot pictTop 0.05] shapesizeCheck] [heading Upward]
|
|
alsoThru 0.5 0.6
|
|
g4 RightSB [mix symbolMid [mix pictBot pictTop 0.9] shapesizeCheck]
|
|
save [NameUni unicode] unicode
|
|
|
|
foreach [{unicode sw} : items-of {{0x271A medium}} ] : sketch
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 [mix Width RightSB 0.5] symbolMid
|
|
g4 [mix 0 SB 0.5] symbolMid
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 Middle [mix symbolMid pictTop (0.8 * shapesize * 7/8)]
|
|
g4 Middle [mix symbolMid pictBot (0.9 * shapesize * 7/8)]
|
|
save [NameUni unicode] unicode
|
|
|
|
foreach [{unicode sw} : items-of {{0x2715 light} {0x2716 medium}} ] : sketch
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 RightSB [mix symbolMid pictTop (0.8 * shapesize)]
|
|
g4 SB [mix symbolMid pictBot (0.9 * shapesize)]
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 SB [mix symbolMid pictTop (0.8 * shapesize)]
|
|
g4 RightSB [mix symbolMid pictBot (0.9 * shapesize)]
|
|
save [NameUni unicode] unicode
|
|
|
|
foreach [{unicode sw} : items-of {{0x2717 light} {0x2718 medium}} ] : sketch
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 RightSB [mix symbolMid [mix pictBot pictTop 0.9] shapesize]
|
|
alsoThru 0.53 0.45
|
|
g4 SB [mix symbolMid pictBot (1.05 * shapesize)]
|
|
include : dispiro
|
|
widths.center sw
|
|
g4 [mix SB RightSB 0.1] [mix symbolMid [mix pictBot pictTop 0.86] shapesize]
|
|
alsoThru 0.47 0.5
|
|
g4 [mix SB RightSB 0.9] [mix symbolMid [mix pictBot pictTop 0.05] shapesize]
|
|
save [NameUni unicode] unicode
|
|
foreach [{unicode sw op} : items-of {
|
|
{ 0x276C light 1 }
|
|
{ 0x276D light 0 }
|
|
{ 0x276E medium 1 }
|
|
{ 0x276F medium 0 }
|
|
{ 0x2770 heavy 1 }
|
|
{ 0x2771 heavy 0 }
|
|
}] : sketch
|
|
include : dispiro
|
|
widths.center sw
|
|
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]
|
|
save [NameUni unicode] unicode
|
|
|
|
glyph-block Symbol-Other-I-Ching : begin
|
|
glyph-block-import CommonShapes
|
|
|
|
# Trigrams
|
|
define [yin m n] : glyph-construction
|
|
local offsetY : (2 / 3) * (pictBot - pictTop) / n
|
|
local startY : symbolMid - offsetY * (n - 1) / 2
|
|
local bar : adviceBlackness n
|
|
local fine : adviceBlackness 5
|
|
local gap : Math.max (Width / 8) (fine)
|
|
include : HBar SB (Middle - gap / 2 * HVContrast) (startY + offsetY * m) bar
|
|
include : HBar (Middle + gap / 2 * HVContrast) RightSB (startY + offsetY * m) bar
|
|
|
|
define [yang m n] : glyph-construction
|
|
local offsetY : (2 / 3) * (operBot - pictTop) / n
|
|
local startY : symbolMid - offsetY * (n - 1) / 2
|
|
local bar : adviceBlackness n
|
|
include : HBar SB RightSB (startY + offsetY * m) bar
|
|
|
|
define [patterns n su] : foreach [offset: range 0 [Math.pow 2 n]] : sketch
|
|
foreach [bit : range 0 n] : begin
|
|
if [maskBit offset bit]
|
|
then : include : yin bit n
|
|
else : include : yang bit n
|
|
save null (su + offset)
|
|
|
|
patterns 1 0x268A
|
|
patterns 2 0x268C
|
|
patterns 3 0x2630
|
|
|
|
glyph-block Symbol-Other-Ligation : begin
|
|
glyph-block-import CommonShapes
|
|
glyph-block-import Symbol-Math-Relation : lessSlantness
|
|
|
|
local arrowheadsKern : (2 / 3) * [clamp 0 (Width * 0.4) (Width - OperatorStroke * 3)]
|
|
|
|
define arrowheadSlope : 1 / lessSlantness
|
|
define [ArrowBarConfig extend kern join doubleBar] : begin
|
|
define cleft O
|
|
define cright (Width - O)
|
|
define arrowr : if doubleBar
|
|
Width + SB + OperatorStroke * HVContrast
|
|
Width + extend
|
|
define arrowl : if doubleBar
|
|
-Width + RightSB - OperatorStroke * HVContrast
|
|
0 - extend
|
|
define zleft : cleft - Width + RightSB
|
|
define zright : cright + SB
|
|
define lk : object
|
|
f SB
|
|
l arrowl
|
|
l1 : arrowl - kern
|
|
c cleft
|
|
j (-join)
|
|
j1 (-join - kern)
|
|
z zleft
|
|
lx : mix arrowl 0 0.5
|
|
|
|
define rk : object
|
|
f RightSB
|
|
r arrowr
|
|
r1 : arrowr + kern
|
|
c cright
|
|
j (Width + join)
|
|
j1 (Width + join + kern)
|
|
z zright
|
|
|
|
define result {}
|
|
foreach [l : items-of : Object.keys lk] : foreach [r : items-of : Object.keys rk]
|
|
result.push { (l + r) lk.(l) rk.(r) }
|
|
return result
|
|
|
|
local arrowExtend [clamp 0 Width (RightSB - OperatorStroke / 2 * arrowheadSlope)]
|
|
local arrowJ : clamp 0 Width (SB + OperatorStroke / 2 * arrowheadSlope)
|
|
foreach [{subclass left right} : items-of [ArrowBarConfig arrowExtend arrowheadsKern arrowJ false]] : sketch
|
|
include : HBar left right symbolMid OperatorStroke
|
|
set currentGlyph.autoRefPriority (-3)
|
|
save ('hyphen.lig.' + subclass)
|
|
|
|
# =>
|
|
local dblArrowD : (parenTop - parenBot) * designParameters.equal_wideness + OperatorStroke * 0.75
|
|
local dblArrowSw : Math.min OperatorStroke (dblArrowD * 3 / 4)
|
|
local dblExtend : clamp 0 Width (RightSB - (dblArrowD - dblArrowSw / 2) * arrowheadSlope)
|
|
local dblArrowJ : clamp 0 Width (SB + (dblArrowD - dblArrowSw / 2) * arrowheadSlope)
|
|
|
|
foreach [{subclass left right} : items-of [ArrowBarConfig dblExtend arrowheadsKern dblArrowJ true]] : sketch
|
|
include : HBarTop left right (symbolMid + dblArrowD) dblArrowSw
|
|
include : HBarBottom left right (symbolMid - dblArrowD) dblArrowSw
|
|
set currentGlyph.autoRefPriority (-3)
|
|
save ('equal.lig.' + subclass)
|
|
|
|
do "Waves"
|
|
define WaveShape : CreateWaveShape dblArrowD dblArrowSw (-1 / 4)
|
|
|
|
define LR (2 / 32)
|
|
define LR1 (9 / 32)
|
|
define Z (1 / 4)
|
|
define F (-1 / 4)
|
|
define C 0
|
|
define J (-1 / 8)
|
|
|
|
define lk : object
|
|
l { LR (-arrowExtend) false }
|
|
l1 { LR1 (-arrowExtend - arrowheadsKern) false }
|
|
f { F nothing false }
|
|
z { Z nothing false }
|
|
c { C nothing false }
|
|
j { J (-arrowJ) true }
|
|
j1 { J (-arrowJ - arrowheadsKern) true }
|
|
|
|
define rk : object
|
|
r { LR (Width + arrowExtend) false }
|
|
r1 { LR1 (Width + arrowExtend + arrowheadsKern) false }
|
|
f { F nothing false }
|
|
z { Z nothing false }
|
|
c { C nothing false }
|
|
j { J (Width + arrowJ) true }
|
|
j1 { J (Width + arrowJ + arrowheadsKern) true }
|
|
|
|
foreach [lS : items-of : Object.keys lk] : foreach [rS : items-of : Object.keys rk] : sketch
|
|
local {tL jL djL} lk.(lS)
|
|
local {tR jR djR} rk.(rS)
|
|
include : WaveShape
|
|
left -- tL
|
|
right -- tR
|
|
xsJoin -- jL
|
|
xfJoin -- jR
|
|
diagJoinS -- djL
|
|
diagJoinF -- djR
|
|
|
|
save "wave.\(lS)\(rS)"
|
|
|
|
do "Arrowheads"
|
|
glyph-block-import Symbol-Math-Relation : dH LigationLessShape LigationGreaterShape
|
|
|
|
sketch
|
|
include : LigationLessShape (symbolMid + dH) (symbolMid - dH) SB RightSB OperatorStroke dblArrowSw (dblArrowD * 2 - dblArrowSw * 2)
|
|
save 'less.lig.dblhead'
|
|
save 'less.lig.dblhead.mid'
|
|
include : Translate (-arrowheadsKern) 0
|
|
save 'less.lig.dblhead.shift1'
|
|
|
|
sketch
|
|
include : LigationGreaterShape (symbolMid + dH) (symbolMid - dH) SB RightSB OperatorStroke dblArrowSw (dblArrowD * 2 - dblArrowSw * 2)
|
|
save 'greater.lig.dblhead'
|
|
save 'greater.lig.dblhead.mid'
|
|
include : Translate (+arrowheadsKern) 0
|
|
save 'greater.lig.dblhead.shift1'
|
|
|
|
sketch
|
|
include : refer-glyph "exclam"
|
|
include : Translate (((RightSB - Width) + (Width - arrowExtend / 2)) / 2 - Middle) 0
|
|
include : HBar (-arrowExtend) (RightSB - Width) symbolMid OperatorStroke
|
|
save 'exclam.lig.htmlcommentstart'
|
|
# Right-shifted >
|
|
sketch
|
|
include [refer-glyph 'greater'] AS_BASE ALSO_METRICS
|
|
save 'greater.lig.shift0'
|
|
save 'greater.lig.shift0.mid'
|
|
save 'greater.lig.shift0.anti'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'greater.lig.shift0h'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'greater.lig.shift1'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'greater.lig.shift1h'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'greater.lig.shift2'
|
|
|
|
# Left-shifted >
|
|
sketch
|
|
include [refer-glyph 'greater'] AS_BASE ALSO_METRICS
|
|
save 'greater.lig.shiftN0'
|
|
save 'greater.lig.shiftN0.mid'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'greater.lig.shiftN0h'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'greater.lig.shiftN1'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'greater.lig.shiftN1h'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'greater.lig.shiftN2'
|
|
|
|
# Left-shifted <
|
|
sketch
|
|
include [refer-glyph 'less'] AS_BASE ALSO_METRICS
|
|
save 'less.lig.shift0'
|
|
save 'less.lig.shift0.mid'
|
|
save 'less.lig.shift0.anti'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'less.lig.shift0h'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'less.lig.shift1'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'less.lig.shift1h'
|
|
include : Translate (-arrowheadsKern / 2) 0
|
|
save 'less.lig.shift2'
|
|
|
|
# Right-shifted <
|
|
sketch
|
|
include [refer-glyph 'less'] AS_BASE ALSO_METRICS
|
|
save 'less.lig.shiftN0'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'less.lig.shiftN0h'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'less.lig.shiftN1'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'less.lig.shiftN1h'
|
|
include : Translate (arrowheadsKern / 2) 0
|
|
save 'less.lig.shiftN2'
|
|
|
|
define [ArrowHeadHole] : Rect (symbolMid + dblArrowD - dblArrowSw) (symbolMid - dblArrowD + dblArrowSw) (-Width) (2 * Width)
|
|
|
|
sketch
|
|
include : difference
|
|
glyph-construction : include : refer-glyph "less"
|
|
ArrowHeadHole
|
|
save 'less.lig.hole'
|
|
|
|
sketch
|
|
include : difference
|
|
glyph-construction : include : refer-glyph "greater"
|
|
ArrowHeadHole
|
|
save 'greater.lig.hole'
|
|
|
|
sketch
|
|
include : difference
|
|
glyph-construction : include : refer-glyph "less.lig.shiftN1"
|
|
ArrowHeadHole
|
|
save 'less.lig.hole.shiftN1'
|
|
|
|
sketch
|
|
include : difference
|
|
glyph-construction : include : refer-glyph "greater.lig.shiftN1"
|
|
ArrowHeadHole
|
|
save 'greater.lig.hole.shiftN1'
|
|
|
|
do "Equal and Inequal" : if [not recursive] : begin
|
|
glyph-block-import Symbol-Math-Relation : EqualShape EqualHole IdentShape IdentHole
|
|
define joiningOverlap (-Width / 6)
|
|
sketch # equal.fc
|
|
include : difference
|
|
EqualShape SB (Width - joiningOverlap)
|
|
EqualHole Width
|
|
save 'equal.fc'
|
|
|
|
sketch # equal.cf
|
|
include : difference
|
|
EqualShape joiningOverlap RightSB
|
|
EqualHole 0
|
|
save 'equal.cf'
|
|
|
|
sketch # equal.jf
|
|
include : difference
|
|
EqualShape (RightSB - Width + joiningOverlap) RightSB
|
|
EqualHole 0
|
|
save 'equal.jf'
|
|
|
|
sketch # equal.cc
|
|
include : difference
|
|
EqualShape joiningOverlap (Width - joiningOverlap)
|
|
union
|
|
EqualHole 0
|
|
EqualHole Width
|
|
save 'equal.cc'
|
|
|
|
sketch # ident.fc
|
|
include : difference
|
|
IdentShape SB (Width - joiningOverlap)
|
|
IdentHole Width
|
|
save 'ident.fc'
|
|
|
|
sketch # ident.cf
|
|
include : difference
|
|
IdentShape joiningOverlap RightSB
|
|
IdentHole 0
|
|
save 'ident.cf'
|
|
|
|
sketch # ident.jf
|
|
include : difference
|
|
IdentShape (RightSB - Width + joiningOverlap) RightSB
|
|
IdentHole 0
|
|
save 'ident.jf'
|
|
sketch # ident.cc
|
|
include : difference
|
|
IdentShape joiningOverlap (Width - joiningOverlap)
|
|
union
|
|
IdentHole 0
|
|
IdentHole Width
|
|
save 'ident.cc'
|
|
|
|
glyph-block-import NotGlyphFn : notGlyph
|
|
notGlyph null 'equal.fc' nothing nothing nothing (Width * 0.5) 'equal.fc.neg'
|
|
notGlyph null 'equal.fc' nothing nothing nothing (Width * 1.0) 'equal.fc.neg3'
|
|
notGlyph null 'equal.fc' nothing nothing nothing (Width * 1.5) 'equal.fc.neg4'
|
|
notGlyph null 'ident.fc' nothing nothing nothing (Width * 0.5) 'ident.fc.neg'
|
|
notGlyph null 'ident.fc' nothing nothing nothing (Width * 1.0) 'ident.fc.neg3'
|
|
notGlyph null 'ident.fc' nothing nothing nothing (Width * 1.5) 'ident.fc.neg4'
|
|
|
|
do "<| , |> and <>"
|
|
glyph-block-import Symbol-Math-Relation : LessShape GreaterShape
|
|
|
|
local trigLeft : mix SB RightSB (1/6)
|
|
local trigRight : Width * 1.5 - OperatorStroke * 1.5 * HVContrast
|
|
local dHTriangle : lessSlantness * (trigRight - trigLeft)
|
|
|
|
define [TrigLeftShape shift] : LessShape (symbolMid + dHTriangle) (symbolMid - dHTriangle) (trigLeft + shift) (trigRight + shift)
|
|
define [TrigRightShape shift] : GreaterShape (symbolMid + dHTriangle) (symbolMid - dHTriangle) (Width - trigRight + shift) (Width - trigLeft + shift)
|
|
|
|
sketch # ligless.trig
|
|
include : TrigLeftShape 0
|
|
save 'less.lig.trig'
|
|
|
|
sketch # ligbar.trig
|
|
include : VBar Middle (symbolMid + dHTriangle + OperatorStroke) (symbolMid - dHTriangle - OperatorStroke) OperatorStroke
|
|
save 'bar.lig.trig'
|
|
|
|
sketch # liggreater.trig
|
|
include : TrigRightShape 0
|
|
save 'greater.lig.trig'
|
|
|
|
sketch # ligless.diamond
|
|
include : intersection
|
|
TrigLeftShape 0
|
|
union
|
|
Rect parenTop parenBot 0 Width
|
|
TrigRightShape Width
|
|
save 'less.lig.diamond'
|
|
|
|
sketch # liggreater.diamond
|
|
include : intersection
|
|
TrigRightShape 0
|
|
union
|
|
Rect parenTop parenBot 0 Width
|
|
TrigLeftShape (-Width)
|
|
save 'greater.lig.diamond'
|
|
|
|
do "Chaining Plus"
|
|
glyph-block-import Symbol-Math-Arith : PlusShape
|
|
|
|
sketch # plus.lig.lc
|
|
include : PlusShape SB (Width - O)
|
|
save 'plus.lig.lc'
|
|
sketch # plus.lig.lc.s
|
|
include : PlusShape SB (Width - O) SB
|
|
save 'plus.lig.lc.s'
|
|
sketch # plus.lig.cc
|
|
include : PlusShape O (Width - O)
|
|
save 'plus.lig.cc'
|
|
sketch # plus.lig.cr
|
|
include : PlusShape O RightSB
|
|
save 'plus.lig.cr'
|
|
sketch # plus.lig.cr.s
|
|
include : PlusShape O RightSB (-SB)
|
|
save 'plus.lig.cr.s'
|
|
sketch # plus.lig.jr
|
|
include : PlusShape (-SB + O) RightSB
|
|
save 'plus.lig.jr'
|