###########################################################################################
# UNIFIED LETTERFORMS : GREEK ORIGINALS
###########################################################################################
symbol-block 'alpha' : sketch
	include eMarks
	
	local middle : mix SB RIGHTSB 0.42
	local fine   : adviceBlackness 3.25
	local k1 0.25
	local k2 0.5
	local k3 0.35
	include : dispiro
		widths.rhs fine
		g4   (RIGHTSB - OX * 1.75) XH [heading DOWNWARD]
		bezcontrols k1 k2 k3 1 6
		g4.left.mid (middle + CORRECTION_OMIDS) O [widths 0 STROKE]
		archv
		flat.ai (SB + OX * 2) SMALLSMOOTHB
		curl.ai (SB + OX * 2) (XH - SMALLSMOOTHA)
		arcvh
		g4.right.mid (middle - CORRECTION_OMIDS) XO [widths 0 STROKE]
		bezcontrols (1 - k3) 0 (1 - k1) (1 - k2) 6
		g4   (RIGHTSB - OX * 2) 0 [widths.heading 0 fine DOWNWARD]
	
	set-anchor 'overlay' BASE (middle - OX) (XH * OVERLAYPOS)
	
	save 'alpha' 0x3B1
	save 'latinalpha' 0xAB64

symbol-block 'Gamma'
	define [GammaShape top] : glyph-construction
		include : VBarLeft (SB * 1.5) 0 top
		include : HBarTop (SB * 1.5 - O) (RIGHTSB - OX) top
		if SLAB : begin
			include : LeftwardTopSerif (SB * 1.5) top SIDEJUT
			include : CenterBottomSerif (SB * 1.5 + HVCONTRAST * HALFSTROKE) 0 JUT
			include : tagged 'serifRT' : DownwardRightSerif (RIGHTSB - OX) top VJUT
	
	sketch # Gamma
		include capitalMarks
		include : GammaShape CAP
		save 'Gamma' 0x393
		save 'cyrGhe' 0x413

	sketch # cyrghe.upright
		include eMarks
		include : GammaShape XH
		save 'cyrghe.upright'
	
	sketch # cyrghe.serbian
		include glyphs.dotlessi AS_BASE
		include glyphs.macronAbove	
		save 'cyrghe.serbian'

	italic-variant 'cyrghe' 0x433

	define [CyrGeShape top] : glyph-construction
		include : GammaShape top
		eject-contour 'serifRT'
		include : VBarRight (RIGHTSB - OX) top (top + ACCENT)
	
	sketch # cyrGe
		include capitalMarks
		include : CyrGeShape CAP
	
		save 'cyrGe' 0x490
	
	sketch # cyrge
		include eMarks
		include : CyrGeShape XH
	
		save 'cyrge' 0x491
	
	sketch # cyrGhayn
		include glyphs.cyrGhe AS_BASE
		include : HOverlayBar (SB * 0.3) [mix (SB + STROKE) (RIGHTSB - STROKE) 0.55] (CAP * (1 - OVERLAYPOS))
	
		save 'cyrGhayn' 0x492
	
	sketch # cyrghayn.upright
		include glyphs.'cyrghe.upright' AS_BASE
		include : HOverlayBar (SB * 0.3) [mix (SB + STROKE) (RIGHTSB - STROKE) 0.55] (XH * (1 - OVERLAYPOS))
	
		save 'cyrghayn.upright'

	sketch # cyrghayn.italic
		include glyphs.'cyrghe.italic' AS_BASE
		include : FlatSlashShape MIDDLE (XH / 2) (OVERLAYSTROKE / 2) (-0.2) 0.75
		save 'cyrghayn.italic'
		save 'voicedlaryngenalspirant' 0x1D24
	
	italic-variant 'cyrghayn' 0x493

symbol-block 'gamma'
	sketch # gamma
		include pMarks
	
		local xmid : [mix SB RIGHTSB 0.46] + HALFSTROKE
		include : dispiro
			g4 (SB + 0.4 * STROKE * HVCONTRAST) (XH - O) [widths.rhs]
			bezcontrols 0.33 0.17 1 0.62 6 important
			flat xmid 0
			curl xmid DESCENDER [heading DOWNWARD]
		
		include : dispiro
			widths.rhs
			flat RIGHTSB XH [heading DOWNWARD]
			curl RIGHTSB (XH * 0.9) [heading DOWNWARD]
			quadcontrols 0 0.3 6
			g4   xmid 0 [widths.rhs : STROKE * 0.9]
		save 'gamma' 0x3B3

define {LambdaShape} : symbol-block 'Lambda'
	define [LambdaShape sw] : glyph-construction
		local TURN (CAP * 0.1)
		local curviness 0.2
		include : dispiro
			widths.rhs sw
			flat SB 0    [heading UPWARD]
			curl SB TURN [heading UPWARD]
			quadcontrols 0 curviness
			g4   (MIDDLE - sw / 2) CAP [widths 0 (sw * 0.8)]
		include : dispiro
			widths.lhs sw
			flat RIGHTSB 0    [heading UPWARD]
			curl RIGHTSB TURN [heading UPWARD]
			quadcontrols 0 curviness
			g4   (MIDDLE + sw / 2) CAP [widths (sw * 0.8) 0]
	
		start-from (MIDDLE - sw / 2) CAP
		line-to (MIDDLE + sw / 2) CAP
		line-to MIDDLE (CAP - sw)
		
		if SLAB : begin
			include : CenterBottomSerif (SB + sw / 2 * HVCONTRAST) 0 JUT
			tag-contour 'serif'
			include : CenterBottomSerif (RIGHTSB - sw / 2 * HVCONTRAST) 0 JUT
			tag-contour 'serif'
	
	sketch # Lambda
		include capitalMarks
		include : LambdaShape STROKE
		save 'Lambda' 0x39B
		save 'latinLambda' 0x245
	
	list LambdaShape

symbol-block 'Delta and cyrbe'
	sketch # Delta
		include glyphs.Lambda AS_BASE
		include : HBar (SB + HALFSTROKE) (RIGHTSB - HALFSTROKE) HALFSTROKE
		eject-contour 'serif'
	
		save 'Delta' 0x394
	
	sketch
		include bMarks
		
		local xNeck : mix SB RIGHTSB 0.07
		local bar : mix 0 XH 0.96
		local xOTLeft : mix SB RIGHTSB 0.5
		local fine : STROKE * 0.5
		
		local sma : SMALLSMOOTHA * bar / XH
		local smb : SMALLSMOOTHB * bar / XH
		
		include : dispiro
			widths.rhs
			g4   [mix MIDDLE RIGHTSB 0.85] ([mix XH CAP 0.8] - STROKE) [heading LEFTWARD]
			alsothru 0.5 0.7
			g4   MIDDLE (CAPO - STROKE)
			archv 2
			g4   (xNeck + STROKE) [mix (CAPO - STROKE) bar 0.5]
			arcvh 2
			g4   xOTLeft bar [heading RIGHTWARD]
			alsothruthem : list {0.25 0.05} {0.5 0.13}
			flat.ai (RIGHTSB - OX) (bar - smb)
			curl.ai (RIGHTSB - OX) sma
			arcvh
			g4.left.mid (MIDDLE + CORRECTION_OMIDS) O
			archv
			flat.ai (SB + OX) smb
			curl.ai (SB + OX) (bar - sma)
			arcvh
			g4   xOTLeft (bar - (STROKE - fine) / 2) [widths 0 fine]
		
		save 'delta' 0x3B4
		save 'cyrbe.serbian'
		save 'latindelta' 0x1E9F
		
	turned 'turndelta' 0x18D 'delta' MIDDLE (XH / 2) pMarks
	
	sketch # cyrbe
		include bMarks
		include : dispiro
			widths.rhs (STROKE * CTHINB)
			flat (SB + OX + STROKE * (1 - CTHINB) * HVCONTRAST) SMALLSMOOTHB
			curl (SB + OX + STROKE * (1 - CTHINB) * HVCONTRAST) (XH - SMALLSMOOTHA)
			arcvh
			g4 (MIDDLE - CORRECTION_OMIDS) (CAP * 0.7 - O) [widths.rhs STROKE]
			archv
			flat.ai (RIGHTSB - OX) (XH - SMALLSMOOTHB)
			curl.ai (RIGHTSB - OX) SMALLSMOOTHA
			arcvh
			g4 (MIDDLE + CORRECTION_OMIDS) O
			archv
			flat (SB + OX) SMALLSMOOTHB
			curl (SB + OX) (XH - SMALLSMOOTHA)
			alsothruthem [list {0.25 0.79} {0.5 0.87}] important
			g4   (RIGHTSB - HALFSTROKE * HVCONTRAST) CAP
			#end : function : set this.dense true
		save 'cyrbe' 0x431

symbol-block 'epsilon and cyrze'
	define [SmallEpsilonShape top hook] : glyph-construction
		local midx : mix SB RIGHTSB 0.65
		local midy : top * OVERLAYPOS
		local sma : top - [mix (midy + HALFSTROKE) (top - O - STROKE) (SMOOTHB / (SMOOTHA + SMOOTHB))] - TANSLANT * HVCONTRAST * STROKE
		local smb : [mix (STROKE + O) (midy - HALFSTROKE) (SMOOTHB / (SMOOTHA + SMOOTHB))] + TANSLANT * HVCONTRAST * STROKE
		local fine : STROKE * CTHIN
		include : dispiro
			widths.lhs
			g4 (RIGHTSB + O) (top - [fallback hook SHOOK])
			hookstart (top - O)
			g4 (SB + OXE) (top - sma)
			arcvh
			flat MIDDLE (midy - (fine - HALFSTROKE)) [widths.heading fine 0 RIGHTWARD]
			curl midx (midy - (fine - HALFSTROKE)) [heading RIGHTWARD]
		include : dispiro
			widths.rhs
			g4 (RIGHTSB - O) [fallback hook SHOOK]
			hookstart O
			g4 (SB + OXE + O * 2) smb
			arcvh
			flat MIDDLE (midy + (fine - HALFSTROKE)) [widths.heading 0 fine RIGHTWARD]
			curl midx (midy + (fine - HALFSTROKE)) [heading RIGHTWARD]
	
	sketch # epsilon
		include eMarks
		include : SmallEpsilonShape XH
		save 'epsilon' 0x3B5
		save 'latinepsilon' 0x25B
	
	sketch # latinEpsilon
		include capitalMarks
		include : SmallEpsilonShape CAP
		
		save 'latinEpsilon' 0x190
	define [CyrZeShape top hook] : glyph-construction
		local midx : mix RIGHTSB SB 0.65
		local midy : top * OVERLAYPOS
		local smb : top - [mix (midy + HALFSTROKE) (top - O - STROKE) (SMOOTHA / (SMOOTHA + SMOOTHB))] + TANSLANT * HVCONTRAST * STROKE
		local sma : [mix (STROKE + O) (midy - HALFSTROKE) (SMOOTHA / (SMOOTHA + SMOOTHB))] - TANSLANT * HVCONTRAST * STROKE
		local fine : STROKE * CTHIN
		include : dispiro
			widths.rhs
			g4 (SB - O) (top - [fallback hook SHOOK])
			hookstart (top - O)
			g4 (RIGHTSB - OXE) (top - smb)
			arcvh
			flat MIDDLE (midy - (fine - HALFSTROKE)) [widths.heading 0 fine LEFTWARD]
			curl midx (midy - (fine - HALFSTROKE)) [heading LEFTWARD]
		include : dispiro
			widths.lhs
			g4 (SB + O) [fallback hook SHOOK]
			hookstart O
			g4 (RIGHTSB - OXE - O * 2) sma
			arcvh
			flat MIDDLE (midy + (fine - HALFSTROKE)) [widths.heading fine 0 LEFTWARD]
			curl midx (midy + (fine - HALFSTROKE)) [heading LEFTWARD]
	
	sketch # cyrZe
		include capitalMarks
		include : CyrZeShape CAP HOOK
	
		save 'cyrZe' 0x417
	
	sketch # cyrze
		include eMarks
		include : CyrZeShape XH
		save 'cyrze' 0x437
		save 'revlatinepsilon' 0x25C
	turned 'closeepsilon' 0x29A 'closeturnepsilon' MIDDLE (XH / 2)

symbol-block 'Theta'
	sketch # Theta
		include capitalMarks
		include glyphs.O AS_BASE
		include : HBar (SB + STROKE * HVCONTRAST - O * 3) (RIGHTSB - STROKE * HVCONTRAST + O * 3) CAPMIDDLE
		save 'Theta' 0x398
	
	sketch # theta
		include bMarks
		include : OShape CAP 0 (SB - O) (RIGHTSB + O) STROKE (SMALLSMOOTHA * 100) (SMALLSMOOTHB * 100)
		include : HBar (SB + HALFSTROKE) (RIGHTSB - HALFSTROKE) CAPMIDDLE
		save 'theta' 0x3B8

symbol-block 'zeta and xi'
	sketch # zeta
		include ifMarks
		include : HBar SB (RIGHTSB + O) (CAP - HALFSTROKE)
		include : dispiro
			widths.rhs
			g4 (RIGHTSB + O) (CAP - STROKE)
			bezcontrols 0.7 0.35 1 0.64 12
			g4.down.mid (SB + STROKE * HVCONTRAST) [mix 0 CAP (0.54 * SMALLSMOOTHB / (SMALLSMOOTHA + SMALLSMOOTHB))]
			arcvh
			g4 [mix SB RIGHTSB 0.55] STROKE [heading RIGHTWARD]
			archv 12
			g4.down.mid RIGHTSB [mix DESCENDER STROKE 0.5] [heading DOWNWARD]
			arcvh 12
			flat (RIGHTSB - (STROKE - [mix DESCENDER STROKE 0.5]) * 1.1) DESCENDER [heading LEFTWARD]
			curl [Math.min (RIGHTSB - (STROKE - [mix DESCENDER STROKE 0.5]) * 1.1 - 1) [mix SB RIGHTSB 0.5]] DESCENDER [heading LEFTWARD]
	
		save 'zeta' 0x3B6
	
	sketch # xi
		include ifMarks
		include : HBar SB (RIGHTSB + O) (CAP - HALFSTROKE)
		
		local xbar : mix SB RIGHTSB 0.85
		local ybar : mix 0 CAP 0.55
		include : dispiro
			widths.rhs
			g4.left.start xbar (CAP - STROKE)
			archv
			g4 (SB - O * 2 + STROKE * HVCONTRAST) [mix (CAP - STROKE) ybar 0.6]
			arcvh
			g4.right.end (xbar - HALFSTROKE * TANSLANT) ybar [widths.rhs (STROKE * [mix CTHIN 1 0.5])]
		include : dispiro
			widths.rhs (STROKE * [mix CTHIN 1 0.5])
			g4.left.start (xbar + HALFSTROKE * TANSLANT) (ybar - STROKE)
			bezcontrols 0.7 0 1 0.6
			g4 (SB + STROKE * HVCONTRAST) [mix 0 ybar 0.45] [widths.rhs]
			arcvh
			g4 [mix SB RIGHTSB 0.5] STROKE
			archv
			g4.down.mid RIGHTSB [mix DESCENDER STROKE 0.5] [heading DOWNWARD]
			arcvh
			flat (RIGHTSB - (STROKE - [mix DESCENDER STROKE 0.5]) * 1.1) DESCENDER [heading LEFTWARD]
			curl [Math.min (RIGHTSB - (STROKE - [mix DESCENDER STROKE 0.5]) * 1.1 - 1) [mix SB RIGHTSB 0.5]] DESCENDER [heading LEFTWARD]
		save 'xi' 0x3BE

symbol-block 'mu' : sketch
	include pMarks
	include glyphs.u
	include : dispiro
		widths.rhs
		flat SB DESCENDER [heading UPWARD]
		curl SB (DESCENDER / 2) [heading UPWARD]
		straight.up.end SB SMALLSMOOTHB [widths.heading 0 [adviceBlackness 4] UPWARD]
	if SLAB : begin
		include : LeftwardTopSerif SB XH SIDEJUT
	
	save 'mu' 0x3BC

symbol-block 'Xi' : sketch
	include capitalMarks
	include : HBar [mix SB RIGHTSB 0.125] [mix RIGHTSB SB 0.125] [mix 0 CAP 0.54]
	include : HBar (SB + OX) (RIGHTSB - OX) (CAP - HALFSTROKE)
	include : HBar (SB + OX) (RIGHTSB - OX) (0 + HALFSTROKE)
	if SLAB : begin
		include : DownwardLeftSerif (SB + OX) CAP VJUT
		include : DownwardRightSerif (RIGHTSB - OX) CAP VJUT
		include : UpwardLeftSerif (SB + OX) 0 VJUT
		include : UpwardRightSerif (RIGHTSB - OX) 0 VJUT
	
	save 'Xi' 0x39E

define {PiShape} : symbol-block 'Pi'
	define [PiShape] : params [top bottom [shrinkrate 0.05] _fine noserif] : glyph-construction
		local fine : fallback _fine STROKE
		local shrink : if (!noserif && SLAB) 0 (shrinkrate * (RIGHTSB - SB))
		local endexpand : shrink / 2
		include : HBarTop (SB - endexpand) (RIGHTSB + endexpand) top fine
		include : VBarLeft (SB + shrink) bottom (top - fine / 2) fine
		include : VBarRight (RIGHTSB - shrink) bottom (top - fine / 2) fine
		
		if (!noserif && SLAB) : begin
			include : CenterBottomSerif (SB + shrink + fine * 0.5 * HVCONTRAST) bottom JUT fine
			include : CenterBottomSerif (RIGHTSB - shrink - fine * 0.5 * HVCONTRAST) bottom JUT fine
			include : CenterTopSerif (SB + shrink + fine * 0.5 * HVCONTRAST) top JUT fine
			include : CenterTopSerif (RIGHTSB - shrink - fine * 0.5 * HVCONTRAST) top JUT fine
	
	sketch # Pi
		include capitalMarks
		include : PiShape CAP 0 (shrinkrate -- 0)
		save 'Pi' 0x3A0
		save 'cyrPe' 0x41F
	
	sketch # cyrpe.upright
		include eMarks
		include : PiShape XH 0
		save 'cyrpe.upright'

	sketch # cyrpe.serbian
		include glyphs.u AS_BASE
		include glyphs.macronAbove
		save 'cyrpe.serbian'

	italic-variant 'cyrpe' 0x43f
	sketch # pi
		include eMarks
		include : PiShape XH 0 (noserif -- true) (shrinkrate -- 0.06)
		save 'pi' 0x3C0
	
	list PiShape

define {SigmaShape} : symbol-block 'Sigma'
	define [SigmaShape top bottom _fine] : glyph-construction
		local cor 1.15
		local fine : fallback _fine STROKE
		
		include : HBarTop SB RIGHTSB top fine
		include : HBarBottom SB RIGHTSB bottom fine
		
		local midx : mix SB RIGHTSB 0.4
		start-from SB (bottom + fine)
		line-to (SB + fine * cor) (bottom + fine)
		line-to (midx + fine * cor) [mix bottom top 0.5]
		line-to (SB + fine * cor) (top - fine)
		line-to SB (top - fine)
		line-to midx [mix bottom top 0.5]
		reverse-last
		
		if SLAB : begin
			include : DownwardRightSerif RIGHTSB top VJUT
			include : UpwardRightSerif RIGHTSB bottom VJUT
	
	sketch # Sigma
		set-width WIDTH
		include capitalMarks
	
		include : SigmaShape CAP 0
		save 'Sigma' 0x3A3
		save 'latinSigma' 0x1A9
	
	list SigmaShape

symbol-block 'Phi, phi and varphi'
	sketch # Phi
		include capitalMarks
		local y1 : CAP * [if SLAB 0.175 0.125]
		local y2 : CAP * [if SLAB 0.825 0.875]
		include : VBar MIDDLE 0 (y1 + HALFSTROKE)
		include : OShape y2 y1 SB RIGHTSB MVERTSTROKE SMOOTHA SMOOTHB
		include : VBar MIDDLE y1 y2 MVERTSTROKE
		include : VBar MIDDLE (y2 - HALFSTROKE) CAP
		
		if SLAB : begin
			include : tagged 'serifMT' : CenterTopSerif MIDDLE CAP JUT
			include : tagged 'serifMB' : CenterBottomSerif MIDDLE 0 JUT
		save 'Phi' 0x3A6
		save 'cyrEf' 0x424
	
	sketch # taillessphi
		include eMarks
		local x0 : mix SB RIGHTSB 0.1
		local y1 : mix 0 XH 0.75
		local x1 : SB + OX * 2
		local y3 : XH * 0.66
		local y4 : XH * 0.65
		include : dispiro
			widths.lhs MVERTSTROKE
			g4 x0 XH
			g4 x1 (XH * 0.55)
			arcvh
			g4 (MIDDLE + CORRECTION_OMIDS) O
			archv
			g4 (WIDTH - x1) (XH * 0.55)
			arcvh 8
			g4.left.mid [mix (WIDTH - x1) (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) 0.525] XH [heading LEFTWARD]
			archv
			flat (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) y3
			curl (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) (MVERTSTROKE * 0.2) [heading DOWNWARD]
	
		save 'taillessphi' 0x2C77
	
	sketch # phi
		include pMarks
		include glyphs.taillessphi
		include : VBar MIDDLE DESCENDER (MVERTSTROKE * 0.2)
	
		save 'phi' 0x3C6
	
	sketch # varphi
		include ifMarks
		local y1 0
		local y2 XH
		include : VBar MIDDLE DESCENDER (y1 + HALFSTROKE)
		include : OShape y2 y1 SB RIGHTSB MVERTSTROKE nothing nothing nothing true
		include : VBar MIDDLE y1 y2 MVERTSTROKE
		include : VBar MIDDLE (y2 - HALFSTROKE) CAP
	
		save 'varphi' 0x3D5
	
	sketch # cyref
		include glyphs.varphi AS_BASE
		if SLAB : begin
			include : tagged 'serifMT' : CenterTopSerif MIDDLE CAP JUT
			include : tagged 'serifMB' : CenterBottomSerif MIDDLE DESCENDER JUT
		save 'cyref' 0x444
		save 'latinphi' 0x278

symbol-block 'Psi'
	sketch # Psi
		include capitalMarks
		local y : CAP * 0.2
		local y2 : CAP * 0.8
		include : dispiro
			widths.lhs MVERTSTROKE
			flat SB y2 [heading DOWNWARD]
			curl SB (y + SMOOTHB)
			arcvh
			g4   MIDDLE y [heading RIGHTWARD]
			archv
			flat RIGHTSB (y + SMOOTHA)
			curl RIGHTSB y2 [heading UPWARD]
		include : VBar MIDDLE y CAP MVERTSTROKE
		include : VBar MIDDLE 0 (y + HALFSTROKE)
		if SLAB : begin
			include : tagged 'serifLT' : LeftwardTopSerif SB y2 SIDEJUT
			include : tagged 'serifRT' : RightwardTopSerif RIGHTSB y2 SIDEJUT
			include : tagged 'serifMT' : CenterTopSerif MIDDLE CAP JUT
			include : tagged 'serifMB' : CenterBottomSerif MIDDLE 0 JUT
	
		save 'Psi' 0x3A8
	
	sketch # smcpPsi
		include eMarks
		local y : XH * 0.3
		local y2 XH
		include : dispiro
			widths.lhs MVERTSTROKE
			flat SB y2 [heading DOWNWARD]
			curl SB (y + SMOOTHB)
			arcvh
			g4   MIDDLE y [heading RIGHTWARD]
			archv
			flat RIGHTSB (y + SMOOTHA)
			curl RIGHTSB y2 [heading UPWARD]
		include : VBar MIDDLE y XH MVERTSTROKE
		include : VBar MIDDLE 0 (y + HALFSTROKE)
		if SLAB : begin
			include : tagged 'serifLT' : LeftwardTopSerif SB y2 SIDEJUT
			include : tagged 'serifRT' : RightwardTopSerif RIGHTSB y2 SIDEJUT
			include : tagged 'serifMB' : CenterBottomSerif MIDDLE 0 JUT
	
		save 'smcpPsi' 0x1D2A
	
	sketch # psi
		include ifMarks
		local fine : adviceBlackness 3.5
		include : dispiro
			widths.lhs fine
			flat SB XH [heading DOWNWARD]
			curl SB SMALLSMOOTHB
			arcvh
			g4   MIDDLE O [heading RIGHTWARD]
			archv
			flat RIGHTSB SMALLSMOOTHA
			curl RIGHTSB XH [heading UPWARD]
		include : VBar MIDDLE 0 CAP fine
		include : VBar MIDDLE DESCENDER HALFSTROKE
		if SLAB : begin
			include : LeftwardTopSerif SB XH SIDEJUT
			tag-contour 'serifLT'
			if (!para.isItalic) : begin
				include : tagged 'serifRT' : RightwardTopSerif RIGHTSB XH SIDEJUT
		save 'psi' 0x3C8

symbol-block 'Omega'
	define [OmegaShape top extend sma smb] : glyph-construction
		local fine : STROKE * CTHIN
		local x1 [mix SB RIGHTSB 0.4]
		local x2 (WIDTH - x1)
		local yattach : top * extend + STROKE
		include : dispiro
			g4   x1 (yattach - fine) [widths.heading 0 fine LEFTWARD]
			archv
			flat SB (yattach - STROKE + smb) [widths 0 STROKE]
			curl SB (top - sma)
			arcvh
			g4   (MIDDLE - CORRECTION_OMIDS) (top - O)
			archv
			flat RIGHTSB (top - smb)
			curl RIGHTSB (yattach - STROKE + sma)
			arcvh
			g4   x2 (yattach - fine) [widths.heading 0 fine LEFTWARD]
		include : VBarRight x1 0 (yattach) fine
		include : HBar SB x1 HALFSTROKE
		include : VBarLeft x2 0 (yattach) fine
		include : HBar x2 RIGHTSB HALFSTROKE
	
	sketch # latinUpsilon1
		include capitalMarks
		include : OmegaShape CAP 0.08 SMOOTHA SMOOTHB
		save 'Omega' 0x3A9
		
		include : FlipAround MIDDLE (CAP / 2)
		save 'latinUpsilon1' 0x1B1
	
	sketch # latinupsilon1
		include eMarks
		include : OmegaShape XH 0.08 SMALLSMOOTHA SMALLSMOOTHB
		save 'latinomega' 0xAB65
		
		include : FlipAround MIDDLE (XH / 2)
		save 'latinupsilon1' 0x28A

symbol-block 'omega'
	sketch # omega
		include eMarks
		local fine : adviceBlackness 3.25
		local mfine : fine * CTHIN
		local x0 : mix SB RIGHTSB 0.1
		local y0 : XH - STROKE * 0.2
		local y1 : mix 0 XH 0.8
		local x1 : SB + OX * 2
		local y3 : XH / 2
		local y4 : XH * 0.65
		
		include : dispiro
			widths.lhs fine
			g4 x0 y0
			g4 x1 (XH / 2)
			arcvh 8
			g4 [mix x1 (MIDDLE + fine / 2 * HVCONTRAST) 0.5] O [heading RIGHTWARD]
			archv 8
			flat (MIDDLE + (mfine - fine / 2) * HVCONTRAST) y3 [widths.heading mfine 0 UPWARD]
			curl (MIDDLE + (mfine - fine / 2) * HVCONTRAST) y4 [heading UPWARD]
			end [function : set this.angles 4]
		include : dispiro
			widths.rhs fine
			g4 (WIDTH - x0) y0
			g4 (WIDTH - x1) (XH / 2)
			arcvh 8
			g4 [mix (WIDTH - x1) (MIDDLE - fine / 2 * HVCONTRAST) 0.5] O [heading LEFTWARD]
			archv 8
			flat (MIDDLE - (mfine - fine / 2) * HVCONTRAST) y3 [widths.heading 0 mfine UPWARD]
			curl (MIDDLE - (mfine - fine / 2) * HVCONTRAST) y4 [heading UPWARD]
			end [function : set this.angles 4]
	
		save 'omega' 0x3C9
	
	sketch # pomega
		include glyphs.omega AS_BASE
		include : HBar SB RIGHTSB (XH - HALFSTROKE)
	
		save 'pomega' 0x3D6
	
	sketch # closeomega
		include eMarks
		local fine : adviceBlackness 3.25
		local mfine : fine * CTHIN
		local x0 : MIDDLE - CORRECTION_OMIDS
		local y0 : XH - O
		local y1 : mix 0 XH 0.45
		local x1 : SB + OX * 2
		local y3 : XH / 2
		local y4 : XH * 0.65
		include : dispiro
			widths.rhs mfine
			flat (MIDDLE + (mfine - fine / 2) * HVCONTRAST) y4 [heading DOWNWARD]
			curl (MIDDLE + (mfine - fine / 2) * HVCONTRAST) y3 [heading DOWNWARD]
			arcvh 8
			g4 [mix x1 (MIDDLE + fine / 2 * HVCONTRAST) 0.5] O [widths.heading 0 fine LEFTWARD]
			archv 8
			g4 x1 y1
			arcvh
			g4 x0 y0
			archv
			g4 (WIDTH - x1) y1
			arcvh 8
			g4 [mix (WIDTH - x1) (MIDDLE - fine / 2 * HVCONTRAST) 0.5] O [heading LEFTWARD]
			archv 8
			flat (MIDDLE - (mfine - fine / 2) * HVCONTRAST) y3 [widths.heading 0 mfine UPWARD]
			curl (MIDDLE - (mfine - fine / 2) * HVCONTRAST) y4 [heading UPWARD]
			end [function : set this.angles 4]
		save 'closeomega' 0x277

###########################################################################################
# UNIFIED LETTERFORMS : CYRILLIC ORIGINALS
###########################################################################################

define {CyrYeriShape RevCyrYeriShape} : symbol-block 'CyrYeri-related'
	define [CyrYeriShape top _left _right _fine _jut] : glyph-construction
		local fine : fallback _fine STROKE
		local left : fallback _left SB
		local right : fallback _right RIGHTSB
		local jut : fallback _jut JUT
		
		local bowl : top * 0.55 + HALFSTROKE
		local turnRadius : bowl * 0.55
		local turnbottom : mix 0 bowl (SMOOTHA / (SMOOTHA + SMOOTHB))
		include : dispiro
			widths.lhs fine
			flat (left + STROKE * 0.2) 0 [heading RIGHTWARD]
			curl ([Math.max (left + fine * HVCONTRAST) (right - turnRadius * [Math.pow ((right - left) / (RIGHTSB - SB)) 0.5])] + CORRECTION_OMIDX * fine) 0
			archv 8
			g4   (right - OX) turnbottom
			arcvh 8
			flat ([Math.max (left + fine * HVCONTRAST) (right - turnRadius * [Math.pow ((right - left) / (RIGHTSB - SB)) 0.5])] - CORRECTION_OMIDX * fine) bowl
			curl (left + STROKE * 0.2) bowl [heading LEFTWARD]
		include : VBarLeft left 0 top fine
		if SLAB : begin
			include : LeftwardBottomSerif left 0 (jut - fine / 2 * HVCONTRAST)
			tag-contour 'serifYeriLB'
			include : CenterTopSerif (left + fine / 2 * HVCONTRAST) top jut
			tag-contour 'serifYeriLT'
	
	define [RevCyrYeriShape top _left _right _fine _jut] : glyph-construction
		local fine : fallback _fine STROKE
		local left : fallback _left SB
		local right : fallback _right RIGHTSB
		local jut : fallback _jut JUT
		
		local bowl : top * 0.55 + HALFSTROKE
	
		local turnRadius : bowl * 0.55
		local turnbottom : mix 0 bowl (SMOOTHB / (SMOOTHA + SMOOTHB))
		include : dispiro
			widths.rhs
			flat (right - STROKE * 0.2) 0 [heading LEFTWARD]
			curl (left + turnRadius * [Math.pow ((right - left) / (RIGHTSB - SB)) 0.5] + CORRECTION_OMIDX * fine) 0
			archv
			g4   (left + O) turnbottom [widths.rhs fine]
			arcvh
			flat (left + turnRadius * [Math.pow ((right - left) / (RIGHTSB - SB)) 0.5] - CORRECTION_OMIDX * fine) bowl [widths.rhs]
			curl (right - STROKE * 0.2) bowl [heading RIGHTWARD]
		include : VBarRight right 0 top fine
		if SLAB : begin
			include : RightwardBottomSerif right 0 (jut - fine / 2 * HVCONTRAST)
			tag-contour 'serifYeriRB'
			include : CenterTopSerif (right - fine / 2 * HVCONTRAST) top jut
			tag-contour 'serifYeriRT'
	
	sketch # cyrYeri
		include capitalMarks
		include : CyrYeriShape CAP SB RIGHTSB
	
		save 'cyrYeri' 0x42C
	
	sketch # cyryeri
		include eMarks
		include : CyrYeriShape XH SB RIGHTSB
	
		save 'cyryeri' 0x44C
	
	sketch # cyrBe
		include glyphs.cyrYeri AS_BASE
		include : HBar SB [mix SB RIGHTSB 0.9] (CAP - HALFSTROKE)
		if SLAB : begin
			include : DownwardRightSerif [mix SB RIGHTSB 0.9] CAP VJUT
		save 'cyrBe' 0x411
		save 'latinBe' 0x182
	
	sketch # ZhuangToneSix
		include glyphs.cyrYeri AS_BASE
		eject-contour 'serifYeriLT'
		local s : Math.max STROKE (XH * 0.1)
		start-from (SB - O) CAP
		line-to    SB CAP
		line-to    (SB - s) (CAP - s)
		line-to    SB (CAP - s * 2)
		line-to    (SB - O) (CAP - s * 2)
		reverse-last
	
		save 'ZhuangToneSix' 0x184
	
	sketch # latinDe
		include capitalMarks
		include : RevCyrYeriShape CAP
		include : HBarTop [mix RIGHTSB SB 0.9] (RIGHTSB + O) CAP
		if SLAB : begin
			include : DownwardLeftSerif [mix RIGHTSB SB 0.9] CAP VJUT
	
		save 'latinDe' 0x18B
	define [CyrYerShape top] : glyph-construction
		local left : if SLAB ([mix SB RIGHTSB 0.35] - MVERTSTROKE / 2 * HVCONTRAST) [mix SB RIGHTSB 0.1]
		local barleft : mix 0 SB [if SLAB 0.25 0.6]
		include : CyrYeriShape top left RIGHTSB
		include : HBarTop barleft (STROKE * 0.1 + left) top
		if SLAB : begin
			include : DownwardLeftSerif barleft top VJUT (MVERTSTROKE / HVCONTRAST)
	
	sketch # cyrYer
		include capitalMarks
		include : CyrYerShape CAP
	
		save 'cyrYer' 0x42A
	
	sketch # cyryer
		include eMarks
		include : CyrYerShape XH
	
		save 'cyryer' 0x44A
	define [CyrYeryShape top] : glyph-construction
		include : CyrYeriShape top (SB + O) [mix (RIGHTSB - MVERTSTROKE * HVCONTRAST) (MIDDLE + MVERTSTROKE / 2 * HVCONTRAST) 0.5] MVERTSTROKE (JUT * 0.75)
		include : VBarRight (RIGHTSB - O) 0 top MVERTSTROKE
		if SLAB : begin
			include : CenterTopSerif (RIGHTSB - O - MVERTSTROKE / 2 * HVCONTRAST) top (JUT * 0.75)
			include : CenterBottomSerif (RIGHTSB - O - MVERTSTROKE / 2 * HVCONTRAST) 0 (JUT * 0.75)
	
	sketch # cyrYery
		include capitalMarks
		include : CyrYeryShape CAP
	
		save 'cyrYery' 0x42B
	
	sketch # cyryery
		include eMarks
		include : CyrYeryShape XH
	
		save 'cyryery' 0x44B
	list CyrYeriShape RevCyrYeriShape

symbol-block 'CyrI'
	define [CyrIShape top] : glyph-construction
		local topstroke : adviceBlackness 4
		local halftopstroke : topstroke / 2
		include : dispiro
			widths.lhs
			flat RIGHTSB 0 [heading UPWARD]
			curl RIGHTSB (top * 0.4) [heading UPWARD]
			straight.up.end RIGHTSB top [widths.heading topstroke 0 UPWARD]
		include : dispiro
			widths.lhs
			flat SB top [heading DOWNWARD]
			curl SB (top * 0.6) [heading DOWNWARD]
			straight.down.end SB 0 [widths.heading topstroke 0 DOWNWARD]
		include : dispiro
			flat (RIGHTSB - halftopstroke) top [widths.heading 0 topstroke DOWNWARD]
			curl (SB + halftopstroke) 0 [widths.heading topstroke 0 DOWNWARD]
		include : AICyrISerifs top
	
	sketch # cyrI
		include capitalMarks
		include : CyrIShape CAP
	
		save 'cyrI' 0x418
	
	sketch # cyri.upright
		include eMarks
		include : CyrIShape XH
	
		save 'cyri.upright'

	sketch # cyri.italic
		include glyphs.u AS_BASE
	
		save 'cyri.italic'

	italic-variant 'cyri' 0x438

symbol-block 'CyrTse'
	define [CyrTseShape top] : glyph-construction
		include : VBarLeft SB 0 top
		include : HBarBottom SB RIGHTSB 0
		include : VBarRight RIGHTSB 0 top
		include : CyrDescender RIGHTSB 0.05
		if SLAB : begin
			include : AIVSerifs top
			include : LeftwardBottomSerif SB 0 SIDEJUT
			include : RightwardBottomSerif RIGHTSB 0 SIDEJUT
	
	sketch # cyrTse
		include capitalMarks
		include : CyrTseShape CAP
	
		save 'cyrTse' 0x426
	
	sketch # cyrtse.upright
		include eMarks
		include : CyrTseShape XH
		save 'cyrtse.upright'

	sketch # cyrtse.italic
		include eMarks
		include glyphs.u
		eject-contour 'serifLT'
		include : CyrDescender RIGHTSB 0.05
		save 'cyrtse.italic'

	italic-variant 'cyrtse' 0x446
	
	define [CyrDzheShape top] : glyph-construction
		include : VBarLeft SB 0 top
		include : HBarBottom SB RIGHTSB 0
		include : VBarRight RIGHTSB 0 top
		include : VBar MIDDLE DESCENDER STROKE
		if SLAB : begin
			include : AIVSerifs top
			include : LeftwardBottomSerif SB 0 SIDEJUT
			include : RightwardBottomSerif RIGHTSB 0 SIDEJUT
	
	sketch # cyrDzhe
		include ifMarks
		include : CyrDzheShape CAP
	
		save 'cyrDzhe' 0x40F
	
	sketch # cyrdzhe.upright
		include pMarks
		include : CyrDzheShape XH
		save 'cyrdzhe.upright'

	sketch # cyrdzhe.italic
		include glyphs.u AS_BASE
		include glyphs.barBelow
		save 'cyrdzhe.italic'

	italic-variant 'cyrdzhe' 0x45F
	
symbol-block 'CyrDe'
	define [CyrDeShape top] : glyph-construction
		local descenderOverflow : if SLAB SIDEJUT ((RIGHTSB - SB) * 0.05)
		local cutleft SB
		local cutright : if SLAB RIGHTSB (RIGHTSB - descenderOverflow)
		local topleft : mix cutleft cutright 0.15
		include : HBarBottom (cutleft - descenderOverflow) (cutright + descenderOverflow) 0
		include : VBarRight cutright 0 top
		include : halfXStrand (topleft + STROKE * HVCONTRAST) top (cutleft + HALFSTROKE * HVCONTRAST * 0.8) HALFSTROKE 0.1 0.75 0.5
		include : VBarLeft (cutleft - descenderOverflow) (-LONGJUT + HALFSTROKE) 0
		include : VBarRight (cutright + descenderOverflow) (-LONGJUT + HALFSTROKE) 0
		
		if SLAB : then
			include : dispiro
				widths.rhs
				flat (topleft - descenderOverflow) top
				curl (cutright + descenderOverflow) top
		: else
			include : HBarTop topleft cutright top
	
	sketch # cyrDe
		include ifMarks
		include : CyrDeShape CAP
	
		save 'cyrDe' 0x414
	
	sketch # cyrde.upright
		include eMarks
		include : CyrDeShape XH
	
		save 'cyrde.upright'

	sketch # cyrde.italic
		include bMarks
		include : dispiro
			widths.lhs (STROKE * CTHINB)
			flat (RIGHTSB - OX - STROKE * HVCONTRAST * (1 - CTHINB)) SMALLSMOOTHA
			curl (RIGHTSB - OX - STROKE * HVCONTRAST * (1 - CTHINB)) (XH - SMALLSMOOTHB)
			arcvh
			g4 (MIDDLE - CORRECTION_OMIDS) (CAP * 0.7 - O) [widths.lhs]
			archv
			flat.ai (SB + OX) (XH - SMALLSMOOTHA)
			curl.ai (SB + OX) SMALLSMOOTHB
			arcvh
			g4 (MIDDLE + CORRECTION_OMIDS) O
			archv
			flat (RIGHTSB - OX) SMALLSMOOTHA
			curl (RIGHTSB - OX) (XH - SMALLSMOOTHB)
			quadcontrols 0 0.8
			g4 (SB + STROKE * 1.1) CAP
	
		save 'cyrde.italic'

	italic-variant 'cyrde' 0x434

symbol-block 'CyrEl'
	define [CyrElShape top] : glyph-construction
		local cutleft : mix SB RIGHTSB 0.125
		local cutleft2 : mix SB RIGHTSB 0.075
		local cutright : mix SB RIGHTSB 0.95
		include : VBarRight cutright 0 top
		include : HBar cutleft cutright (top - HALFSTROKE)
		include : LegShape 
			ztop -- (cutleft                       <> top)
			zbot -- ([mix SB 0 [if SLAB 0.5 0.25]] <> 0)
			xb -- cutleft2
		if SLAB : begin
			include : RightwardTopSerif cutright top SIDEJUT
			include : LeftwardTopSerif cutleft top SIDEJUT
			include : CenterBottomSerif (cutright - HALFSTROKE * HVCONTRAST) 0 JUT
	
	sketch # cyrEl
		include capitalMarks
		include : CyrElShape CAP
	
		save 'cyrEl' 0x41B
	
	sketch # cyrel
		include eMarks
		include : CyrElShape XH
		save 'cyrel' 0x43B

symbol-block 'CyrZhe'
	define [CyrZheShape top] : glyph-construction
		local fine : adviceBlackness 3.3
		local midx : mix SB MIDDLE 0.3
		define [CyrAngleShape] : glyph-construction
			local cor HVCONTRAST
			start-from (SB + O * 4) 0
			line-to (SB + fine * cor + O * 4) 0
			line-to (midx + fine * cor) (top / 2)
			line-to (SB + fine * cor + O * 4) top
			line-to (SB + O * 4) top
			line-to midx (top / 2)
			reverse-last
		include : CyrAngleShape
		include : FlipAround MIDDLE (top / 2)
		include : CyrAngleShape
		include : VBar MIDDLE 0 top fine
		include : HBar midx (WIDTH - midx) (top / 2) fine
	
	sketch # cyrZhe
		include capitalMarks
		include : CyrZheShape CAP
		save 'cyrZhe' 0x416
	composite nothing glyphs.cyrZhe [CyrDescender (RIGHTSB - O * 4) nothing true] [into-unicode 0x496]
	
	sketch # cyrzhe
		include eMarks
		include : CyrZheShape XH
		save 'cyrzhe' 0x436
	composite nothing glyphs.cyrzhe [CyrDescender (RIGHTSB - O * 4) nothing true] [into-unicode 0x497]

	define [CyrBigYusShape top yp] : glyph-construction
		local fine : adviceBlackness 3.3
		local cor HVCONTRAST
		local midx : mix SB MIDDLE 0.3
		local midx2 : Math.min (MIDDLE - fine * cor) [mix SB MIDDLE 0.75]
		local yb : top * yp
		local tovershoot 2
		start-from (SB + O * 4) 0
		line-to (SB + fine * cor + O * 4) 0
		line-to (midx + fine * cor) yb
		line-to midx yb
		reverse-last
		
		start-from (midx2 + fine * cor) yb
		line-to (SB + fine * cor + O * tovershoot) top
		line-to (SB + O * tovershoot) top
		line-to midx2 yb
		reverse-last
		
		start-from (WIDTH - SB - O * 4) 0
		line-to (WIDTH - SB - fine * cor - O * 4) 0
		line-to (WIDTH - midx - fine * cor) yb
		line-to (WIDTH - midx) yb
		
		start-from (WIDTH - midx2 - fine * cor) yb
		line-to (WIDTH - SB - fine * cor - O * tovershoot) top
		line-to (WIDTH - SB - O * tovershoot) top
		line-to (WIDTH - midx2) yb


		include : VBar MIDDLE 0 yb fine
		include : HBarTop midx (WIDTH - midx) yb fine
		include : HBarTop (SB + O * tovershoot + HVCONTRAST * fine * 0.99) (RIGHTSB - O * tovershoot - HVCONTRAST * fine * 0.99) top fine
	sketch # cyrbigYus
		include capitalMarks
		include : CyrBigYusShape CAP 0.575
		save 'cyrbigYus' 0x46A
	sketch # cyrbigyus
		include eMarks
		include : CyrBigYusShape XH 0.55
		save 'cyrbigyus' 0x46B

	define [CyrSmallYusShape top] : glyph-construction
		local fine : adviceBlackness 3.3
		include : VShape top (sw -- fine)
		eject-contour 'serifLT'
		eject-contour 'serifRT'
		include : FlipAround MIDDLE (top / 2)
		local p 0.16
		local bary (top / 2)
		if (SLAB && !para.isItalic) : set p : p * 1.33
		include : HBarTop [mix SB RIGHTSB p] [mix RIGHTSB SB p] bary fine
		include : VBar MIDDLE bary 0 fine
		if SLAB : begin
			include : tagged 'serifLB' : LeftwardBottomSerif SB 0 SIDEJUT
			include : tagged 'serifRB' : RightwardBottomSerif RIGHTSB 0 SIDEJUT
	sketch # cyrsmallYus
		include capitalMarks
		include : CyrSmallYusShape CAP
		save 'cyrsmallYus' 0x466
	sketch # cyrsmallyus
		include eMarks
		include : CyrSmallYusShape XH
		save 'cyrsmallyus' 0x467

symbol-block 'CyrSha'
	define [CyrShaShape top] : glyph-construction
		include : HBarBottom SB RIGHTSB 0
		include : VBarLeft SB 0 top MVERTSTROKE
		include : VBarRight RIGHTSB 0 top MVERTSTROKE
		include : VBar MIDDLE 0 top MVERTSTROKE
		if SLAB : begin
			include : tagged 'serifLT' : LeftwardTopSerif SB top SIDEJUT
			include : tagged 'serifLB' : LeftwardBottomSerif SB 0 SIDEJUT
			include : tagged 'serifRT' : RightwardTopSerif RIGHTSB top SIDEJUT
			include : tagged 'serifRB' : RightwardBottomSerif RIGHTSB 0 SIDEJUT
	
	sketch # cyrSha
		include capitalMarks
		include : CyrShaShape CAP
	
		save 'cyrSha' 0x428
	
	sketch # cyrsha.upright
		include eMarks
		include : CyrShaShape XH
		save 'cyrsha.upright'

	turned 'cyrsha.italic' null 'm' MIDDLE (XH / 2)
	italic-variant 'cyrsha' 0x448
	
	define [CyrShchaShape top] : glyph-construction
		include : CyrShaShape top
		#eject-contour 'serifRB'
		include : CyrDescender RIGHTSB 0.05
	
	sketch # cyrShcha
		include capitalMarks
		include : CyrShchaShape CAP
	
		save 'cyrShcha' 0x429
	
	sketch # cyrshcha.upright
		include eMarks
		include : CyrShchaShape XH
		save 'cyrshcha.upright'

	sketch # cyrshcha.italic
		include eMarks
		include glyphs.'cyrsha.italic'
		include : CyrDescender RIGHTSB 0.05
		save 'cyrshcha.italic'

	italic-variant 'cyrshcha' 0x449
	
	# Serbian pe and te
	sketch # cyrte.serbian
		include glyphs.'cyrsha.italic' AS_BASE
		include glyphs.macronAbove
		save 'cyrte.serbian'

	italic-variant 'cyrte' 0x442

symbol-block 'CyrChe'
	define [CyrCheShape top _barp] : glyph-construction
		local bar : top * [fallback _barp 0.5]
		include : VBarRight RIGHTSB 0 top
		include : dispiro
			widths.lhs
			flat SB top [heading DOWNWARD]
			curl SB (bar + SMOOTHB - HALFSTROKE)
			arcvh
			flat MIDDLE (bar - HALFSTROKE)
			curl (RIGHTSB - 1) (bar - HALFSTROKE) [heading RIGHTWARD]
		if SLAB : begin
			include : CenterTopSerif (RIGHTSB - HALFSTROKE * HVCONTRAST) top JUT
			include : CenterTopSerif (SB + HALFSTROKE * HVCONTRAST) top JUT
			include : CenterBottomSerif (RIGHTSB - HALFSTROKE * HVCONTRAST) 0 JUT
	
	sketch # cyrChe
		include capitalMarks
		include : CyrCheShape CAP [if SLAB 0.45 0.35]
		save 'cyrChe' 0x427
	composite nothing glyphs.cyrChe [CyrDescender RIGHTSB] [into-unicode 0x4B6]
	
	sketch # cyrche
		include eMarks
		include : CyrCheShape XH [if SLAB 0.45 0.4]
		save 'cyrche' 0x447
	composite nothing glyphs.cyrche [CyrDescender RIGHTSB] [into-unicode 0x4B7]
	
	turned 'cyrShha' 0x4BA 'cyrChe' MIDDLE (CAP / 2)
	
	sketch # cyrChevbar
		include glyphs.cyrChe AS_BASE
		local yc (CAP * [if SLAB 0.45 0.35] + STROKE * 0.1)
		include : VBar MIDDLE (yc + LONGJUT * 0.8) (yc - LONGJUT * 0.8) OVERLAYSTROKE
		save 'cyrChevbar' 0x4B8

	sketch # cyrchevbar
		include glyphs.cyrche AS_BASE
		local yc (XH * [if SLAB 0.45 0.35] + STROKE * 0.1)
		include : VBar MIDDLE (yc + LONGJUT * 0.8) (yc - LONGJUT * 0.8) OVERLAYSTROKE
		save 'cyrchevbar' 0x4B9

symbol-block 'CyrYu'
	define [CyrYuShape top sma smb] : glyph-construction
		local xm : mix (SB + O + MVERTSTROKE * HVCONTRAST) (RIGHTSB - OX) 0.175
		include : VBarLeft (SB + O) 0 top MVERTSTROKE
		include : OShape top 0 xm (RIGHTSB - OX) MVERTSTROKE (sma * 0.8) (smb * 0.8)
		include : HBar (SB + O + 1) xm (top / 2)
		
		if SLAB : begin
			include : CenterTopSerif (SB + O + MVERTSTROKE / 2 * HVCONTRAST) top (JUT * 0.75)
			include : CenterBottomSerif (SB + O + MVERTSTROKE / 2 * HVCONTRAST) 0 (JUT * 0.75)
	
	sketch # cyrYu
		include capitalMarks
		include : CyrYuShape CAP SMOOTHA SMOOTHB
	
		save 'cyrYu' 0x42E
	
	sketch # cyryu
		include eMarks
		include : CyrYuShape XH SMALLSMOOTHA SMALLSMOOTHB
		save 'cyryu' 0x44E

symbol-block 'CyrLje and CyrNje'
	define [CyrLjeShape top] : glyph-construction
		local xlefttop : mix SB RIGHTSB 0.075
		local jut : JUT * 0.72
		include : LegShape
			ztop -- (xlefttop                      <> top)
			zbot -- ([mix SB 0 [if SLAB 0.75 0.5]] <> 0)
			xb -- [mix SB RIGHTSB 0.025]
			fine -- MVERTSTROKE
		include : CyrYeriShape top (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) (RIGHTSB - O) MVERTSTROKE jut
		include : HBarTop xlefttop MIDDLE top
		if SLAB : begin
			include : LeftwardTopSerif xlefttop top (jut - MVERTSTROKE / 2 * HVCONTRAST)
	
	sketch # cyrLje
		include capitalMarks
		include : CyrLjeShape CAP
	
		save 'cyrLje' 0x409
	
	sketch # cyrlje
		include eMarks
		include : CyrLjeShape XH
		save 'cyrlje' 0x459

	define [CyrNjeShape top] : glyph-construction
		local xlefttop : mix SB RIGHTSB 0.075
		local jut : JUT * 0.72
		include : VBarLeft SB 0 top MVERTSTROKE
		include : CyrYeriShape top (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) (RIGHTSB - O) MVERTSTROKE jut
		include : HBar (SB + MVERTSTROKE * 0.1) MIDDLE (top / 2)
		if SLAB : begin
			include : CenterTopSerif (SB + MVERTSTROKE / 2 * HVCONTRAST) top jut
			include : CenterBottomSerif (SB + MVERTSTROKE / 2 * HVCONTRAST) 0 jut
	
	sketch # cyrNje
		include capitalMarks
		include : CyrNjeShape CAP
	
		save 'cyrNje' 0x40A
	
	sketch # cyrnje
		include eMarks
		include : CyrNjeShape XH
		save 'cyrnje' 0x45A

symbol-block 'CyrTshe and CyrDje'
	sketch # cyrTshe
		include capitalMarks
		
		local left : [mix SB RIGHTSB 0.15] + OX
		local right : RIGHTSB - OX
		
		include : nShoulder
			left -- (left + STROKE * HVCONTRAST)
			right -- right
		include : VBarLeft left 0 CAP
		include : dispiro
			widths.rhs
			flat (SB + OX) CAP
			curl [mix left RIGHTSB 0.475] CAP
		
		if SLAB : begin
			include : CenterBottomSerif (left + HVCONTRAST * HALFSTROKE) 0 JUT
			include : CenterBottomSerif (right - HVCONTRAST * HALFSTROKE) 0 JUT
	
		save 'cyrTshe' 0x40B
	
	sketch # cyrDje
		include capitalMarks
		
		local left : [mix SB RIGHTSB 0.15] + OX
		local right: RIGHTSB - OX * 1.5
		
		include : nShoulder
			left -- (left + STROKE * HVCONTRAST)
			right -- right
			top -- XH
			bottom -- (HOOK + HALFSTROKE + O)
			sma -- SMOOTHA
			smb -- SMOOTHB
		include : VBarLeft left 0 CAP
		include : dispiro
			widths.rhs
			flat (SB + OX) CAP
			curl [mix left RIGHTSB 0.475] CAP
		include : VerticalHook (right - HALFSTROKE * HVCONTRAST) (HOOK + HALFSTROKE + O) [Math.max ((left - right) / 2 + HALFSTROKE) (-HOOK * 1.2)] HOOK
		
		if SLAB : begin
			include : LeftwardBottomSerif left 0 SIDEJUT
	
		save 'cyrDje' 0x402
	
	sketch # cyrdje
		include ifMarks
		include glyphs.cyrtshe
		eject-contour 'serifRB'
		include : VerticalHook (RIGHTSB - HALFSTROKE * HVCONTRAST) 0 (-HOOK * 1.2) HOOK
		save 'cyrdje' 0x452

###########################################################################################
# UNIFIED LETTERFORMS : OTHER LATIN
###########################################################################################
symbol-block 'eszet'
	sketch # eszet
		set-width WIDTH
		include ifMarks
		local l : SB * 1
		include : dispiro
			widths.lhs
			g4 ([mix SB RIGHTSB 0.75] + HALFSTROKE * HVCONTRAST) (CAP - HOOK)
			hookstart (CAP - O)
			flat l XH
			curl l 0 [heading DOWNWARD]
		local t : mix 0 CAP 0.7
		local tm : [mix DESCENDER t 0.625] + HALFSTROKE
		local tl : [mix l RIGHTSB 0.35] + HALFSTROKE * HVCONTRAST
		include : HBarTop (l + 1) (RIGHTSB - HALFSTROKE * 1.2 - OX) t
		include : dispiro
			widths.rhs
			flat tl tm [heading RIGHTWARD]
			curl (tl + 1) tm [heading RIGHTWARD]
			g2 (RIGHTSB - OX * 1.5) [mix DESCENDER tm 0.70]
			g2 (RIGHTSB - OX * 1.5) [mix DESCENDER tm 0.67]
			alsothru 0.5 0.75
			g4 [mix SB RIGHTSB 0.35] DESCENDER
		include : dispiro
			widths.center (STROKE * 1.1)
			corner tl (tm - STROKE) [heading UPWARD]
			corner (RIGHTSB - HALFSTROKE * 1.2 - OX) t [heading UPWARD]
		save 'eszet' 0xDF
	
	sketch # Eszet
		include capitalMarks
		include : dispiro
			widths.lhs
			g4 (RIGHTSB + O * 2) (CAP - SMOOTHB)
			hookstart (CAP - O)
			flat SB XH
			curl SB 0 [heading DOWNWARD]
		local ymiddle : [mix 0 CAP 0.5] - HALFSTROKE
		include : dispiro
			widths.rhs
			g4   (RIGHTSB - ymiddle / 2 - STROKE * 0.75) (ymiddle + STROKE)
			archv
			g4   (RIGHTSB - O) [mix 0 (ymiddle + STROKE) 0.5]
			arcvh
			flat (RIGHTSB - ymiddle / 2 - HALFSTROKE) 0
			curl (SB + STROKE - O * 3) 0 [heading LEFTWARD]
		include : dispiro
			widths.rhs
			g4 (RIGHTSB + O * 2) (CAP - SMOOTHB)
			g4 (RIGHTSB - ymiddle / 2 - STROKE * 0.75) (ymiddle + STROKE) [widths STROKE 0]
		save 'Eszet' 0x1E9E

symbol-block 'Digraphs'
	sketch # AE
		set-width WIDTH
		include capitalMarks
		
		local eleft : MIDDLE - MVERTSTROKE * 0.25
		local turn : XH * 0.1
		
		# A half
		include : dispiro
			widths.rhs MVERTSTROKE
			flat SB 0 [heading UPWARD]
			curl SB (CAP * 0.1) [heading UPWARD]
			quadcontrols 0 0.3 6 unimportant
			g4   (eleft - HALFSTROKE) CAP [widths.rhs (MVERTSTROKE * 0.8)]
	
		start-from (eleft - HALFSTROKE) CAP
		line-to    eleft CAP
		line-to    eleft (CAP - MVERTSTROKE)
		include : HBarTop  ([mix SB (eleft - HALFSTROKE) (1/6)] + MVERTSTROKE * 0.5 * HVCONTRAST)  (eleft + MVERTSTROKE / 2) (XH / 2) MVERTSTROKE
		
		# E half
		include : VBarLeft eleft 0 CAP MVERTSTROKE
		include : HBarTop (eleft - O) RIGHTSB CAP
		include : HBar (eleft - O) (RIGHTSB - MVERTSTROKE / 4) (CAP * 0.54)
		include : HBarBottom (eleft - O) RIGHTSB 0
		if SLAB : begin
			include : CenterBottomSerif (SB + MVERTSTROKE / 2 * HVCONTRAST) 0 JUT MVERTSTROKE
			include : DownwardRightSerif RIGHTSB CAP VJUT MVERTSTROKE
			include : UpwardRightSerif RIGHTSB 0 VJUT MVERTSTROKE
		save 'AE' 0xC6
		save 'cyrAE' 0x4D4
	
	define [OEShape top] : glyph-construction
		local eleft MIDDLE
		
		# O half
		
		include : dispiro
			widths.lhs MVERTSTROKE 0
			straight.left.start eleft top [heading LEFTWARD]
			archv
			flat  SB (top - SMOOTHA)
			curl  SB SMOOTHB
			arcvh
			straight.right.end eleft 0 [heading RIGHTWARD]
		
		# E half
		include : VBarLeft eleft 0 top MVERTSTROKE
		include : HBarTop (eleft - O) RIGHTSB top
		include : HBar (eleft - O) (RIGHTSB - MVERTSTROKE / 4) (top * 0.54)
		include : HBarBottom (eleft - O) RIGHTSB 0
		
		if SLAB : begin
			include : DownwardRightSerif RIGHTSB top VJUT MVERTSTROKE
			include : UpwardRightSerif RIGHTSB 0 VJUT MVERTSTROKE
	
	sketch # OE
		set-width WIDTH
		include capitalMarks
		include : OEShape CAP
		save 'OE' 0x152
	
	sketch # smcpOE
		include eMarks
		include : OEShape XH
	
		save 'smcpOE' 0x276
	define aeepart : glyph-construction
		local eLeft : MIDDLE - MVERTSTROKE / 2 * HVCONTRAST + 0.1
		local eMiddle : [mix eLeft (RIGHTSB - OX * 2) 0.5] - MVERTSTROKE * TANSLANT
		local barbottom (XH * EBARPOS - HALFSTROKE)
		
		local sma : SMALLSMOOTHA * 0.6
		local smb : SMALLSMOOTHB * 0.6
		include : dispiro
			widths.lhs MVERTSTROKE
			flat (RIGHTSB - OX * 2) barbottom [heading UPWARD]
			curl (RIGHTSB - OX * 2) (XH - smb)
			arcvh
			g4   eMiddle XO
			archv
			flat eLeft (XH - sma)
			curl eLeft smb
			hookend O true MVERTSTROKE
			g4 (RIGHTSB - OX * 2) (AHOOK + MVERTSTROKE * TANSLANT) [heading UPWARD]
		include : HBarBottom (eLeft + MVERTSTROKE / 2) (RIGHTSB - OX * 2 - MVERTSTROKE / 2) barbottom MVERTSTROKE
	
	define aeapart : glyph-construction
		local bartop (XH * OVERLAYPOS * 1.02 + HALFSTROKE)
		local abarRight : MIDDLE + MVERTSTROKE / 2 * HVCONTRAST - 0.1
		local lowmiddle : mix (SB + OX * 2) abarRight 0.5
		local barsmooth : mix SB abarRight 0.7
		
		local sma : SMALLSMOOTHA * 0.6
		local smb : SMALLSMOOTHB * 0.6
	
		include : dispiro
			widths.rhs MVERTSTROKE
			g4 (SB + OX) (XH - AHOOK - MVERTSTROKE * TANSLANT) [heading UPWARD]
			hookstart XO true MVERTSTROKE
			flat abarRight (XH - smb)
			curl abarRight smb
			arcvh
			g4 lowmiddle O [heading LEFTWARD]
			archv
			g4 (SB + OX * 2) [mix 0 bartop 0.45]
			arcvh
			flat barsmooth bartop
			curl (abarRight - 1) bartop [heading RIGHTWARD]
	
	define oeopart : glyph-construction
		local abarRight : MIDDLE + MVERTSTROKE / 2 * HVCONTRAST
		include : OShape XH 0 (SB + OX) (abarRight + OX) MVERTSTROKE (SMALLSMOOTHA * 0.6) (SMALLSMOOTHB * 0.6)
	
	sketch # ae
		set-width WIDTH
		include eMarks
		include aeepart
		include aeapart
		save 'ae' 0xE6
		save 'cyrae' 0x4D5
	turned nothing 0x1D02 'ae' MIDDLE (XH / 2)
	
	
	sketch # oe
		set-width WIDTH
		include eMarks
		include aeepart
		include oeopart
		save 'oe' 0x153
	turned nothing 0x1D14 'oe' MIDDLE (XH / 2)
	
	sketch # db
		set-width WIDTH
		include bMarks
		include oeopart
		include : FlipAround MIDDLE (XH / 2)
		include oeopart
		include : VBar MIDDLE (XH / 2) CAP MVERTSTROKE
		if SLAB : begin
			include : LeftwardTopSerif (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) CAP SIDEJUT
	
		save 'db' 0x238
	
	sketch # qp
		set-width WIDTH
		include pMarks
		include oeopart
		include : FlipAround MIDDLE (XH / 2)
		include oeopart
		include : VBar MIDDLE DESCENDER (XH / 2) MVERTSTROKE
		if SLAB : begin
			include : CenterBottomSerif MIDDLE DESCENDER JUT
	
		save 'qp' 0x239
	
	sketch # OU
		include capitalMarks
		include : OShape (CAP * BARPOS + HALFSTROKE) 0 SB RIGHTSB nothing SMOOTHA SMOOTHB
		include : dispiro
			widths.lhs
			flat SB CAP [heading DOWNWARD]
			curl SB (CAP * BARPOS - O - HALFSTROKE + SMOOTHB)
			arcvh
			g4 (MIDDLE + CORRECTION_OMIDS) (CAP * BARPOS - O - HALFSTROKE + (STROKE * (1 - CTHIN))) [widths.lhs (STROKE * CTHIN)]
			archv
			flat RIGHTSB (CAP * BARPOS - O - HALFSTROKE + SMOOTHA) [widths.lhs]
			curl RIGHTSB CAP [heading UPWARD]
	
		save 'OU' 0x222
	
	sketch # ou
		include bMarks
		local bar : linreg 18 (XH * 0.9) 108 XH STROKE
		include : OShape bar 0 SB RIGHTSB
		include : dispiro
			widths.lhs
			flat SB CAP [heading DOWNWARD]
			curl SB (bar - O - STROKE + SMOOTHB)
			arcvh
			g4 (MIDDLE + CORRECTION_OMIDS) (bar - O - STROKE + (STROKE * (1 - CTHIN))) [widths.lhs (STROKE * CTHIN)]
			archv
			flat RIGHTSB (bar - O - STROKE + SMOOTHA) [widths.lhs]
			curl RIGHTSB CAP [heading UPWARD]
	
		save 'ou' 0x223
	
	sketch # IJ
		include capitalMarks
		include : create-glyph : glyph-construction
			include glyphs.'I.straight'
			apply-transform : Translate (SB - MIDDLE + HALFSTROKE * HVCONTRAST) 0
		include : create-glyph : glyph-construction
			include glyphs.'J.shorthook'
			apply-transform : Translate JBALANCE2 0
	
		save 'IJ' 0x132
	
	sketch # ij
		include ifMarks
		include : create-glyph : glyph-construction
			include glyphs.'dotlessi.straight' AS_BASE
			include glyphs.dotAbove
			apply-transform : Translate (SB * 1.5 - MIDDLE + HALFSTROKE * HVCONTRAST) 0
		include : create-glyph : glyph-construction
			include glyphs.'dotlessj.straight' AS_BASE
			include glyphs.dotAbove
			apply-transform : Translate (RIGHTSB - SB * 0.5 - MIDDLE - JBALANCE - HALFSTROKE * HVCONTRAST) 0
		save 'ij' 0x133

symbol-block 'Ezh'
	define [EzhShape top bot pleft hookless] : glyph-construction
		local cor : 1.2 * HVCONTRAST
		local yMidBar : mix bot top 0.6
		local ezhLeft : mix SB RIGHTSB [fallback pleft 0.2]
		local ezhRight : mix SB RIGHTSB 0.925
		include : HBarTop SB ezhRight top
		
		start-from ezhLeft yMidBar
		line-to (ezhLeft + STROKE * cor) (yMidBar - HALFSTROKE)
		line-to (ezhLeft + STROKE * cor) yMidBar
		line-to ezhRight (top - STROKE)
		line-to (ezhRight - STROKE * cor) (top - STROKE)
		reverse-last
		
		include : dispiro
			widths.rhs
			flat ezhLeft yMidBar [heading RIGHTWARD]
			curl (MIDDLE - CORRECTION_OMIDS) yMidBar
			archv
			g4   RIGHTSB [mix yMidBar bot : hookless || (SMALLSMOOTHB / (SMALLSMOOTHA + SMALLSMOOTHB))] [if [not hookless] important [heading DOWNWARD]]
			if hookless {} : list
				hookend bot
				g4 SB (bot + HOOK * (top - bot) / [fallback para.cap0 CAP])
		
		if SLAB : begin
			include : DownwardLeftSerif SB top VJUT
	
	define [RevEzhShape top bot pleft hookless] : glyph-construction
		local cor : 1.2 * HVCONTRAST
		local yMidBar : mix bot top 0.6
		local ezhRight : mix RIGHTSB SB [fallback pleft 0.2]
		local ezhLeft : mix RIGHTSB SB 0.925
		include : HBarTop ezhLeft RIGHTSB top
		
		start-from ezhRight yMidBar
		line-to (ezhRight - STROKE * cor) (yMidBar - HALFSTROKE)
		line-to (ezhRight - STROKE * cor) yMidBar
		line-to ezhLeft (top - STROKE)
		line-to (ezhLeft + STROKE * cor) (top - STROKE)
		
		include : dispiro
			widths.lhs
			flat ezhRight yMidBar [heading LEFTWARD]
			curl (MIDDLE + CORRECTION_OMIDS) yMidBar
			archv
			g4   SB [mix yMidBar bot (SMALLSMOOTHA / (SMALLSMOOTHA + SMALLSMOOTHB))] [if [not hookless] important [heading DOWNWARD]]
			if hookless {} : list
				hookend bot
				g4 RIGHTSB (bot + HOOK * ((top - bot) / CAP))
		if SLAB : begin
			include : DownwardRightSerif RIGHTSB top VJUT
	
	sketch # Ezh
		set-width WIDTH
		include capitalMarks
		include : EzhShape CAP 0
		save 'Ezh' 0x1B7
		save 'cyrEzh' 0x4E0
	
	sketch # ezh
		set-width WIDTH
		include pMarks
		include : EzhShape XH DESCENDER
		save 'ezh' 0x292
		save 'cyrezh' 0x4E1
	
	sketch # revEzh
		include capitalMarks
		include : RevEzhShape CAP 0
	
		save 'revEzh' 0x1B8
	
	sketch # revezh
		include pMarks
		include : RevEzhShape XH DESCENDER
	
		save 'revezh' 0x1B9
	
	sketch # lyogh
		include ifMarks
		include : EzhShape XH DESCENDER 0.4
		include : VBarLeft SB (XH * 0.1) CAP
	
		save 'lyogh' 0x26E
	
	sketch # ezhtail
		local b : mix DESCENDER XH 0.25
		include : EzhShape XH b nothing 0.5
		local y : mix [mix b XH 0.6] b 0.5
		include : dispiro
			widths.rhs
			g4.down.start RIGHTSB y [heading DOWNWARD]
			arcvh
			flat [mix SB RIGHTSB 0.45] b
			curl [mix SB RIGHTSB 0.4] b
			archv
			g4 (SB + STROKE * HVCONTRAST) [mix (DESCENDER + STROKE) b 0.5]
			arcvh
			flat [mix SB RIGHTSB 0.4] (DESCENDER + STROKE)
			curl RIGHTSB (DESCENDER + STROKE)
	
		save 'ezhtail' 0x1BA
	
	sketch # ezhcurlytail
		include eMarks
		local p (SMALLSMOOTHB / (SMALLSMOOTHA + SMALLSMOOTHB))
		include : EzhShape XH DESCENDER nothing p
		local fine : adviceBlackness 3
		local rinner : (XH * 0.4 - fine * 1.5) / 2
		local m1 : RIGHTSB - STROKE * HVCONTRAST
		local x2 : RIGHTSB - HALFSTROKE
		local y2 DESCENDER
		include : dispiro
			widths.lhs
			straight.down.start m1 [mix [mix DESCENDER XH 0.6] DESCENDER p] [heading DOWNWARD]
			CurlyTail fine rinner m1 DESCENDER SB x2 y2
		save 'ezhcurlytail' 0x293

symbol-block 'Glottal stop'
	sketch # glottalstop
		include bMarks
		include : dispiro
			widths.rhs
			g4 SB (CAP - HOOK)
			hookstart CAPO
			g4 RIGHTSB (CAP - [adviceGlottalStopSmooth CAP 1])
			alsothru 0.5 0.5 important
			flat (MIDDLE + HALFSTROKE * HVCONTRAST) (XH * 0.3)
			curl (MIDDLE + HALFSTROKE * HVCONTRAST) 0 [heading DOWNWARD]
		if SLAB : begin
			include : CenterBottomSerif MIDDLE 0 JUT
	
		save 'glottalstop' 0x294
		save 'capglottalstop' 0x241
	
	sketch # revglottalstop
		include bMarks
		include : dispiro
			widths.lhs
			g4 RIGHTSB (CAP - HOOK)
			hookstart CAPO
			g4 SB (CAP - [adviceGlottalStopSmooth CAP (-1)])
			alsothru 0.5 0.5 important
			flat (MIDDLE - HALFSTROKE * HVCONTRAST) (XH * 0.3)
			curl (MIDDLE - HALFSTROKE * HVCONTRAST) 0 [heading DOWNWARD]
		if SLAB : begin
			include : CenterBottomSerif MIDDLE 0 JUT
		save 'revglottalstop' 0x295

	sketch # smallglottalstop
		include bMarks
		include : dispiro
			widths.rhs
			g4 SB (XH - HOOK)
			hookstart XO
			g4 RIGHTSB (XH - [adviceGlottalStopSmooth XH 1])
			alsothru 0.5 0.5 important
			flat (MIDDLE + HALFSTROKE * HVCONTRAST) (XH * 0.15)
			curl (MIDDLE + HALFSTROKE * HVCONTRAST) 0 [heading DOWNWARD]
		if SLAB : begin
			include : CenterBottomSerif MIDDLE 0 JUT
	
		save 'smallglottalstop' 0x242
	
	sketch # invglottalstopbar
		include eMarks
		local smooth : adviceGlottalStopSmooth XH (-1 - TANSLANT * (15 - (WIDTH / 500) * 12) * [clamp 0 1 : linreg 126 1 135 0.5 STROKE])
		include : dispiro
			widths.lhs
			g4 RIGHTSB (XH - HOOK)
			hookstart XO
			g4.down.mid SB (XH - smooth)
			alsothru 0.5 0.5 important
			flat (MIDDLE - HALFSTROKE * HVCONTRAST) (XH * 0.15)
			curl (MIDDLE - HALFSTROKE * HVCONTRAST) 0 [heading DOWNWARD]
		include : HOverlayBar (MIDDLE - LONGJUT * 0.6) (MIDDLE + LONGJUT * 0.6) (XH * 0.25)
		include : FlipAround MIDDLE (XH / 2)
	
		save 'invglottalstopbar' 0x1BE
	
	sketch # fineglottalstop
		include bMarks
		local fine : markHalfStroke * 2
		include : dispiro
			widths.rhs fine
			g4 SB (CAP - HOOK)
			hookstart CAPO
			g4 RIGHTSB (CAP - [adviceGlottalStopSmooth CAP 1])
			alsothru 0.5 0.5 important
			flat (MIDDLE + fine / 2 * HVCONTRAST) (XH * 0.3)
			curl (MIDDLE + fine / 2 * HVCONTRAST) 0 [heading DOWNWARD]
		if SLAB : begin
			include : CenterBottomSerif MIDDLE 0 JUT fine
	
		save 'fineglottalstop'

	sketch # finerevglottalstop
		include bMarks
		local fine : markHalfStroke * 2
		include : dispiro
			widths.lhs fine
			g4 RIGHTSB (CAP - HOOK)
			hookstart CAPO
			g4 SB (CAP - [adviceGlottalStopSmooth CAP (-1)])
			alsothru 0.5 0.5 important
			flat (MIDDLE - fine / 2 * HVCONTRAST) (XH * 0.3)
			curl (MIDDLE - fine / 2 * HVCONTRAST) 0 [heading DOWNWARD]
		if SLAB : begin
			include : CenterBottomSerif MIDDLE 0 JUT fine
		save 'finerevglottalstop'

	turned 'invglottalstop' 0x296 'revglottalstop' MIDDLE (CAP / 2)

	sketch # glottalstopbar
		include glyphs.glottalstop AS_BASE
		include : HOverlayBar (MIDDLE - LONGJUT * 0.6) (MIDDLE + LONGJUT * 0.6) (CAP * 0.25)
	
		save 'glottalstopbar' 0x2A1
	
	sketch # revglottalstopbar
		include glyphs.revglottalstop AS_BASE
		include : HOverlayBar (MIDDLE - LONGJUT * 0.6) (MIDDLE + LONGJUT * 0.6) (CAP * 0.25)
		save 'revglottalstopbar' 0x2A2

symbol-block 'eth' : sketch
	include bMarks
	
	include : OShape (CAP * 0.6) 0 SB RIGHTSB
	local ymiddlea : (CAP * 0.6 + SMALLSMOOTHA - SMALLSMOOTHB) / 2
	include : dispiro
		widths.lhs
		g4.up.start (RIGHTSB - OX) ymiddlea
		quadcontrols 0 0.8
		g4 (SB + STROKE * 1.1) CAP
	
	include : dispiro
		widths.center OVERLAYSTROKE
		flat [mix SB RIGHTSB 0.1] [mix XH CAP (-0.1)]
		curl [mix SB RIGHTSB 0.95] [mix XH CAP 0.3]
	
	save 'eth' 0xF0

symbol-block 'Thorn'
	sketch # Thorn
		set-width WIDTH
		include capitalMarks
		
		local bowlTop (CAP * 0.81)
		local bowlBottom (CAP * 0.19)
		
		local turn : mix bowlTop bowlBottom (SMOOTHB / (SMOOTHA + SMOOTHB))
		local turnRadius : (bowlTop - bowlBottom) / 2
		include : dispiro
			widths.rhs
			flat (SB * 1.25 + 1) bowlTop [heading RIGHTWARD]
			curl (RIGHTSB - turnRadius - CORRECTION_OMIDS) bowlTop
			archv
			g4   (RIGHTSB - O) turn
			arcvh
			flat (RIGHTSB - turnRadius + CORRECTION_OMIDS) bowlBottom
			curl (SB * 1.25 + 1) bowlBottom [heading LEFTWARD]
		
		include : VBarLeft (SB * 1.25) 0 CAP
		if SLAB : begin
			include : CenterBottomSerif (SB * 1.25 + HALFSTROKE * HVCONTRAST) 0 JUT
			include : CenterTopSerif (SB * 1.25 + HALFSTROKE * HVCONTRAST) CAP JUT
	
		save 'Thorn' 0xDE
		save 'Sho' 0x3F7
	
	sketch # thorn
		
		include : create-glyph : glyph-construction
			include glyphs.b
			eject-contour 'serifLB'
		include : create-glyph : glyph-construction
			include glyphs.p
			eject-contour 'bowl'
			eject-contour 'serifLT'
		include ifMarks
		
		save 'thorn' 0xFE
		save 'sho' 0x3F8

symbol-block 'Hwair'
	sketch # Hwair
		include : VBarLeft (SB + O) 0 CAP MVERTSTROKE
		include : HBar SB MIDDLE (CAP / 2)
		include : dispiro
			widths.lhs MVERTSTROKE
			flat (MIDDLE - MVERTSTROKE * 0.5 * HVCONTRAST) CAP [heading DOWNWARD]
			curl (MIDDLE - MVERTSTROKE * 0.5 * HVCONTRAST) (SMALLSMOOTHB * 0.6)
			arcvh
			g4 [mix (MIDDLE - MVERTSTROKE * 0.5 * HVCONTRAST) (RIGHTSB - O) 0.5] O [heading RIGHTWARD]
			archv
			flat (RIGHTSB - O) (SMALLSMOOTHA * 0.6)
			curl (RIGHTSB - O) XH [heading UPWARD]
		if SLAB : begin
			local jut : JUT * 0.75
			include : CenterTopSerif (SB + O + MVERTSTROKE / 2 * HVCONTRAST) CAP jut
			include : CenterBottomSerif (SB + O + MVERTSTROKE / 2 * HVCONTRAST) 0 jut
			include : CenterTopSerif MIDDLE CAP jut
	
		save 'Hwair' 0x1F6
	
	sketch # hwair
		include : VBarLeft (SB + O) 0 CAP MVERTSTROKE
		include : dispiro
			nShoulderKnots (SB + O + MVERTSTROKE * HVCONTRAST) (MIDDLE + MVERTSTROKE * 0.5 * HVCONTRAST) (MVERTSTROKE * 0.4) nothing (XH * 0.51) (SMALLSMOOTHA * 0.6) (SMALLSMOOTHB * 0.6) MVERTSTROKE
			flat (MIDDLE + MVERTSTROKE * 0.5 * HVCONTRAST) (XH * 0.5) [heading DOWNWARD]
			curl (MIDDLE + MVERTSTROKE * 0.5 * HVCONTRAST) (SMALLSMOOTHB * 0.6)
			arcvh
			g4 [mix (MIDDLE - MVERTSTROKE * 0.5 * HVCONTRAST) (RIGHTSB - O) 0.5] O [widths.heading MVERTSTROKE 0 RIGHTWARD]
			archv
			flat (RIGHTSB - O) (SMALLSMOOTHA * 0.6)
			curl (RIGHTSB - O) XH [heading UPWARD]
		if SLAB : begin
			local jut : JUT * 0.75
			include : LeftwardTopSerif (SB + O) CAP (jut - MVERTSTROKE / 2 * HVCONTRAST)
			if (!para.isItalic) : begin
				include : CenterBottomSerif (SB + O + MVERTSTROKE / 2 * HVCONTRAST) 0 jut
				tag-contour 'serifLB'
		save 'hwair' 0x195

symbol-block 'Gha'
	sketch # Gha
		include capitalMarks
		local abarRight : MIDDLE + MVERTSTROKE / 2 * HVCONTRAST
		include : OShape CAP 0 (SB + O) abarRight MVERTSTROKE (SMALLSMOOTHA * 0.6) (SMALLSMOOTHB * 0.6)
		include : VBarRight (RIGHTSB - O * 2) DESCENDER CAP MVERTSTROKE
		include : dispiro
			widths.lhs MVERTSTROKE
			flat MIDDLE (CAP - SMALLSMOOTHB * 0.6) [heading RIGHTWARD]
			curl (MIDDLE + 1) (CAP - SMALLSMOOTHB * 0.6) [heading RIGHTWARD]
			alsothru 0.5 0.15
			g4   (RIGHTSB - O * 2 - MVERTSTROKE * HVCONTRAST) CAP [widths 0 MVERTSTROKE]
	
	
		save 'Gha' 0x1A2
	
	sketch # gha
		include pMarks
		local abarRight : MIDDLE + MVERTSTROKE / 2 * HVCONTRAST
		include : OShape XH 0 (SB + O) abarRight MVERTSTROKE (SMALLSMOOTHA * 0.6) (SMALLSMOOTHB * 0.6)
		include : VBarRight (RIGHTSB - O * 2) DESCENDER XH MVERTSTROKE
		include : dispiro
			widths.lhs MVERTSTROKE
			flat MIDDLE (XH - SMALLSMOOTHB * 0.6) [heading RIGHTWARD]
			curl (MIDDLE + 1) (XH - SMALLSMOOTHB * 0.6) [heading RIGHTWARD]
			alsothru 0.5 0.15
			g4   (RIGHTSB - O * 2 - MVERTSTROKE * HVCONTRAST) XH [widths 0 MVERTSTROKE]
		save 'gha' 0x1A3

symbol-block 'Wynn'
	define [WynnShape bot top] : glyph-construction
		include : VBarLeft SB bot top
		include : dispiro
			widths.rhs (STROKE * CTHIN)
			g4 (SB + HVCONTRAST * STROKE * (1 - CTHIN)) [mix bot top 0.8]
			alsothru 0.55 0.85
			g4 MIDDLE (top - O) [widths.heading 0 STROKE RIGHTWARD]
			archv
			g4 (RIGHTSB - O) [mix bot top 0.7]
			alsothru 0.25 0.45
			g4 (SB + STROKE * HVCONTRAST) [mix bot top 0.1]
	
	sketch # Wynn
		include capitalMarks
		include : WynnShape 0 CAP
	
		save 'Wynn' 0x1F7
	
	sketch # wynn
		include pMarks
		include : WynnShape DESCENDER XH
		save 'wynn' 0x1BF

symbol-block 'Yogh'
	define [YoghShape top bot] : glyph-construction
		include : dispiro
			widths.rhs
			g4 SB (top - HOOK)
			hookstart (top - O)
			g4 RIGHTSB (top - SMOOTHB)
			alsothruthem {{0.5 0.75}}
			g4 ([mix SB RIGHTSB 0.1] + STROKE * 0.25) ([mix bot top 0.425] - HALFSTROKE)
		include : dispiro
			widths.rhs
			g4 [mix SB RIGHTSB 0.75] ([mix bot (top - SMOOTHB) 0.758] + HALFSTROKE)
			g4 RIGHTSB ([mix bot (top - SMOOTHB) 0.475])
			alsothruthem {{0.25 0.6} {0.5 0.81}}
			g4 SB (bot + O)
	
	sketch # Yogh
		include capitalMarks
		include : YoghShape CAP 0
	
		save 'Yogh' 0x21C
	
	sketch # yogh
		include pMarks
		include : YoghShape XH DESCENDER
		save 'yogh' 0x21D

symbol-block 'RamsHorn'
	define [RamsHornShape bottom top] : glyph-construction
		local hf : [adviceBlackness 4] / 2
		local d : hf * 2 + WIDTH * 0.05
	
		include : dispiro
			widths.center
			g4 (SB + HALFSTROKE * HVCONTRAST + O) top [heading DOWNWARD]
			quadcontrols 1 0.7 16
			g4 (MIDDLE + d - hf) (bottom + d * (1 - TANSLANT * 0.5)) [widths hf hf]
			arcvh
			g4 (MIDDLE + CORRECTION_OMIDX * hf * 2) (bottom + hf)
			archv
			g4 (MIDDLE - d + hf) (bottom + d * (1 + TANSLANT * 0.5))
			quadcontrols 0 0.3 16
			g4 (RIGHTSB - HALFSTROKE * HVCONTRAST - O) top [widths.heading HALFSTROKE HALFSTROKE UPWARD]
	
	sketch # latingamma
		include pMarks
		include : RamsHornShape DESCENDER XH
	
		save 'latingamma' 0x263
	
	sketch # latinGamma
		include ifMarks
		include : RamsHornShape DESCENDER CAP
	
		save 'latinGamma' 0x194
	
	sketch # ramshorn
		include eMarks
		include : RamsHornShape 0 XH
		save 'ramshorn' 0x264

symbol-block 'Rhotic Tail and other phonetic letters'
	define [ErTail left w dohook] : glyph-construction
		local right WIDTH
		local mid : mix left right 0.5
		local rise : (WIDTH - left) * 0.3
		local sw : fallback w (markFine * 2)
		include : dispiro
			widths.rhs sw
			g2 (left - sw / 2 * HVCONTRAST) (XH * 0.5)
			g2 (mid - sw * HVCONTRAST) (XH * 0.5 + rise)
		include : dispiro
			widths.rhs sw
			flat mid (XH * 0.5 + rise) [heading DOWNWARD]
			curl mid (XH * 0.5 + [if dohook 0 (rise - 1)]) [heading DOWNWARD]
			if dohook {[hookend (XH * 0.5 - rise)]} {[arcvh]}
			g4 (right - [if dohook (markFine * 2) 0]) (XH * 0.5 - [if dohook (rise * 0.5) rise]) [if dohook nothing [heading RIGHTWARD]]
			#if dohook {[hookend (XH * 0.5 - rise)] [g4 right (XH * 0.5)]} {}
	
	sketch # rhotichook
		include : ErTail (-STROKE * HVCONTRAST) STROKE true
		save 'rhotichook' 0x2DE

	if [not recursive] : let [thinfont : Widen {'schwa' 'revlatinepsilon'} 0.85 1] : begin
		sketch # er
			include eMarks
			include thinfont.schwa
			include : ErTail (WIDTH * 0.85 - SB - markFine * HVCONTRAST * 1.25)
			save 'er' 0x25A
		
		sketch # revlatinepsiloner
			include eMarks
			include thinfont.revlatinepsilon
			include : ErTail (WIDTH * 0.85 - SB - markFine * HVCONTRAST * 1.25)
			save 'revlatinepsiloner' 0x25D
	
	sketch # bidentalpercussive
		local g : create-glyph : glyph-construction
			include : HBarTop SB RIGHTSB (CAP * 0.4)
			include : VBarLeft SB (CAP * 0.1) (CAP * 0.4)
			include : VBarRight RIGHTSB (CAP * 0.1) (CAP * 0.4)
		include g
		apply-transform : Upright
		apply-transform : Translate 0 (CAP / 2)
		apply-transform : Italify
		include g
		save 'bidentalpercussive' 0x2AD