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

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

glyph-module

glyph-block Letter-Cyrillic-Te-Comb : begin
	glyph-block-import CommonShapes
	glyph-block-import Mark-Shared-Metrics : markMiddle markExtend markFine
	glyph-block-import Mark-Above : aboveMarkTop aboveMarkBot aboveMarkMid aboveMarkStack
	create-glyph 'cyrl/teAbove' : glyph-proc
		set-width 0
		set-mark-anchor 'above' markMiddle XH markMiddle aboveMarkStack
		set-base-anchor 'aboveBraceL' (markMiddle - markExtend) aboveMarkMid
		set-base-anchor 'aboveBraceR' (markMiddle + markExtend) aboveMarkMid

		local ext : markExtend * 1.5

		include : VBar.m (markMiddle - ext) aboveMarkBot aboveMarkTop (markFine * 2)
		include : VBar.m markMiddle         aboveMarkBot aboveMarkTop (markFine * 2)
		include : VBar.m (markMiddle + ext) aboveMarkBot aboveMarkTop (markFine * 2)
		include : HBar.t (markMiddle - ext) (markMiddle + ext) aboveMarkTop (markFine * 2)
