subroutine charbegin(var charno) % seven-bit character code (var charuw) % character width in units (var lftcorr, var rtcorr) % sidebar corrections in units (var charh, var chard, var chari): % \&{charht}, \&{chardp}, \&{charic} values in points no eqtrace; no calltrace; no drawdisplay; % no tracing in this subroutine new uw,moduw; % the correct character width in units new r; % raster-oriented character width new u; % raster-oriented design unit new tu; % unmodified raster-oriented unit new italcorr; % italic correction new lcorr,rcorr; % left and right corrections if chari0: italcorr=chari; else: italcorr=0; fi; if danger0: % rounding of character width is necessary lcorr=danger.round((lftcorr-ls)/danger); rcorr=danger.round((rtcorr-ls)/danger); else: lcorr=lftcorr-ls; rcorr=rtcorr-ls; fi; tu=pu.pixels; uw=charuw-(lcorr+rcorr); if fixwidth=0: moduw=uw; else: moduw=9; new italcorr; italcorr=0; fi; r=charuw.u=round((moduw.tu-2).charuw/uw); charcode charno; charic italcorr; if charh>0: charht charh; else: charht 0; fi; if chard>0: chardp chard; else: chardp 0; fi; charwd moduw.pu; chardw moduw.tu; incx round(-lcorr.u); if boxmode=1: call box(round lcorr.u); fi. input cyrnum; % numerals input cyrpunc; % punctuation symbols needed for cyrillic input cyrspec; % characters which aren't included in above... if fixwidth=0: texinfo slant, 6pu, 3pu, 2pu, px, 18pu, 2pu; else: texinfo slant, 9pu, 0, 0, px, 9pu, 9pu; fi; new k,kk,kkk,l; k=.5pu; kk=.25pu; kkk=.75pu; l=1.25pu; lig `a:`q kern -kkk,`u kern -k; lig `b:`b kern k,`e kern k,`f kern k,`h kern -kk,`o kern k, `s kern k,`u kern -k,'015 kern k; lig `c:`1='017,`d kern k,`h=`q; lig `d:`1='016,`2='012,`3='036,`d kern k,`j='016; % `z='036; This was the original way to get dzh lig, but % was not used because mr didn't want to put dots between d's and z's. lig `e:`1='013,`2='015,`b kern kkk,`e kern k,`f kern k,`h kern -k,`o kern k, `s kern k,`t kern kk,`u kern -kk,'015 kern k; lig `f:`b kern kkk,`e kern k,`h kern -k,'152 kern -k,`o kern k, `s kern k,`t kern kk,'015 kern k; lig `g:`b kern kk,`e kern kk,`o kern kk,`s kern kk,'015 kern kk; lig `h:`e kern -k,`o kern -k,`s kern -k,'015 kern -k; lig `i: `1 = '014; lig `j: `1 = '037, `2 = '030; lig `k:`u kern -kk, `h=`h; lig `l: `1 = '011,`j='011; lig `n: `1 = '010,`j = '010; lig `o:`b kern kkk,`e kern k,`h kern -k,`o kern k, `s kern k,`t kern kk,'015 kern k; lig `p:`1='176,`2='177; lig `r:`b kern kkk,`e kern k,`h kern -k,`o kern k, `s kern k,`t kern kk,'015 kern k; lig `s:`b kern kk,`e kern kk,`f kern kk, `o kern kk,`s kern kk,'015 kern kk,`h=`x; lig `t:`e kern kk,`o kern kk,`s = `c,'015 kern kk; lig `v: `b kern k, `e kern k,`o kern k, `s kern k, '015 kern k; lig `w:`d kern k; lig `x: `q = `w,`c=`7; %last one is step to build shch lig `y: `a = '037,`u='030; lig `z: `1 = '031,`b kern k,`e kern k,`o kern k,`s kern k,'015 kern k, `h = '031; lig '013:`b kern k,`e kern k,`h kern -k,`o kern k, `s kern k,`t kern kk,'015 kern k; %lig '026: `h='002, `H='002; % original way to get DZH (see comment at lig 'd) lig '030:`b kern k,`e kern k,`h kern -k,`o kern k,`s kern k,'015 kern k; lig '031:`u kern -kk; %lig '036: `h='012; % original way to get dzh (see comment at lig 'd) %%%%%%%% The following are two-step ligs built from unused chars in font: lig `7: `h=`w; % builds shch lig `6: `h=`W, `H=`W; % builds Shch lig `A:`q kern -kkk,'177 kern -kkk; lig `B:`f kern k,`o kern k,`s kern k,`u kern k,'015 kern k; lig `C: `1 = '007,`H=`Q,`h=`Q; lig `D: `1 = '006, `2 = '002,`3='026,`J='006,`j='006; % `z='026, `Z='026; % Original DZH - see comment at lig 'd) lig `E: `1 = '003, `2 = '005; lig `I: `1 = '004; lig `J: `1 = '027, `2 = '020; lig `K: `H = `H,`h=`H; lig `L: `1 = '001, `J = '001,`j='001; lig `N: `0 = '175, `1 = '000, `J='000,`j='000; lig `P: `1 = '136, `2 = '137; lig `G: `U:`a kern -l,`v kern -l,`g kern -l,`d kern -l,`e kern -l, `f kern -k,`h kern -l,`i kern -l,`j kern -l,`k kern -l, `l kern -l,`m kern -l,`n kern -l,`o kern -l,`p kern -l, `q kern -l,`r kern -l,`s kern -l,`t kern -l,`u kern -l, `w kern -l,`x kern -l,`y kern -l,`z kern -l,'030 kern -l, '031 kern -l,'176 kern -l,'177 kern -l,'013 kern -l, '015 kern -l; lig `S: `H = `X,`h=`X; lig `T: `S = `C,`s=`C, `a kern -l,`v kern -l,`g kern -l,`d kern -l,`e kern -l, `f kern -k,`h kern -l,`i kern -l,`j kern -l,`k kern -l, `l kern -l,`m kern -l,`n kern -l,`o kern -l,`p kern -l, `q kern -l,`r kern -l,`s kern -l,`t kern -l,`u kern -l, `w kern -l,`x kern -l,`y kern -l,`z kern -l,'030 kern -l, '031 kern -l,'176 kern -l,'177 kern -l,'013 kern -l, '015 kern -l; lig `V: `f kern k,`o kern k,`s kern k,'015 kern k; lig `X: `Q = `W,`q=`W, `c=`6,`C=`6; % These are step in building shch lig `Y: `A ='027,`a='027,`U = '020,`u='020; lig `Z: `1 = '031,`H='021,`h = '021.