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

import [mix linreg clamp fallback] from "@iosevka/util"
import [DesignParameters] from "../../meta/aesthetics.mjs"

glyph-module

glyph-block Symbol-Telephone-Recorder : for-width-kinds WideWidth1
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives
	glyph-block-import Symbol-Geometric-Shared : GeometricDim GeometricSizes

	define Geom : GeometricDim MosaicUnitWidth MosaicWidth

	create-glyph [MangleName 'telephoneRecorder'] [MangleUnicode 0x2315] : glyph-proc
		set-width Geom.Width

		local ringRadius :  0.75 * Geom.Size + 0.25 * OperatorStroke
		include : RingStrokeAt Geom.MidX Geom.MidY ringRadius OperatorStroke
		include : difference
			dispiro
				flat Geom.MidX Geom.MidY [widths.center OperatorStroke]
				curl (Geom.MidX - Geom.Size) (Geom.MidY - Geom.Size)
			RingAt Geom.MidX Geom.MidY (ringRadius + O)
