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

import [mix] from "@iosevka/util"

glyph-module

glyph-block Letter-Greek-Lower-Zeta : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives

	create-glyph 'grek/zeta' 0x3B6 : glyph-proc
		local fine : AdviceStroke 3

		include : MarkSet.bp
		include : HBar.m SB RightSB (Ascender - HalfStroke)
		include : dispiro
			g4 RightSB (Ascender - Stroke) [widths.rhs fine]
			bezControls 0.7 0.35 1 0.64 12
			g4.down.mid (SB + [HSwToV Stroke]) [mix 0 Ascender (0.54 * SmallArchDepthB / (SmallArchDepthA + SmallArchDepthB))] [widths.rhs Stroke]
			arcvh 16
			g2 [mix SB RightSB 0.55] Stroke [heading Rightward]
			archv 16
			g4.down.mid RightSB [mix Descender Stroke 0.5] [heading Downward]
			arcvh 16
			flat (RightSB - (Stroke - [mix Descender Stroke 0.5]) * 1.1) Descender
			curl [Math.min (RightSB - (Stroke - [mix Descender Stroke 0.5]) * 1.1 - 1) [mix SB RightSB 0.5]] Descender
