$$include '../../meta/macros.ptl'

import [mix linreg clamp fallback] from "@iosevka/util"

glyph-module

glyph-block Symbol-Arrow-Simple : for-width-kinds WideWidth1
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives
	glyph-block-import Symbol-Arrow-Shared : ArrowDims ArrowT MkArrowT

	define dims : ArrowDims MosaicWidth MosaicWidthScalar
	define Arrow : ArrowT dims
	define MkArrow : MkArrowT dims

	define {
		.arrowHeight arrowHeight
		.arrowWidth arrowWidth
		.arrowTop arrowTop
		.arrowBot arrowBot
		.arrowMidX arrowMidX
		.arrowSB arrowSB
		.arrowRSB arrowRSB
		.arrowDiagRSB arrowDiagRSB
		.arrowDiagSB arrowDiagSB
		.arrowDiagBot arrowDiagBot
		.arrowDiagTop arrowDiagTop

		.doubleBarSpan doubleBarSpan
		.arrowHeadSize arrowHeadSize
		.strokeSpan strokeSpan
		.doubleHeadGap doubleHeadGap
		.fine fine
	} dims

	# Determine anchor positions for horizontal multihead/tail arrows
	define tailP : (arrowHeadSize - fine * 0.5) / arrowWidth
	define headP : 1 - (strokeSpan + fine) / arrowWidth
	define gapP : doubleHeadGap / arrowWidth
	define dhAnchorP  : mix 0     (headP - gapP) 0.6
	define htAnchorP  : mix tailP  headP         0.6
	define dhtAnchorP : mix tailP (headP - gapP) 0.6
	define kLongArrowSB : [DivFrame MosaicWidthScalar 4].leftSB / [DivFrame MosaicWidthScalar 2].leftSB

	MkArrow.single Arrow.shape [MangleName 'arrowLeft']       [MangleUnicode 0x2190] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single Arrow.shape [MangleName 'arrowUp']         [MangleUnicode 0x2191] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single Arrow.shape [MangleName 'arrowRight']      [MangleUnicode 0x2192] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.shape [MangleName 'arrowDown']       [MangleUnicode 0x2193] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.single Arrow.shape [MangleName 'arrowUpLeft']     [MangleUnicode 0x2196] arrowDiagRSB arrowDiagBot arrowDiagSB arrowDiagTop
	MkArrow.single Arrow.shape [MangleName 'arrowUpRight']    [MangleUnicode 0x2197] arrowDiagSB arrowDiagBot arrowDiagRSB arrowDiagTop
	MkArrow.single Arrow.shape [MangleName 'arrowDownRight']  [MangleUnicode 0x2198] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot
	MkArrow.single Arrow.shape [MangleName 'arrowDownLeft']   [MangleUnicode 0x2199] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot

	MkArrow.single Arrow.trigShape [MangleName 'trigArrowLeft']       [MangleUnicode 0x2B60] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single Arrow.trigShape [MangleName 'trigArrowUp']         [MangleUnicode 0x2B61] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single Arrow.trigShape [MangleName 'trigArrowRight']      [MangleUnicode 0x2B62] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.trigShape [MangleName 'trigArrowDown']       [MangleUnicode 0x2B63] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.single Arrow.trigShape [MangleName 'trigArrowUpLeft']     [MangleUnicode 0x2B66] arrowDiagRSB arrowDiagBot arrowDiagSB arrowDiagTop
	MkArrow.single Arrow.trigShape [MangleName 'trigArrowUpRight']    [MangleUnicode 0x2B67] arrowDiagSB arrowDiagBot arrowDiagRSB arrowDiagTop
	MkArrow.single Arrow.trigShape [MangleName 'trigArrowDownRight']  [MangleUnicode 0x2B68] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot
	MkArrow.single Arrow.trigShape [MangleName 'trigArrowDownLeft']   [MangleUnicode 0x2B69] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot

	MkArrow.single Arrow.openShape [MangleName 'openHeadArrowLeft']   [MangleUnicode 0x21FD] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single Arrow.openShape [MangleName 'openHeadArrowRight']  [MangleUnicode 0x21FE] arrowSB SymbolMid arrowRSB SymbolMid

	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowLeft']       [MangleUnicode 0x1F850] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowUp']         [MangleUnicode 0x1F851] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowRight']      [MangleUnicode 0x1F852] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowDown']       [MangleUnicode 0x1F853] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowUpLeft']     [MangleUnicode 0x1F854] arrowDiagRSB arrowDiagBot arrowDiagSB arrowDiagTop
	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowUpRight']    [MangleUnicode 0x1F855] arrowDiagSB arrowDiagBot arrowDiagRSB arrowDiagTop
	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowDownRight']  [MangleUnicode 0x1F856] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot
	MkArrow.single Arrow.ssShape [MangleName 'sansSerifArrowDownLeft']   [MangleUnicode 0x1F857] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot

	MkArrow.single Arrow.rhsShape [MangleName 'arrowLeftHR']  [MangleUnicode 0x21BC] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single Arrow.lhsShape [MangleName 'arrowLeftHL']  [MangleUnicode 0x21BD] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single Arrow.rhsShape [MangleName 'arrowUpHR']    [MangleUnicode 0x21BE] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single Arrow.lhsShape [MangleName 'arrowUpHL']    [MangleUnicode 0x21BF] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single Arrow.lhsShape [MangleName 'arrowRightHL'] [MangleUnicode 0x21C0] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.rhsShape [MangleName 'arrowRightHR'] [MangleUnicode 0x21C1] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.lhsShape [MangleName 'arrowDownHL']  [MangleUnicode 0x21C2] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.single Arrow.rhsShape [MangleName 'arrowDownHR']  [MangleUnicode 0x21C3] arrowMidX arrowTop arrowMidX arrowBot

	# Multibar
	define DoubleBarShape : Arrow.Bar.dblShape doubleBarSpan
	define TripleBarShape : Arrow.Bar.tripleShape doubleBarSpan
	define QuadrupleBarShape : Arrow.Bar.quadrupleShape doubleBarSpan
	define DoubleBarArrowShape : Arrow.multibarShapeT DoubleBarShape
	define TripleBarArrowShape : Arrow.multibarShapeT TripleBarShape
	define QuadrupleBarArrowShape : Arrow.multibarShapeT QuadrupleBarShape

	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowLeft']       [MangleUnicode 0x21D0] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowRight']      [MangleUnicode 0x21D2] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowUp']         [MangleUnicode 0x21D1] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowDown']       [MangleUnicode 0x21D3] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowUpLeft']     [MangleUnicode 0x21D6] arrowDiagRSB arrowDiagBot arrowDiagSB arrowDiagTop
	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowUpRight']    [MangleUnicode 0x21D7] arrowDiagSB arrowDiagBot arrowDiagRSB arrowDiagTop
	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowDownRight']  [MangleUnicode 0x21D8] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot
	MkArrow.single DoubleBarArrowShape [MangleName 'dblArrowDownLeft']   [MangleUnicode 0x21D9] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot

	MkArrow.single TripleBarArrowShape [MangleName 'tripleArrowLeft']    [MangleUnicode 0x21DA] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single TripleBarArrowShape [MangleName 'tripleArrowRight']   [MangleUnicode 0x21DB] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single TripleBarArrowShape [MangleName 'tripleArrowUp']      [MangleUnicode 0x290A] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single TripleBarArrowShape [MangleName 'tripleArrowDown']    [MangleUnicode 0x290B] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.single QuadrupleBarArrowShape [MangleName 'quadrupleArrowUp']      [MangleUnicode 0x27F0] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single QuadrupleBarArrowShape [MangleName 'quadrupleArrowDown']    [MangleUnicode 0x27F1] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.single QuadrupleBarArrowShape [MangleName 'quadrupleArrowLeft']    [MangleUnicode 0x2B45] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single QuadrupleBarArrowShape [MangleName 'quadrupleArrowRight']   [MangleUnicode 0x2B46] arrowSB SymbolMid arrowRSB SymbolMid

	# Double Head
	[MkArrow.singleAnchorAt dhAnchorP] Arrow.dblShape [MangleName 'dhArrowLeft']  [MangleUnicode 0x219E] arrowRSB SymbolMid arrowSB SymbolMid
	[MkArrow.singleAnchorAt dhAnchorP] Arrow.dblShape [MangleName 'dhArrowRight'] [MangleUnicode 0x21A0] arrowSB SymbolMid arrowRSB SymbolMid
	[MkArrow.singleAnchorAt dhAnchorP] Arrow.dblShape [MangleName 'dhArrowUp']    [MangleUnicode 0x219F] arrowMidX arrowBot arrowMidX arrowTop
	[MkArrow.singleAnchorAt dhAnchorP] Arrow.dblShape [MangleName 'dhArrowDown']  [MangleUnicode 0x21A1] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.single Arrow.dblTrigShape [MangleName 'dblTrigArrowLeft']  [MangleUnicode 0x2BEC] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single Arrow.dblTrigShape [MangleName 'dblTrigArrowUp']    [MangleUnicode 0x2BED] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single Arrow.dblTrigShape [MangleName 'dblTrigArrowRight'] [MangleUnicode 0x2BEE] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.dblTrigShape [MangleName 'dblTrigArrowDown']  [MangleUnicode 0x2BEF] arrowMidX arrowTop arrowMidX arrowBot

	# Tail
	MkArrow.single Arrow.tailShape [MangleName 'arrowTailFromRight'] [MangleUnicode 0x2919] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.tailShape [MangleName 'arrowTailFromLeft']  [MangleUnicode 0x291A] arrowRSB SymbolMid arrowSB SymbolMid

	MkArrow.single Arrow.dblTailShape [MangleName 'dblArrowTailFromRight'] [MangleUnicode 0x291B] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single Arrow.dblTailShape [MangleName 'dblArrowTailFromLeft']  [MangleUnicode 0x291C] arrowRSB SymbolMid arrowSB SymbolMid

	# Two-sided Arrows
	MkArrow.double Arrow.shape Arrow.shape [MangleName 'arrowLeftRight'] [MangleUnicode 0x2194] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double Arrow.shape Arrow.shape [MangleName 'arrowUpDown'] [MangleUnicode 0x2195] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.double Arrow.shape Arrow.shape [MangleName 'arrowUpLeftAndDownRight'] [MangleUnicode 0x2921] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot
	MkArrow.double Arrow.shape Arrow.shape [MangleName 'arrowUpRightAndDownLeft'] [MangleUnicode 0x2922] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot

	MkArrow.double Arrow.trigShape Arrow.trigShape [MangleName 'trigArrowLeftRight'] [MangleUnicode 0x2B64] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double Arrow.trigShape Arrow.trigShape [MangleName 'trigArrowUpDown'] [MangleUnicode 0x2B65] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.double Arrow.openShape Arrow.openShape [MangleName 'openHeadArrowLeftRight'] [MangleUnicode 0x21FF] arrowSB SymbolMid arrowRSB SymbolMid

	MkArrow.double Arrow.ssShape Arrow.ssShape [MangleName 'sansSerifArrowLeftRight'] [MangleUnicode 0x1F858] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double Arrow.ssShape Arrow.ssShape [MangleName 'sansSerifArrowUpDown']    [MangleUnicode 0x1F859] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.double Arrow.rhsShape Arrow.rhsShape [MangleName 'arrowLeftRightHR'] [MangleUnicode 0x294A] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double Arrow.lhsShape Arrow.lhsShape [MangleName 'arrowLeftRightHL'] [MangleUnicode 0x294B] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double Arrow.rhsShape Arrow.rhsShape [MangleName 'arrowUpDownHR']    [MangleUnicode 0x294C] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.double Arrow.lhsShape Arrow.lhsShape [MangleName 'arrowUpDownHL']    [MangleUnicode 0x294D] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.double Arrow.rhsShape Arrow.lhsShape [MangleName 'arrowLeftHRRightHL'] [MangleUnicode 0x294E] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double Arrow.rhsShape Arrow.lhsShape [MangleName 'arrowUpHRDownHL']    [MangleUnicode 0x294F] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.double Arrow.lhsShape Arrow.rhsShape [MangleName 'arrowLeftHLRightHR'] [MangleUnicode 0x2950] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double Arrow.lhsShape Arrow.rhsShape [MangleName 'arrowUpHLDownHR']    [MangleUnicode 0x2951] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.double DoubleBarArrowShape DoubleBarArrowShape [MangleName 'dblArrowLeftRight'] [MangleUnicode 0x21D4] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double DoubleBarArrowShape DoubleBarArrowShape [MangleName 'dblArrowUpDown'] [MangleUnicode 0x21D5] arrowMidX arrowTop arrowMidX arrowBot

	# Arrow + Tail
	define BarToBarShape : Arrow.barTailShapeT Arrow.Bar.shape
	define DoubleBarToBarShape : Arrow.barTailShapeT DoubleBarShape

	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowLeft']  [MangleUnicode 0x21A4] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowUp']    [MangleUnicode 0x21A5] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowRight'] [MangleUnicode 0x21A6] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowDown']  [MangleUnicode 0x21A7] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowUpLeft']    [MangleUnicode 0x1F8B8] arrowDiagRSB arrowDiagBot arrowDiagSB arrowDiagTop
	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowUpRight']   [MangleUnicode 0x1F8B9] arrowDiagSB arrowDiagBot arrowDiagRSB arrowDiagTop
	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowDownRight'] [MangleUnicode 0x1F8BA] arrowDiagSB arrowDiagTop arrowDiagRSB arrowDiagBot
	MkArrow.double BarToBarShape Arrow.shape [MangleName 'barArrowDownLeft']  [MangleUnicode 0x1F8BB] arrowDiagRSB arrowDiagTop arrowDiagSB arrowDiagBot

	MkArrow.double BarToBarShape Arrow.rhsShape [MangleName 'barArrowLeftHR']  [MangleUnicode 0x295A] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.double BarToBarShape Arrow.lhsShape [MangleName 'barArrowRightHL'] [MangleUnicode 0x295B] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double BarToBarShape Arrow.rhsShape [MangleName 'barArrowUpHR']    [MangleUnicode 0x295C] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.double BarToBarShape Arrow.lhsShape [MangleName 'barArrowDownHL']  [MangleUnicode 0x295D] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.double BarToBarShape Arrow.lhsShape [MangleName 'barArrowLeftHL']  [MangleUnicode 0x295E] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.double BarToBarShape Arrow.rhsShape [MangleName 'barArrowRightHR'] [MangleUnicode 0x295F] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.double BarToBarShape Arrow.lhsShape [MangleName 'barArrowUpHL']    [MangleUnicode 0x2960] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.double BarToBarShape Arrow.rhsShape [MangleName 'barArrowDownHR']  [MangleUnicode 0x2961] arrowMidX arrowTop arrowMidX arrowBot

	[MkArrow.doubleAnchorAt 0.2] BarToBarShape Arrow.dblShape [MangleName 'barDhArrowLeft']  [MangleUnicode 0x2905] arrowRSB SymbolMid arrowSB SymbolMid
	[MkArrow.doubleAnchorAt 0.2] BarToBarShape Arrow.dblShape [MangleName 'barDhArrowRight'] [MangleUnicode 0x2B36] arrowSB SymbolMid arrowRSB SymbolMid

	MkArrow.double DoubleBarToBarShape DoubleBarArrowShape [MangleName 'barDblArrowLeft']  [MangleUnicode 0x2906] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.double DoubleBarToBarShape DoubleBarArrowShape [MangleName 'barDblArrowRight'] [MangleUnicode 0x2907] arrowSB SymbolMid arrowRSB SymbolMid

	[MkArrow.doubleAnchorAt htAnchorP 0.5] Arrow.tailShape Arrow.shape [MangleName 'htArrowLeft'] [MangleUnicode 0x21A2] arrowRSB SymbolMid arrowSB SymbolMid
	[MkArrow.doubleAnchorAt htAnchorP 0.5] Arrow.tailShape Arrow.shape [MangleName 'htArrowRight'] [MangleUnicode 0x21A3] arrowSB SymbolMid arrowRSB SymbolMid

	[MkArrow.doubleAnchorAt dhtAnchorP 0.4] Arrow.tailShape Arrow.dblShape [MangleName 'dhtArrowLeft']  [MangleUnicode 0x2916] arrowRSB SymbolMid arrowSB SymbolMid
	[MkArrow.doubleAnchorAt dhtAnchorP 0.4] Arrow.tailShape Arrow.dblShape [MangleName 'dhtArrowRight'] [MangleUnicode 0x2B3B] arrowSB SymbolMid arrowRSB SymbolMid

	# Arrow to Bar/Diamond
	define ArrowToBarShape : Arrow.toBarShapeT Arrow.shape
	define TrigArrowToBarShape : Arrow.toBarShapeT Arrow.trigShape
	define LHSArrowToBarShape : Arrow.toBarShapeT Arrow.lhsShape
	define RHSArrowToBarShape : Arrow.toBarShapeT Arrow.rhsShape
	define ArrowToDiamondShape : Arrow.toDiamondShapeT Arrow.shape

	MkArrow.single ArrowToBarShape [MangleName 'arrowBarLeft']  [MangleUnicode 0x21E4] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single ArrowToBarShape [MangleName 'arrowBarRight'] [MangleUnicode 0x21E5] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single ArrowToBarShape [MangleName 'arrowBarUp']    [MangleUnicode 0x2912] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single ArrowToBarShape [MangleName 'arrowBarDown']  [MangleUnicode 0x2913] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.single TrigArrowToBarShape [MangleName 'trigArrowBarLeft']  [MangleUnicode 0x2B70] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single TrigArrowToBarShape [MangleName 'trigArrowBarUp']    [MangleUnicode 0x2B71] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single TrigArrowToBarShape [MangleName 'trigArrowBarRight'] [MangleUnicode 0x2B72] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single TrigArrowToBarShape [MangleName 'trigArrowBarDown']  [MangleUnicode 0x2B73] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.single RHSArrowToBarShape [MangleName 'arrowBarLeftHR']  [MangleUnicode 0x2952] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single LHSArrowToBarShape [MangleName 'arrowBarRightHL'] [MangleUnicode 0x2953] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single RHSArrowToBarShape [MangleName 'arrowBarUpHR']    [MangleUnicode 0x2954] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single LHSArrowToBarShape [MangleName 'arrowBarDownHL']  [MangleUnicode 0x2955] arrowMidX arrowTop arrowMidX arrowBot
	MkArrow.single LHSArrowToBarShape [MangleName 'arrowBarLeftHL']  [MangleUnicode 0x2956] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single RHSArrowToBarShape [MangleName 'arrowBarRightHR'] [MangleUnicode 0x2957] arrowSB SymbolMid arrowRSB SymbolMid
	MkArrow.single LHSArrowToBarShape [MangleName 'arrowBarUpHL']    [MangleUnicode 0x2958] arrowMidX arrowBot arrowMidX arrowTop
	MkArrow.single RHSArrowToBarShape [MangleName 'arrowBarDownHR']  [MangleUnicode 0x2959] arrowMidX arrowTop arrowMidX arrowBot

	MkArrow.single ArrowToDiamondShape [MangleName 'arrowDiamondLeft']  [MangleUnicode 0x291D] arrowRSB SymbolMid arrowSB SymbolMid
	MkArrow.single ArrowToDiamondShape [MangleName 'arrowDiamondRight'] [MangleUnicode 0x291E] arrowSB SymbolMid arrowRSB SymbolMid

	MkArrow.double Arrow.shape ArrowToBarShape [MangleName 'arrowUpDownBar'] [MangleUnicode 0x21A8] arrowMidX arrowTop arrowMidX arrowBot

	[MkArrow.doubleAnchorAt 0.1] BarToBarShape ArrowToDiamondShape [MangleName 'BarArrowDiamondLeft']  [MangleUnicode 0x291F] arrowRSB SymbolMid arrowSB SymbolMid
	[MkArrow.doubleAnchorAt 0.1] BarToBarShape ArrowToDiamondShape [MangleName 'BarArrowDiamondRight'] [MangleUnicode 0x2920] arrowSB SymbolMid arrowRSB SymbolMid

	# Arrow Heads
	create-glyph [MangleName 'arrowHeadUp'] [MangleUnicode 0x2303] : glyph-proc
		set-width MosaicWidth
		include : Arrow.Head.shape arrowMidX arrowBot arrowMidX arrowTop
	create-glyph [MangleName 'arrowHeadDown'] [MangleUnicode 0x2304] : glyph-proc
		set-width MosaicWidth
		include : Arrow.Head.shape arrowMidX arrowTop arrowMidX arrowBot

	# These arrows are always wide. In force-monospace variants they will be deleted
	if (MosaicWidthScalar > 1 && !para.forceMonospace) : do
		define l : mix 0 arrowSB kLongArrowSB
		define r : mix MosaicWidth arrowRSB kLongArrowSB
		MkArrow.single Arrow.shape 'longArrowLeft'  0x27F5 r SymbolMid l SymbolMid
		MkArrow.single Arrow.shape 'longArrowRight' 0x27F6 l SymbolMid r SymbolMid

		MkArrow.single DoubleBarArrowShape 'longDblArrowLeft'  0x27F8 r SymbolMid l SymbolMid
		MkArrow.single DoubleBarArrowShape 'longDblArrowRight' 0x27F9 l SymbolMid r SymbolMid

		MkArrow.double Arrow.shape Arrow.shape 'longArrowLeftRight' 0x27F7 l SymbolMid r SymbolMid
		MkArrow.double DoubleBarArrowShape DoubleBarArrowShape 'longDblArrowLeftRight' 0x27FA l SymbolMid r SymbolMid

		MkArrow.double BarToBarShape Arrow.shape 'longBarArrowLeft'  0x27FB r SymbolMid l SymbolMid
		MkArrow.double BarToBarShape Arrow.shape 'longBarArrowRight' 0x27FC l SymbolMid r SymbolMid
		MkArrow.double DoubleBarToBarShape DoubleBarArrowShape 'longBarDblArrowLeft'  0x27FD r SymbolMid l SymbolMid
		MkArrow.double DoubleBarToBarShape DoubleBarArrowShape 'longBarDblArrowRight' 0x27FE l SymbolMid r SymbolMid
