diff options
Diffstat (limited to 'Master/texmf-dist/fonts/source/public/itrans/kanvarna.mf')
-rw-r--r-- | Master/texmf-dist/fonts/source/public/itrans/kanvarna.mf | 2359 |
1 files changed, 2359 insertions, 0 deletions
diff --git a/Master/texmf-dist/fonts/source/public/itrans/kanvarna.mf b/Master/texmf-dist/fonts/source/public/itrans/kanvarna.mf new file mode 100644 index 00000000000..f2a429c2dd3 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/itrans/kanvarna.mf @@ -0,0 +1,2359 @@ +% This file is part of the KannadaTeX Software Package. +%Copyright (c) 1991 G.S. Jagadeesh & Venkatesh. Gopinath. +% +%Author: GS. Jagadeesh. +%The KannadaTeX Software Package is distributed in the hope that +%it will be useful,but WITHOUT ANY WARRANTY. No author or distributor +%accepts responsibility to anyone for the consequences of using it +%or for whether it serves any particular purpose or works at all, +%unless he says so in writing. Refer to the KannadaTeX Software Package +%General Public License for full details. +% +%Everyone is granted permission to copy, modify and redistribute +%the KannadaTeX Software Package, but only under the conditions described in the +%KannadaTeX Software Package General Public License. A copy of this license is +%supposed to have been given to you along with KannadaTeX Software Package so you +%can know your rights and responsibilities. It should be in a +%file named CopyrightLong. Among other things, the copyright notice +%and this notice must be preserved on all copies. +%%%%% +% This file contains all Kannada aksharas in it's varnamale. +% along vowel modifiers and consonant conjunctions. + +%-------------- Begin of are the Vowel and Vowel modifiers.--------------- +def VA = + stest(va); kanchar "vowel a"; + begintchar(v_a_code,v_a_width#,x_height#,0,0,0,0); + v_a_form; + sketch z10..z11..z1..z3..z4..z5..z6..z7--z8; + endtchar; etest; +enddef ; + +def VAA= + stest(vaa); kanchar "vowel aa"; + begintchar(v_aa_code,v_a_width#,x_height#,0,0,0,0); + v_a_form; + sketch z10..z11..z1..z3..z4..z2 &z2{(0,1)}..{up}z12..z6..z5..{left}z7--z8; + endtchar; etest; +enddef ; + +def VE= + stest(ve); kanchar "vowel e"; + begintchar(v_e_code,v_e_width#,x_height#,des_depth#,0,0,0); + v_e_form; + endtchar; etest; +enddef ; + +def VEE = + stest(vee); kanchar "vowel ee"; + begintchar(v_ee_code,cb_ra_width#+2.6u#,asc_height#,0,0,0,0); + cb_ra_form; + z1a = (0, 1/2x_height); + z1b = (cb_ra_width+1.1u, y1a); + rt z1c = (x1b+1.5u, .7x_height); + z1d = (x1b+.75u, .85x_height); + rt z1e = (x1b+1.5u, .25x_height); + bot z1f = (x1b+.5u, 0); + draw z1a--z1b..z1c..z1d..z1b..z1e..z1f; + vmfa_form(301); % Following are test to see How vowel modifer looks. + endtchar; etest; +enddef ; + +def VU= + stest(vu); kanchar "vowel u"; + begintchar(v_u_code,v_u_width#,asc_height#,0,0,0,0); + v_u_form; + %sketch v_u_pa; + endtchar; etest; +enddef; + +def VUU= + stest(vuu); kanchar "vowel uu"; + begintchar(v_uu_code,v_uu_width#+.5u#,x_height#,0,0,0,0); + v_uu_form; + endtchar; etest; +enddef; + +def VRO= + stest(vro); kanchar "vowel ro"; + begintchar(v_ro_code,v_ro_width#+1.7vm_u_width#,x_height#+2u#,0,0,0,0); + v_ro_form; + endtchar; etest; +enddef; + +def VROO= + stest(vroo); kanchar "vowel roo"; + begintchar(v_roo_code,v_ro_width#+2vm_u_width#+vm_uu_width#,x_height#+2u#,0,0,0,0); + v_ro_form; + %z3a = (0, .7w_height); + vm_uu_form(39); + endtchar; etest; +enddef; + +def VEA= + stest(vea); kanchar "vowel ea"; + begintchar(v_ea_code,cb_pa_width#,x_height#,0,0,0,0); + vb_ea_form; + sketch vb_a_p; + endtchar; etest; +enddef ; + +def VEAE= + stest(veae); kanchar "vowel eae"; + begintchar(v_eae_code,cb_pa_width#,x_height#,0,0,0,0); + vb_eae_form; + sketch vb_a_pb; + endtchar; etest; +enddef ; + +def VI = + stest(vi); kanchar "vowel y"; + begintchar(v_i_code,cb_pa_width#,x_height#,0,0,0,0); + vb_i_form; + draw vb_a_pb; + endtchar; etest; +enddef; + +def VAO = + stest(vao); kanchar "vowel ao"; + begintchar(v_ao_code,cb_ja_width#,x_height#,0,0,0,0); + cb_ja_form; + endtchar; etest; +enddef; + +def VAOO = + stest(vaoo); kanchar "vowel aoo"; + begintchar(v_aoo_code,cb_ja_width#,x_height#,0,0,0,0); + cb_ja_form; + vm_hook_form(2,2); + endtchar; etest; +enddef; + +def VAU= + stest(vau); kanchar "vowel ow"; + begintchar(v_au_code,5/4cb_ja_width#,asc_height#,0,0,0,0); + cb_ja_form; + z12=top z2; + vm_au_form(12,w); + h:=top y12c; w:=rt x1000b; + endtchar; etest; +enddef; + +% Begin of Vowel Modifiers....... + +def VMAH = + stest(vmp); kanchar "vowel modifier of ah"; + begintchar(vm_ah_code,vm_ah_width#,x_height#+vm_ah_height#,0,0,0,0); + lft top z77 = (0, x_height); + vmah_form(77); + pivot_message(x77); + endtchar; etest; +enddef; + +def VMA = + stest(vma); kanchar "vowel modifier of a"; + begintchar(vm_a_code,vm_a_width#,asc_height#,0,0,0,0); + lft top z1=(0,x_height); + vmfa_form(1); + pivot_message(x1); + endtchar; etest; +enddef ; + +def VMAA = + stest(vmaa); kanchar "vowel modifier of aa"; + % used for kha,nga,ja,nya etc. + begintchar(vm_aa_code,vm_aa_width#,asc_height#,0,0,0,0); + lft top z0 = (0, x_height); + vmfaa_form(0) ; + pivot_message(x0); + endtchar; etest; +enddef ; + +def VME= + stest(vme); kanchar "vowel modifer of e "; + begintchar(vm_e_code,vm_e_width#,vm_e_height1#+ascunit#,0,0,0,0); + vm_e_form; + pivot_message(.5u); + endtchar; etest; +enddef ; + +def VMEE= + stest(vmee); kanchar "vowel modifier of ee"; + begintchar(vm_ee_code,vm_e_width#,asc_height#,0,0,0,0); + vm_ee_form; + %vm_hook_form(7,3); + pivot_message(x2); + endtchar; etest; +enddef; + +def VMU = + stest(vmu); kanchar "vowel modifier of u"; + begintchar(vm_u_code,vm_u_width#,x_height#,0,0,0,0); + rt z1 = (0,.6w_height); + vm_u_form(1); + w:=rt x1b; + pivot_message(x1d); + endtchar; etest; +enddef; + +def VMUU = + stest(vmuu); kanchar "vowel modifier of uu"; + begintchar(vm_uu_code,vm_uu_width#,x_height#,0,0,0,0); + rt z1 = (0,.6w_height); + vm_uu_form(1); + endtchar; etest; +enddef; + +def VMRO = + stest(vmro); kanchar "vowel modifier of ro"; + begintchar(vm_ro_code,vm_ro_width#-3u#,x_height#,.5des_depth#,0,ul#,0); + cc_clear ; + vm_ro_form; %cc_whd(0,1); + %cc_whd(0,1); + endtchar; etest; +enddef; + + +def VMROO = + stest(vmroo); kanchar "vowel modifier of roo"; + begintchar(vm_roo_code,vm_ro_width#+vm_bar_width#-3u#,x_height#,.5des_depth#,0,ul#,0); + cc_clear ; + vm_ro_form; + z10 =(x1+.9vm_bar_width, y1); + rt z11 = (x1+vm_bar_width, y1 -2u); + z12 = (x1+.9vm_bar_width, y1 -u); + path cd, bar_p; + bar_p = z1---z10..z11..z12; + cd = bar_p scaled 1 shifted (-3u, -.5des_depth) rotated 0 ; + sketch cd; + endtchar; etest; +enddef; + +def VMEA = + stest(vmea); kanchar "vowel modifier of ea"; + begintchar(vm_ea_code,vm_ea_width#,x_height#+vm_ea_height#,0,0,0,0); + lft top z77 = (0, x_height); + vmfea_form(77); + pivot_message(x77); + endtchar; etest; +enddef; + +def VMEAA = + stest(vmeaa); kanchar "vowel modifier of ea"; + begintchar(vm_ea1_code,vm_ea1_width#,x_height#+vm_ea_height#,0,0,0,0); + bar_forma(vm_ea1_width) ; + %lft top z77 = (0, x_height); + vmfea_form(301); + pivot_message(x300); + endtchar; etest; +enddef; + +def VMY = + stest(vmy); kanchar "vowel modifier of y"; + begintchar(vm_y_code,.5vm_ro_width#,x_height#,des_depth#+1.4u#,0,ul#,0); + vm_y_form; %cc_whd(0,1); + path ct ; + %ct = vm_y_p scaled 1.3 shifted (-1.5u, 4.3u) rotated 0 ; + ct = vm_y_p scaled .85 shifted (-2.0u, -.5des_depth) rotated 0 ; + sketch ct; + %cc_clear; cc_transform(ct); + %cc_whd(1,0); + endtchar; etest; +enddef; + +def VMAU= + stest(vmau); kanchar "vowel modifier au"; + begintchar(vm_au_code,vm_au_width#,asc_height#,0,0,0,0); + lft z12 = (0, x_height); + vm_au_form(12,w); + pivot_message(x12); + endtchar; etest; +enddef; + +% --------------------End of the Vowel and Vowel modifiers.------------ + +%---------------------Begin of Kannada Consonant and its conjunctions.-------- +def CBKA= + stest(cbka); kanchar "base of consonant ka"; + begintchar(cb_ka_code,cb_ka_width#,x_height#,0,0,0,0); + cb_ka_form; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCKA= + stest(ccka); kanchar "consonant conjunction of ka"; + begintchar(cc_ka_code,cb_ka_width#,x_height#,0,0,0,0); + cb_ka_form; + cc_clear; cc_transform(cb_ka_pa); + cc_transform(cb_ka_pb); cc_transform(cb_ka_pc); + cc_whd(1,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBKHA= + stest(cbkha); kanchar "base of consonant kha"; + begintchar(cb_kha_code,cb_kha_width#,x_height#,wedge_depth#,0,0,0); + cb_kha_form; + sketch cb_kha_p; + pivot_message(x12,x400); + endtchar; etest; +enddef ; + +def CCKHA= + stest(cckha); kanchar "consonant conjunction of kha"; + begintchar(cc_kha_code,cb_kha_width#,x_height#,0#,0,0,0); + cb_kha_form; + cc_clear; cc_transform(cb_kha_p); + cc_whd(1,0); + pivot_message(.6w); + endtchar; etest; +enddef ; + +def CBGA= + stest(cbga); kanchar "base of consonant ga"; + begintchar(cb_ga_code,cb_ga_width#,x_height#,0,0,0,0); + cb_ga_form; + sketch cb_ga_p; + bar_forma(cb_ga_width-.5u); + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCGA= + stest(ccga); kanchar "consonant conjunct of ga"; + begintchar(cc_ga_code,cb_ga_width#,x_height#,0,0,0,0); + cb_ga_form; + cc_clear; cc_transform(cb_ga_p);cc_whd(0,0); + %pivot_message(x3*cc_scale); + cc_whd(1,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + + +def CBGHA = + stest(cbgha); kanchar "base of consonant gha"; + begintchar(cb_gha_code,cb_pa_width#+1/2vm_u_width#,x_height#,wedge_depth#,0,0,0); + cb_pa_form; + top lft z77=(1/2cb_pa_width-1/2c_height-.5u, top (x_height - c_height)); + place_lit_circ(77, 1); + path new_path ; + + sketch cb_pa_p ; + top z10=1/2[z46,z46]; + %z50=(x48+1/4u,y48) ; + wedge(10); + vm_ghu_form(48); + bar_forma(.9cb_pa_width); % z301 is comming from bar_forma... + %vmfa_form(301); % Following are test to see How vowel modifer looks. + %vmfaa_form(301) ; + %vmfea_form(301); + %bar_form(0,cb_ka_width); + %vm_au_form(301,w); + %vmah_form(301); % tale-ardha akshara + %vm_u_form(400); + + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def transform_gha(text t) = + path ct_p ; + cc_transform(t) ; + undraw cc_transformed_path ; + ct_p = cc_transformed_path scaled .95 shifted (-1.5u, 2u) rotated 0 ; + sketch ct_p ; +enddef ; + +def CCGHA= + stest(ccgha); kanchar "consonant conjunct of gha"; + begintchar(cc_gha_code,cb_pa_width#+1/4vm_u_width#-2u#,x_height#,0,0,0,0); + cb_pa_form; + + top lft z77=(1/2cb_pa_width-1/2c_height-.5u, top (x_height - c_height)); + place_lit_circ(77, 1); + + sketch cb_pa_p; + top z10=1/2[z46,z46]; + z50=(x48+1/4u,y48) ; + wedge(10); + vm_ghu_form(48); + + path ca, cb, cc ; + cc_clear; %cc_transform(pl_lit_cir_p); + transform_gha(cb_pa_p); + transform_gha(wedge_p); + transform_gha(vm_ghu_p);cc_whd(1,1); + pivot_message(w/2); + endtchar; etest; +enddef ; + + +def CBNGA = + stest(cbnga); kanchar "base of consonant nga"; + begintchar(cb_nga_code,cb_ja_width#,x_height#,0,0,0,0); + cb_ja_form; + sketch cb_ja_pc; + sketch cb_nga_p; % puts bowl to nga. + %vmfa_form(301); % Following are test to see How vowel modifer looks. + %vmfaa_form(21) ; + %vmfea_form(21); + %vm_au_form(21,w); + + pivot_message(x21-1.5u,x400); + endtchar; etest; +enddef ; + +def CCNGA = + stest(ccnga); kanchar "base of consonant nga"; + begintchar(cc_nga_code,cb_ja_width#,x_height#,0,0,0,0); + cb_ja_form; + cc_clear; cc_transform(cb_ja_pa); + cc_transform(cb_nga_p); cc_transform(cb_ja_pc); + cc_whd(1,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + + +def CBCHA = + stest(cbcha); kanchar "base of consonant cha"; + begintchar(cb_cha_code,cb_ja_width#+.5u#,x_height#,0,0,0,0); + cb_ch_form; + pivot_message(x20-u,x400); + endtchar; etest; +enddef ; + +def transform_char(text t) = + path ct_p ; + cc_transform(t) ; + undraw cc_transformed_path ; + ct_p = cc_transformed_path scaled 1 shifted (-u, 1.5u) rotated 0 ; + sketch ct_p ; +enddef ; + +def CCCHA = + stest(cccha); kanchar "consonant conjunction of cha"; + begintchar(cc_cha_code,cb_ja_width#-2.5u#,x_height#,0,0,0,0); + cb_ch_form; + cc_clear; transform_char(cb_cha_pa); + transform_char(cb_cha_pb); + transform_char(cb_cha_pc); + cc_whd(1,1); + endtchar; etest; +enddef ; + +def CBCCHA= + stest(cbccha); kanchar "base of consonant ccha"; + begintchar(cb_ccha_code,cb_ja_width#,x_height#,0,0,0,0); + cb_cch_form; + wedge(8); + pivot_message(x12-u,x400); + endtchar; etest; +enddef ; + +def CCCCHA= + stest(ccccha); kanchar "consonant conjunction ccha"; + begintchar(cc_ccha_code,cb_ja_width#-2u#,x_height#,0,0,0,0); + cb_cch_form; + wedge(8); + cc_clear; transform_char(cb_ccha_pa); + transform_char(wedge_p); + cc_whd(0,0); + endtchar; etest; +enddef ; + + +def CBJA = + stest(cbja); kanchar "base of consonant ja"; + begintchar(cb_ja_code,cb_ja_width#,x_height#,0,0,0,0); + cb_ja_form; + sketch cb_ja_pb; % puts bowl to ja. + pivot_message(x52-u,x400); + %vmfa_form(52); % Following are test to see How vowel modifer looks. + %vmfaa_form(52) ; + %vmfea_form(52); + %vm_au_form(52,vm_au_width); + %vmah_form(52); % tale-ardha akshara + endtchar; etest; +enddef ; + +def CCJA = + stest(ccja); kanchar "base of consonant ja"; + begintchar(cc_ja_code,cb_ja_width#-2u#,x_height#,0,0,0,0); + cb_ja_form; + %sketch cb_ja_pb; % puts bowl to ja. + cc_clear; transform_char(cb_ja_pa); + transform_char(cb_ja_pb);cc_whd(0,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBJHA = +stest(cbjha); kanchar "base of consonant jha"; + begintchar(cb_jha_code,cb_ra_width#+2vm_u_width#,x_height#,wedge_depth#, + 0,0,0); + cb_ra_form; + % The next statement will identify the point on ra_form + % where the bowl will be attached. + z5 = (cb_ra_p) intersectionpoint ((x1,w_height)--(x1+w,w_height)); + vm_u_form(5); + z6 = z5b; + wedge(6); + z7 = z6; + vm_u_form(7); + w:=rt x7b; + z8a=(x7d-.5u,y7d); + + %vmfa_form(301); % Following are test to see How vowel modifer looks. + %vmfaa_form(8a) ; + %vmfea_form(301); + %bar_form(0,cb_ka_width); + %vm_au_form(8a,w); + + % to compute the joining point of "kombu for jha". + path inter; + inter = (.9w, .3x_height)--(1.1w, .3x_height); + z401 = vm_u_p intersectionpoint inter; + %vm_u_form(401); + + pivot_message(x301,x401,x8a); + + endtchar; etest; +enddef; + +def CCJHA = + stest(ccjha); kanchar "consonant conjunct of jha"; + begintchar(cc_jha_code,cb_ra_width#+2vm_u_width#-2.5u#,x_height#,0,0,0,0); + cb_ra_form; + % The next statement will identify the point on ra_form + % where the bowl will be attached. + z5=z4; + vm_u_form(5); + path p; p:=vm_u_p; + z6 = z5b; + wedge(6); + z7 = z6; + vm_u_form(7); + w:=rt x7b; + cc_clear; transform_char(cb_ra_p); + transform_char(p); transform_char(vm_u_p); + transform_char(wedge_p);cc_whd(1,0); + penlabels(5,6); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBNYA= + stest(cbnya); kanchar "base mf consonant nya"; + begintchar(cb_nya_code,v_e_width#+half_plus_width#,x_height#,0,0,0,0); + cb_nya_form; + pivot_message(x17-u,x400); + endtchar; etest; +enddef ; + +def CCNYA= + stest(ccnya); kanchar "consonant conjunction of nya"; + begintchar(cc_nya_code,v_e_width#+half_plus_width#,x_height#,0,0,0,0); + cb_nya_form; + cc_clear; cc_transform(v_e_p); + cc_transform(cb_ny_pb); cc_whd(0,1); + pivot_message(0) ; + endtchar; etest; +enddef; + +def CBTTA= + stest(cbtta); kanchar "base of consonant tta"; + begintchar(cb_tta_code,cb_tta_width#,x_height#,0,0,0,0); + cb_tta_form; + pivot_message(x13-u,x400); + endtchar; etest; +enddef ; + +def CCTTA= + stest(cctta); kanchar "base of consonant tta"; + begintchar(cc_tta_code,cb_tta_width#-1.75u#,x_height#,0,0,0,0); + cb_tta_form; + cc_clear; transform_char(cb_tta_p);; cc_whd(1,0); + pivot_message(w); + endtchar; etest; +enddef ; + +def CBTTHA= + stest(cbttha); kanchar "base of consonant ttha"; + begintchar(cb_ttha_code,cb_ra_width#,x_height#,0,0,0,0); + cb_ra_form; + z10 = (x1,1/2x_height); + fill_dot(10); + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCTTHA= + stest(ccttha); kanchar "consonant conjunct of ttha"; + begintchar(cc_ttha_code,cb_ra_width#,x_height#,0,0,0,0); + cb_ra_form; + z10 = (x1,1/2x_height); + fill_dot(10); + cc_clear; cc_transform(cb_ra_p); + cc_f_transform(fill_dot_p);cc_whd(0,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + + +def CBDDA= + stest(cbdda); kanchar "base of consonant dda"; + begintchar(cb_dda_code,.9cb_da_width#,x_height#,0,0,0,0); + cb_dda_form; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCDDA= + stest(ccdda); kanchar "consonant conjunction of dda"; + begintchar(cc_dda_code,.9cb_da_width#-2u#,x_height#,0,0,0,0); + cb_dda_form; + cc_clear; cc_transform(cb_dda_p);cc_whd(0,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBDDHA= + stest(cbddha); kanchar "base of consonant ddha"; + begintchar(cb_ddha_code,.9cb_da_width#,x_height#,0,0,0,0); + cb_dda_form; + wedge(3); + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCDDHA= + stest(ccddha); kanchar "consonant conjunction of ddha"; + begintchar(cc_ddha_code,.9cb_da_width#-2u#,x_height#,0,0,0,0); + cb_dda_form; + wedge(3); + cc_clear; cc_transform(cb_dda_p); + cc_transform(wedge_p);cc_whd(1,1); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBNNA= + stest(cbnna); kanchar "base of consonant nna"; + begintchar(cb_nna_code,cb_nna_width#,x_height#,0,0,0,0); + cb_nna_form; + pivot_message(x400-.5u); + endtchar; etest; +enddef ; + +def CCNNA= + stest(ccnna); kanchar "consonant conjunct of nna"; + begintchar(cc_nna_code,cb_nna_width#-u#,x_height#,0,0,0,0); + cb_nna_form; + cc_clear; cc_transform(cb_nna_p);cc_whd(0,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBTA= + stest(cbta); kanchar "base of consonant ta"; + begintchar(cb_ta_code,cb_ta_width#,x_height#,0,0,0,0); + cb_ta_form; + sketch cb_ta_p; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCTA= + stest(ccta); kanchar "consonant conjunct of ta"; + begintchar(cc_ta_code,vmwidth#,0,0,0,0,0); + % d is set later + top z1=(0,0); barandhook_formk(1,w,5); erase sketch barandhook_p; + sketch barandhook_p reflectedabout ( top z1, top z1+(w,0)) + shifted (0, (-bot_accent+ (bot y1c))); + d:=bot_accent- (bot y1c); + pivot_message(w); + endtchar; etest; +enddef ; + +def CBTHA= + stest(cbtha); kanchar "base of consonant tha"; + begintchar(cb_tha_code,cb_da_width#,x_height#,wedge_depth#,0,0,0); + cb_da_form; + wedge(4); + z10 = (x1,2/3x_height-uh); + fill_dot(10); + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCTHA= + stest(cctha); kanchar "consonant conjunct of tha"; + begintchar(cc_tha_code,cb_da_width#-2u#,x_height#,0,0,0,0); + cb_da_form; + wedge(4); + z10 = (x1,2/3x_height-uh); + fill_dot(10); + cc_clear; cc_transform(cb_da_p); + cc_transform(wedge_p); cc_f_transform(fill_dot_p); + cc_whd(0,1); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBDA= + stest(cbda); kanchar "base of consonant da"; + begintchar(cb_da_code,cb_da_width#,x_height#,0,0,0,0); + cb_da_form; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCDA= + stest(ccda); kanchar "consonant conjunct of da"; + begintchar(cc_da_code,cb_da_width#-2u#,x_height#,0,0,0,0); + cb_da_form; + cc_clear; cc_transform(cb_da_p); + cc_whd(0,0); + %pivot_message(x4*cc_scale); + pivot_message(w/2); + endtchar; etest; +enddef ; + + +def CBDHA= + stest(cbdha); kanchar "base of consonant dha"; + begintchar(cb_dha_code,cb_da_width#,x_height#,0,0,0,0); + cb_da_form; + wedge(4); + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCDHA= + stest(ccdha); kanchar "consonant conjunct of da"; + begintchar(cc_dha_code,cb_da_width#-2u#,x_height#,0,0,0,0); + cb_da_form; + wedge(4); + cc_clear; cc_transform(cb_da_p); + cc_transform(wedge_p); + cc_whd(1,1); + pivot_message(w/2); + %pivot_message(x4*cc_scale); + endtchar; etest; +enddef ; + + +def CBNA= + stest(cbna);kanchar "base of consonant na"; + begintchar(cb_na_code,cb_na_width#,x_height#,wedge_depth#,0,0,0); + cb_na_form; + sketch cb_na_p; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CBNAA= + stest(cbnaa); kanchar "consonant of nX (alternative)"; + begintchar(cb_naa_code,cb_na_width#,x_height#,0,0,0,0); + naa_form ; + pivot_message(0); + endtchar; etest; +enddef ; + +def CCNA= + stest(ccna); kanchar "consonant conjunct of na"; + begintchar(cc_na_code,2.5u#,x_height#-3u#,des_depth#,0,ul#,0); + numeric wid; + wid = 7u ; + top lft z1 = (.4wid,.5x_height); + z2 = (.55wid,(x_height-d)/2); + bot z3 = (1/4wid,-d); + lft z4 = (0,-d+1/2sc_height); + z5 = (x3,y3+sc_height); + bot z6 = (3/4wid,-d); + rt z7 = (wid,y4); + path cc_na_p, ct; + cc_na_p = z1..z2..z3..z4..z5..z6..z7; + ct = cc_na_p scaled 1 shifted (-3u, 6u) rotated -10 ; + cc_clear; transform_char(ct); + cc_whd(1,0); + pivot_message(w/2); + endtchar; etest; +enddef ; + +def CBPA= + stest(cbpa); kanchar "base of consonant pa"; + begintchar(cb_pa_code,cb_pa_width#,x_height#,0,0,0,0); + cb_pa_form; + top lft z77=(1/2cb_pa_width-1/2c_height-.5u, top (x_height - c_height)); + place_lit_circ(77, 1); + sketch cb_pa_p; + + bar_forma(cb_pa_width-.5u); % z301 is comming from bar_forma... + %vmfa_form(301); % Following are test to see How vowel modifer looks. + %vmfaa_form(301) ; + %vmfea_form(301); + %vm_au_form(301,vm_au_width); + + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def transform_charb(text t) = + path ct_p ; + cc_transform(t) ; + undraw cc_transformed_path ; + ct_p = cc_transformed_path scaled 1 shifted (-2u, 2.5u) rotated 0 ; + sketch ct_p ; +enddef ; + +def CCPA= + stest(ccpa); kanchar "consonant conpunction of pa"; + begintchar(cc_pa_code,cb_pa_width#-2u#,x_height#,0,0,0,0); + cb_pa_form; + pivot_message(3/4w); + cc_clear; transform_charb(cb_pa_p); + cc_whd(1,0); + endtchar; etest; +enddef ; + + +def CBPHA= + stest(cbpha); kanchar "base of consonant pha"; + begintchar(cb_pha_code,cb_pa_width#,x_height#,0,0,0,0); + cb_pa_form; + %pivot_message(x1,x1); + top lft z77=(1/2cb_pa_width-1/2c_height-.5u, top (x_height - c_height)); + place_lit_circ(77, 1); + top z10=1/2[z46,z46]; + wedge(10); + sketch cb_pa_p; + sketch wedge_p; + bar_forma(cb_pa_width-.5u); % z301 is comming from bar_forma... + %vmfa_form(301); % Following are test to see How vowel modifer looks. + %vmfaa_form(301) ; + %vmfea_form(301); + %vm_au_form(301,vm_au_width); + + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCPHA= + stest(ccpha); kanchar "consonant conpunction of pha"; + begintchar(cc_pha_code,cb_pa_width#-2u#,x_height#,0,0,0,0); + cb_pa_form; + + sketch cb_pa_p; + top z10=1/2[z46,z46]; + wedge(10); + + cc_clear; transform_charb(cb_pa_p); + transform_charb(wedge_p); + cc_whd(1,1); + endtchar; etest; + +enddef ; + +def CBBA= + stest(cbba); kanchar "base of consonant ba"; + begintchar(cb_ba_code,cb_ba_width#,x_height#,0,0,0,0); + cb_ba_form; + pivot_message(x9-u,x400); + endtchar; etest; +enddef ; + +def CCBA= + stest(ccba); kanchar "consonant conjunct of ba"; + begintchar(cc_ba_code,cb_ba_width#-3.5u#,top_height#,0,0,ul#,0); + cb_ba_form; + cc_clear; transform_charb(((subpath(0,7) of cb_ba_p)..(x9,1.3y9))); + cc_whd(1,0); + endtchar; etest; +enddef; + +def CBBHA= + stest(cbbha); kanchar "base of consonant bha"; + begintchar(cb_bha_code,cb_ba_width#,x_height#,0,0,0,0); + cb_ba_form; + wedge(6); + %vmah_form(9); % tale-ardha akshara + pivot_message(x9-u,x400); + endtchar; etest; +enddef ; + +def CCBHA= + stest(ccbha); kanchar "consonant conjunct of bha"; + begintchar(cc_bha_code,cb_ba_width#-3.5u#,top_height#,0,0,ul#,0); + cb_ba_form; + wedge(6); + cc_clear; transform_charb(((subpath(0,7) of cb_ba_p)..(x9,1.3y9))); + transform_charb(wedge_p); + cc_whd(1,1); + pivot_message(x12,x400); + endtchar; etest; +enddef; + + +def CBMA= + stest(cbma); kanchar "base of consonant ma"; + begintchar(cb_ma_code,cb_pa_width#+vm_u_width#,x_height#,0,0,0,0); + cb_va_form; + sketch cb_va_p; + z65 = (cb_va_p) intersectionpoint ((x46,.8w_height)--(x46+cb_pa_width,.8w_height)); + vm_u_form(65); + + % to compute the joining point of "kombu for nya". + z500=z65b; + %vm_u_form(500); + z67=(x65d-.5u, y65d); + %vm_au_form(67,vm_au_width); + %vmfaa_form(67) ; + %vmah_form(301); % tale-ardha akshara + + pivot_message(x301,x500, x67); + + endtchar; etest; +enddef ; + +def CCMA= + stest(ccma); kanchar "consonant conjunct of ma"; + begintchar(cc_ma_code,4u#,x_height#,des_depth#,0,ul#,0); + path cc_ma_p; + numeric wid; + wid = 6u; + rt z1=(wid,-.8d+uh);bot z2=(wid/2,-d); + lft z3=(0,-.1d); z4=(.3wid,.15x_height); %z4=(2/3wid,x_height/5); + rt z5=(.6wid,0); z6=(.3wid,-.075d); + z7=(.15wid,.1x_height); z8=(.075wid,.25x_height); + z9=(.14wid,.55x_height); + cc_ma_p = z1..z2..z3..z4..z5..z6..z7..tension1.2..z8..tension 1.2..z9; + sketch cc_ma_p; + path ct; + ct = cc_ma_p scaled 1 shifted (0, 3.5u) ; + %cc_clear; cc_transform(cc_ma_p); cc_whd(0,0); + cc_clear; transform_charb(ct); cc_whd(0,0); + endtchar; etest; +enddef ; + + +def CBYA= + stest(cbya); kanchar "base of consonant ya"; + begintchar(cb_ya_code,cb_ya_width#+vm_u_width#,x_height#,0,0,0,0); + cb_ya_form; + pivot_message(x7,x400, x10); + endtchar; etest; +enddef; + +def CCYA= + stest(ccya); kanchar "consonant conjunct of ya"; + %begintchar(cc_ya_code,6u#,x_height#,des_depth#,0,ul#,0); + begintchar(cc_ya_code,4.5u#,x_height#,des_depth#+2.5u#,0,0,0); + numeric y_width ; + y_width = 6u ; + lft z1 = (0,-1/3des_depth); z2 = (y_width/4,0); z3 = (1/4y_width,-1/2des_depth); + bot z4 = (1/3y_width,-des_depth); z5 = (2/3y_width,0); z6 = (.45y_width,.45j_height); + z7 = (.6y_width,.7j_height); z8=(.65y_width,.4j_height); + + path cc_ya_p, ct ; + cc_ya_p = z1..z2..z3..z4..z5..{up}z6..z7..z8; + %ct = cc_ya_p scaled 1.3 shifted (0, -3.5u) ; + ct = cc_ya_p scaled 1.0 shifted (0, -2u) ; + sketch ct; + %cc_clear; cc_transform(ct); cc_whd(1,0); + pivot_message(0); + endtchar; etest +enddef; + +def CBRA = + stest(cbra); kanchar "base of consonant ra"; + begintchar(cb_ra_code,cb_ra_width#,x_height#,0,0,0,0); + cb_ra_form; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CBRRA = + stest(cbrra); kanchar "base of consonant rra"; + begintchar(cb_rra_code,cb_rra_width#,x_height#,0,0,0,0); + cb_rra_form; + pivot_message(x7,x400); + endtchar; etest; +enddef ; + +% For arkavattu; +def CCRRA = + stest(ccara); kanchar "base of consonant ra(as arkavattu)"; + begintchar(cc_ara_code,cb_ra_width#,x_height#,0,0,0,0); + arkavattu ; + sketch arka_pa reflectedabout((0,0),(w,0)) shifted (0,h); + sketch arka_pb reflectedabout((0,0),(w,0)) shifted (0,h); + endtchar; etest; +enddef ; + + +def CCRA = + stest(ccra); kanchar "consonant conjunct of ra"; + begintchar(cc_ra_code,7u#,0,3.5uh#,0,0,0); + top lft z1=(0,-bot_accent); bot z2=(w/2,-d); top rt z3=(w,-bot_accent); + sketch z1..z2..z3; + pivot_message(w); + endtchar; etest; +enddef ; + + +def CBLA = + stest(cbla); kanchar "base of consonant la"; + begintchar(cb_la_code,cb_la_width#,x_height#,0,0,0,0); + cb_la_form; + sketch cb_la_p; + pivot_message(x55-u,x400); + endtchar; etest; +enddef ; + +def CCLA = + stest(ccla); kanchar "consonant conjunct of la"; + begintchar(cc_la_code,7u#,0,4.5uh#,0,0,0); + path s,t; + bot z1=(w/4,-d); lft z2 =(0,-1/2d); top z3=(x1,-bot_accent); + top z4=(w/2,y2); + s= z1..z2..z3..z4; + t=s reflectedabout ((w/2,h),(w/2,-d)); + sketch s;sketch t; + pivot_message(.8w); + endtchar; etest; +enddef ; + +def CBVA= + stest(cbva); kanchar "base of consonant va"; + begintchar(cb_va_code,cb_pa_width#,x_height#,0,0,0,0); + cb_va_form; + sketch cb_va_p ; + %pivot_message(x46,x400); + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCVA= + stest(ccva); kanchar "consonant conjunction of va"; + begintchar(cc_va_code,cb_pa_width#,x_height#,0,0,0,0); + cb_va_form; + vmfa_form(301); % Following are test to see How vowel modifer looks. + cc_clear; cc_transform(cb_va_p); + cc_transform(bar_pa) ; cc_transform(bar_p) ; + cc_whd(1, 0); + endtchar; etest; +enddef ; + +def CBCA= + stest(cbca); kanchar "base of consonant ca"; + begintchar(cb_ca_code,cb_ca_width#,x_height#,0,0,0,0); + cb_ca_form; + draw cb_ca_p; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCCA= + stest(ccca); kanchar "consonant conjunct of ca"; + begintchar(cc_ca_code,cb_ca_width#-2.5u#,asc_height#,0,0,ul#,0); + cb_ca_form; + cc_clear; transform_charb(((x5, .8asc_height)..cb_ca_p)); cc_whd(1,0); + endtchar; etest; +enddef ; + +def CBSA = + stest(cbsa); kanchar "base of consonant sa"; + begintchar(cb_sa_code,cb_na_width#,x_height#,0,0,0,0); + cb_sa_form; + sketch cb_sa_p; + pivot_message(x301+.2u,x400); + endtchar; etest; +enddef ; + +def CCSA = + stest(ccsa); kanchar "consonant conjunct of sa"; + begintchar(cc_sa_code,cb_na_width#-2.5u#,x_height#,0,0,ul#,0); + cb_sa_form; + %sketch cb_na_p; + cc_clear; transform_charb(cb_sa_p); cc_whd(1,0); + endtchar; etest; +enddef ; + +def CBHA = + stest(cbha); kanchar "base of consonant ha"; + begintchar(cb_ha_code,cb_ha_width#,x_height#,0,0,0,0); + cb_ha_form; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCHA = + stest(ccha); kanchar "consonant conjunct of ha"; + begintchar(cc_ha_code,cb_ha_width#,x_height#,0,0,0,0); + cb_ha_form; + cc_clear; cc_transform(cb_ha_p); + cc_whd(0,0); + pivot_message(0) ; + endtchar; etest; +enddef ; + +def CBLLA = + stest(cblla); kanchar "base of consonant lla"; + begintchar(cb_lla_code,cb_lla_width#,x_height#,0,0,0,0); + cb_lla_form; + sketch cb_lla_p; + pivot_message(x12-u,x400); + endtchar; etest; +enddef ; + +def CBLLAA = + stest(cbllaa); kanchar "base of consonant lla"; + begintchar(cb_llaa_code,cb_rra_width#,x_height#,0,0,0,0); + cb_rra_form; + undraw cb_rra_pd ; + pivot_message(x7,x400); + endtchar; etest; +enddef ; + +def CCLLA = + stest(cclla); kanchar "consonant conjunct of lla"; + begintchar(cc_lla_code,cb_lla_width#,asc_height#,0,0,ul#,0); + cb_lla_form; + cc_clear; cc_transform(cb_lla_p); + cc_whd(1,0); + endtchar; etest; +enddef ; + +def CBSHA= + stest(cbsha); kanchar "base of consonant sha"; + begintchar(cb_sha_code,cb_pa_width#,x_height#,0,0,0,0); + cb_sha_form; + sketch cb_pa_p; + sketch cb_sha_pb; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CCSHA= + stest(ccsha); kanchar "consonant conjunct of sha"; + begintchar(cc_sha_code,cb_pa_width#-2u#,x_height#,0,0,0,0); + cb_sha_form; + cc_clear; transform_charb(cb_pa_p); + transform_charb(cb_sha_pb); cc_whd(0,0); + endtchar; etest; +enddef ; + +def CBKSHA = + stest(cbksha); kanchar "base of consonant ksha"; + begintchar(cb_ksha_code,cb_ka_width#,x_height#,cb_ksha_depth#,0,0,0); + cb_ksha_form; + sketch cb_ka_pa; + sketch cb_ka_pb; + sketch cb_ka_pc; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +% ----------------End of Kannada Consonant and its conjunctions.---------- + +% ----------------Begin of Kannada Vowel modifed Consonants(special)---------- + +def CVKE = + stest(cvke); kanchar "consonant+vowel ka+e"; + begintchar(cv_ke_code,cb_ka_width#,x_height#+vm_e_heightj#,0,0,0,0); + cb_ka_form; + undraw bar_pa; %cb_ka_pc; + vm_e_form_a(8,.1u, .3u); %sketch vm_e_p; + path vm_e_pa,vm_e_pb,vm_e_pc ; + vm_e_pa = cb_ka_pc softjoin vm_e_p; + sketch vm_e_pa; + endtchar; etest; +enddef; + +def CVKHE = + stest(cvkhe); kanchar "consonant+vowel kha+e"; + begintchar(cv_khe_code,cb_kha_width#,x_height#+vm_e_heightj#,0,0,0,0); + cb_kha_form; + sketch cb_kha_p; + vm_e_form_a(11,.6u, 1.u); + path vm_e_pa,vm_e_pb,vm_e_pc ; + vm_e_pa = vm_e_p reflectedabout(z11, z11+(.1u, .8u)); + vm_e_pb = vm_e_pa reflectedabout(z11, z11+(-.45u, .8u)); + %sketch cb_kha_p softjoin vm_e_pb ; + sketch vm_e_pb ; + pivot_message(1.99u); + endtchar; etest; +enddef; + +def CVGE= + stest(cvge); kanchar "consonant+vowel e ga+e"; + begintchar(cv_ge_code,cb_ga_width#,x_height#+2ascunit#,0,0,0,0); + cb_ga_form; + sketch cv_ge_p; + sketch cb_ga_p; + %vm_e_form; + endtchar; etest; +enddef ; + +def CVGHE = + stest(cvghe); kanchar "base of consonant gha+ Vowel modifer e"; + begintchar(cv_ghe_code,cb_pa_width#+1/2vm_u_width#,x_height#+.8u#,wedge_depth#,0,0,0); + cb_pa_form; + top lft z77=(1/2cb_pa_width-1/2c_height, top (x_height - c_height)); + %place_lit_circ(77, 1); + path new_path ; + + sketch cb_pa_p ; + top z10=1/2[z46,z46]; + wedge(10); + vm_ghu_form(48); + vm_e_form; + undraw vm_e_p; + path ct; + ct = vm_e_p scaled .75 shifted (2u, -u) rotated 0 ; + sketch ct; + + %pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CVCHE = + stest(cvche); kanchar "consonant+vowel e cha+e"; + begintchar(cv_che_code,cb_ja_width#,x_height#,0,0,0,0); + cb_ch_form; + vm_e_form_a(9,.6u, 1.u); + undraw cb_cha_pc ; + path vm_e_pa,vm_e_pb,vm_e_pc ; + vm_e_pa = vm_e_p reflectedabout(z9, z9+(.1u, .8u)); + vm_e_pb = vm_e_pa reflectedabout(z9, z9+(-.1u, .8u)); + sketch vm_e_pb ; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVCCHE= + stest(cvcche); kanchar "consonant+vowel e ccha+e"; + begintchar(cv_cche_code,cb_ja_width#,x_height#+2.6u#,0,0,0,0); + cb_cch_form; + wedge(8); + vm_e_form_a(11,.6u, 1.u); + path vm_e_pa,vm_e_pb,vm_e_pc ; + vm_e_pa = vm_e_p reflectedabout(z11, z11+(.1u, .8u)); + vm_e_pb = vm_e_pa reflectedabout(z11, z11+(-.28u, .8u)); + sketch vm_e_pb ; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVJE = + stest(cvje); kanchar "consonant+vowel e cbja+e"; + begintchar(cv_je_code,cb_ja_width#,x_height#+1.5u#,0,0,0,0); + cb_ja_form; + sketch cb_ja_pe; % puts bowl to ja. + %pivot_message(x3c,x7); + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVJHE = + stest(cvjhe); kanchar "consonant+vowel e cbjha+e"; + begintchar(cv_jhe_code,cb_ra_width#+2vm_u_width#,.9vm_e_heightx#, + wedge_depth#,0,0,0); + cb_ra_form; + % The next statement will identify the point on ra_form + % where the bowl will be attached. + z5 = (cb_ra_p) intersectionpoint ((x1,w_height)--(x1+w,w_height)); + vm_u_form(5); + z6 = z5b; + wedge(6); + z7 = z6; + vm_u_form(7); + w:=rt x7b; + sketch cv_re_p; + undraw bar_pa; + endtchar; etest; +enddef; + +def CVTTE= + stest(cvtte); kanchar "consonant+vowel e cbtta+e"; + begintchar(cv_tte_code,cb_tta_width#,x_height#,0,0,0,0); + cb_tta_form; + undraw cb_tta_p ; + sketch cb_tta_pe ; + endtchar; etest; +enddef ; + +def CVTTHE = + stest(cvtthe); kanchar "consonant+vowel e cbttha+e"; + begintchar(cv_tthe_code,cb_ra_width#,.9vm_e_heightx#,0,0,0,0); + cb_ra_form; + undraw bar_pa; + z10 = (x1,1/2x_height); + fill_dot(10); + sketch cv_re_p; + %pivot_message(x1,x1); + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVDDE= + stest(cvdde); kanchar "consonant+vowel e cbdda+e"; + begintchar(cv_dde_code,cb_da_width#,x_height#+1.7u#,0,0,0,0); + cb_dda_form; + undraw bar_pa ; + sketch cv_dde_p ; + %pivot_message(x1,x4); + endtchar; etest; +enddef ; + +def CVDDHE= + stest(cvddhe); kanchar "consonant+vowel e cbddha+e"; + begintchar(cv_ddhe_code,cb_da_width#,x_height#+1.7u#,0,0,0,0); + cb_dda_form; + sketch cv_dde_p ; + undraw bar_pa ; + wedge(3); + %pivot_message(x1,x4); + endtchar; etest; +enddef ; + +def CVTE= + stest(cvte); kanchar "consonant+vowel e cbta+e"; + begintchar(cv_te_code,cb_ta_width#,x_height#,0,0,0,0); + cb_ta_form; + sketch cb_te_p; + undraw bar_pa ; + %pivot_message(x10,x5); + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVTHE= + stest(cvthe); kanchar "consonant+vowel e cbtha+e"; + begintchar(cv_the_code,cb_da_width#,x_height#+1.9u#,wedge_depth#,0,0,0); + cb_da_form; + undraw bar_pa ; + wedge(4); + z10 = (x1,2/3x_height-uh); + fill_dot(10); + %pivot_message(x1,x4); + pivot_message(.199u); + sketch cv_de_p; + endtchar; etest; +enddef ; + +def CVDE= + stest(cvde); kanchar "consonant+vowel e cbda+e"; + begintchar(cv_de_code,cb_da_width#,x_height#+1.9u#,0,0,0,0); + cb_da_form; + undraw bar_pa ; + sketch cv_de_p; + %pivot_message(x1,x4); + endtchar; etest; +enddef ; + +def CVDHE= + stest(cvdhe); kanchar "consonant+vowel e cbda+e"; + begintchar(cv_dhe_code,cb_da_width#,x_height#+1.9u#,0,0,0,0); + cb_da_form; + undraw bar_pa ; + sketch cv_de_p; + wedge(4); + %pivot_message(x1,x4); + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVNE= + stest(cvne);kanchar "consonant+vowel e cbna+e"; + begintchar(cv_ne_code,cb_na_width#,x_height#,wedge_depth#,0,0,0); + cb_na_form; + sketch cb_ne_p; + undraw bar_pa ; + %pivot_message(x6,x6); + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVPE= + stest(cvpe); kanchar "consonant pa+ e"; + begintchar(cv_pe_code,cb_pa_width#,x_height#+.8u#,0,0,0,0); + cb_pa_form; + top lft z77=(1/2cb_pa_width-1/2c_height, top (x_height - c_height)); + sketch cb_pa_p; + vm_e_form; + undraw vm_e_p; + path ct; + ct = vm_e_p scaled .75 shifted (2u, -.5u) rotated 0 ; + sketch ct; + %pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CVPHE= + stest(cvphe); kanchar "consonant pha+ e"; + begintchar(cv_phe_code,cb_pa_width#,x_height#+.8u#,0,0,0,0); + cb_pa_form; + top lft z77=(1/2cb_pa_width-1/2c_height, top (x_height - c_height)); + sketch cb_pa_p; + top z10=1/2[z46,z46]; + wedge(10); + vm_e_form; + undraw vm_e_p; + path ct; + ct = vm_e_p scaled .75 shifted (2u, -.5u) rotated 0 ; + sketch ct; + %pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CVBE= + stest(cvbe); kanchar "consonant+vowel e cbba+e"; + begintchar(cv_be_code,cb_ba_width#,x_height#+1u#,0,0,0,0); + cb_ba_form; + undraw cb_ba_p; + sketch cb_be_p; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVBHE= + stest(cvbhe); kanchar "consonant+vowel e cbbha+e"; + begintchar(cv_bhe_code,cb_ba_width#,x_height#+1u#,0,0,0,0); + cb_ba_form; + undraw cb_ba_p; + sketch cb_be_p; + wedge(6); + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVME= + stest(cvme); kanchar "consonant+vowel e cbma+e"; + begintchar(cv_me_code,cb_pa_width#+vm_u_width#,x_height#,0,0,0,0); + cb_va_form; + sketch cb_ve_p; + z65 = (cb_va_p) intersectionpoint ((x46,.8w_height)--(x46+cb_pa_width,.8w_height)); + vm_u_form(65); + undraw bar_pa ; + %w:=rt x3b; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVYE= + stest(cvye); kanchar "consonant+vowel e cbya+e"; + begintchar(cv_ye_code,cb_ya_width#+vm_u_width#,x_height#+1.5u#,0,0,0,0); + cb_ya_form; + undraw cb_ya_pb ; + undraw bar_p ; + draw cb_ye_p ; + endtchar; etest; +enddef; + +def CVRE = + stest(cvre); kanchar "consonant+vowel e cbra+e"; + begintchar(cv_re_code,cb_ra_width#,x_height#,0,0,0,0); + cb_ra_form; + sketch cv_re_p; + undraw bar_pa ; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVLE = + stest(cvle); kanchar "consonant+vowel e cbla+e"; + begintchar(cv_le_code,cb_la_width#,x_height#+1u#,0,0,0,0); + cb_la_form; + sketch cb_le_p; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVCE= + stest(cvce); kanchar "consonant+vowel e cbca+e"; + begintchar(cv_ce_code,cb_ca_width#,x_height#,0,0,0,0); + cb_ca_form; + draw cb_ce_p; + undraw bar_pa ; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVLLE = + stest(cvlle); kanchar "consonant+vowel e cblla+e"; + begintchar(cv_lle_code,cb_lla_width#,x_height#,0,0,0,0); + cb_lla_form; + sketch cb_lle_p; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVVE= + stest(cvve); kanchar "consonant+vowel e cbma+e"; + begintchar(cv_ve_code,cb_pa_width#,x_height#,0,0,0,0); + cb_va_form; + sketch cb_ve_p; + z65 = (cb_va_p) intersectionpoint ((x46,.8w_height)--(x46+cb_pa_width,.8w_height)); + undraw bar_pa ; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVVU= + stest(cvvu); kanchar "consonant va+u"; + begintchar(cv_vu_code,cb_pa_width#+.6vm_u_width#,x_height#,.5des_depth#,0,0,0); + cb_va_form; + sketch cb_va_p ; + %pivot_message(x46,x400); + cv_vu_form(46); + pivot_message(x301); + endtchar; etest; +enddef ; + +def CVVUU= + stest(cvvuu); kanchar "consonant va+uu"; + begintchar(cv_vuu_code,cb_pa_width#+.8vm_uu_width#,x_height#,.5des_depth#,0,0,0); + cb_va_form; + sketch cb_va_p ; +cv_vuu_form(46); + pivot_message(x301); + endtchar; etest; +enddef ; + +def CVSHE= + stest(cvshe); kanchar "consonant sha+e"; + begintchar(cv_she_code,cb_pa_width#,x_height#+.8u#,0,0,0,0); + cb_sha_form; + sketch cb_pa_p; + sketch cb_sha_pb; + undraw pl_lit_cir_p ; + undraw bar_pa; %cb_ka_pc; + vm_e_form; + undraw vm_e_p; + path ct; + ct = vm_e_p scaled .75 shifted (2u, -.5u) rotated 0 ; + sketch ct; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CVSE = + stest(cvse); kanchar "consonant sa+e"; + begintchar(cv_se_code,cb_na_width#,x_height#+.8u#,0,0,0,0); + cb_sa_form; + sketch cb_sa_p; + undraw pl_lit_cir_p ; + undraw bar_pa; %cb_ka_pc; + vm_e_form; + undraw vm_e_p; + path ct; + ct = vm_e_p scaled .75 shifted (1.8u, -.5u) rotated 0 ; + sketch ct; + pivot_message(.199u); + endtchar; etest; +enddef ; + +def CVHE = + stest(cvhe); kanchar "consonant ha+e"; + begintchar(cv_he_code,cb_ha_width#,x_height#+1.8u#,0,0,0,0); + cb_ha_form; + vm_e_form; + undraw bar_pa; %cb_ka_pc; + undraw cb_ha_pa ; + undraw vm_e_p; + path ct; + ct = vm_e_p scaled .75 shifted (.26u, +.5u) rotated 0 ; + sketch ct; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +def CVKSHE = + stest(cvkshe); kanchar "base of consonant ksha+vowel modifer e"; + begintchar(cv_kshe_code,cb_ka_width#,x_height#,cb_ksha_depth#,0,0,0); + cb_ksha_form; + %sketch cb_kha_p; + sketch cb_ka_pa; + sketch cb_ka_pb; + sketch cb_ka_pc; + undraw bar_pa; %cb_ka_pc; + vm_e_form_a(8,.1u, .3u); %sketch vm_e_p; + path vm_e_pa,vm_e_pb,vm_e_pc ; + vm_e_pa = cb_ka_pc softjoin vm_e_p; + sketch vm_e_pa; + pivot_message(x301,x400); + endtchar; etest; +enddef ; + +% ----------------End of Kannada Vowel modifed Consonants(special)---------- + +% ---------- start of ubayaksharas ----------- + + +%stest(uas); kanchar "accent ardhasunna"; +%begintchar(u_ardhasunna_code,x_height#/2,x_height#,0,0,0,ur#); +%top rt z2=(w,h); bot rt z1=(w,0); lft z3=(0,h/2); +%sketch z1..z3..z2; +%endtchar; etest; + + stest(uss); kanchar "accent s"; + begintchar(u_uss_code,x_height#,x_height#,0,0,0,0); + cb_dollar_form ; + cc_clear; cc_transform(dol_p); + cc_whd(1,0); + endtchar; etest; + + stest(us); kanchar "accent sunna"; + begintchar(u_sunna_code,x_height#,x_height#,0,0,0,ur#); + top z2=(w/2,h); bot z1=(x2,0); + sketch z1..z2..cycle; + endtchar; etest; + + stest(uvi); kanchar "accent visarga"; + begintchar(u_visarga_code,2/5x_height#,x_height#,0,0,0,ur#); + top z2 = (w/2,h); bot z1 =(x2,3h/5); + path puvi; + puvi= z1..z2..cycle; + sketch puvi; sketch puvi shifted (0,-2h/3); + endtchar; etest; + +%stest(uav); kanchar "accent ardhavisarga"; +%begintchar(u_ardhavisarga_code,2/5x_height#,x_height#,0,0,0,ur#); +%path puav; +%top z2 = (w/2,h); bot z1 =(x2,3h/5); +%puav = subpath (0.25,1.75) of (z1..z2..cycle); +%sketch puav;sketch puav shifted (0,-2h/3); +%endtchar; etest; + +%stest(ua); kanchar "accent avagraha"; +%begintchar(u_avagraha_code,kfig_width#,x_height#,0,0,0,ur#); +%top lft z1=(0,h); lft z2=(0,h/4); z3=(w/2,(y1+y2)/2); +%bot lft z4=(0,0); bot rt z5=(w,0); +%sketch flex (z1,z3,z2,z4)& z4--z5; +%endtchar; etest; + +% ----------- end of ubhayaksharas ---------- + +%----------- Begin of bars used for transliteration of vedic hymns------------- + + stest(buone); kanchar "b udatta(one bar)"; + begintchar(b_udatta1_code,u#,top_accent#+3uh#,0,0,0,0); + bot z1=(w/2,top_accent); top z2=(x1,h); + sketch z1--z2; + pivot_message((w/2)); + endtchar; etest; + + stest(butwo); kanchar "b udatta (two bars)"; + begintchar(b_udatta2_code,3.5u#,top_accent#+3uh#,0,0,0,0); + bot z1=(w/4,top_accent); top z2=(x1,h); + bot z3=(w/4+w/2,top_accent); z4=z2+(w/2,0); + sketch z1--z2; sketch z3-- z4; + pivot_message((w/2)); + endtchar; etest; + + stest(ba); kanchar "b anudatta"; + begintchar(b_anudatta_code,4u#,0,0,0,0,0); + % d is set later + top lft z1=(0,-bot_accent);top rt z2=(w,-bot_accent); + sketch z1--z2; + d:=- (bot y1); + pivot_message((w/2)); + endtchar; etest; + +%----------- end of fonts for vedic hymns--------------- + +% kannada digits and punctuation symbols +% +% --------- start of roman digits ------------ + +def DRZERO = + stest(drzero); kanchar "Roman digit zero"; + begintchar(dr_zero_code,7u#,fig_height#,0,0,0,ur#); + top z1=(w/2,h); lft z2=(0,1/2h); + bot z3=(w/2,0); rt z4=(w,1/2h); + sketch superellipse(z4,z1,z2,z3,0.707); + endtchar; etest; +enddef; + +def DRONE = + stest(drone); kanchar "Roman digit one"; + begintchar(dr_one_code,4u#,fig_height#,0,0,0,ur#); + bot lft z1=(0,0); bot rt z2=(w,0); top z3=(x5,h); + lft z4=(x1,x_height+uh); bot z5=1/2[z1,z2]; + sketch z1--z2; sketch z3--z5; + sketch z4..{up}z3; + endtchar; etest; +enddef; + +def DRTWO = + stest(drtwo); kanchar "Roman digit two"; + begintchar(dr_two_code,7u#,fig_height#,0,0,0,ur#); + bot lft z1=(0,0); bot rt z2=(w,0); lft z3=(0,x_height); + top z4=(w/2,h); rt z5=(w,y3); + sketch z1--z2; sketch z3..z4..z5..{-1,-1}z1; + endtchar; etest; +enddef; + +def DRTHREE = + stest(drthree); kanchar "Roman digit three"; + begintchar(dr_three_code,7u#,fig_height#,0,0,0,ur#); + path pa; + top lft z1=(0,3/4h); top z2=(w/2,h); + rt z3=(w,y1); z4=(w/2-u,1/2h); + pa= z1..z2..z3..{(-1,0)}z4; + sketch pa; sketch pa reflectedabout (z4,(w,y4)); + endtchar; etest; +enddef; + +def DRFOUR = + stest(drfour); kanchar "Roman digit four"; + begintchar(dr_four_code,7u#,fig_height#,0,0,0,ur#); + bot z1=(w-1.5u,0); top z2=(x1,h); + lft z3=(0,w_height); rt z4=(w,y3); + bot z1a=(x1-(x4-x1),0); bot z1b=(x4,0); + sketch z1a--z1b; sketch z1--z2; + sketch z3--z2; sketch z3--z4; + penlabels(1a,1b); + endtchar; etest; +enddef; + +def DRFIVE = + stest(drfive); kanchar "Roman digit five"; + begintchar(dr_five_code,7u#,fig_height#,0,0,0,ur#); + top rt z1=(w,h); top lft z2=(0,h); lft z3=(0,6/10h); + z4=(1/2w,y3+uh); rt z5=(w,(y4+y6)/2); bot z6=(x4,0); lft z7=(0,1/4h); + sketch z1--z2; sketch z2--z3; + sketch z3..z4..z5..z6..z7; + endtchar; etest; +enddef; + +def DRSIX = + stest(drsix); kanchar "Roman digit six"; + begintchar(dr_six_code,6u#,fig_height#,0,0,0,ur#); + dr_sixnine_form; + sketch dr_sixnine_p; + endtchar; etest; +enddef; + +def DRSEVEN = + stest(drseven); kanchar "Roman digit seven"; + begintchar(dr_seven_code,7u#,fig_height#,0,0,0,ur#); + top lft z1=(0,h); top rt z3=(w,h); + bot z4=(1/4w,0); + sketch z1--z3{(-1,-1)}..{down}z4; + endtchar; etest; +enddef; + +def DREIGHT = + stest(dreight); kanchar "Roman digit eight"; + begintchar(dr_eight_code,7u#,fig_height#,0,0,0,ur#); + top z1=(w/2,h); z2=(x1,0.6h); + bot z3=(x1,0); lft z4=(0,y2/2); rt z5=(w,y4); + z6=(x4+u,1/2(y1+y2)); z7=(w-u,y6); + sketch superellipse(z7,z1,z6,z2,0.707); + sketch superellipse(z5,z2,z4,z3,0.707); + endtchar; etest; +enddef; + +def DRNINE = + stest(drnine); kanchar "Roman digit nine"; + begintchar(dr_nine_code,6u#,fig_height#,0,0,0,ur#); + dr_sixnine_form; + bot lft z10 = z1; + sketch dr_sixnine_p rotatedaround(z10,-180) shifted(-w,-h); + endtchar; etest; +enddef; + +%---------------------end of roman digits------------------------ + +% ------------- start of kannada digits ------------ + +def DKZERO = + stest(dkzero); kanchar "kannada digit zero"; + begintchar(dk_zero_code,kfig_width#,kfig_height#,0,0,0,ur#); + top z1=(w/2,h); lft z2=(0,h/2); bot z3=(x1,0); rt z4=(w,y2); + sketch superellipse(z4,z1,z2,z3,0.707); + endtchar; etest; +enddef; + +def DKONE = + stest(dkone); kanchar "kannada digit one"; + begintchar(dk_one_code,kfig_width#,kfig_height#,0,0,0,ur#); + bot z1=(w/4,0); lft z2=(0,h/2); top z3=(w/2,h); + rt z4=(w,h/2); bot z5=(w-(w/4),0); + sketch z1..tension 1.2..z2..z3..z4..tension 1.2..z5; + endtchar; etest; +enddef; + +def DKTWO = + stest(dktwo); kanchar "kannada digit two"; + begintchar(dk_two_code,kfig_width#,kfig_height#,0,0,0,ur#); + z1=(3w/5+.75u,5h/6); z2=(x1-.75u,4h/6); z3=(w/2,y1); + top z4=(x1,h); z5=((x8+x1)/2,y3); bot z6=(x1,0); + bot lft z7=(0+u,0);rt z8=(w,h/2); + sketch z1..z2..z3..z4..z8..{(-1,0)}z6--z7; + endtchar; etest; +enddef; + + +def DKTHREE = + stest(dkthree); kanchar "kannada digit three"; + begintchar(dk_three_code,kfig_width#-2u#,kfig_height#,0,0,0,ur#); + path pa; + %lft z1=(0,4h/5); top z2=(w/2,h); top z3=(4w/5,h); + %rt z4=(w,3h/4); z5=(3w/4,h/2); z6=(w/3,h/2); + %pa= z1..z2..z3..z4..z5; + %sketch pa; sketch pa reflectedabout(z5,z6); + %sketch z5--z6; + cb_kha_form; + path dkg_three ; + dkg_three = z1..z2..z3..z4..z5..z6..z7..z8..z9; + sketch dkg_three ; + endtchar; etest; +enddef; + +def DKFOUR = + stest(dkfour); kanchar "kannada digit four"; + begintchar(dk_four_code,kfig_width#-2u#,kfig_height#,0,0,0,ur#); + %top z1=(w/5,h); lft z2=(0,2h/3); z4=(w/2,h/3); + %bot z5=(x4,0); z3=(w/3,1/2(y4+y5)); + %forsuffixes s=6,7,8: + % z.s=z.[s-5] reflectedabout(z4,z5); endfor; + %sketch z1..z2..z4..z7..z6; + %sketch z4..z3..z5..z8..z4; + cb_lla_form; + sketch cb_lla_p ; + endtchar; etest; +enddef; + +def DKFIVE = + stest(dkfive); kanchar "kannada digit five"; + begintchar(dk_five_code,kfig_width#,kfig_height#,0,0,0,ur#); + %lft z1=(0,8h/10); lft z2=(0,3h/10); z3=(2w/3,(y1+y2)/2); + %top z11=(w/3,h); z12 = z11 reflectedabout ((0,y3),(w,y3)); + %sketch z1..z11..z3..z12..z2; + %top z4=(x3+(w-x3)/2,h); + %rt z5=(w,(y3+y4)/2); + %bot z7=(x4,0); rt z8=(x9,y9-uh); rt z9=(w,y2); + %sketch z3..z5..z4..z3..z7..z8..z9; + dk_five_form ; + + endtchar; etest; +enddef; + +def DKSIX = + stest(dksix); kanchar "kannada digit six"; + begintchar(dk_six_code,kfig_width#,kfig_height#,0,0,0,ur#); + dk_six_form; + endtchar; etest; +enddef; + +def DKSEVEN = + stest(dkseven); kanchar "kannada digit seven"; + begintchar(dk_seven_code,kfig_width#-2u#,kfig_height#,0,0,0,ur#); + %lft z1=(0,3h/4); top z2=(w/2,h); rt z3=(w,y1); z4=(w/2,h/2); + %forsuffixes i=6,7,8: + % z.i=z.[i-5] rotatedaround (z4,0); + %endfor; + z1 = (.5w, .75h) ; top z2 = (.3w, .95h) ; + top z3 = (x1+u, y1) ; lft z4 = (0, .2h) ; + bot z5 = (.1w, 0) ; bot z6 = (w, 0) ; + sketch z1..z2..z3..tension 1.1..z4...z5--z6 ; + endtchar; etest; +enddef; + + +def DKEIGHT = + stest(dkeight); kanchar "kannada digit eight"; + begintchar(dk_eight_code,kfig_width#+u#,kfig_height#,0,0,0,ur#); + z1 =(.2w, .75h) ; top z2 = (.3w, h) ; z2a = (.075w, .75h) ; + lft z3 = (.0w, .5h) ; bot z4 = (.35w, .03h ) ; + rt z5 = (.9w, .45h) ; z6 = (.7w, .8h) ; + top z7 = (.75w, h) ; rt top z8 = (w, h) ; + sketch z1..z2..z2a..z3..z4...z5..z6...z7--z8 ; + + sketch z1 ; sketch z2; sketch z3; sketch z4 ; ;sketch z5; sketch z6; sketch z7; + endtchar; etest; +enddef; + +def DKNINE = + stest(dknine); kanchar "kannada digit nine"; + begintchar(dk_nine_code,kfig_width#,kfig_height#,0,0,0,ur#); + rt top z1 = (w, h) ; top z2 = (.25w, h) ; z2a = (.05w, .9h) ; + lft z3 = (0, .75h) ; z4 = (.2w, .4h) ; + z6 = (x4, .6h) ; z5 = ( .35w, (y4+y6)/2) ; + lft z7 = (0, .25h) ; bot z8 = (.2w, 0) ; + bot z9 = (.3w, 0 ) ; + sketch z1---z2..z3..z4..z5..z6..z7...z8---z9 ; + + endtchar; etest; +enddef; + +% end of kannada digits + +% --------- start of punctuation ---------- + +def PPERIOD = + stest(pperiod); kanchar "punctuation period"; + begintchar(p_period_code,2*dot_radius#,2*dot_radius#,0,0,0,ur#); + z1=(dot_radius,dot_radius); + fill_dot(1); + endtchar; etest; +enddef; + +def PCOMMA = + stest(pcomma); kanchar "punctuation comma"; + begintchar(p_comma_code, p_comma_width#,2*dot_radius#,des_depth#,0,0,ur#); + p_comma_form; + endtchar; etest; +enddef; + +def PEQUAL = + stest(pequal); kanchar "punctuation equal"; + begintchar(p_equal_code,10u#,3/4x_height#,0,0,0,ur#); + top lft z1=(0,h); top rt z2=(w,h); + bot lft z3=(0,1/4x_height); bot rt z4=(w,1/4x_height); + sketch z1--z2; sketch z3--z4; + endtchar; etest; +enddef; + +def PBAR = + stest(pbar); kanchar "punctuation vertical bar"; + begintchar(p_bar_code,u#,x_height#,0,0,0,ur#); + p_bar_form; + sketch p_bar_p; + endtchar; etest; +enddef; + +def PDBAR = + stest(pdbar); kanchar "punctuation double bar"; + begintchar(p_dbar_code,2.5u#,x_height#,0,0,0,ur#); + p_bar_form; + sketch p_bar_p;sketch p_bar_p reflectedabout ((w/2,0),(w/2,h)); + endtchar; etest; +enddef; + +def PCOLON = + stest(pcolon); kanchar "punctuation colon"; + begintchar(p_colon_code,2*dot_radius#,x_height#,0,0,0,ur#); + z1=(dot_radius,dot_radius); + fill_dot(1); + z2=(x1,x_height-dot_radius); + fill_dot(2); + endtchar; etest; +enddef; + +def PSCOLON = + stest(pscolon); kanchar "punctuation semicolon"; + begintchar(p_scolon_code,p_comma_width#,x_height#,des_depth#,0,0,ur#); + p_comma_form; + z5=(x1,x_height-dot_radius); + fill_dot(5); + endtchar; etest; +enddef; + +def PCQUOTE = + stest(pcquote); kanchar "punctuation closing quote"; + begintchar(p_cquote_code,p_comma_width#,asc_height#,0,0,0,ur#); + p_comma_form; + erase fill fill_dot_p; erase sketch p_comma_p; + fill fill_dot_p shifted (0,asc_height-2*dot_radius); + sketch p_comma_p shifted (0,asc_height-2*dot_radius); + endtchar; etest; +enddef; + +def PCQUOTES = + stest(pcquotes); kanchar "punctuation closing quotes"; + begintchar(p_cquotes_code,2*p_comma_width#+u#,asc_height#,0,0,0,ur#); + p_comma_form; + erase fill fill_dot_p; erase sketch p_comma_p; + fill fill_dot_p shifted (0,asc_height-2*dot_radius); + sketch p_comma_p shifted (0,asc_height-2*dot_radius); + fill fill_dot_p shifted (0,asc_height-2*dot_radius) + shifted (p_comma_width+u,0); + sketch p_comma_p shifted (0,asc_height-2*dot_radius) + shifted (p_comma_width+u,0); + endtchar; etest; +enddef; + +def POQUOTE = + stest(poquote); kanchar "punctuation opening quote"; + begintchar(p_oquote_code,p_comma_width#,asc_height#,0,0,0,ur#); + p_comma_form; + erase fill fill_dot_p; erase sketch p_comma_p; + lft z5 = z2; + top rt z6 =z3; + fill fill_dot_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6)); + sketch p_comma_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6)); + endtchar; etest; +enddef; + +def POQUOTES = + stest(poquotes); kanchar "punctuation opening quotes"; + begintchar(p_oquotes_code,2*p_comma_width#+u#,asc_height#,0,0,0,ur#); + p_comma_form; + erase fill fill_dot_p; erase sketch p_comma_p; + lft z5 = z2; + top rt z6 =z3; + fill fill_dot_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6)); + sketch p_comma_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6)); + fill fill_dot_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6)) + shifted(p_comma_width+u,0); + sketch p_comma_p rotatedaround (z5,-180) shifted(-x5,asc_height-abs(y6)) + shifted(p_comma_width+u,0); + endtchar; etest; +enddef; + +def PDQUOTES = + stest(pdquotes);kanchar "punctuation double quotes"; + begintchar(p_dquotes_code,4.5u#,asc_height#,0,0,0,ur#); + top lft z1=(1.5u,h); bot lft z2=(0,x_height); + top rt z3=(w,h); bot rt z4=(x1+1.5u,x_height); + sketch z1--z2; sketch z3--z4; + endtchar; etest; +enddef; + +%stest(pdquotes);kanchar "punctuation double quotes"; +%begintchar(p_dquotes_code,2*dot_radius#+u#,asc_height#,0,0,0,ur#); +%%begintchar(p_dquotes_code,4*dot_radius#+u#,asc_height#,0,0,0,ur#); +%path pa; +%%z1=(dot_radius,h-dot_radius);z1l=(0,y1);z1r=(2x1,y1);z1t=(x1,h); +%z1=(dot_radius/2,h-dot_radius/2);z1l=(0,y1);z1r=(2x1,y1);z1t=(x1,h); +%z2=(x1,x_height); +%%z2=(x1,x_height);z2l=(dot_radius/2,y2);z2r=(x2+(x2-x2l),y2); +%%pa= z2l--z1l & flex(z1l,z1t,z1r) & z1r--z2r--cycle; fill pa; +%pa= z2--z1l & flex(z1l,z1t,z1r) & z1r--z2--cycle; filldraw pa; +%filldraw pa shifted(dot_radius+u,0); +%%fill pa shifted(2dot_radius+u,0); +%endtchar; etest; + +def PSLASH = + stest(pslash); kanchar "punctuation virgule (slash)"; + begintchar(p_slash_code,6u#,asc_height#,des_depth#,0,0,ur#); + p_slash_form; + sketch p_slash_p; + endtchar; etest; +enddef; + +def PHASH = + stest(phash); kanchar "punctuation hash mark (number sign)"; + begintchar(p_hash_code,12u#,asc_height#,des_depth#,0,0,ur#); + numeric midpoint; + midpoint = (-des_depth+asc_height)/2; + lft z1=(0,midpoint+2u); rt z2=(w,y1); + lft z3=(0,midpoint-2u); rt z4=(w,y3); + bot z5=(2u,-d); top z6=(x5+4u,h); + z7=(x5+4u,y5); z8=(x7+4u,y6); + sketch z1--z2; sketch z3--z4; + sketch z5--z6; sketch z7--z8; + endtchar; etest; +enddef; + +%stest(pexcla); kanchar "punctuation exclamation point"; +%begintchar(p_excla_code,dot_radius#,asc_height#,0,0,0,ur#); +%pickup pencircle; +%z1=(dot_radius/2,dot_radius/2); +%filldraw fullcircle scaled 2x1 shifted z1; +%z2=(x1,5*y1); z3 =(x1,h-y1); +%z2l=(x1-dot_radius/4,y2); z2r=(x1+dot_radius/4,y2); +%z3l=(0,y3); z3r=(x1+dot_radius/2,y3); z3t=(x1,h); +%filldraw z2l--z3l & flex(z3l,z3t,z3r) & z3r--z2r--cycle; +%endtchar; etest; + +def PEXCLA = + stest(pexcla); kanchar "punctuation exclamation point"; + begintchar(p_excla_code,dot_radius#,asc_height#,0,0,0,ur#); + z1=(dot_radius,dot_radius); + fill_dot(1); + fill fullcircle scaled 2x1 shifted z1; + top z2=(x1,h); bot z3 =(x1,4*y1); + sketch z2--z3; + endtchar; etest; +enddef; + +def PASTERISK = + stest(pasterisk); kanchar "punctuation asterisk"; + begintchar(p_asterisk_code,x_height#,x_height#,0,0,0,ur#); + z1=(1/2w,1/2h); + for d=30 step 60 until 330: + z[d]=z1+0.5 dir d xscaled w yscaled h; + sketch z1--z[d]; + penlabels(z[d]); + endfor; + endtchar; etest; +enddef; + +def PPLUS = + stest(pplus); kanchar "punctuation plus"; + begintchar(p_plus_code,x_height#,x_height#,0,0,0,ur#); + lft z1=(0,h/2); rt z2=(w,y1); top z3=(w/2,h); bot z4=(x3,0); + sketch z1--z2; sketch z3--z4; + endtchar; etest; +enddef; + + +def PLBRACKET = + stest(plbracket); kanchar "punctuation left bracket"; + begintchar(p_lbracket_code,3u#,top_height#,bot_depth#,0,0,ur#); + p_lbracket_form; + sketch p_lbracket_p; + endtchar; etest; +enddef; + +def PRBRACKET = + stest(prbracket); kanchar "punctuation right bracket"; + begintchar(p_rbracket_code,3u#,top_height#,bot_depth#,0,0,ur#); + p_lbracket_form; + sketch p_lbracket_p shifted (-w,0) reflectedabout ((0,0),(0,h)); + endtchar; etest; +enddef; + +def PLPAREN = + stest(plparen); kanchar "punctuation left parenthesis"; + begintchar(p_lparen_code,3u#,top_height#,bot_depth#,0,0,ur#); + p_rparen_form; + sketch p_rparen_p shifted (-w,0) reflectedabout ((0,0),(0,h)); + endtchar; etest; +enddef; + +def PRPAREN = + stest(prparen); kanchar "punctuation right parenthesis"; + begintchar(p_rparen_code,3u#,top_height#,bot_depth#,0,0,ur#); + p_rparen_form; + sketch p_rparen_p; + endtchar; etest; +enddef; + +def PLBRACE = + stest(plbrace); kanchar "punctuation left brace"; + begintchar(p_lbrace_code,4u#,top_height#,bot_depth#,0,0,ur#); + p_lbrace_form; + sketch p_lbrace_p; + endtchar; etest; +enddef; + +def PRBRACE = + stest(prbrace); kanchar "punctuation right brace"; + begintchar(p_rbrace_code,4u#,top_height#,bot_depth#,0,0,ur#); + p_lbrace_form; + sketch (p_lbrace_p shifted (-w,0) reflectedabout ((0,0),(0,h)) ); + endtchar; etest; +enddef; + +def PPERCENT = + stest(ppercent); kanchar "punctuation percent sign"; + begintchar(p_percent_code,6u#,asc_height#,des_depth#,0,0,ur#); + p_slash_form; + sketch p_slash_p; + z3=(3(x1+x2)/8,-d+7/8(h+d)); + z4=(w-x3,-d+(h-y3)); + sketch fullcircle scaled (1.5u) shifted z3; + sketch fullcircle scaled (1.5u) shifted z4; + endtchar; etest; +enddef; + +def PBSLASH = + stest(pbslash); kanchar "punctuation backslash"; + begintchar(p_bslash_code,6u#,asc_height#,des_depth#,0,0,ur#); + p_slash_form; + sketch p_slash_p reflectedabout ((w/2,h),(w/2,0)); + endtchar; etest; +enddef; + +def PLBAR = + stest(plbar); kanchar "punctuation long bar"; + begintchar(p_lbar_code,u#,asc_height#,des_depth#,0,0,ur#); + top z1=(w/2,h); bot z2=(x1,-d); + sketch z1--z2; + endtchar; etest; +enddef; + +def PHYPHEN = + stest(phyphen); kanchar "punctuation hyphen"; + begintchar(p_hyphen_code,6u#,1/2x_height#,0,0,0,ur#); + top lft z1=(0,h); top rt z2=(w,h); + sketch z1--z2; + endtchar; etest; +enddef; + +def PLHYPHEN = + stest(plhyphen); kanchar "punctuation long hyphen"; + begintchar(p_lhyphen_code,9u#,1/2x_height#,0,0,0,ur#); + top lft z1=(0,h); top rt z2=(w,h); + sketch z1--z2; + endtchar; etest; +enddef; + +def PVLHYPHEN = + stest(pvlhyphen); kanchar "punctuation very long hyphen"; + begintchar(p_vlhyphen_code,15u#,1/2x_height#,0,0,0,ur#); + top lft z1=(0,h); top rt z2=(w,h); + sketch z1--z2; + endtchar; etest; +enddef; + +def PUBAR = + stest(pubar); kanchar "punctuation underbar"; + begintchar(p_ubar_code,x_height#,0,uh#,0,0,ur#); + bot lft z1=(0,-d); bot rt z2=(w,-d); + sketch z1--z2; + endtchar; etest; +enddef; + +def PQUESTION = + stest(pquestion); kanchar "punctuation question mark"; + begintchar(p_question_code,6u#,asc_height#,0,0,0,ur#); + lft z1=(0,h-2dot_radius); top z2=(w/2,h); + rt z3=(w,y1); z4=(x2,1/2x_height); + z5=(x2,1/3(y2+y4)); z6=(x2,dot_radius);fill_dot(6); + sketch z1..z2..z3..z5..tension 1.5..z4; + endtchar; etest; +enddef; + +def PDOLLAR = + stest(pdollar); kanchar "punctuation dollar sign"; + begintchar(p_dollar_code,cb_ka_width#,x_height#+1.5uh#,1.5uh#,0,0,ur#); + cb_dollar_form; + sketch dol_p ; + top z11 = (w/2,h); bot z12 = (w/2,-d); + sketch z11--z12; + endtchar; etest; +enddef; + +def PGREATER = + stest(pgreater); kanchar "punctuation greater than"; + begintchar(p_greater_code,7u#,x_height#,0,0,0,ur#); + bot lft z1=(0,0); top lft z2=(0,x_height); rt z3=(w,1/2(y1+y2)); + sketch z1--z3; sketch z2--z3; + endtchar; etest; +enddef; + +def PLESS = + stest(pless); kanchar "punctuation less than"; + begintchar(p_less_code,7u#,x_height#,0,0,0,ur#); + bot rt z1=(w,0); top rt z2=(w,x_height); lft z3=(0,1/2(y1+y2)); + sketch z1--z3; sketch z2--z3; + endtchar; etest; +enddef; + +def PAT = + stest(pat); kanchar "punctuation at sign"; + begintchar(p_at_code,10u#,asc_height#,0,0,0,ur#); + z1=(w/2,3/4h); z2=(1/5w,1/2h); + z3=(x1,1/4h); z4=(4/5w,5/8h); + z5=(4/5w,3/8h); z6=(9/10w,y3); + rt z7=(w,y2); top z8=(x1,h); + lft z9=(0,y2); bot z10=(x1,0); rt z11=(x7,1/8h); + sketch z5..z3..z2..z1..z4&z4--z5& z5..z6..z7{up}..{left}z8..z9..z10..z11; + endtchar; etest; +enddef; + +def PTILDE = + stest(ptilde); kanchar "punctuation tilde sign"; + begintchar(p_tilde_code,9u#,asc_height#,0,0,0,ur#); + top lft z1=(0,asc_height2); top z2=(w/3,h); + z3=(2/3w,y1); top rt z4=(w,y2); + sketch z1..z2..z3..z4; + endtchar; etest; +enddef; + +def PHAT = + stest(phat); kanchar "punctuation circumflex(hat)"; + begintchar(p_hat_code,5u#,asc_height#,0,0,0,ur#); + lft z1=(0,asc_height1); rt z2=(w,y1); top z3=(1/2(x1+x2),h); + sketch z1--z3; sketch z3--z2; + endtchar; etest; +enddef; + +def PAMPERSAND = + stest(pampersand); kanchar "punctuation ampersand"; + begintchar(p_ampersand_code,11u#,asc_height#,0,0,0,ur#); + rt z11=(w,1/4x_height); bot z10=(3/4w,0); + z1=(x10+u,x_height); y1a=y1; x1-x1a=w-x1; rt z1b=(w,x_height); + bot z2=(w/4,0);lft z3=(0,y11); z4=(w/8,1/2x_height+uh); + z5=(x2,3/4x_height); z6=(w/2,asc_height1); + top z7=(5/12w,h); z8=(5/24w,y6); %z9=(x7,1/2x_height); + sketch z1a--z1b; + sketch z1..{left}z2..z3..z4..z5..z6..z7..z8..z5..z10..z11; + penlabels (1a,1b); + endtchar; etest; +enddef; + +% ---------------- end of punctuation ------------ + +%-------Begin of glyps to demonstrate conjunctions and vowel modifers----- +def BOXA = + stest(cbbb); kanchar "consonant blackbox(bb)"; + %This is not really a letter in Kannada. However this character + % is useful for demonstrating vowel modifiers, cons. conjuncts, accents etc. + begintchar(cb_bb_code,0.2em_width#,0.8x_height#,0.25x_height#,0,0,0); + fill (0,-d)--(w,-d)--(w,h)--(0,h)--cycle; + pivot_message((w/2),(w/2)); + endtchar; etest; +enddef ; + +def BOXB = + stest(cbbo); kanchar "consonant outlinebox(bo)"; + %This is not really a letter in Kannada. However this character + % is useful for demonstrating vowel modifiers, cons. conjuncts, accents etc. + begintchar(cb_bo_code,0.2em_width#,x_height#,0,0,0,0); + bot lft z1=(0,-d);bot rt z2=(w,-d);top rt z3=(w,h); top lft z4=(0,h); + z1a=(0,y1);z2a=(w,y2);z3a=(w,y3);z4a=(0,y4); + sketch z1--z4; sketch z2--z3; sketch z1a--z2a; sketch z4a--z3a; + cutoff(z1a,180);cutoff(z2a,0);cutoff(z3a,0);cutoff(z4a,180); + pivot_message((w/2),(w/2)); + endtchar; etest; +enddef ; + +def BOXC = + stest(cbbe); kanchar "consonant emptybox(be)"; + %This is not really a letter in Kannada. However this character + % is useful for demonstrating vowel modifiers, cons. conjuncts, accents etc. + begintchar(cb_be_code,0.2em_width#,x_height#,0,0,0,0); + pivot_message((w/2),(w/2)); + endtchar; etest; +enddef ; + +%-------End of glyps to demonstrate conjunctions and vowel modifers----- + +% ----------------Begin of Misc glyphs for emotional expression-------------- + +def SMILE = + stest(grin); kanchar "Grin face"; + begintchar(kn_spla_code,7u#,x_height#+u#,0,0,0,0); + top z1 = (w/2, h) ; rt z2 = (0, 1/2h) ; + bot z3 = (x1, 0) ; lft z4 = (w, 1/2h) ; + top z5 = (1/4w, 2/3h) ; top z6 = (3/4w, 2/3h) ; + fill_dotb(5) ; + fill_dotb(6) ; + sketch z1..z2..z3..z4..z1 ; + z7 = (x5+.15u, 1/3h); z8 = (w-x7, y7) ; + z9 = ((x7+x8)/2, .2h) ; + draw z7...z9...z8 ; + endtchar; etest; +enddef ; + +def FROWN = + stest(weep); kanchar "Weep face"; + begintchar(kn_splb_code,7u#,x_height#+u#,0,0,0,0); + top z1 = (w/2, h) ; rt z2 = (0, 1/2h) ; + bot z3 = (x1, 0) ; lft z4 = (w, 1/2h) ; + top z5 = (1/4w, 2/3h) ; top z6 = (3/4w, 2/3h) ; + fill_dotb(5) ; + fill_dotb(6) ; + sketch z1..z2..z3..z4..z1 ; + z7 = (x5+.15u, 1/3h); z8 = (w-x7, y7) ; + z9 = ((x7+x8)/2, .4h) ; + draw z7...z9...z8 ; + endtchar; etest; +enddef ; + +% ----------------End of Misc glyphs for emotional expression-------------- + + |