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

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

glyph-module

glyph-block LetterLike-Fraktur-Upper-L : begin
	glyph-block-import Common-Derivatives
	glyph-block-import CommonShapes
	glyph-block-import LetterLike-Fraktur-Common : UpperDf S M F T fraktur-stroke change-pen
	glyph-block-import LetterLike-Fraktur-Common : DecoSizeX DecoSizeY SlopeA SlopeB CutMaskLeft
	glyph-block-import LetterLike-Fraktur-Common : Wave FHook PHexTop PHexBot

	create-glyph "frak/L" 0x1D50F : glyph-proc
		local df : include : UpperDf 1
		include : df.markSet.capital

		local lBox : S.box CAP 0 df.leftSB df.rightSB
		include : lift-@ : fraktur-stroke S
			g2 lBox.right (@yT - SHook)
			hookstart (sw -- S.thick) (@yT = lBox.top)
			g2 (@xLT = [lBox.xp 0.125]) (@yLT = @yT - ArchDepthA)
			~~~ [g2.down.mid (@xLT + 1.5 * Wave.DepthX) [mix @yLT @yB 0.5]]
			g2c.ld.end (@xB = lBox.left) (@yB = lBox.bottom)
			~~~ [g2 (@xB + TINY) (@yB + TINY)]
			~~~ ~~~ [Wave.h (-O)]
			g2c.ru.end (lBox.right + 0.25 * DecoSizeX) (@yB + Wave.DepthY)
