### Punctuation symbols
$$include '../../meta/macros.ptl'

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

glyph-module

glyph-block Symbol-Punctuation-Ties : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives

	define [TieShape y k] : dispiro
		widths.[if (k>0) 'rhs' 'lhs'] OperatorStroke
		g4 (SB + OX) y
		quadControls  0.5 1
		g4.right.mid  Middle (y - k * Descender / 3) [heading Rightward]
		quadControls  0.5 0
		g4 (RightSB - OX) y

	create-glyph "overTie" 0x2040 : TieShape CAP 1
	create-glyph "underTie" 0x203F : TieShape 0 (-1)
	create-glyph "overAndUnderTie" 0x2050 : union [TieShape CAP 1] [TieShape 0 (-1)]
	create-glyph "invertedUnderTie" 0x2054 : TieShape 0 1
	create-glyph "symbolMidTie" : TieShape (- Descender / 3) 2
	create-glyph "frown" 0x2322 : TieShape (SymbolMid + Descender / 3 + OperatorStroke / 4) 2
	create-glyph "smile" 0x2323 : TieShape (SymbolMid - Descender / 3 - OperatorStroke / 4) (-2)
	create-glyph "kali/cwi" 0xA92E : TieShape (XH / 2 + Descender / 3 + OperatorStroke / 4) 2
