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

import [mix] from "@iosevka/util"

glyph-module

glyph-block Letter-Latin-Insular-T : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives

	define [InsularTShape top bot ada adb] : glyph-proc
		include : HBar.t SB RightSB top

		local fine : Stroke * CThinB
		include : dispiro
			straight.left.start Middle (top - Stroke + fine) [widths.lhs.heading fine Leftward]
			archv
			flat (SB + OX) (top - ada - Stroke + fine) [widths.lhs]
			curl (SB + OX) (bot + adb)
			hookend bot
			g4 RightSB (bot + Hook)

	create-glyph 'TInsular' 0xA786 : glyph-proc
		include : MarkSet.capital
		include : InsularTShape CAP 0 ArchDepthA ArchDepthB
	create-glyph 'tInsular' 0xA787 : glyph-proc
		include : MarkSet.e
		include : InsularTShape XH 0 SmallArchDepthA SmallArchDepthB
