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

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

glyph-module

glyph-block Letter-Armenian-Upper-U-Group : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives
	glyph-block-import Letter-Shared-Shapes : SerifFrame
	glyph-block-import Letter-Latin-U : UShape USerifs
	glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar

	do "Ayb"
		glyph-block-import Letter-Latin-Upper-Q : QCrossing QInnerDiagSw
		create-glyph 'armn/Ayb' 0x531 : glyph-proc
			local df : include : DivFrame 1
			include : df.markSet.capital
			include : UShape df CAP 1 df.mvs
			include : QCrossing df CAP QInnerDiagSw
			if SLAB : include : USerifs.Toothless df CAP df.mvs

	do "Men"
		create-glyph 'armn/Men' 0x544 : glyph-proc
			local df : include : DivFrame 1
			include : df.markSet.capital
			include : UShape df CAP 0 df.mvs
			include : [ArmHBar.right df].cap
			if SLAB : begin
				include : USerifs.Toothless df CAP df.mvs

	do "Vo"
		create-glyph 'armn/Vo' 0x548 : glyph-proc
			local df : include : DivFrame 1
			include : df.markSet.capital
			include : UShape df CAP 1 df.mvs
			include : FlipAround Middle (CAP / 2)
			if SLAB : begin
				local sf : SerifFrame.fromDf df CAP 0
				include : composite-proc sf.lb.full sf.rb.full

	do "Rra"
		create-glyph 'armn/Rra' 0x54C : glyph-proc
			local df : include : DivFrame 1
			include : df.markSet.capital
			include : UShape df CAP 1 df.mvs
			include : FlipAround Middle (CAP / 2)
			include : [ArmHBar.right df].mid
			if SLAB : begin
				local sf : SerifFrame.fromDf df CAP 0
				include : composite-proc sf.lb.full sf.rb.full

	do "Seh"
		create-glyph 'armn/Seh' 0x54D : glyph-proc
			local df : include : DivFrame 1
			include : df.markSet.capital
			include : UShape df CAP 1 df.mvs
			if SLAB : begin
				include : USerifs.Toothless df CAP df.mvs
