%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%        File: mbglyphs.mf
%      Author: Oliver Corff and Dorjpalam Dorj
%        Date: October 1st, 2001
%     Version: 0.2
%   Copyright: Ulaanbaatar, Beijing, Berlin
%
% Description: Local Mongolian Script (LM[AOX])
%              Mongol Bicig Modyn Bar Glyph Definition
%
%              Common Glyphs for Mongol and Manju
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_TITEMSTROKE,numtaigedeswidth#,height#,depth#);
	"The titem";
	titem_stroke(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if style=wood:  titemwidth#:=shudwidth#+numtaigedeswidth# fi;
if style=steel: titemwidth#:=shudwidth# fi;

beginchar(MONG_TITEM,titemwidth#,height#,depth#);
	"The titem";
	if style=steel:
		titem;
	fi;
	if style=wood:
		titem_stroke(shudwidth);
		shud(0)
	fi;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_SHUD,shudwidth#,height#,depth#);
	"The shud";
	shud(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_SHILBE,shilbewidth#,height#,depth#);
	"Shilbe";
	shilbe(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_GEDES,gedeswidth#,height#,depth#);
	"gedes";
	gedes(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGU,eswidth#,height#,depth#);
	"Letter final o, u";
	adagu;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_CEGTEISHUD,shudwidth#,height#,depth#);
	"dusaltai shud";
	shud(0);
	dusal (1/2shudwidth,yashilbeheight,3thin,2thick);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if style=wood:  exennwidth#:=numtaigedeswidth#+shudwidth# fi;
if style=steel: exennwidth#:=shudwidth# fi;

beginchar(MONG_EXENN,exennwidth#,height#,depth#);
	"Initial titemtei, cegtei shud";
	if style=wood:
		titem_stroke(shudwidth);
		cegteishud(0)
	fi;
	if style=steel:
		cegteititem;
	fi;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LEWER,shudwidth#,height#,depth#);
	"The glyph l in non-final position";
	shud(0);
	l_ewer(1/2shudwidth);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if style=wood:  exenlwidth#:=numtaigedeswidth#+shudwidth# fi;
if style=steel: exenlwidth#:=shudwidth# fi;

beginchar(MONG_EXENL,exenlwidth#,height#,depth#);
	"Initial l";
	if style=wood:
		titem_stroke(shudwidth);
		shud(0);
		l_ewer(1/2shudwidth);
	fi;
	if style=steel:
		titem;
		l_ewer(1/2shudwidth);
	fi;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_SUULIINLEWER,eswidth#,height#,depth#);
	"The glyph L in final position";
	z1=(shudwidth+6.00thin,nuruuleft);
	z2=(shudwidth-bearing,y1);
	z3=(1/2shudwidth,gedesouter);
	z4=(bearing,nuruuleft);
	%z5=(,underinner);
	z5=(7/16shudwidth-2.25thin,underinner+thin);
	z6=(7/16shudwidth+thin,underouter);
	z7=(shudwidth+1/2gedeswidth,underinner);
	z8=(7/16shudwidth+thin,underinner);
	z9=(7/16shudwidth,underinner+thin);
	x10=(9/16shudwidth);
	z10-z11=whatever*(z2-z3);
	z11=(3/4shudwidth,nuruuright);
	z12=(x1,nuruuright);
	% pickup pencircle scaled .25 thin;
	fill (z1--z2--z3--z5{down}..{right}z6---z7&
		z7---z8{left}..{up}z9---z10--z11--z12--cycle) ifrotated;
	penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_TERTIARYLEWER,numtaigedeswidth#,height#,depth#);
	"The glyph L in blam-a";
	nuruu(secAwidth,0);
	shud_atom(secAwidth,bearing);
	%penstroke (z1e{up}..z2e..{down}z3e) ifrotated;

	z5r=(numtaigedeswidth,underouter);
	z6l=(secAwidth,nuruuright);
	penpos4(thin,0);
	penpos5(underinner-underouter,-90);
	penpos6(2thin,-180);
	penstroke (z5e{left}..{up}z6e) ifrotated;

	z7=(1/2[secAwidth,bearing],shudheight);
	z8=(secAwidth,nuruuleft);
	z9=(x8,nuruuright);
	unfill (z7--z8--z9--cycle) ifrotated;

	z11r=(1/3shudwidth,nuruuright);
	z12r=(1/3shudwidth,-0.8thick+underouter+1.5thin);
	z13r=(x11+1.5thin,-0.8thick+underouter);
	z14r=(2/3shudwidth+gedeswidth,-0.8thick+underouter);
	penpos11(thin,0);
	penpos12(2.25thin,0);
	penpos13(underinner-underouter,+90);
	penpos14(epsilon,+90);
	penstroke (z11e---z12e{down}..{right}z13e---z14e) ifrotated;
	penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_HIGHLEWER,shudwidth#,height#,depth#);
	"The glyph l in non-final position, raised for 'b's friends";
	shud(0);
	z1r=(1/2shudwidth,nuruuright);
	z2r=(1/2shudwidth,underouter+0.5thin);
	z3r=(x1+1.5thin,underouter-thin);
	z4r=(shudwidth+shudwidth,underouter-thin);
%	z4r=(shudwidth+gedeswidth,underouter-thin);
	penpos1(1.75thin,0);
	penpos2(2.25thin,0);
	penpos3(underinner-underouter,+90);
	penpos4(epsilon,+90);
	penstroke (z1e---z2e{down}..{right}z3e---z4e) ifrotated;
	penlabels(1,2,3,4);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_MEWER,shudwidth#,height#,depth#);
	"The glyph m in non-final position";
	shud(0);
	m_ewer(1/2shudwidth);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if style=wood:  exenmwidth#:=numtaigedeswidth#+shudwidth# fi;
if style=steel: exenmwidth#:=shudwidth# fi;

beginchar(MONG_EXENM,exenmwidth#,height#,depth#);
	"Initial m";
	if style=wood:
		titem_stroke(shudwidth);
		shud(0);
		m_ewer(2/12shudwidth);
	fi;
	if style=steel:
		titem;
		m_ewer(2/12shudwidth);
	fi;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_SUULIINMEWER,eswidth#,height#,depth#);
	"The glyph m in final position";
	nuruu(eswidth,23/24gedeswidth);
	z1r=(gedeswidth-5thin,gedesouter);
	z2 =(x1-thin,Centerline);
	z3 =(0,underouter);
	penpos1(thick,15);
	penpos2(2/3thick,0);
	penpos3(1/2thin,0);
	penstroke (z1e..z2e..z3e) ifrotated;
	penlabels(1,2,3);

	z4r=(x1r,gedesouter);
	z5 =(eswidth-2thin,Centerline);
	z6r=(14/16shudwidth,underouter);
	z7 =(7/16shudwidth,underinner+thin);
	penpos4(1/2thin,30);
	penpos5(1.25thin,0);
	penpos6(underouter-underinner, 90);
	penpos7(epsilon, 135);
	penstroke (z4e{dir -45}..tension 1.25..z5e
		..tension 1.25..z6e..tension 1.25..z7e) ifrotated;
	penlabels(4,5,6,7);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGLL,2shudwidth#,height#,depth#);
	"A Ligature: ll";
	shud(0);
	shud(shudwidth);
	
	z1r=(3/2shudwidth,nuruuright);
	z2r=(3/2shudwidth,underinner+1.5thin);
	z3r=(x1+1.5thin,underinner);
	z4r=(2shudwidth+gedeswidth,underinner);
	penpos1(1.75thin,0);
	penpos2(2.25thin,0);
	penpos3(underinner-underouter,+90);
	penpos4(epsilon,+90);
	penstroke (z1e---z2e{down}..{right}z3e---z4e) ifrotated;
	penlabels(1,2,3,4);

	z11r=(1/2shudwidth,nuruuright);
	z12r=(1/2shudwidth,underouter+0.5thin);
	z13r=(x11+1.5thin,underouter-thin);
	z14r=(shudwidth+gedeswidth,underouter-thin);
	penpos11(1.75thin,0);
	penpos12(2.25thin,0);
	penpos13(underinner-underouter,+90);
	penpos14(epsilon,+90);
	penstroke (z11e---z12e{down}..{right}z13e---z14e) ifrotated;
	penlabels(11,12,13,14);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGML,2shudwidth#,height#,depth#);
	"A Ligature: ml";
	shud(0);
	shud(shudwidth);
	
	z1=(10/16shudwidth+shudwidth,Centerline);
	z2r=(6/16shudwidth+shudwidth,underinner+1.5thin);
	z3 =(6/16shudwidth,y2);

        penpos1(0.8thick,+95);
        penpos2(0.8thick,+95);
        penpos3(0.8thick,+75);

        penstroke (z1e--z2e--z3e) ifrotated;
	penlabels(1,2,3);

	z11l=(x3l,y3l);
	z12r=(x11r,underouter+0.5thin);
	z13r=(x11+1.5thin,underouter-1.5thin);
	z14r=(shudwidth+gedeswidth,y13r);
	penpos11(1.75thin,0);
	penpos12(2.25thin,0);
	penpos13(underinner-underouter,+90);
	penpos14(epsilon,+90);
	penstroke (z11e---z12e{down}..{right}z13e---z14e) ifrotated;
	penlabels(11,12,13,14);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_XEWTEEQIX,tewidth#,height#,depth#);
	"The letter initial x";
	xewteeqix;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_DUNDG,2shudwidth#,height#,depth#);
	"Medial g";
	cegteishud(0);
	cegteishud(shudwidth);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_DUNDX,2shudwidth#,height#,depth#);
	"Medial x";
	shud(0);
	shud(shudwidth);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGX,2shudwidth#,height#,depth#);
	"Final x";
	shud(shudwidth);
	bagaodoisuul;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_DUNDNG,shudwidth#+numtaigedeswidth#,height#,depth#);
	"Medial ng";
	shud(numtaigedeswidth);
	baganum;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGNG,shudwidth#+shilbewidth#+orxicwidth#,height#,depth#);
	"Final ng";
	shud(orxicwidth+shilbewidth);
	shilbe(orxicwidth);
	orxic(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGKA,tewidth#,height#,depth#);
	"A Ligature: KA";
	ligka;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGKI,eswidth#+secAwidth#,height#,depth#);
	"A Ligature: KI";
	ligki;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGKU,bawidth#,height#,depth#);
	"A Ligature: KU";
	ligku;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGI,gedeswidth#,height#,depth#);
	"Vowel I in final position";
	nuruu(gedeswidth,gedeswidth-bearing);
	z1l=(1/3gedeswidth,shudheight);
	z2r=(gedeswidth-1/2bearing,nuruuleft);
	penpos1(4thin,60);
	penpos2(2thin,0);

	z4 =(x2,nuruuright);
	z5r=(1/2[x4,x6],underouter);
	z6r=(0,nuruuright);	% nuruuright was Centerline
	penpos4(2thin,0);
	penpos5(underinner-underouter,-90);
	penpos6(epsilon,-180);
	
	penstroke (z1e..tension 1.2..z2e...z4e{down}..z5e..{up}z6e) ifrotated;
	penlabels(1,2,3,4,5,6);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_NUMTDELBENQIX,eswidth#,height#,depth#);
	"Letter p";
	nuruu(eswidth,eswidth-numtaigedeswidth);

	z1r=(eswidth-1/2bearing,gedesouter+thin);
	z2r=(1/3[x1,x4],gedesouter);
	z3r=(7/12[x1,x4],gedesouter);
	z4r=(eswidth-numtaigedeswidth,nuruuleft);
	penpos1(thin,180);
	penpos2(gedesouter-gedesinner,90);
	penpos3(gedesouter-gedesinner,90);
	penpos4(thin,180);
	penstroke (z1e..z2e..z3e..{down}z4e) ifrotated;

	z5r=(x1,nuruuright);
	z6r=(1/2[x5,x7],underouter);
	z7r=(0,Centerline);
	penpos5(thin,0);
	penpos6(underinner-underouter,-90);
	penpos7(1/4thin,-180);
	penstroke (z5e{down}..z6e..{up}z7e) ifrotated;
	penlabels(1,2,3,4,5,6,7);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_BAGANUM,numtaigedeswidth#,height#,depth#);
	"Smaller version of female g";
	baganum;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGK,shilbewidth#+orxicwidth#,height#,depth#);
	"Final k";
	shilbe(orxicwidth);
	orxic(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_NUMTAIGEDES,eswidth#,height#,depth#);
	"Letter b, or final u";
	nuruu(eswidth,eswidth-numtaigedeswidth);

	z1r=(eswidth-1/2bearing,nuruuleft);
	z2r=(1/2[x1,x3],gedesouter);
	z3r=(eswidth-numtaigedeswidth,nuruuleft);
	penpos1(thin,0);
	penpos2(gedesouter-gedesinner,90);
	penpos3(thin,180);
	penstroke (z1e{up}..z2e..{down}z3e) ifrotated;

	z4 =(x1,nuruuright);
	z5r=(1/2[x4,x6],underouter);
	z6r=(0,Centerline);
	penpos4(thin,0);
	penpos5(underinner-underouter,-90);
	penpos6(1/4thin,-180);
	penstroke (z4e{down}..z5e..{up}z6e) ifrotated;
	penlabels(1,2,3,4,5,6);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGB,gedeswidth#+orxicwidth#,height#,depth#);
	"Final b";
	if style=wood:
		gedes(orxicwidth);
		orxic(0);
	fi;
	if style=steel:
		nuruu(numtaigedeswidth+numtaigedeswidth,numtaigedeswidth);
		z1r=(2numtaigedeswidth-1/2bearing,nuruuleft);
		z2r=(1/2[x1,x3],gedesouter);
		z3r=(numtaigedeswidth,nuruuleft);
		penpos1(thin,0);
		penpos2(gedesouter-gedesinner,90);
		penpos3(thin,180);
		penstroke (z1e{up}..z2e..{down}z3e) ifrotated;

		z4 =(x1,nuruuright);
		z5r=(x3r+thin,underouter);
		z6r=(0,nuruuright);
		z7r=(5/24gedeswidth,orxicouter);
		penpos4(thin,0);
		penpos5(underinner-underouter,-90);
		penpos6(epsilon,-180);
		penpos7(3/3thick,105);
		penstroke
			(z4e{down}..{left}z5e{left}..tension 2.5..{right}z7e)
				ifrotated;
		penlabels(1,2,3,4,5);
	fi;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if style=steel: buruuxarsangedeswidth#:=cewidth# fi;
if style=wood:  buruuxarsangedeswidth#:=tewidth# fi;

beginchar(MONG_BURUUXARSANGEDES,buruuxarsangedeswidth#,height#,depth#);
	"Letter t";
	if style=steel:
		deribun_ta;
	fi;
	if style=wood:
		nuruu(tewidth,0);
		shud_atom(1/2gedeswidth,bearing);
		z1r=(tewidth,nuruuright);
		z2r=(1/3tewidth,underouter);
		z3r=(bearing,nuruuright);
		penpos1(thin,0);
		penpos2(underinner-underouter,-90);
		penpos3(2thin,-180);
		penstroke (z1e..tension 2..z2e..{up}z3e) ifrotated;
		penlabels(1,2,3);
	fi;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_GEDESTEISHILBE,eswidth#,height#,depth#);
	"Letter d";
	if style=steel:
		roundgedestshilbe;
	fi;
	if style=wood:
		modgedestshilbe;
	fi;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_DUNDD,gedeswidth#+shudwidth#,height#,depth#);
	"Medial d before consonants";
	shud(0);
	gedes(shudwidth);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGD,gedeswidth#+shudwidth#,height#,depth#);
	"Final d";
	suul;
	gedes(shudwidth);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ERWEELJINSHILBE,gedeswidth#,height#,depth#);
	"Letter 'r' in first and medial position";
	nuruu(gedeswidth,0);
	z1=(gedeswidth-1/2bearing,nuruuleft);
	z2=(gedeswidth-5thin,shilbeheight);
	z3=(0,shilbeheight-thin);
	z4=(x2-0.5thin,shilbeheight-5thin);
	z5=(gedeswidth-3thin,nuruuleft);
	fill (z1{dir 100}..z2 & z2{dir 225}..{dir 105}z3 &
		z3{down}..{dir 45}z4 & z4..{dir -80}z5&z5--cycle) ifrotated;
	penlabels(1,2,3,4,5);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_BOSOOSHILBE,eswidth#,height#,depth#);
	"Letter z";
	bosoo_shilbe;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_EXENS,tewidth#,height#,depth#);
	"Letter `s' in initial position";
	exenzawj;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ZAWJ,tewidth#,height#,depth#);
	"Letter `s' in medial position";
	zawj;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ADAGS,tewidth#,height#,depth#);
	"Letter `s' in final position ";
	suulzawj;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_SEREEEWER,eswidth#,height#,depth#);
	"Letter c";
	seree_ewer;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ETGERSHILBE,shudwidth#+thin#,height#,depth#);
	"Letter ya";
	nuruu(shudwidth+thin,0);	
	z1r=(shudwidth+thin-1/4bearing,nuruuleft);
	z2 =(1/8shudwidth+thin,gedesouter);
	z3 =(5/8shudwidth+thin,yashilbeheight);
	penpos1(thin,0);
	penpos2(3.5thin,+15);
	penpos3(epsilon,15);
	penstroke (z1e..tension 2.5..z2e..tension 1.25..z3e) ifrotated;
	penlabels(1,2,3);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_MATGARSHILBE,gedeswidth#,height#,depth#);
	"Letter va";
	nuruu(gedeswidth,0);	
	z1r=(gedeswidth-1/4bearing,nuruuleft);
	z2r=(3/8gedeswidth,yashilbeheight);
	z3 =(1/8gedeswidth,gedesinner);
	penpos1(thin,0);
	penpos2(3.75thin,+90);
	penpos3(epsilon,+135);
	penstroke (z1e{dir 105}..tension 3.5..z2e..tension 2.50..z3e) ifrotated;
	penlabels(1,2,3);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_SUUL,shudwidth#,height#,depth#);
	"The suul";
	suul;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_ORXIC,orxicwidth#,height#,depth#);
	"The orxic";
	orxic(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_BAGODOISUUL,shudwidth#,height#,depth#);
	"The gamma suul";
	bagaodoisuul;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_BIODOISUUL,shudwidth#,height#,depth#);
	"Little tail following certain letters";
	z1=(shudwidth,Centerline);
	z2=(1/2shudwidth,Centerline);
	z3=(0,nuruuleft+thin);
	penpos1(nuruuwidth,90);
	penpos2(14/16nuruuwidth,80);
	penpos3(epsilon,45);
	penstroke (z1e---z2e..z3e) ifrotated;
	penlabels(1,2,3);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_NCEG,secAwidth#,height#,depth#);
	"The n= dot";
	dusal(1/2secAwidth,gedesouter,3thin,2thick);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_GCEG,shudwidth#,height#,depth#);
	"The g= dots";
	dusal(9/12shudwidth,gedesouter,3thin,2thick);
	dusal(3/12shudwidth,gedesouter,3thin,2thick);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Some commonly used graphical ligatures without added semantic value
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGBA,bawidth#,height#,depth#);
	"A Ligature: BA";
	ligba;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGBI,biwidth#,height#,depth#);
	"A Ligature: BI";
	nuruu(shilbewidth-thin,0);
	nuruu(biwidth,biwidth-numtaigedeswidth);

	z1r=(biwidth-1/2bearing,nuruuleft);
	z2r=(1/2[x1,x3],gedesouter);
	z3r=(biwidth-numtaigedeswidth,nuruuleft);
	penpos1(thin,0);
	penpos2(gedesouter-gedesinner,90);
	penpos3(thin,180);
	penstroke (z1e{up}..z2e..{down}z3e) ifrotated;

	z4 =(x1,nuruuright);
	z5r=(1/2[x4,x6],underouter);
	z6l=(shilbewidth,nuruuright);
	z7l=(3thin,shilbeheight);
	penpos4(thin,0);
	penpos5(underinner-underouter,-90);
	penpos6(2thin,-180);
	penpos7(4thin,-120);
	penstroke (z4e{down}..z5e..{up}z6e..tension infinity..z7e) ifrotated;

	penlabels(1,2,3,4,5,6,7,8,9);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGBU,2numtaigedeswidth#,height#,depth#);
	"A Ligature: BU";
	ligbu(0);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGBN,bawidth#,height#,depth#);
	"A Ligature: BN";
	ligba;
	dusal (x7,yashilbeheight,3thin,2thick);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGBL,bawidth#,height#,depth#);
	"A Ligature: BL";
	ligba;
	high_l_ewer(2.5thin);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGPA,bawidth#,height#,depth#);
	"A Ligature, PA";
	ligmongpa;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGPI,biwidth#,height#,depth#);
	"A Ligature: PI";
	nuruu(shilbewidth-thin,0);
	nuruu(biwidth,biwidth-numtaigedeswidth);

%	z1r=(biwidth-1/2bearing,nuruuleft);
	z1r=(biwidth-1/2bearing,gedesouter+thin);
	z2r=(1/3[x1,x4],gedesouter);
	z3r=(7/12[x1,x4],gedesouter);
	z4r=(biwidth-numtaigedeswidth,nuruuleft);
	penpos1(thin,180);
	penpos2(gedesouter-gedesinner,90);
	penpos3(gedesouter-gedesinner,90);
	penpos4(thin,180);
	penstroke (z1e..z2e..z3e..{down}z4e) ifrotated;

	z5r=(x1,nuruuright);
	z6r=(1/2[x5,x7],underouter);
	z7l=(shilbewidth,nuruuright);
	z8l=(3thin,shilbeheight);
	penpos5(thin,0);
	penpos6(underinner-underouter,-90);
	penpos7(2thin,-180);
	penpos8(4thin,-120);
	penstroke (z5e{down}..z6e..{up}z7e..tension infinity..z8e) ifrotated;

	penlabels(1,2,3,4,5,6,7,8,9,10);
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
beginchar(MONG_LIGPU,2numtaigedeswidth#,height#,depth#);
	"A Ligature: PU";
	ligmongpu;
endchar;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
