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

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

glyph-module

glyph-block Letter-Armenian-Lower-Q-Group : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives
	glyph-block-import Letter-Shared-Shapes : OBarRight SerifFrame
	glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar

	do "Gim"
		create-glyph 'armn/gim' 0x563 : glyph-proc
			local df : include : DivFrame 1
			include : df.markSet.p
			include : OBarRight.shape (top -- XH)
			include : VBar.r df.rightSB Descender XH
			include : [ArmHBar.right df].base
			if SLAB : begin
				local sf : SerifFrame.fromDf df XH Descender
				include sf.rb.fullSide
				if [not para.isItalic] : begin
					include sf.rt.outer

	do "Za"
		create-glyph 'armn/za' 0x566 : glyph-proc
			local df : include : DivFrame 1
			include : df.markSet.p
			include : OBarRight.shape (top -- XH)
			include : VBar.r df.rightSB Descender XH
			include : [ArmHBar.right df].desc
			if (SLAB && [not para.isItalic]) : begin
				local sf : SerifFrame.fromDf df XH Descender
				include sf.rt.outer
