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

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

glyph-module

glyph-block Digits-Shared : begin
	glyph-block-export OnumHeight
	define OnumHeight : XH * para.onumZeroHeightRatio

	glyph-block-export ShiftDown
	define [ShiftDown] : Translate ((OnumHeight - CAP) * TanSlope) (OnumHeight - CAP)

	glyph-block-export OnumMarks
	define OnumMarks : object
		e : MarkSet.OfZone {.top OnumHeight .bot 0}
		p : MarkSet.OfZone {.top OnumHeight .bot (OnumHeight - CAP)}

	glyph-block-export CodeLnum CodeOnum
	define [CodeLnum u] : if (para.variantSelector.__defaultDigitForm == 'oldStyle') null u
	define [CodeOnum u] : if (para.variantSelector.__defaultDigitForm == 'oldStyle') u null
