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

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

glyph-module

glyph-block Symbol-Math-Empty-Set : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives
	glyph-block-import Common-OShape-Variants : OvalShapeT

	create-glyph 'emptySet' 0x2205 : glyph-proc
		include : OvalShapeT dispiro CAP 0 SB RightSB OperatorStroke
		include : MarkSet.capital
		local fine : OperatorStroke / 2
		include : dispiro
			widths.center OperatorStroke
			flat (SB + O + fine) [mix CAP 0 1.05]
			curl (RightSB - O - fine) [mix 0 CAP 1.05]

	create-glyph 'reverseEmptySet' 0x29B0 : glyph-proc
		include : OvalShapeT dispiro CAP 0 SB RightSB OperatorStroke
		include : MarkSet.capital
		local fine : OperatorStroke / 2
		include : dispiro
			widths.center OperatorStroke
			flat (RightSB - O - fine) [mix CAP 0 1.05]
			curl (SB + O + fine) [mix 0 CAP 1.05]

	derive-composites 'emptysetOverbar'    0x29B1 'emptySet' 'sbRsbOverlineAbove'
	derive-composites 'emptysetRing'       0x29B2 'emptySet' 'ringAbove'
	derive-composites 'emptysetRightArrow' 0x29B3 'emptySet' 'rightArrowAbove'
	derive-composites 'emptysetLeftArrow'  0x29B4 'emptySet' 'leftArrowAbove'
