###### Other symbols
# IPA tonal marks
symbol-block 'Phonetic Symbols'
	local triangleSize : Math.min (PERIODRADIUS) (XH / 5)
	
	sketch # trianglecolon
		start-from (MIDDLE - triangleSize * 1.35) XH
		line-to    MIDDLE (XH - triangleSize * 2.75)
		line-to    (MIDDLE + triangleSize * 1.35) XH
		start-from (MIDDLE - triangleSize * 1.35) 0
		line-to    MIDDLE (0 + triangleSize * 2.75)
		line-to    (MIDDLE + triangleSize * 1.35) 0
	
		save 'trianglecolon' 0x2D0
	
	sketch # halftrianglecolon
		start-from (MIDDLE - triangleSize * 1.35) XH
		line-to    MIDDLE (XH - triangleSize * 2.75)
		line-to    (MIDDLE + triangleSize * 1.35) XH
		save 'halftrianglecolon' 0x2D1

	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) [mix (OPERATORSTROKE / 2) (CAP - OPERATORSTROKE / 2) (tone / 4)] OPERATORSTROKE

# Suit card
symbol-block 'Suit Cards'
	local heartTop : mix parenMid parenTop 0.6
	local heartBot : mix parenMid parenBot 0.6
	
	sketch # heart
		local y1 : mix heartBot heartTop 0.5
		local y2 : mix heartBot heartTop 0.75
		local y3 : mix heartBot heartTop 0.75
		
		include : spiro-outline
			corner MIDDLE heartBot
			quadcontrols 1 (2 / 3)
			g4 (RIGHTSB - O) y2
			arcvh
			g4 [mix MIDDLE RIGHTSB 0.5] heartTop
			archv
			corner MIDDLE y3
			arcvh
			g4 [mix MIDDLE SB 0.5] heartTop
			archv
			g4 (SB + O) y2
			quadcontrols 0 (1 / 3)
			close
		save 'heart' 0x2665
	
	sketch # spade
		include glyphs.heart
		apply-transform : Upright
		apply-transform : Translate (-MIDDLE) (-heartBot)
		apply-transform : Scale 1 (-0.75)
		apply-transform : Translate MIDDLE heartTop
		apply-transform : Italify
		
		include : HBarBottom [mix SB RIGHTSB 0.25] [mix RIGHTSB SB 0.25] heartBot
		include : VBar MIDDLE heartBot [mix heartBot heartTop (1 - 0.75 * 0.75)]
		save 'spade' 0x2660
	
	sketch # clubs
		local circleRadius : (heartTop - heartBot) * 0.2
		include : RingAt MIDDLE (heartTop - circleRadius) circleRadius
		include : RingAt (SB + O + circleRadius) [mix heartBot heartTop 0.45] circleRadius
		include : RingAt (RIGHTSB - O - circleRadius) [mix heartBot heartTop 0.45] circleRadius
		
		include : HBarBottom [mix SB RIGHTSB 0.25] [mix RIGHTSB SB 0.25] heartBot
		include : VBar MIDDLE heartBot [mix heartBot heartTop (1 - 0.75 * 0.75)]
		save 'clubs' 0x2663
	
	sketch # diamond
		start-from MIDDLE heartTop
		line-to    RIGHTSB parenMid
		line-to    MIDDLE heartBot
		line-to    SB parenMid
		save 'diamond' 0x2666

symbol-block 'Planets'
	sketch # venus
		local obot : operTop - RIGHTSB + SB
		include : OShape operTop obot SB RIGHTSB OPERATORSTROKE
		include : VBar MIDDLE operBot obot OPERATORSTROKE
		include : HBar SB RIGHTSB [mix operBot (obot + OPERATORSTROKE) 0.5] OPERATORSTROKE
	
		save 'venus' 0x2640
	turned 'earth' 0x2641 'venus' MIDDLE parenMid
	
	sketch # mars
		local otop : operBot + RIGHTSB - SB
		include : OShape otop operBot SB RIGHTSB OPERATORSTROKE
		include : ArrowShape MIDDLE (otop - OPERATORSTROKE / 3) MIDDLE operTop ((RIGHTSB - SB) * 0.4)
		save 'mars' 0x2642

symbol-block 'Musical'
	sketch # quaver
		local fine : adviceBlackness 5
		local noteSize : MIDDLE + fine / 2 - SB
		local y1 : mix operBot operTop 0.8
		local y2 : mix operBot operTop 0.4
		local x3 : mix SB RIGHTSB 0.7
		local y3 : mix operBot operTop 0.25
		include : Ring (operBot + 0.8 * noteSize) operBot SB (SB + noteSize)
		include : VBarRight (SB + noteSize) (operBot + 0.4 * noteSize) operTop fine
		include : dispiro
			widths.rhs fine
			g4 (SB + noteSize) operTop
			bezcontrols.absolute RIGHTSB y1 RIGHTSB y2
			g4 x3 y3
		save 'quaver' 0x266A

symbol-block 'Metric marks'
	sketch # metmark
		include : VBar MIDDLE (-font.'OS/2'.usWinDescent) (font.'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 parenMid SHOULDERFINE
		include : HBar 0 MIDDLE parenTop SHOULDERFINE
		include : HBar 0 MIDDLE parenBot SHOULDERFINE
		save 'metmark' 0xE09F

symbol-block 'Other typographic symbols'
	sketch # Kome
		local sw : adviceBlackness 3.75
		local radius : (RIGHTSB - SB) / 2
		include : dispiro
			widths.center sw
			flat (MIDDLE - radius) (parenMid - radius)
			curl (MIDDLE + radius) (parenMid + radius)
		
		include : dispiro
			widths.center sw
			flat (MIDDLE + radius) (parenMid - radius)
			curl (MIDDLE - radius) (parenMid + 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) parenMid r0
		include : RingAt (MIDDLE - r) parenMid r0
		include : RingAt MIDDLE (parenMid + r) r0
		include : RingAt MIDDLE (parenMid - r) r0
		save 'kome' 0x203B

### Ligature-orienteds
symbol-block 'Ligature-oriented Subglyphs' : if (para.spacing > 0) : begin
	# Shifted arrowheads
	local arrowheadsKern : clamp 0 (WIDTH / 2) (WIDTH - OPERATORSTROKE * 3)
	sketch
		include glyphs.greater AS_BASE ALSO_METRICS
		include : Translate arrowheadsKern 0
		save 'liggreater.shift1'
		include : Translate arrowheadsKern 0
		save 'liggreater.shift2'
		include : Translate (-arrowheadsKern * 3) 0
		save 'liggreater.shiftN1'
	sketch
		include glyphs.less AS_BASE ALSO_METRICS
		include : Translate (-arrowheadsKern) 0
		save 'ligless.shift1'
		include : Translate (-arrowheadsKern) 0
		save 'ligless.shift2'
		include : Translate (arrowheadsKern * 3) 0
		save 'ligless.shiftN1'
	
	# arrows
	# ->
	define arrowheadSlope : (RIGHTSB - SB) / (parenTop - parenBot) * 4
	define [ArrowBarConfig extend kern join] : let [cleft O] [cright (WIDTH - O)] [arrowr : WIDTH + extend] [arrowl : 0 - extend] : list
		list 'fr' SB arrowr
		list 'lf' arrowl RIGHTSB
		list 'cr' cleft arrowr
		list 'lc' arrowl cright
		list 'lxc' [mix arrowl 0 0.5] cright
		list 'fr1' SB (arrowr + kern)
		list 'l1f' (arrowl - kern) RIGHTSB
		list 'cr1' cleft (arrowr + kern)
		list 'l1c' (arrowl - kern) cright
		list 'fr2' SB (arrowr + kern * 2)
		list 'l2f' (arrowl - kern * 2) RIGHTSB
		list 'cr2' cleft (arrowr + kern * 2)
		list 'l2c' (arrowl - kern * 2) cright
		list 'cf' cleft RIGHTSB
		list 'fc' SB cright
		list 'jf' (-join) RIGHTSB
		list 'fj' SB (WIDTH + join)
		list 'jr' (-join) arrowr
		list 'lj' arrowl (WIDTH + join)
		list 'j1f' (-join - kern) RIGHTSB
		list 'fj1' SB (WIDTH + join + kern)
		list 'lr' arrowl arrowr
		list 'cc' cleft cright

	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]] : sketch
		include : HBar left right parenMid OPERATORSTROKE
		save ('lighy.' + subclass)
	 
	# =>
	local dblarrowd : XH * [linreg 18 0.15 126 0.275 STROKE]
	local sw : Math.min OPERATORSTROKE (dblarrowd * [clamp 0.45 0.75 ((1 - WHITENESS) * 1)])
	local dblextend [clamp 0 WIDTH (RIGHTSB - (dblarrowd - sw / 2) * arrowheadSlope)]
	local dblarrowj : clamp 0 WIDTH (SB + (dblarrowd - sw / 2) * arrowheadSlope)
	foreach [{subclass left right} : items-of [ArrowBarConfig dblextend arrowheadsKern dblarrowj]] : sketch
		include : HBarTop left right (parenMid + dblarrowd) sw
		include : HBarBottom left right (parenMid - dblarrowd) sw
		save ('ligeq.' + subclass)
	
	sketch
		include glyphs.exclam
		include : Translate (((RIGHTSB - WIDTH) + (WIDTH - arrowextend / 2)) / 2 - MIDDLE) 0
		include : HBar (-arrowextend) (RIGHTSB - WIDTH) parenMid OPERATORSTROKE
		save 'ligexclam.htmlcommentstart'