### Punctuation symbols
$$include '../../meta/macros.ptl'

import [mix linreg clamp fallback] from "@iosevka/util"
import [Joining] from "@iosevka/glyph/relation"
import [DesignParameters] from "../../meta/aesthetics.mjs"

glyph-module

glyph-block Symbol-Punctuation-Brackets : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives

	define MosaicTop    fontMetrics.os2.sTypoAscender
	define MosaicBottom fontMetrics.os2.sTypoDescender
	define MosaicHeight : MosaicTop - MosaicBottom

	define Paren : namespace
		export : define [Dim] : with-params [df [delta 0] [dp DesignParameters] [sw Stroke]] : object
			outside : [mix df.leftSB df.rightSB dp.parenOutside] - delta - [HSwToV dp.parenOutsideSwAdj] * sw + O
			inside  : [mix df.leftSB df.rightSB dp.parenInside] - [HSwToV dp.parenInsideSwAdj] * sw
			bottom  : [mix SymbolMid ParenBot (1 + dp.parenOvershoot)] - delta
			top     : [mix SymbolMid ParenTop (1 + dp.parenOvershoot)] + delta
			mid       SymbolMid

		export : define [Shape] : with-params [df [sw Stroke] [dp DesignParameters]] : begin
			local dim : Dim df (delta -- 0) (dp -- dp) (sw -- sw)
			return : dispiro
				widths.lhs sw
				g4 dim.inside dim.top
				quadControls 1 (1 - dp.parenCurliness)
				g4 dim.outside dim.mid
				quadControls 0 dp.parenCurliness
				g4 dim.inside dim.bottom

		export : define [UpperShape df sw] : let [dim : Dim df 0 (sw -- sw)] : dispiro
			widths.lhs sw
			g4 dim.inside dim.top
			quadControls 1 (1 - DesignParameters.parenCurliness)
			g4.down.end dim.outside MosaicBottom [heading Downward]

		export : define [ExtensionShape df sw] : let [dim : Dim df 0 (sw -- sw)] : dispiro
			widths.lhs sw
			g4.down.start dim.outside MosaicTop [heading Downward]
			g4.down.end dim.outside MosaicBottom [heading Downward]

		export : define [LowerShape df sw] : let [dim : Dim df 0 (sw -- sw)] : dispiro
			widths.lhs sw
			g4.down.start dim.outside MosaicTop [heading Downward]
			quadControls 0 DesignParameters.parenCurliness
			g4 dim.inside dim.bottom

		export : define [ShapeMask df sw delta] : let [dim : Dim df delta (sw -- sw)] : spiro-outline
			corner dim.inside dim.top
			quadControls 1 (1 - DesignParameters.parenCurliness)
			g4 dim.outside dim.mid
			quadControls 0 DesignParameters.parenCurliness
			corner dim.inside dim.bottom

	do "Paren glyphs"
		define [NormalShape df] : Paren.Shape df df.mvs
		define [LargeContourShape df] : begin
			local dp : object
				parenOutside           (0.25 * DesignParameters.parenOutside)
				parenInside            DesignParameters.parenInside
				parenOutsideSwAdj      DesignParameters.parenOutsideSwAdj
				parenInsideSwAdj       DesignParameters.parenInsideSwAdj
				parenCurliness         [mix 1 DesignParameters.parenCurliness 0.5]
				parenOvershoot         DesignParameters.parenOvershoot
			return : Paren.Shape df df.mvs dp
		define [FlatArcShape df] : begin
			local dp : object
				parenOutside           (0.5 * DesignParameters.parenOutside)
				parenInside            DesignParameters.parenInside
				parenOutsideSwAdj      DesignParameters.parenOutsideSwAdj
				parenInsideSwAdj       DesignParameters.parenInsideSwAdj
				parenCurliness         [mix 1 DesignParameters.parenCurliness 0.5]
				parenOvershoot         DesignParameters.parenOvershoot
			local dim : Paren.Dim df 0 dp
			return : dispiro
				widths.lhs df.mvs
				g4.left.start dim.inside dim.top
				archv
				flat dim.outside [mix dim.bottom dim.top 0.65]
				curl dim.outside [mix dim.bottom dim.top 0.35]
				arcvh
				g4.right.start dim.inside dim.bottom

		define SimpleParenConfig : object
			'normal'       NormalShape
			'largeContour' LargeContourShape
			'flatArc'      FlatArcShape

		foreach { suffix shape } [pairs-of SimpleParenConfig] : begin
			create-glyph "parenLeft.\(suffix)" : shape [DivFrame 1]
			create-glyph "doubleParenLeft.\(suffix)" : glyph-proc
				local df : DivFrame 1 3
				local subDf : df.slice 3 2
				include : shape subDf
				include : with-transform [ApparentTranslate (df.width - subDf.width) 0] : shape subDf

			turned "parenRight.\(suffix)" null "parenLeft.\(suffix)" Middle SymbolMid
			turned "doubleParenRight.\(suffix)" null "doubleParenLeft.\(suffix)" Middle SymbolMid

			create-glyph "parenLeftUHalf.\(suffix)" : intersection
				refer-glyph "parenLeft.\(suffix)"
				MaskAbove SymbolMid
			create-glyph "parenLeftLHalf.\(suffix)" : intersection
				refer-glyph "parenLeft.\(suffix)"
				MaskBelow SymbolMid

			turned "parenRightUHalf.\(suffix)" null "parenLeftLHalf.\(suffix)" Middle SymbolMid
			turned "parenRightLHalf.\(suffix)" null "parenLeftUHalf.\(suffix)" Middle SymbolMid

		select-variant 'parenLeft'  '('
		select-variant 'parenRight' ')'
		select-variant 'doubleParenLeft'  0x2E28 (follow -- 'parenLeft')
		select-variant 'doubleParenRight' 0x2E29 (follow -- 'parenRight')

		select-variant 'parenLeftUHalf'   0x2E59 (follow -- 'parenLeft')
		select-variant 'parenRightUHalf'  0x2E5A (follow -- 'parenRight')
		select-variant 'parenLeftLHalf'   0x2E5B (follow -- 'parenLeft')
		select-variant 'parenRightLHalf'  0x2E5C (follow -- 'parenRight')

		alias 'flattenedParenLeft'  0x27EE 'parenLeft.flatArc'
		alias 'flattenedParenRight' 0x27EF 'parenRight.flatArc'

		create-glyph 'parenLeftUpper' 0x239B : glyph-proc
			include : ForceUpright
			include : Paren.UpperShape [DivFrame 1] Stroke

		create-glyph 'parenLeftExtension' 0x239C : glyph-proc
			include : ForceUpright
			include : Paren.ExtensionShape [DivFrame 1] Stroke

		create-glyph 'parenLeftLower' 0x239D : glyph-proc
			include : ForceUpright
			include : Paren.LowerShape [DivFrame 1] Stroke

		turned 'parenRightLower' 0x23A0 'parenLeftUpper' Middle SymbolMid
		turned 'parenRightExtension' 0x239F 'parenLeftExtension' Middle SymbolMid
		turned 'parenRightupper' 0x239E 'parenLeftLower' Middle SymbolMid

		create-glyph 'zNotationParenLeft' 0x2987 : glyph-proc
			local df : DivFrame 1
			local fine : AdviceStroke 4
			local dim : Paren.Dim df 0 (sw -- fine)
			include : intersection
				Rect [mix dim.bottom dim.top 2] [mix dim.top dim.bottom 2] 0 dim.inside
				union
					Paren.Shape df fine
					intersection
						VBar.r dim.inside dim.bottom dim.top fine
						Paren.ShapeMask df fine O

		turned 'zNotationParenRight' 0x2988 'zNotationParenLeft' Middle SymbolMid

	define Bracket : namespace
		export : define [HDim barLeft ext] : namespace
			export : define l : fallback barLeft : [mix SB RightSB DesignParameters.bracketOutside] - [HSwToV DesignParameters.bracketOutsideSwAdj] * Stroke
			export : define r : [fallback ext 0] + [mix SB RightSB DesignParameters.bracketInside]

		export : define [Mask] : Rect MosaicTop MosaicBottom (-Width) (2 * Width)

		export : define [Shape top bottom barLeft ext] : begin
			local hDim : HDim barLeft ext
			return : union
				HBar.b hDim.l hDim.r bottom
				HBar.t hDim.l hDim.r top
				VBar.l hDim.l bottom top

	do "Bracket Glyphs"
		create-glyph 'bracketLeft' '[' : Bracket.Shape ParenTop ParenBot
		create-glyph 'bracketLeftUHalf' 0x2E22 : intersection
			refer-glyph 'bracketLeft'
			MaskAbove SymbolMid
		create-glyph 'bracketLeftLHalf' 0x2E24 : intersection
			refer-glyph 'bracketLeft'
			MaskBelow SymbolMid

		create-glyph 'ligExtBracketLeft' : glyph-proc
			Joining.set currentGlyph Joining.Classes.Right
			include : Bracket.Shape ParenTop ParenBot (Middle - [HSwToV HalfStroke]) Width

		create-glyph 'bracketLeftUpper' 0x23A1 : glyph-proc
			include : ForceUpright
			include : intersection [Bracket.Mask]
				Bracket.Shape ParenTop (ParenBot - MosaicHeight)

		create-glyph 'bracketLeftExtension' 0x23A2 : glyph-proc
			include : ForceUpright
			include : intersection [Bracket.Mask]
				Bracket.Shape (ParenTop + MosaicHeight) (ParenBot - MosaicHeight)

		create-glyph 'bracketLeftLower' 0x23A3 : glyph-proc
			include : ForceUpright
			include : intersection [Bracket.Mask]
				Bracket.Shape (ParenTop + MosaicHeight) ParenBot

		create-glyph 'dblBracketLeft' 0x27E6 : glyph-proc
			local hDim : Bracket.HDim
			local sw : Math.min ((hDim.r - hDim.l) / 5) [AdviceStroke 4]
			include : union
				HBar.b hDim.l hDim.r ParenBot
				HBar.t hDim.l hDim.r ParenTop
				VBar.l hDim.l ParenBot ParenTop sw
				VBar.m [mix hDim.l hDim.r (1 / 2)] ParenBot ParenTop sw

		create-glyph 'bracketBarLeft' 0x2045 : glyph-proc
			local hDim : Bracket.HDim
			include : union
				HBar.b hDim.l hDim.r ParenBot
				HBar.t hDim.l hDim.r ParenTop
				HBar.m hDim.l hDim.r [mix ParenBot ParenTop 0.5]
				VBar.l hDim.l ParenBot ParenTop

		create-glyph 'barBarLeft' 0x2E20 : glyph-proc
			local hDim : Bracket.HDim
			include : union
				HBar.m hDim.l hDim.r [mix ParenBot ParenTop 0.5]
				VBar.l hDim.l ParenBot ParenTop

		create-glyph 'smallBracketLeft' null : Bracket.Shape (XH / CAP * ParenTop) (XH / CAP * ParenBot)

		turned 'bracketRight' ']' 'bracketLeft' Middle SymbolMid
		turned 'bracketRightUHalf' 0x2E23 'bracketLeftLHalf' Middle SymbolMid
		turned 'bracketRightLHalf' 0x2E25 'bracketLeftUHalf' Middle SymbolMid
		turned 'bracketRightLower' 0x23A6 'bracketLeftUpper' Middle SymbolMid
		turned 'bracketRightExtension' 0x23A5 'bracketLeftExtension' Middle SymbolMid
		turned 'bracketRightUpper' 0x23A4 'bracketLeftLower' Middle SymbolMid
		turned 'dblBracketRight' 0x27E7 'dblBracketLeft' Middle SymbolMid
		turned 'bracketBarRight' 0x2046 'bracketBarLeft' Middle SymbolMid
		turned 'barBarRight' 0x2E21 'barBarLeft' Middle SymbolMid

		create-glyph 'ligExtBracketRight' : glyph-proc
			include [refer-glyph 'ligExtBracketLeft'] AS_BASE ALSO_METRICS
			include : FlipAround Middle SymbolMid
			Joining.set currentGlyph Joining.Classes.Left

	define Brace : namespace
		define [Dim] : begin
			local parenCenter [mix SB RightSB [mix DesignParameters.braceInside DesignParameters.braceOutside 0.5]]
			local radius    : Math.min
				[mix SB RightSB DesignParameters.braceInside] - parenCenter
				(ParenTop - SymbolMid - Stroke * 1.5) / 2
			return : object parenCenter radius

		export : define [UpperHalfShape top bottom sw ext] : glyph-proc
			define [object parenCenter radius] : Dim
			define xIns : mix SB RightSB DesignParameters.braceInside
			define xTip : mix SB RightSB DesignParameters.braceOutside
			include : dispiro
				flat (xIns + [fallback ext 0]) top [widths.center.heading sw Leftward]
				curl (xIns - TINY) top [heading Leftward]
				archv
				flat parenCenter (top - radius) [heading Downward]
				curl parenCenter (bottom + radius) [heading Downward]
				arcvh
				straight.left.end xTip bottom [heading Leftward]

		export : define [LowerHalfShape top bottom sw ext] : glyph-proc
			define [object parenCenter radius] : Dim
			define xIns : mix SB RightSB DesignParameters.braceInside
			define xTip : mix SB RightSB DesignParameters.braceOutside
			include : dispiro
				flat (xIns + [fallback ext 0]) bottom [widths.center.heading sw Leftward]
				curl (xIns - TINY) bottom [heading Leftward]
				archv
				flat parenCenter (bottom + radius) [heading Upward]
				curl parenCenter (top - radius) [heading Upward]
				arcvh
				straight.left.end xTip top [heading Leftward]

		export : define [UpperThirdShape top bottom sw] : glyph-proc
			define [object parenCenter radius] : Dim
			include : intersection [Bracket.Mask]
				UpperHalfShape top (bottom - MosaicHeight) sw

		export : define [LowerThirdShape top bottom sw] : glyph-proc
			define [object parenCenter radius] : Dim
			include : intersection [Bracket.Mask]
				LowerHalfShape (top + MosaicHeight) bottom sw

		export : define [CenterThirdShape top bottom sw] : glyph-proc
			define [object parenCenter radius] : Dim
			include : intersection [Bracket.Mask]
				union
					UpperHalfShape (top + MosaicHeight) [mix bottom top 0.5] sw
					LowerHalfShape [mix bottom top 0.5] (bottom - MosaicHeight) sw

		export : define [ExtensionShape top bottom sw] : glyph-proc
			define [object parenCenter radius] : Dim
			include : intersection [Bracket.Mask]
				union
					UpperHalfShape (top + MosaicHeight) (bottom - MosaicHeight) sw

		######

		export : define [CurlyShape sw pFlatIn pFlatOut ext] : glyph-proc
			local hs : sw / 2
			local xIns : mix SB RightSB DesignParameters.braceInside
			local xOus : mix SB RightSB DesignParameters.braceOutside
			local m1   : mix xIns xOus (DesignParameters.braceCurlyM1 * (1 + 0.5 * pFlatIn))
			local m2   : mix xIns xOus (DesignParameters.braceCurlyM2 * (1 + 0.5 * pFlatOut))
			local braceRadiusLowLimit : (ParenTop - SymbolMid - sw) * (1 / 3) + hs
			local radius1 : (sw / 16) + [mix [Math.min (xIns - m1) braceRadiusLowLimit] sw (0.75 * pFlatIn)]
			local radius2 : (sw / 16) + [mix [Math.min (m2 - xOus) braceRadiusLowLimit] sw (0.75 * pFlatOut)] - hs
			local ess : mix sw (EssUpper * sw / Stroke) 0.25
			local top : mix SymbolMid ParenTop (1 + DesignParameters.braceOvershoot)
			local bot : mix SymbolMid ParenBot (1 + DesignParameters.braceOvershoot)

			local flatLengthIn  : Math.max 0.1 : pFlatIn * (xIns - xOus)
			local flatLengthOut : Math.max 0.1 : pFlatOut * (xIns - xOus)
			local fine : sw * CThin

			include : dispiro
				flat (xIns + [fallback ext 0]) (top - hs) [widths.center.heading sw Leftward]
				curl (xIns - flatLengthIn) (top - hs) [heading Leftward]
				archv.superness (2.2 + pFlatIn)
				g4.down.mid m1 (top - radius1) [heading Downward]
				alsoThru 0.5 0.5 [widths.center ess]
				g4.down.mid m2 (SymbolMid + radius2) [widths.center.heading sw Downward]
				arcvh
				flat (xOus + flatLengthOut) (SymbolMid + (sw - fine) / 2) [widths.center.heading fine Leftward]
				curl xOus (SymbolMid + (sw - fine) / 2) [heading Leftward]

			include : dispiro
				flat (xIns + [fallback ext 0]) (bot + hs) [widths.center.heading sw Leftward]
				curl (xIns - flatLengthIn) (bot + hs) [heading Leftward]
				archv.superness (2.2 + pFlatIn)
				g4.up.mid m1 (bot + radius1) [heading Upward]
				alsoThru 0.5 0.5 [widths.center ess]
				g4.up.mid m2 (SymbolMid - radius2) [widths.center.heading sw Upward]
				arcvh
				flat (xOus + flatLengthOut) (SymbolMid - (sw - fine) / 2) [widths.center.heading fine Leftward]
				curl xOus (SymbolMid - (sw - fine) / 2) [heading Leftward]


	do "Brace glyphs"
		do "Normal"
			local top : [mix SymbolMid ParenTop (1 + DesignParameters.braceOvershoot)] - HalfStroke
			local bot : [mix SymbolMid ParenBot (1 + DesignParameters.braceOvershoot)] + HalfStroke

			create-glyph 'braceLeft.straight' : glyph-proc
				include : Brace.UpperHalfShape top SymbolMid Stroke
				include : Brace.LowerHalfShape SymbolMid bot Stroke
			turned 'braceRight.straight' null 'braceLeft.straight' Middle SymbolMid

			create-glyph 'ligExtBraceLeft.straight' : glyph-proc
				Joining.set currentGlyph Joining.Classes.Right
				include : Brace.UpperHalfShape top SymbolMid Stroke Width
				include : Brace.LowerHalfShape SymbolMid bot Stroke Width
			create-glyph 'ligExtBraceRight.straight' : glyph-proc
				include [refer-glyph 'ligExtBraceLeft.straight'] AS_BASE ALSO_METRICS
				include : FlipAround Middle SymbolMid
				Joining.set currentGlyph Joining.Classes.Left

			create-glyph 'braceLeftUpper' 0x23A7 : glyph-proc
				include : ForceUpright
				include : Brace.UpperThirdShape top bot Stroke
			turned 'braceRightLower' 0x23AD 'braceLeftUpper' Middle SymbolMid

			create-glyph 'braceLeftLower' 0x23A9 : glyph-proc
				include : ForceUpright
				include : Brace.LowerThirdShape top bot Stroke
			turned 'braceRightUpper' 0x23AB 'braceLeftLower' Middle SymbolMid

			create-glyph 'braceLeftMiddle' 0x23A8 : glyph-proc
				include : ForceUpright
				include : Brace.CenterThirdShape top bot Stroke
			turned 'braceRightMiddle' 0x23AC 'braceLeftMiddle' Middle SymbolMid

			create-glyph 'braceExtension' 0x23AA : glyph-proc
				include : ForceUpright
				include : Brace.ExtensionShape top bot Stroke

			create-glyph 'whiteBraceLeft.straight' : glyph-proc
				local fine : AdviceStroke 4
				local xIns : mix SB RightSB DesignParameters.braceInside
				include : Brace.UpperHalfShape top SymbolMid fine
				include : Brace.LowerHalfShape SymbolMid bot fine
				include : VBar.r xIns (bot + fine / 2) (top - fine / 2) fine
			turned 'whiteBraceRight.straight' null 'whiteBraceLeft.straight' Middle SymbolMid

		do "Diagonal"
			local top : mix SymbolMid ParenTop (1 + DesignParameters.braceOvershoot)
			local bot : mix SymbolMid ParenBot (1 + DesignParameters.braceOvershoot)
			create-glyph 'upperLeftOrLowerRightfBrace' 0x23B0 : glyph-proc
				include : ForceUpright
				include : Brace.UpperHalfShape (top - HalfStroke) (bot + HalfStroke) Stroke
			create-glyph 'upperRightOrLowerLeftfBrace' 0x23B1 : glyph-proc
				include : ForceUpright
				include : Brace.LowerHalfShape (top - HalfStroke) (bot + HalfStroke) Stroke

		do "Curly"
			define CurlyBraceConfig : object
				curly             { 0   0     }
				curlyFlatBoundary { 0.25 0.05 }

			foreach { suffix { pFlatIn pFlatOut } } [Object.entries CurlyBraceConfig] : do
				create-glyph "braceLeft.\(suffix)" : Brace.CurlyShape Stroke pFlatIn pFlatOut
				turned "braceRight.\(suffix)" null "braceLeft.\(suffix)" Middle SymbolMid

				create-glyph "ligExtBraceLeft.\(suffix)" : glyph-proc
					Joining.set currentGlyph Joining.Classes.Right
					include : Brace.CurlyShape Stroke pFlatIn pFlatOut Width
				create-glyph "ligExtBraceRight.\(suffix)" : glyph-proc
					include [refer-glyph "ligExtBraceLeft.\(suffix)"] AS_BASE ALSO_METRICS
					include : FlipAround Middle SymbolMid
					Joining.set currentGlyph Joining.Classes.Left

				create-glyph "whiteBraceLeft.\(suffix)" : glyph-proc
					local fine : AdviceStroke 4
					local xIns : mix SB RightSB DesignParameters.braceInside
					local top : mix SymbolMid ParenTop (1 + DesignParameters.braceOvershoot)
					local bot : mix SymbolMid ParenBot (1 + DesignParameters.braceOvershoot)
					include : Brace.CurlyShape fine pFlatIn pFlatOut
					include : VBar.r xIns (bot + fine / 2) (top - fine / 2) fine

				turned "whiteBraceRight.\(suffix)" null "whiteBraceLeft.\(suffix)" Middle SymbolMid


		select-variant 'braceLeft' '{'
		select-variant 'braceRight' '}'

		select-variant 'ligExtBraceLeft' (follow -- 'braceLeft')
		select-variant 'ligExtBraceRight' (follow -- 'braceRight')

		select-variant 'whiteBraceLeft' 0x2983 (follow -- 'braceLeft')
		select-variant 'whiteBraceRight' 0x2984 (follow -- 'braceRight')

	do "Angle Bracket"
		define [AngleLeftShape outside inside sw] : begin
			local fatten : Math.hypot 1 ((inside - outside - O) / (ParenTop - SymbolMid))
			return : union
				dispiro
					widths.lhs sw
					flat inside ParenTop
					curl (outside + O) SymbolMid [widths.heading (sw * fatten) 0 Downward]
				dispiro
					widths.rhs sw
					flat inside ParenBot
					curl (outside + O) SymbolMid [widths.heading 0 (sw * fatten) Upward]
		define [AngleLeftShapeMask outside inside sw] : spiro-outline
			corner inside ParenTop
			corner (outside + O) SymbolMid
			corner inside ParenBot

		create-glyph 'angleLeft' 0x2329 : glyph-proc
			define dim : Paren.Dim [DivFrame 1] (delta -- 0)
			include : AngleLeftShape dim.outside dim.inside OperatorStroke

		create-glyph 'dblAngleLeft' 0x27EA : glyph-proc
			define dim : Paren.Dim [DivFrame 1] (delta -- 0) (sw -- OperatorStroke)
			define fine : Math.min OperatorStroke [AdviceStroke 3.5]
			define farOutside : dim.outside / 2
			define middle : mix farOutside dim.inside 0.5
			include : AngleLeftShape farOutside middle fine
			include : AngleLeftShape middle dim.inside fine

		create-glyph 'zNotationAngleLeft' 0x2989 : glyph-proc
			local df : DivFrame 1
			local fine : AdviceStroke 4
			local dim : Paren.Dim df 0 (sw -- fine)
			include : intersection
				Rect [mix ParenBot ParenTop 2] [mix ParenTop ParenBot 2] 0 dim.inside
				union
					AngleLeftShape dim.outside dim.inside fine
					intersection
						VBar.r dim.inside dim.bottom dim.top fine
						AngleLeftShapeMask dim.outside dim.inside fine

		turned 'zNotationAngleRight' 0x298A 'zNotationAngleLeft' Middle SymbolMid
		turned 'angleRight' 0x232A 'angleLeft' Middle SymbolMid
		turned 'dblAngleRight' 0x27EB 'dblAngleLeft' Middle SymbolMid
		alias 'mathAngleLeft' 0x27E8 'angleLeft'
		alias 'mathAngleRight' 0x27E9 'angleRight'

	do "Floor and Ceiling"
		create-glyph 'ceilingLeft' 0x2308 : glyph-proc
			include : HBar.t    [mix SB RightSB DesignParameters.bracketOutside] [mix SB RightSB DesignParameters.bracketInside] ParenTop
			include : VBar.l   [mix SB RightSB DesignParameters.bracketOutside] ParenBot ParenTop

		create-glyph 'floorLeft' 0x230A : glyph-proc
			include : HBar.b [mix SB RightSB DesignParameters.bracketOutside] [mix SB RightSB DesignParameters.bracketInside] ParenBot
			include : VBar.l   [mix SB RightSB DesignParameters.bracketOutside] ParenBot ParenTop

		turned 'floorRight' 0x230B 'ceilingLeft' Middle SymbolMid
		turned 'ceilingRight' 0x2309 'floorLeft' Middle SymbolMid
