diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 23:38:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 23:38:21 +0000 |
commit | 215012a8d684889983ec2c0629e1c704e6853d9c (patch) | |
tree | ebf1271bd71869069824935ae8a5678745bf8bce /Master/texmf-dist/fonts/source/lh/base | |
parent | 1af3d19d6dbcbf309667d9cb4aa3cdda914914a9 (diff) |
trunk/Master/texmf-dist/fonts/source
git-svn-id: svn://tug.org/texlive/trunk@101 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/fonts/source/lh/base')
58 files changed, 26153 insertions, 0 deletions
diff --git a/Master/texmf-dist/fonts/source/lh/base/fikparm.mf b/Master/texmf-dist/fonts/source/lh/base/fikparm.mf new file mode 100644 index 00000000000..dcd04088cd1 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/fikparm.mf @@ -0,0 +1,291 @@ +% +% fikparm.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% File with modified macros for font startup from polish fik_mik.mf +% (Bogus\l{}aw Jackowski and Marek Ry\'cko) +% and +% start of Lig & kerns block from lkligtbl.mf (Alexander Berdnikov) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Contents: +% +% |LHver_check| like exbase's |version_check| +% If unknown fonteq: def fonteq +% If unknown genmode: set genmode +% Set param_base (it could be reset in fontbegin file) +% Set flags for input glyph files (they could be reset in fontbegin file) +% Set flags for letter shapes: not supported by current version (-"-) +% Input fontbegin file (if necessary) +% Defining boolean altcoding +% Input cmbase and lcyrbeg (file with macros for ec param file) +% input lkligtbl.mf (ligs & kerns block of A.Berdnikov) +% Redefining `generate' macro +% Use_driver macro: +% input parameter file +% set font_identifier (and gensize for ec) +% input coding file +% input Cyrillic definitions file +% input driver file +% +% FINAL: START FONT -- use_driver(fonteq) +% + + +% defining LHver_check 3.4 +% +lh_maj_ver:=3; lh_min_ver:=4; % version identification +def LHver_check(expr e,f)= + if e>lh_maj_ver: message "LH font warning: Obsolete base"; + elseif e<lh_maj_ver: message "LH font warning: File from old release found"; + else: % e=lh_maj_ver: OK + if f>lh_min_ver: message "LH font warning: Obsolete base"; + elseif f<lh_min_ver: message "LH font warning: File from old release found"; + else: % f=lh_min_ver: LH version is OK + fi + fi +enddef; + +% changed fonteq with genmode must precede fikparm: + +% -- set value of first letters to change +if unknown fonteq: + def fonteq=2 enddef; +fi + +if unknown cmbright: + if unknown ebbase: def cmbright=false enddef; + else: def cmbright=true enddef; + fi; +fi + +% -- set genmode string: the name of first letters +if unknown genmode: + string genmode; genmode:="cm"; +fi +if genmode="dc": genmode:="ec"; + message "We use ec fonts only"; message ""; +fi + +% -- |param_base| can be changed only in begin file +string param_base; param_base:=jobname; + +% -- selfhelp +% fonteq -- *number* of first (two, three or even four) letters from +% current font which are changed to letters from a standard/popular font +% header to input necessary parameters; it's entered *only* in font headers; +% genmode -- *the name* of first two, three or even four letters from +% a standard/popular font header to input necessary parameters; +% it's entered both in font headers and in fontbegin file (if fonteq wasn't +% changed); it must consist of *fonteq* letters, +% param_base -- default: *jobname*; +% one may use encoding and kern&ligs data from another font data in case of +% changing param_base to necessary name (e.g. ll* virtual fonts use +% lh* 8-bit font data with `vfcoding:=true;' command); param_base must +% be changed *in fontbegin file only*. +% + +% -- name of encoding for T2/X2 +string enc_name; + +% next booleans are used in ??begin files: + +% -- set booleans for font stuff +boolean wncoding,vfcoding,roman_ec; +wncoding:=false; +vfcoding:=false; +roman_ec:=false; + +% -- set flags for Cyrillic letter assortment +boolean more_letters,old_cyr,other_cyr,unic; +more_letters:=false; +old_cyr:=false; +other_cyr:=false; +unic:=false; + +% -- set flags for letter shapes +% - put ogoneks instead of descenders? +boolean is_ogonek; is_ogonek=false; + +% -- `true' not supported in current version +boolean specific,kapitel; +specific=false; +kapitel:=false; +if unknown concrete: + boolean concrete; concrete=false; +fi + +% -- set flags for ligature and kerning stuff +boolean TITLEfont,SmallCapsfont,ROMANfont; + +% there must stay jobname because data is read from started font header +% to check whether is the "standard LH" font; +if substring(fonteq-2,fonteq) of jobname = "lh": + % lh* fonts have not any additional parameters + enc_name:="LCY"; + elseif substring(fonteq-2,fonteq) of jobname = "ll": + param_base:="lh" & (substring(fonteq,length(jobname)) of jobname); + vfcoding:=true; + enc_name:="LCY"; + elseif substring(fonteq-2,fonteq) of jobname = "wn": + more_letters:=true; wncoding:=true; + enc_name:="WNCYR"; + elseif substring(fonteq-2,fonteq) of jobname = "la": + roman_ec:=true; more_letters:=true; + genmode:="ex"; enc_name:="T2A"; + elseif substring(fonteq-2,fonteq) of jobname = "lb": + roman_ec:=true; more_letters:=true; + genmode:="ex"; enc_name:="T2B"; + elseif substring(fonteq-2,fonteq) of jobname = "lc": + roman_ec:=true; more_letters:=true; + genmode:="ex"; enc_name:="T2C"; + elseif substring(fonteq-2,fonteq) of jobname = "ld": + roman_ec:=true; more_letters:=true; old_cyr:=true; + genmode:="ex"; enc_name:="T2D"; + elseif substring(fonteq-2,fonteq) of jobname = "rx": + more_letters:=true; + genmode:="ex"; enc_name:="X2"; +% elseif substring(fonteq-2,fonteq) of jobname = "rs": +% more_letters:=true; old_cyr:=true; +% genmode:="ex"; enc_name:="XS"; + else: % for another non-standard fonts + enc_name:="Unknown"; % should be changed in fontbegin file + scantokens("input " + & substring(fonteq-2,fonteq) of jobname & "begin.mf"); +fi + +% -- must go after redefined booleans wncoding and vfcoding in ??begin.mf +boolean altcoding; + altcoding:= if wncoding or vfcoding: false else: true fi; + +% -- start base file +if not cmbright: +if (genmode="ex") or (genmode="ec"): + if unknown exbase: input exbase; fi +else: + if unknown cmbase: input cmbase; fi +fi +fi + +if unknown ligs: newinternal ligs; fi % exbase, ebbase + +% -- additional macros for ec compatible mode +input lcyrbeg; + +% -- if TFMonly: "kill" cmbase's drawing macros +if known TFMonly: input nodraw; fi % Only build TFM + +% -- start macros for ligatures and kerning +input lkligtbl; + +string driver_name,ss; numeric ii; + +% -- set additional extra_endchar for SliTeX invisible fonts +% !!! WARNING: +% in icmcsc10.mf the line "extra_endchar:=..." must stay BEFORE "generate csc" +ss:=substring(0,fonteq-2) of param_base; +if (ss="i") or (ss="il"): extra_endchar := extra_endchar & "clearit;"; fi + +% -- reset slitex boolean for SliTeX fonts +ss:=substring(0,fonteq-2) of param_base; +if (ss="l") or (ss="il"): slitex := true; fi + +vardef generate @# = driver_name:=str @#; endgroup enddef; + +% -- input parameter file +% set font_identfier +% then driver file +vardef use_driver @# (expr fonteq) = +% +% Start values + ii:=0; + forever: ii:=ii+1; + ss:=substring(length(param_base)-ii,length(param_base)-ii+1) of param_base; + exitif (ss<"0") or (ss>"9") or (ii>=length(param_base)); + endfor; +% +% - input parameter file + ii:=ii-1; + ss:=substring(length(param_base)-ii,length(param_base)) of param_base; + if (genmode="ex") or (genmode="ec"): +if concrete: + gensize:=scantokens(ss); + ss:="input eo"& (substring(fonteq+1,length(param_base)) of param_base); +elseif cmbright: + %gensize:=scantokens(ss); + ss:="input eb"& (substring(fonteq+1,length(param_base)) of param_base); +else: +% - set gensize for ec parameter files + if (ss="8") or (ss="10"): % for EC slitex fonts + gensize:=scantokens(ss); + ss:="input "& (substring(0,fonteq-2) of param_base) & "ec" + & (substring(fonteq,length(param_base)) of param_base); + else: + gensize:=scantokens(ss)/100; + ss:="input ec" & (substring(fonteq,length(param_base)-ii) of param_base); + fi +fi + else: +% - set gensize for cm parameter files + gensize:=scantokens(ss); +if concrete: + ss:="input "& "cc" & (substring(fonteq+1,length(param_base)) of param_base); +else: +% HERE could be cm or cc genmode: vvvvvvv + ss:="input "& (substring(0,fonteq-2) of param_base) & genmode + & (substring(fonteq,length(param_base)) of param_base); +fi + fi +%show gensize,ss; +% +% - set font_identifier + numeric true_pt#; true_pt#=pt#; + pt#:=true_pt#; scantokens(ss); pt#:=true_pt#; + font_identifier:=substring(0,length(param_base)-ii) of param_base; +% +% - input encoding file + scantokens ("input "& (substring(fonteq-2,fonteq) of param_base) & "codes"); +% - input Cyrillic definitions file + scantokens "input lcyrdefs"; +% +% - input driver file + scantokens("input "& + if genmode="ex": + if driver_name= "exroman" : "leroman" + elseif driver_name= "extextit": "letextit" + elseif driver_name= "excsc" : "lecsc" + elseif driver_name= "ebroman" : "leroman" + else: driver_name fi + elseif genmode="ec": + if driver_name= "exroman" : "ldroman" + elseif driver_name= "extextit": "ldtextit" + elseif driver_name= "excsc" : "ldcsc" + else: driver_name fi + else: + if driver_name= "roman" : "ldroman" + elseif driver_name= "sroman" : "ldroman" % slitex must be true + elseif driver_name= "broman" : "ldroman" + elseif driver_name= "textit" : "ldtextit" + elseif driver_name= "title" : "ldtitle" + elseif driver_name= "csc" : "ldcsc" + else: driver_name fi fi); +enddef; + +% START FONT +use_driver(fonteq); + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lcyrbeg.mf b/Master/texmf-dist/fonts/source/lh/base/lcyrbeg.mf new file mode 100644 index 00000000000..b959d126440 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lcyrbeg.mf @@ -0,0 +1,188 @@ +% +% lcyrbeg.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% File with macros which emulate exbase.mf from ec fonts (J"org Knappen) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Contents: +% +% *) font booleans (mostly for ec); slitex used in SliTeX cm fonts +% *) macros for processing chars twice: for some accents +% *) routines to generate the parameter sets by extrapolation +% ** macros for accenting moved in file lcyrdefs.mf +% + +LHver_check(3,4); % like |version_check| in ec + +if unknown slitex: + boolean slitex; slitex := false; fi % |true| simulates behaviour of |sroman| +if unknown one_serif: + boolean one_serif; one_serif:=true; fi % |false| suppresses base serif on `1' +if unknown classic_serif: + boolean classic_serif; classic_serif := false; fi +if unknown suppress_i_dot: + boolean suppress_i_dot; suppress_i_dot :=false; fi +if unknown hach_sharp: + boolean hach_sharp; hach_sharp:=false; fi +if unknown classic_sharp_s: + boolean classic_sharp_s; classic_sharp_s:=false; fi % Chooses shape of sharp s +if unknown knuthian_ae: + boolean knuthian_ae; knuthian_ae:=false; fi % |true| reproduces cm italic \ae +if unknown fancy_thorn: + boolean fancy_thorn; fancy_thorn:=false; fi % |true| produces \th with fancier bulb +if unknown is_small_cap: + boolean is_small_cap; is_small_cap:=false; fi +tracingstats:=1; % Print statistics at the end of run + +% +% +% +% some extra font parameters +% +def font_cap_height expr x = fontdimen 8: x enddef; +def font_asc_height expr x = fontdimen 9: x enddef; +def font_acc_cap_height expr x = fontdimen 10: x enddef; +def font_desc_depth expr x = fontdimen 11: x enddef; +def font_max_height expr x = fontdimen 12: x enddef; +def font_max_depth expr x = fontdimen 13: x enddef; +def font_digit_width expr x = fontdimen 14: x enddef; +def font_cap_stem expr x = fontdimen 15: x enddef; +def font_baselineskip expr x = fontdimen 16: x enddef; + + + +% +% XXXXXXX The following routines generate the parameter +% X X sets by extrapolation +% X X +% X X +% X X +% XXXX XXXX +% X X +% X X +% X X +% X X +% X X +% X +% +% +% needed variables +% + +vardef simple_gendef@#(text aa)(text t)= + string s[]; + s1:=""; + s2:=str @#; + index:=1; + forsuffixes $=t: ydata[index]:=$ if s1<>s2: *@# fi; + index:=index+1; + endfor; + if numpoints>(index-1): errmessage "Missing parameter"; message str aa; fi; + if numpoints<(index-1): errmessage "Too many parameters"; message str aa; fi; + aa:=ydata[merke]; + if gencheck: message str aa fi; +enddef; + +vardef extended_gendef@#(text aa)(text t)= + string s[]; + s1:=""; + s2:=str @#; + index:=1; + forsuffixes $=t: ydata[index]:=$ if s1<>s2: *@# fi; + index:=index+1; + endfor; + if numpoints>(index-1): errmessage "Missing parameter"; message str aa; fi; + if numpoints<(index-1): errmessage "Too many parameters"; message str aa; fi; + if gensize>basedata[numpoints]: + numeric hilf []; + hilf[1]:=(ydata[numpoints]-ydata[numpoints-1])/(basedata[numpoints]-basedata[numpoints-1]); + hilf[2]:=(ydata[numpoints]-ydata[numpoints-2])/(basedata[numpoints]-basedata[numpoints-2]); + hilf[3]:=ydata[numpoints]-hilf1*basedata[numpoints]; + hilf[4]:=ydata[numpoints]-hilf2*basedata[numpoints]; + spy:=(hilf[1]*gensize+hilf[3])/2+(hilf[2]*gensize+hilf[4])/2; + aa:=spy; + else: + for index = 1 upto numpoints-1: + interval[index]:=basedata[index+1]-basedata[index]; + endfor; + for index=1 upto numpoints: + spline[1][index]:=ydata[index]; + endfor; + for index=2 upto numpoints-1: + alpha[index]:=3*((spline[1][index+1]*interval[index-1])% + -(spline[1][index]*(basedata[index+1]-basedata[index-1]))% + +(spline[1][index-1]*interval[index]))% + /(interval[index-1]*interval[index]); + endfor; + spl[1]:=0; + spmu[1]:=0; + spz[1]:=0; + for index=2 upto numpoints-1: + spl[index]:=2*(basedata[index+1]-basedata[index-1])% + -interval[index-1]*spmu[index-1]; + spmu[index]:=interval[index]/spl[index]; + spz[index]:=(alpha[index]-interval[index-1]*spz[index-1])/spl[index]; + endfor; + spline[3][numpoints]:=0; + for index=numpoints-1 downto 1: + spline[3][index]:=spz[index]-spmu[index]*spline[3][index+1]; + endfor; + for index=numpoints -1 downto 1: + spline[2][index]:=(spline[1][index+1]-spline[1][index])/interval[index]% + -interval[index]*(spline[3][index+1]*spline[3][index])/3; + spline[4][index]:=(spline[3][index+1]-spline[3][index])/(3*interval[index]); + endfor; + location:=1; + for term=1 upto numpoints-1: + if gensize > basedata[term]: location:=term; fi + endfor; + spx:=gensize-basedata[location]; + spy:=((spline[4][location]*spx+spline[3][location])*spx+spline[2][location])*spx+spline[1][location]; + aa:=spy; fi; + if gencheck: message str aa fi; +enddef; + +vardef basedef(text t)= + boolean basevalue; boolean gencheck; + numeric index; numeric ergbnis; numeric location; numeric term; + numeric numpoints; numeric spx; numeric spy; + numeric basedata[]; numeric interval[]; numeric alpha[]; + numeric spl[]; numeric spmu[]; numeric spz[]; + numeric ydata[]; numeric spline[][]; + basevalue:=false; gencheck:=false; + index:=1; + forsuffixes $=t: basedata[index]:=$; + if $=gensize: basevalue:=true; merke:=index; fi; + index:=index+1; + endfor; + numpoints:=index-1; + if numpoints<3: errmessage "Not enough reference points"; fi + if basevalue: def gendef=simple_gendef enddef; else: + def gendef=extended_gendef enddef; fi +enddef; + +def clear_extra_memory= % Release ressources hold by the extrapolation routine + numeric index; numeric ergbnis; numeric location; numeric term; + numeric numpoints; numeric spx; numeric spy; + numeric basedata[]; numeric interval[]; numeric alpha[]; + numeric spl[]; numeric spmu[]; numeric spz[]; + numeric ydata[]; numeric spline[][]; + numeric hilf []; string s[]; +enddef; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf b/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf new file mode 100644 index 00000000000..8f7796d668f --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf @@ -0,0 +1,1403 @@ +% +% lcyrdefs.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Cyrillic definitions and +% macros borrowed from ec fonts package (J"org Knappen) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Content: +% +% Cyrillic startup definitions: +% cyrchar stuff +% load components absent in Computer Modern parameters files +% redefined font_setup +% Advanced cmbase's definitions +% macros for cyr letter's drawing +% macro for accent cyrbreve - cyrillic breve +% Exbase's special routines for accenting +% (borrowed part from exbase) +% Macros for processing chars twice +% (borrowed part from exbase) +% Accents which created with beginchar_twice routine +% (borrowed from exaccess) +% + +LHver_check(3,4); % like |version_check| in ec + +let lhchar=\; % `|lhchar|' should precede each character + +%if roman_ec: % for inputed exrullett.mf and exrllett.mf +% def version_check(expr e,f) = enddef; +% let ecchar=\; +%fi; + +% +% defining cyrchar stuff - chars with floating codes +% +if unknown autocount: % set auto code count for miscelaneous fonts + def cyrchar(suffix $)(expr w_sharp,h_sharp,d_sharp) = + iff known CYR_.$: beginchar(CYR_.$,w_sharp,h_sharp,d_sharp); + enddef; + + def cyrarithchar(suffix $) = + iff known CYR_.$: beginarithchar(CYR_.$); + enddef; + + def cyrchar_twice(suffix $)(expr w_sharp,h_sharp,d_sharp) = + iff known CYR_.$: beginchar_twice(CYR_.$,w_sharp,h_sharp,d_sharp); + enddef; + + def getcharcode(suffix $) = + if known CYR_.$: charcode:=CYR_.$; fi + enddef; +fi + +% next macro necessary for absent Old Slav letters in Italic fonts +def cyrcharmoving (suffix $) = if known CYR_.$: CYR_.$ := -2; fi enddef; + +% +% load components absent in parameter files +% +if unknown acc_height#: % emulation ecfonts parameter file + + if monospace: % borrowed from ectt + basedef ( 8, 9, 10, 12); + gendef[1/36pt#](acc_height#)(60, 67.5, 75, 90); + gendef[1/36pt#](dot_height#)(60, 67.5, 75, 90); + else: % borrowed from ecrm + basedef ( 5, 6, 7, 8, 9, 10, 12, 17.28); + gendef[1/36pt#](acc_height#)(42.5, 49, 55.5, 62, 68.5, 75, 90, 127.5); + gendef[1/36pt#](dot_height#)( 42, 46.6, 51.2, 56, 60.4, 66, 77.2, 100); + fi + +fi + +sbeak# := (if serifs: max(beak#,3/4desc_depth#) else: desc_depth# fi) /1.2; +cap_sbeak# := if serifs: max(beak#,3/4desc_depth#) else: desc_depth# fi; + +% +% add absent exbase parameters in cmbase's font_setup +% original font_setup macro redefined to ADD necessary settings in it's context +% +let font_setup_ = font_setup; + +if unknown true_mono: + boolean true_mono; + if monospace: true_mono:=true; % |true| forces ligatures to monowidth + else: true_mono:=false; % + fi +fi + +def font_setup = + font_setup_; + define_whole_blacker_pixels(acc_height); + define_pixels(cap_sbeak,sbeak); + pickup pencircle scaled min(hair,vair); + extra_rule.nib:=savepen; + if true_mono: let normal_adjust_fit=mono_adjust_fit; fi +enddef; + +% +% booleans for lowercase/uppercase identifying +% +boolean cyrcaph, cyrcaph.cyrcaph; +cyrcaph = false; +cyrcaph.cyrcaph = true; + +% +% advanced cmbase's definitions: macros for cyr letter's drawing +% set_bar_axis, bar_stroke +% cyr_serif, l_serif, r_serif +% cyrbulb +% cbreve + +% sets for bar axis in lowercase letters +% +vardef set_bar_axis = + pickup tiny.nib; y1.bh:=vround(.55x_height-.6[thin_join,vair]/2); + y2.bh:=y1.bh+.6[thin_join,vair]; y0.bh:=.5[y2.bh,y1.bh]; +enddef; + +vardef bar_stroke(expr left_jut,right_jut) = % |x$r| and |x$$r| (only) are known + if left_jut>right_jut: errmessage ("change `bar' points"); fi + fix_virgin z; + set_bar_axis; + if serifs: pickup crisp.nib; else: pickup fine.nib; fi + if (y2.bh-y1.bh)>(currentbreadth+eps): + pos[ii](.6[thin_join,vair],90); pos[jj](.6[thin_join,vair],90); + lft x[ii]r=left_jut; rt x[jj]r=right_jut; + top y[ii]r=top y[jj]r=y2.bh; + filldraw stroke z[ii]e--z[jj]e; % bar + else: + y[ii]l=y[jj]l=y1.bh; y[ii]r=y[jj]r=y2.bh; + x[ii]l=x[ii]r=left_jut; x[jj]l=x[jj]r=right_jut; + fill z[jj]l{right}...{left}z[jj]r--z[ii]r{left}...{right}z[ii]l--cycle; % bar + fi + penlabels([ii],[jj]); +enddef; + +% +% Cyrillic descender serif +% +vardef cyr_serif(suffix $,$$,@) % serif at |z$| for stroke from |z$$| + (expr darkness,beak_darkness,jut,beak_jut) = + if serifs: + pickup crisp.nib; + else: + pickup pencircle scaled (3/5[fine,crisp]+eps); + fi + numeric bracket_height,light_stem; pair downward; + bracket_height=bracket; + light_stem=hround (max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi)); + % for cyr_serif always |y$|<|y$$| + if (y$>y$$): errmessage ("`cyr_serif' placed only on the bottom"); fi + downward=z$-z$$; + y@0=min(y$+bracket_height,y$$)+eps; + top y@1-slab-eps=bot y@4+eps=tiny.bot y$; + if y@1>y@0: y@0:=y@1+eps; fi + bot y@2=bot y@3=vround(-d); + y@5=y@1; y@6=y@0; + z@5=whatever[z$,z$$]; z@6=whatever[z$,z$$]; + if jut<0: + z@0+penoffset downward of currentpen = + z$l+penoffset downward of pen_[tiny.nib]+whatever*downward; + lft x@1=hround (tiny.lft x$l+jut)-eps; + if x@6<x@0+eps: x@6:=x@0+eps; fi + lft x@2=rt x@3-light_stem-eps=hround (lft x@1+beak_jut)-eps; + x@4=x$+.5(fudged.stem-3stem_corr-tiny)+eps; + else: + z@0-penoffset downward of currentpen = + z$r-penoffset downward of pen_[tiny.nib]-whatever*downward; + rt x@1=hround (tiny.rt x$r+jut)+eps; + if x@6>x@0-eps: x@6:=x@0-eps; fi + rt x@2=lft x@3+light_stem+eps=hround (rt x@1+beak_jut)+eps; + x@4=x$-.5(fudged.stem-3stem_corr-tiny)-eps; + fi + pair corner,beak_corner; + ypart corner=y@1; corner=z@0+whatever*downward; + ypart beak_corner=y@4; beak_corner=z@3+whatever*(z@1-z@2); + if jut<0: + filldraw z@0{z$-z$$} + ...(darkness+eps)[corner,.5[z@1,z@0]]{z@1-z@0} + ...{jut,0}z@1--z@2--z@3{z@1-z@2} + ...(beak_darkness+eps)[beak_corner,.5[z@3,z@4]] + ...{-jut,0}z@4--(x@4,y@1)--z@5--z@6--cycle; % descender + else: + filldraw z@6--z@5--(x@4,y@1)--z@4{jut,0} + ...(beak_darkness+eps)[beak_corner,.5[z@3,z@4]] + ...{z@2-z@1}z@3--z@2--z@1{-jut,0} + ...(darkness+eps)[corner,.5[z@1,z@0]]{z@0-z@1} + ...{z$$-z$}z@0--cycle; % descender + fi + labels (@0,@1,@2,@3,@4,@5,@6); +enddef; + +% +% roman descenders +% +def l_serif(suffix $,$$,@) % descender at |z$| for stroke from |z$$| + (expr left_darkness,beak_darkness,left_jut,beak_jut) + (suffix @@) + (expr right_darkness,right_jut) = + cyr_serif($,$$,@,left_darkness,beak_darkness,-left_jut,-beak_jut); + serif($,$$,@@,right_darkness,right_jut); +enddef; +% +def r_serif(suffix $,$$,@) % descender at |z$| for stroke from |z$$| + (expr left_darkness,left_jut) + (suffix @@) + (expr right_darkness,beak_darkness,right_jut,beak_jut) = + serif($,$$,@,left_darkness,-left_jut); + cyr_serif($,$$,@@,right_darkness,beak_darkness,right_jut,beak_jut); +enddef; + +% +% italic descender +% +def i_serif(suffix $,@) = % vawed italic descender + y@1=.5[y$,y@2r]; x@1r=x$r; + numeric theta,slope; + theta=angle(-max(3u,u+2curve),d); + slope=-angle(-max(2u,u+curve),d); + pos@1(.5[vair,hair],180); + pos@2(7/8[hair,curve],theta); + pos@3(vair,theta); + lft x@2r=lft x@1r+max(.5hair,1)+eps; + y@2r=-.35d; + bot y@3l=-d-oo; + z@3l=z@2l+hair*dir (if monospace: .5 fi theta)+whatever*dir slope; + filldraw stroke z$e{down}...z@1e...z@2e{down}....{dir (slope)}z@3e; + penlabels (@1,@2,@3); +enddef; + +% +% redefined bulb: ... with directions instead of -- +% +def cyrbulb(suffix $,$$,$$$) = + z$$$r=z$$r; + path_.l:=z$l{x$$r-x$r,0}...{0,y$$r-y$r}z$$l; + path p_; p_:=z$r{x$$r-x$r,0}...{0,y$$r-y$r}z$$r; + filldraw path_.l--reverse p_--cycle; % link + path_.r:=z$$$l{0,y$r-y$$r}..z$$$r{0,y$$r-y$r}; % near-circle + y_:=xpart(path_.r intersectiontimes p_); + if y_<0: y_:=1; fi + filldraw subpath(0,y_) of path_.r + {dir (angle direction y_ of p_)}...%-- + z$$r{0,y$$r-y$r}..cycle; % bulb +enddef; + +% +% cbreve accent for Cyrillic letters +% +boolean altaccent; altaccent=false; + +vardef cbreve(expr x_center,y_move, + _one,_two,_three,_four,_five,_six,_seven) suffix modifier = + numeric mid_thickness,bulb_diam; + mid_thickness=max(crisp.breadth,vround if serifs: 1/5 else: 1/3 fi[vair,stem]); + bulb_diam=max(crisp.breadth,hround(max(dot_size,cap_curve)-2stem_corr)); + pickup crisp.nib; + pos[_one](bulb_diam,0); pos[_two](bulb_diam,90); + x[_one]=x[_two]=x_center-1.75u if monospace: /expansion_factor fi; + if cyrcaph.modifier: + bot y[_six]r=vround (y_move+max( + min(cap_height+o+max(tiny,0.5mid_thickness), + cap_height+0.3acc_height), + 1/3[cap_height,min(asc_height,2x_height)]+o-.5mid_thickness + )); + top y[_two]r=vround (y_move+max( + (cap_height+dot_height#*hppp), + bot y[_six]r+mid_thickness+bulb_diam+eps + )); + else: + bot y[_six]r=vround (y_move+max( + min(x_height+o+max(tiny,0.5mid_thickness), + x_height+0.3acc_height), + if serifs: + 1/3[x_height, min(asc_height,2x_height) + -cap_height+x_height] + else: + 1/3[x_height,h] + fi + o - 0.5mid_thickness + )); + top y[_two]r=vround (y_move+max( + (x_height+dot_height#*hppp), + bot y[_six]r+mid_thickness+bulb_diam+eps + )); + fi + y[_one]=y_move+.5[y[_two]l,y[_two]r]; + pos[_three](bulb_diam,0); + penpos[_four](y[_two]r-y[_two]l,90); + y[_three]=y[_four]=y[_one]; + x[_three]=x[_four]=x[_one]+3.5u if monospace: /expansion_factor fi; + if square_dots: % no dots in sans serif cyrbreve + x[_six]=hround x_center; + lft x[_five]r=hround(x[_six]-2.5u + if monospace: /expansion_factor fi-.5vair); + rt x[_seven]r=hround(x[_six]+2.5u + if monospace: /expansion_factor fi+.5vair); + top y[_five]=top y[_seven]=h+y_move; % common for both upper and lower + if y[_six]r>(bot y[_seven]-eps): + y[_six]r:=bot y[_seven]-eps; + fi + else: + dot([_one],[_two]); % left dot + if not altaccent: + dot([_three],[_four]); % right dot + fi + x[_six]=.5[x[_one]l,x[_three]r]; + lft x[_five]r=lft x[_one]l; + rt x[_seven]r=rt x[_three]r; + top y[_five]=top y[_seven]=y[_two]; % common for both upper and lower + fi + pos[_five](vair,-180); + pos[_seven](vair,0); + pos[_six](mid_thickness,-90); + filldraw stroke z[_five]e{down} + ...z[_six]e{right} + ...{up}z[_seven]e; % stroke + penlabels ([_five],[_six],[_seven]); +enddef; + +%%% fine hi higher +% |higher| is a counterpart to |lower| (see the file excsc.mf), +% |hi| facilitates using higher values (which are reference points in +% the floating world of CM fonts) +def hi = if is_small_cap: higher fi\\ enddef; + +% +% special routines for accenting bowwowed from ecfonts but rearranged +% +%!!!lhfonts: first goes umlaut for yo +vardef lowercase_umlaut(expr x_move,y_move,umlaut_one,umlaut_two, + umlaut_three,umlaut_four) = +pickup tiny.nib; +pos[umlaut_one](udot_diam,0); +pos[umlaut_two](udot_diam,90); +x[umlaut_one]=x[umlaut_two]=x_move+.5w-1.75u if monospace:/expansion_factor fi ; +top y[umlaut_two]r=lc_trema_height; +y[umlaut_one]=y_move+.5[y[umlaut_two]l,y[umlaut_two]r]; +dot([umlaut_one],[umlaut_two]); % left dot +pos[umlaut_three](udot_diam,0); +penpos[umlaut_four](y[umlaut_two]r-y[umlaut_two]l,90); +y[umlaut_three]=y[umlaut_four]=y[umlaut_one]; +x[umlaut_three]=x[umlaut_four]=x[umlaut_one] + +3.5u if monospace: /expansion_factor fi ; +dot([umlaut_three],[umlaut_four]); % right dot +enddef; +% +vardef uppercase_umlaut(expr x_move,y_move,umlaut_one,umlaut_two, + umlaut_three,umlaut_four) = +pickup tiny.nib; +pos[umlaut_one](udot_diam,0); +pos[umlaut_two](udot_diam,90); +x[umlaut_one]=x[umlaut_two]=x_move+.5w-1.75u if monospace:/expansion_factor fi ; +top y[umlaut_two]r=vround(cap_height+dot_height#*hppp); +y[umlaut_one]=y_move+.5[y[umlaut_two]l,y[umlaut_two]r]; +dot([umlaut_one],[umlaut_two]); % left dot +pos[umlaut_three](udot_diam,0); +penpos[umlaut_four](y[umlaut_two]r-y[umlaut_two]l,90); +y[umlaut_three]=y[umlaut_four]=y[umlaut_one]; +x[umlaut_three]=x[umlaut_four]=x[umlaut_one] + +3.5u if monospace: /expansion_factor fi ; +dot([umlaut_three],[umlaut_four]); % right dot +enddef; +% +% +% breve accent used in wncyr font +% +%!!! lowercase_breve edited +vardef lowercase_breve(expr x_center,y_move,breve_one,breve_two,breve_three)= +pickup crisp.nib; pos[breve_one](vair,-180); +pos[breve_three](vair,0); +top y[breve_one]=top y[breve_three]=h; +x[breve_two]=x_center; +lft x[breve_one]r=hround(x[breve_two]-2.5u + if monospace: /expansion_factor fi -0.5vair); +rt x[breve_three]r=hround(x[breve_two]+2.5u + if monospace: /expansion_factor fi +0.5vair); +numeric mid_thickness; mid_thickness=max(crisp.breadth,vround 1/3[vair,stem]);%!!! +bot y[breve_two]r= + vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness); +if y[breve_two]r>(y[breve_one]-.5crisp-eps): %!!! + y[breve_two]r:=y[breve_one]-.5crisp-eps; fi %!!! +pos[breve_two](mid_thickness,-90); %!!! moved here after if +filldraw stroke z[breve_one]e{down}... + z[breve_two]e{right}...{up}z[breve_three]e; % stroke +enddef; +% +%!!! uppercase_breve edited +vardef uppercase_breve (expr x_center,y_move,breve_one, + breve_two,breve_three)= +pickup crisp.nib; pos[breve_one](vair,-180); +pos[breve_three](vair,0); +top y[breve_one]=top y[breve_three]=cap_height + acc_height; +x[breve_two]=hround x_center; +x[breve_two]-rt x[breve_one]l + =(lft x[breve_three]l)-x[breve_two] + =hround (2.5u if monospace: /expansion_factor fi -.5vair); +numeric mid_thickness; +mid_thickness=max(crisp.breadth,vround min(1/3[vair,stem],.5acc_height));%!!! +pos[breve_two](mid_thickness,-90); +% |accent_gap| SHOULD be defined by the acute accent, before this macro runs +if unknown accent_gap: % accent_gap emulation + if serifs: + y[breve_two]'=h-.5mid_stem+eps-max(2/3[h,hi.x_height],hi.x_height+o+hair); + accent_gap=a_ht-(y[breve_two]'+.5mid_stem)-hi.x_height; + else: + top y[breve_two]'=h-vround(2/3[h,hi.x_height]); + accent_gap=a_ht-y[breve_two]'-hi.x_height; + fi +fi +bot y[breve_two]r=cap_height + if hefty: .5 fi accent_gap; +filldraw stroke z[breve_one]e{down}...z[breve_two]e{right}... + {up}z[breve_three]e; % stroke +enddef; +% +% +% the rest of accents +% +%!!! lowercase_cedilla edited +vardef lowercase_cedilla (expr x_center,y_move, + cedi_one,cedi_two,cedi_three,cedi_four,cedi_five) = +x[cedi_one]=x_center; % .5w+.5u; +if serifs: + pickup crisp.nib; + pos[cedi_one](stem,0); + pos[cedi_two](stem,0); + pos[cedi_three](vair,90); + pos[cedi_four](stem,0); + pos[cedi_five](vair,-90); + x[cedi_one]=x[cedi_two]; + z[cedi_three]l=z[cedi_two]l; + x[cedi_four]=x[cedi_two]+1.5u; + x[cedi_five]=x[cedi_three]-1.5u; + bot y[cedi_one]=y_move;%!!! was 0 + bot y[cedi_two]=-vround 2/7d-o; + y[cedi_four]=.5[y[cedi_three],y[cedi_five]]; + bot y[cedi_five]=-d-o; + filldraw stroke z[cedi_one]e--z[cedi_two]e; % stem + filldraw stroke z[cedi_three]e{right}... + z[cedi_four]e{down}...{left}z[cedi_five]e; % hook +else: pickup fine.nib; pos[cedi_one](vair,0); top y[cedi_one]=-o-2; + pos[cedi_two](.5[vair,stem],0); + bot y[cedi_two]=-d-o; x[cedi_two]=x[cedi_one]-1.25u; + filldraw stroke z[cedi_one]e--z[cedi_two]e; fi % diagonal +enddef; +% +vardef uppercase_cedilla(expr x_center,y_move, + cedi_one,cedi_two,cedi_three,cedi_four,cedi_five) = +x[cedi_one]=x_center; +if serifs: + pickup crisp.nib; + pos[cedi_one](stem,0); + pos[cedi_two](stem,0); + pos[cedi_three](vair,90); + pos[cedi_four](stem,0); + pos[cedi_five](vair,-90); + x[cedi_one]=x[cedi_two]; + z[cedi_three]l=z[cedi_two]l; + x[cedi_four]=x[cedi_two]+1.5u if monospace: /expansion_factor fi; + x[cedi_five]=x[cedi_three]-1.5u if monospace: /expansion_factor fi; + top y[cedi_one]=y_move; + bot y[cedi_two]=-vround 2/7d-o; + y[cedi_four]=.5[y[cedi_three],y[cedi_five]]; + bot y[cedi_five]=-d-o; + filldraw stroke z[cedi_one]e--z[cedi_two]e; % stem + filldraw stroke z[cedi_three]e{right}... + z[cedi_four]e{down}...{left}z[cedi_five]e; % hook +else: pickup fine.nib; pos[cedi_one](vair,0); + top y[cedi_one]=-o-2; + pos[cedi_two](.5[vair,stem],0); + bot y[cedi_two]=-d-o; x[cedi_two] = + x[cedi_one]-1.25u if monospace: /expansion_factor fi; + filldraw stroke z[cedi_one]e--z[cedi_two]e; fi % diagonal +enddef; +% +% +%!!! uppercase_hat edited +vardef uppercase_hat + (expr x_center,y_move,hat_zero,hat_one,hat_two,hat_three,hat_four) = +if serifs: + pickup crisp.nib; + pos[hat_two](.5[vair,curve],90); + top y[hat_two]r=cap_accent_height+oo; + x[hat_two]=good.x x_center; % optically centered + x[hat_one]=good.x x[hat_two]-2.25u if monospace: /expansion_factor fi ; + x[hat_three]=2x[hat_two]-x[hat_one]; + %!!! |accent_gap| SHOULD be defined by the acute accent, before this macro runs + if unknown accent_gap: % accent_gap emulation + y[hat_one]'=h-.5mid_stem+eps-max(2/3[h,hi.x_height],hi.x_height+o+hair); + accent_gap=a_ht-(y[hat_one]'+.5mid_stem)-hi.x_height; + fi + y[hat_one]=y[hat_three] = accent_gap + cap_height; + pos[hat_one](hair,angle(z[hat_two]-z[hat_one])+90); + pos[hat_three](hair,angle(z[hat_three]-z[hat_two])+90); + filldraw stroke z[hat_one]e--z[hat_two]e--z[hat_three]e; % diagonals +else: + pickup fine.nib; + pos[hat_one](vair,0); + pos[hat_three](vair,0); + pos[hat_two](stem,0); + top y[hat_two]=cap_accent_height+oo; + x[hat_two]=good.x x_center; % optically centered + x[hat_one]=good.x x[hat_two]-2.25u if monospace: /expansion_factor fi ; + x[hat_three]=2x[hat_two]-x[hat_one]; + %!!! |accent_gap| SHOULD be defined by the acute accent, before this macro runs + if unknown accent_gap: % accent_gap emulation + top y[hat_one]'=h-vround(2/3[h,hi.x_height]); + accent_gap=a_ht-y[hat_one]'-hi.x_height; + fi + bot y[hat_one]=bot y[hat_three]=.5accent_gap + cap_height; + z[hat_zero]=whatever[z[hat_one]r,z[hat_two]r]= + whatever[z[hat_two]l,z[hat_three]l]; + y[hat_four]l=y[hat_four]r=y[hat_two]; + x[hat_four]l=hround (.2[x[hat_two]l,x[hat_two]]-eps); %!!! + x[hat_four]r=w-x[hat_four]l; + filldraw z[hat_four]l--z[hat_one]l--z[hat_one]r-- + z[hat_zero]--z[hat_three]l-- + z[hat_three]r--z[hat_four]r--cycle; fi % diagonals +enddef; +% +%!!! lowercase_hat edited +vardef lowercase_hat + (expr x_center,y_move,hat_zero,hat_one,hat_two,hat_three,hat_four) = +if serifs: + pickup crisp.nib; + pos[hat_two](.5[vair,curve],90); + top y[hat_two]r=h+y_move; + x[hat_two]=good.x x_center; % optically centered + x[hat_one]=good.x x[hat_two]-2.25u if monospace: /expansion_factor fi ; + x[hat_three]=2x[hat_two]-x[hat_one]; + y[hat_one]=y[hat_three] = + max(y[hat_two]-0.5(min(asc_height,2x_height)-x_height), + 1/6[x_height,h]); + pos[hat_one](hair,angle(z[hat_two]-z[hat_one])+90); + pos[hat_three](hair,angle(z[hat_three]-z[hat_two])+90); + filldraw stroke z[hat_one]e--z[hat_two]e--z[hat_three]e; % diagonals +else: + pickup fine.nib; + pos[hat_one](vair,0); + pos[hat_three](vair,0); + pos[hat_two](stem,0); + top y[hat_two]=h+y_move; + x[hat_two]=good.x x_center; % optically centered + x[hat_one]=good.x x[hat_two]-2.25u if monospace: /expansion_factor fi ; + x[hat_three]=2x[hat_two]-x[hat_one]; + bot y[hat_one]=bot y[hat_three]=vround (2/3[x_height+acc_height,x_height]-eps); %!!! + % same slope as in the acute accent + z[hat_zero]=whatever[z[hat_one]r,z[hat_two]r]= + whatever[z[hat_two]l,z[hat_three]l]; + y[hat_four]l=y[hat_four]r=y[hat_two]; + x[hat_four]l=hround (.2[x[hat_two]l,x[hat_two]]-eps); %!!! + x[hat_four]r=w-x[hat_four]l; + filldraw z[hat_four]l--z[hat_one]l--z[hat_one]r-- + z[hat_zero]--z[hat_three]l-- + z[hat_three]r--z[hat_four]r--cycle; fi % diagonals +enddef; +% +% +vardef lowercase_tilde(expr x_move,y_move,tilde_one,tilde_two,tilde_three, + tilde_four,tilde_five)= +h':=min(asc_height,10/7x_height+.5dot_size); +if serifs: numeric theta; + theta=angle(1/6( + 6u if monospace: /expansion_factor fi-vair), + 1/4(h'-x_height)); + pickup crisp.nib; + numeric mid_width; mid_width=.4[vair,stem]; + pos[tilde_one](vair,theta+90); + pos[tilde_two](vair,theta+90); + pos[tilde_three](vair,theta+90); + pos[tilde_four](vair,theta+90); + z[tilde_two]-z[tilde_one]= + z[tilde_four]-z[tilde_three]=(mid_width-crisp)*dir theta; + lft x[tilde_one]r=hround(x_move+0.5w-3u if monospace: /expansion_factor fi); + rt x[tilde_four]l=hround(x_move+0.5w+3u if monospace: /expansion_factor fi); + top y[tilde_four]r=h'; + pair delta; + ypart delta=3(y[tilde_three]l-y[tilde_one]l); + delta=whatever*dir theta; + bot y[tilde_one]l=vround(bot y[tilde_one]l+ + min(2/3[x_height,h'],y[tilde_three]l-.25vair)-top y[tilde_one]r); + filldraw z[tilde_one]l.. + controls(z[tilde_one]l+ + delta)and(z[tilde_three]l-delta)..z[tilde_three]l..z[tilde_four]l + --z[tilde_four]r.. + controls(z[tilde_four]r-delta)and(z[tilde_two]r+delta).. + z[tilde_two]r..z[tilde_one]r--cycle; % stroke +else: + pickup fine.nib; + pos[tilde_one](vair,180); + pos[tilde_two](vair,90); + pos[tilde_three](.5[vair,slab],90); + pos[tilde_four](vair,90); + pos[tilde_five](vair,180); + lft x[tilde_one]r=hround (x_move + 0.5w-3u); + rt x[tilde_five]l=hround (x_move + 0.5w+3u); + x[tilde_two]-x[tilde_one]= + x[tilde_three]-x[tilde_two]= + x[tilde_four]-x[tilde_three]=x[tilde_five]-x[tilde_four]; + bot y[tilde_one]=bot y[tilde_four]l=y_move+vround(.75[x_height,h]-vair); + top y[tilde_two]r=top y[tilde_five]=h+y_move; + y[tilde_three]=.5[y[tilde_two],y[tilde_four]]; + filldraw stroke + z[tilde_one]e{up}... + z[tilde_two]e{right}.. + z[tilde_three]e.. + {right}z[tilde_four]e...{up}z[tilde_five]e; fi % stroke +enddef; + +% +%!!! uppercase_tilde edited +vardef uppercase_tilde(expr x_move,y_move,tilde_one,tilde_two,tilde_three, + tilde_four,tilde_five)= +if serifs: numeric theta; + theta=angle(1/8(7u if monospace: /expansion_factor fi-vair),1/4acc_height); + pickup crisp.nib; + numeric mid_width; mid_width=.4[vair,stem]; + pos[tilde_one](vair,theta+90); + pos[tilde_two](vair,theta+90); + pos[tilde_three](vair,theta+90); + pos[tilde_four](vair,theta+90); + z[tilde_two]-z[tilde_one]= + z[tilde_four]-z[tilde_three]=(mid_width-crisp)*dir theta; + lft x[tilde_one]r=hround(x_move+0.5w-3.5u if monospace: /expansion_factor fi); + rt x[tilde_four]l=hround(x_move+0.5w+3.5u if monospace: /expansion_factor fi); + top y[tilde_four]r=h; + % |accent_gap| SHOULD be defined by the acute accent, before this macro runs + %if unknown accent_gap: % accent_gap emulation + % y[tilde_one]'=h-.5mid_stem+eps-max(2/3[h,hi.x_height],hi.x_height+o+hair); + % accent_gap=a_ht-(y[tilde_one]'+.5mid_stem)-hi.x_height; + %fi + %bot y[tilde_one]l=accent_gap+cap_height; + bot y[tilde_one]l=vround(bot y[tilde_one]l + +min(2/3[cap_height,cap_accent_height],y[tilde_three]l-.25vair) + -top y[tilde_one]r); + pair delta; + ypart delta=3(y[tilde_three]l-y[tilde_one]l); + delta=whatever*dir theta; + filldraw z[tilde_one]l.. + controls(z[tilde_one]l+ + delta)and(z[tilde_three]l-delta)..z[tilde_three]l..z[tilde_four]l + --z[tilde_four]r.. + controls(z[tilde_four]r-delta)and(z[tilde_two]r+delta).. + z[tilde_two]r..z[tilde_one]r--cycle; % stroke +else: + pickup fine.nib; + pos[tilde_one](vair,180); + pos[tilde_two](vair,90); + pos[tilde_three](.5[vair,slab],90); + pos[tilde_four](vair,90); + pos[tilde_five](vair,180); + lft x[tilde_one]r=w-rt x[tilde_five]l=hround 1.5u+0.5(w-9u); + x[tilde_two]-x[tilde_one]= + x[tilde_three]-x[tilde_two]= + x[tilde_four]-x[tilde_three]=x[tilde_five]-x[tilde_four]; + % |accent_gap| SHOULD be defined by the acute accent, before this macro runs + if unknown accent_gap: % accent_gap emulation + top y[tilde_one]'=h-vround(2/3[h,hi.x_height]); + accent_gap=a_ht-y[tilde_one]'-hi.x_height; + fi + bot y[tilde_one]=bot y[tilde_four]l=cap_height+.5accent_gap; + top y[tilde_two]r=top y[tilde_five]=h; + y[tilde_three]=.5[y[tilde_two],y[tilde_four]]; + filldraw stroke + z[tilde_one]e{up}... + z[tilde_two]e{right}.. + z[tilde_three]e.. + {right}z[tilde_four]e...{up}z[tilde_five]e; fi % stroke +enddef; +% +% umlauts moved up +% +vardef lowercase_circle(expr + x_center,y_bottom,circ_one,circ_two,circ_three,circ_four)= +numeric circ_hair,circ_vair; +circ_hair=hround min(hair,u if monospace: /expansion_factor fi +.5); +circ_vair=vround min(vair,(h-x_height)/6+.5); +penpos[circ_one](circ_vair,90); penpos[circ_three](circ_vair,-90); +penpos[circ_two](circ_hair,180); penpos[circ_four](circ_hair,0); +x[circ_one]=x[circ_three]=x_center; % +x[circ_two]r=hround(x[circ_one]-1.5u-.5circ_hair); +x[circ_four]r=hround(x[circ_one]+1.5u+.5circ_hair); +y[circ_one]r=h+apex_o; +y[circ_two]=y[circ_four]=.5[y[circ_one],y[circ_three]]; +y[circ_three]l=vround y_bottom; % (1/3[x_height,h]+apex_o); +penstroke pulled_arc.e([circ_one],[circ_two]) + & pulled_arc.e([circ_two],[circ_three]) + & pulled_arc.e([circ_three],[circ_four]) + & pulled_arc.e([circ_four],[circ_one]) & cycle; % bowl +enddef; +% +vardef uppercase_circle(expr + x_center,y_bottom,circ_one,circ_two,circ_three,circ_four)= +numeric circ_hair,circ_vair; +circ_hair=hround min(hair,u if monospace: /expansion_factor fi +.5); +circ_vair=vround vair; % min(vair,(h-x_height)/6+.5); +penpos[circ_one](circ_vair,90); penpos[circ_three](circ_vair,-90); +penpos[circ_two](circ_hair,180); penpos[circ_four](circ_hair,0); +x[circ_one]=x[circ_three]=x_center; % .5w; +x[circ_two]r + = hround(x[circ_one]-1.5u if monospace: /expansion_factor fi -.5circ_hair); +x[circ_four]r + = hround(x[circ_one]+1.5u if monospace: /expansion_factor fi +.5circ_hair); +y[circ_one]r=cap_height + acc_height+apex_o; +y[circ_two]=y[circ_four]=.5[y[circ_one],y[circ_three]]; +y[circ_three]l=vround y_bottom; % (1/3[x_height,h]+apex_o); +penstroke pulled_arc.e([circ_one],[circ_two]) + & pulled_arc.e([circ_two],[circ_three]) + & pulled_arc.e([circ_three],[circ_four]) + & pulled_arc.e([circ_four],[circ_one]) & cycle; % bowl +enddef; +% +% +% cedillas moved up +% +% breves moved up +% +% renamed lowercase ogonek +vardef the_ogonek(expr x_move,y_move,ogon_one,ogon_two,ogon_three) = +x[ogon_one]r=x_move; + pickup crisp.nib; + pos[ogon_one]( + if currentbreadth<0.9vair: 0.9vair else: currentbreadth+eps fi,-60); + pos[ogon_two](stem,0); + pos[ogon_three](vair,145); + x[ogon_two]=x[ogon_one]-2.5u if monospace: / expansion_factor fi ; + x[ogon_three]=x[ogon_one]+0.5u if monospace: / expansion_factor fi ; + bot y[ogon_one]r = y_move; + bot y[ogon_three]=0.5(-d-o)+y_move; %0.4 + bot y[ogon_two]=0.5(-d-o)+y_move; + filldraw stroke z[ogon_one]e{dir 225}... + z[ogon_two]e{dir -110}...{dir 60}z[ogon_three]e; % hook +enddef; + +% +% MACROS FOR PROCESSING CHARS TWICE: +% PASS 1: COLLECTING TFM (SHARP) INFORMATION +% PASS 2: CREATING THE GLYPH +% +%%% define_pixels prepare_pen +%%% beginchar beginchar_twice +%%% endfor repeat_once + +% A special provision is necessary if one uses |modes.mf|: +% This file assumes, that one never wants to use more than one mode +% in the same font, but we will do so. +% +% Make sure, that you never input |modes.mf| after this file, otherwise +% unpleasant surprises wait for you. + +def clear_mode_guards = + forsuffixes $=proofing,fontmaking,tracingtitles,pixels_per_inch, + blacker,fillin,o_correction,blacker_min,aspect_ratio: + numeric mode_guard_$; + endfor +enddef; + +let ori_draw:=draw; +let ori_fill:=fill; +let ori_filldraw:=filldraw; +let ori_erase:=erase; +let ori_penstroke:=penstroke; +let ori_special:=special; +let ori_numspecial:=numspecial; + +mode_def canonical_sharp_mode = % nearly |proof| mode + proofing:=0; % no, we aren't making full proofs + fontmaking:=0; % yes, we are making a font + tracingtitles:=0; % don't show titles online + pixels_per_inch:=2601.72; % that's 36 pixels per pt + blacker:=0; % no additional blackness + blacker_min:=0; % no write_white provision + fillin:=0; % no compensation for fillin + o_correction:=1; % no reduction in overshoot +enddef; + +def beginchar_twice(expr c,w_sharp,h_sharp,d_sharp) = + begingroup + if string mode: string prev_mode; prev_mode:=mode; + else: numeric prev_mode; prev_mode:=mode; + fi + for sharp_calc_:=1,whatever: +% |sharp_calc| is checked in |corrital|, |mark_height|, and |put_accent| + sharp_calc:=sharp_calc_; + if known sharp_calc: % carry out ``sharp'' calculations + begingroup save mode,mag; mode:=canonical_sharp_mode; + clear_mode_guards; mode_setup; font_setup; pseudo_setup; + if is_small_cap: % excerpt from |font_setup| + define_pixels(higher.u,higher.bar_height); + define_corrected_pixels(higher.o); + define_whole_pixels(higher.letter_fit); + define_whole_vertical_pixels(higher.x_height,higher.body_height); + define_whole_blacker_pixels(higher.stem); + fi + endgroup; + def draw expr e=enddef; + let fill:=draw; + let filldraw:=draw; + let erase:=killtext; % |killtext| was absent from earlier versions of plain + let penstroke:=killtext; + def special primary t = enddef; + def numspecial primary t = enddef; + charwd:=w_sharp; charht:=h_sharp; chardp:=d_sharp; charic:=0; + else: % carry out ``discrete'' calculations + mode:=prev_mode; + clear_mode_guards; mode_setup; font_setup; pseudo_setup; + if is_small_cap: % excerpt from |font_setup| + define_pixels(higher.u,higher.bar_height); + define_corrected_pixels(higher.o); + define_whole_pixels(higher.letter_fit); + define_whole_vertical_pixels(higher.x_height,higher.body_height); + define_whole_blacker_pixels(higher.stem); + fi + let draw:=ori_draw; + let fill:=ori_fill; + let filldraw:=ori_filldraw; + let erase:=ori_erase; + let penstroke:=ori_penstroke; + let special:=ori_special; + let numspecial:=ori_numspecial; + charwd:=w_sharp; + fi + charcode:=if known c: byte c else: 0 fi; + w:=hround(w_sharp*hppp); h:=vround(h_sharp*hppp); d:=vround(d_sharp*hppp); + clearxy; clearit; clearpen; scantokens extra_beginchar; +enddef; + +let repeat_once = endfor; + +% +% +% accents which created with beginchar_twice routine +% (borrowed from exaccess but with +% redefining is_cap put_accent put_gravis and put_dot) + +% +% GENERAL PURPOSE ACCESSORIES +% +vardef is_egyptian = +% |false| for most of the CM fonts, except funny fonts; +% |true| for the CC fonts + serifs and (1.4max(fine#,crisp#, tiny#)<slab#) and (1.6slab#>stem#) +enddef; + +vardef is_bold = if serifs: (hair#+.5stem#)>1.5u# else: stem#>2u# fi\\ enddef; + +%!!! set is_cap as boolean +boolean is_cap; + +%%% top is_known +%%% top fix_virgin +vardef is_known z suffix $ = +% an auxiliary macro for |fix_virgin z|, used also while constructing ogoneks + (known x$) or (known x$l) or (known x$r)\\ or + (known y$) or (known y$l) or (known y$r) +enddef; + +vardef fix_virgin z = % find a pair of virgin pairs + numeric ii,jj; jj:=1; + forever: + if is_known z[jj] or is_known z[jj+1]: % unknown gaps may occur + jj:=incr jj else: jj=ii fi; exitif known ii; + endfor; + jj:=ii+1; +% now |ii| and |jj| are such that |z[ii]| and |z[jj]| are ``untouched'' +enddef; + +%%% italcorr corrital +% correction of italic correction (cf. D. E. Knuth, The \MF{}book, p. 105): +vardef corrital z suffix $ = +% |z$| is the rightmost position of a pen (in accent path) + if known sharp_calc: + if not monospace: + save charic_; charic_=(rt(x$)-r)/hppp+slant*y$/vppp+.5u#; + if charic_>charic: charic:=charic_; fi + fi +%| else: %| |charic=mono_charic#|, do nothing + fi +enddef; + +%%% top prepare_pen +def prepare_pen suffix $ = +%%% fine $ %%%% temporary MFT convention + if $>fudged.hair: $:=fudged.hair; fi + $.breadth:=$; + pickup if $=0: nullpen else: pencircle scaled $; $:=$-eps fi; + $.nib:=savepen; breadth_[$.nib]:=$; + forsuffixes $$=lft,rt,top,bot: shiftdef($.$$,$$ 0); endfor +%%% qq $ %%%% ordinary MFT convention +enddef; + +% The proportion of |vair/stem| depends drastically on resolution; +% e.g., for 300 dpi cmbx10 |vair=1| and |stem=5|, for 746 dpi cmbx10 +% (300 dpi, magstep 5) |vair=4| and |stem=12|, while, sharply speaking, +% |stem#/vair#=3.15381|; hence a new variable |xvair| has been introduced +% to be used in some crucial places instead of |vair|. +vardef xvair = stem*vair#/stem# enddef; + +% +% ACCENT ACCESSORIES +% +% |the_cap_flat| is a factor controlling the flatness of accents over +% majuscules; a default value may be overriden by assigning a value to the +% variable |cap_flat| (cf. also |the_|... macros in ogonek accessories). +vardef the_cap_flat = + if known cap_flat: cap_flat elseif serifs and hefty: 1/5 else: 1/3 fi +enddef; +% +% The |hpos_corr| variable is an optional parameter to |put_ogonek|, meant +% to be set locally inside |beginchar| ... |endchar|, if a horizontal +% correction of the accent position is needed: +numeric hpos_corr; +% +%%%% temporary MFT convention: +%%% top x_height diam a_wd a_ht i_ht u asc_height cap_A_wd +% width of the acute accent: +vardef a_wd@# = 9hi.u@# enddef; +% height of the acute accent: +vardef a_ht@# = %!!!in plfonts: skipped ,hi.x_height@#+acc_h + min(asc_height@#,2hi.x_height@#,hi.x_height@#+acc_height@#) enddef; +% height of the letter `i': +vardef i_ht@#(suffix diam) = + if is_small_cap: a_ht@# % usually there is no dot over a small cap `i' + else: min(asc_height@#, 10/7hi.x_height@#+.5diam@#) fi +enddef; +% width of the letter `A' (used in |put_ogonek|): +vardef cap_A_wd@# = 13u@# enddef; +%%%% ordinary MFT convention: +%%% qq x_height diam a_wd a_ht i_ht u asc_height cap_A_wd + +def mark_height(expr sharp_h)= +% |sharp_h| is the height of an accented minuscule + if known sharp_calc: + charht:=if is_cap: h/vppp else: sharp_h fi;% in plfonts line placed after `if' in ec---before + if\\ (proofing>0) and is_cap: +% BJ likes to have proofs vertically aligned (somehow): + proofoffset(0,h-charht*vppp-1mm); + fi + fi +% say earlier, e.g., |is_smoke=1| if you're making `smoked' proofs +% and you don't like to have a rule marking the height + if unknown is_smoke: + if proofing>0: proofrule((l+w/2,charht*hppp)t_,(r+u,charht*hppp)t_); fi + if displaying>0: screenrule((l+w/2,charht*hppp)t_,(r+u,charht*hppp)t_); fi + fi +enddef; + +def fix_acc_pairs = + fix_virgin z; + begingroup +% excerpt from |beginchar|: + save w,h; w=round(a_wd); h=round(a_ht); +% excerpt from |mono_adjust|: + if monospace: + save u_; numeric u_; u_:=hi.u#; save u; u#:=u_; + numeric expansion_faktor; + mono_charwd#=2 hi.letter_fit#+expansion_faktor*a_wd#; + hi.u:=u#*expansion_faktor*hppp; + w:=mono_charwd-shrink_fit-2 hi.letter_fit; + fi +% end of the excerpts + numeric accent_gap,mid_stem; mid_stem=2/3[stem,hi.stem]; + if serifs: + pickup crisp.nib; + x[jj]'=hround(w-2hi.u)-.5mid_stem; x[jj]':=x[jj]'-2/3[x[jj]',w-x[jj]']; + y[jj]'=h-.5mid_stem+eps-max(2/3[h,hi.x_height],hi.x_height+o+hair); + accent_gap=a_ht-(y[jj]'+.5mid_stem)-hi.x_height; + bot z[ii]=round(accent_hpos, + accent_gap+if is_cap: cap_height else: hi.x_height fi); + z[jj]=z[ii]+(z[jj]' + if is_cap: rotated (-the_cap_flat*angle(z[jj]')) fi); + numeric theta; theta=angle(z[ii]-z[jj])+90; + pos[jj](mid_stem,theta); pos[ii](hair,theta); + else: + pickup fine.nib; + rt x[jj]'r=hround(.5w-1.25hi.u); + top y[jj]'=h-vround(2/3[h,hi.x_height]); + z[ii]'=origin; pos[jj]'(mid_stem,0); pos[ii]'(vair,0); + accent_gap=a_ht-y[jj]'-hi.x_height; + if is_cap: + numeric beta; beta=-the_cap_flat*angle(z[jj]'-z[ii]'); + z[ii]=round(accent_hpos,accent_gap+cap_height); + z[jj]=z[ii]+(z[jj]' rotated beta); + y[jj]r=y[jj]l=y[jj]; y[ii]r=y[ii]l=y[ii]; + for xx:=jj,ii: forsuffixes $:=l,r: + (z[xx]$-z[ii]) rotated -beta=whatever[z[jj]'$,z[ii]'$]; + endfor\\ endfor + else: + for xx:=jj,ii: forsuffixes $:=r, ,l: + z[xx]$=z[xx]'$+round(accent_hpos, + accent_gap+if is_small_cap: cap_height else: x_height fi); + endfor\\ endfor + fi + fi + endgroup; +enddef; + +% is_cap checked by modifier +def put_accent suffix modifier = %!!! + if cyrcaph.modifier: is_cap:=true; else: is_cap:=false; fi %!!! + numeric accent_hpos; + accent_hpos=.5w - if is_cap: .75 else: .5 fi\\ u + if known hpos_corr: +hpos_corr fi; + fix_acc_pairs; % |fix_acc_pairs| uses private values of |w|, |h| \& |u| + numeric hpos_corr; % |hpos_corr| is local: forget its value +% draw the diagonal: + if serifs: + pickup crisp.nib; filldraw circ_stroke (z[jj]e--z[ii]e); + z[jj].right=directionpoint up of (z[jj]r{z[jj]r-z[ii]r}..{z[ii]l-z[jj]l}z[jj]l); + z[jj].top=directionpoint left of (z[jj]r{z[jj]r-z[ii]r}..{z[ii]l-z[jj]l}z[jj]l); + else: + pickup fine.nib; filldraw stroke (z[jj]e--z[ii]e); + z[jj].right=z[jj].top=z[jj]r; + fi + corrital z[jj].right; % correct italic correction +% adjust and save height (it is used in the program for the dotted `Z'): + h:=if is_cap: y[jj].top else: a_ht fi; + if known sharp_calc: saved_height:=h; fi + mark_height(a_ht#); + penlabels([ii],[jj]); +enddef; + +% +% GRAVE ACCENT ACCESSORIES +% + +% This section borrows heavily from the (acute) accent accessories +def fix_grav_pairs = + fix_virgin z; + begingroup +% excerpt from |beginchar|: + save w,h; w=round(a_wd); h=round(a_ht); +% excerpt from |mono_adjust|: + if monospace: + save u_; numeric u_; u_:=hi.u#; save u; u#:=u_; + numeric expansion_faktor; + mono_charwd#=2 hi.letter_fit#+expansion_faktor*a_wd#; + hi.u:=u#*expansion_faktor*hppp; + w:=mono_charwd-shrink_fit-2 hi.letter_fit; + fi +% end of the excerpts + numeric accent_gap,mid_stem; mid_stem=2/3[stem,hi.stem]; + if serifs: + pickup crisp.nib; + x[jj]'=hround(w-2hi.u)-.5mid_stem; x[jj]':= -x[jj]'+ 2/3[x[jj]',w-x[jj]']; + y[jj]'=h-.5mid_stem+eps-max(2/3[h,hi.x_height],hi.x_height+o+hair); + accent_gap=a_ht-(y[jj]'+.5mid_stem)-hi.x_height; + bot z[ii]=round(accent_hpos, + accent_gap+if is_cap: cap_height else: hi.x_height fi); + z[jj]=z[ii]+(z[jj]' + if is_cap: rotated (-the_cap_flat*(angle(z[jj]')-180)) fi); + numeric theta; theta=angle(z[ii]-z[jj])+90; + pos[jj](mid_stem,theta); pos[ii](hair,theta); + else: + pickup fine.nib; + lft x[jj]'l=-hround(.5w-1.25hi.u); + top y[jj]'=h-vround(2/3[h,hi.x_height]); + z[ii]'=origin; pos[jj]'(mid_stem,0); pos[ii]'(vair,0); + accent_gap=a_ht-y[jj]'-hi.x_height; + if is_cap: + numeric beta; beta=-the_cap_flat*(angle(z[jj]'-z[ii]')-180); + z[ii]=round(accent_hpos,accent_gap+cap_height); + z[jj]=z[ii]+(z[jj]' rotated beta); + y[jj]r=y[jj]l=y[jj]; y[ii]r=y[ii]l=y[ii]; + for xx:=jj,ii: forsuffixes $:=l,r: + (z[xx]$-z[ii]) rotated -beta=whatever[z[jj]'$,z[ii]'$]; + endfor\\ endfor + else: + for xx:=jj,ii: forsuffixes $:=r, ,l: + z[xx]$=z[xx]'$+round(accent_hpos, + accent_gap+if is_small_cap: cap_height else: x_height fi); + endfor\\ endfor + fi + fi + endgroup; +enddef; + +% is_cap checked by modifier +def put_gravis suffix modifier = %!!! + if cyrcaph.modifier: is_cap:=true; else: is_cap:=false; fi %!!! + numeric accent_hpos; + accent_hpos=.5w + if is_cap: .75 else: .5 fi\\ u + if known hpos_corr: +hpos_corr fi; + fix_grav_pairs; % |fix_grav_pairs| uses private values of |w|, |h| \& |u| + numeric hpos_corr; % |hpos_corr| is local: forget its value +% draw the diagonal: + if serifs: + pickup crisp.nib; filldraw circ_stroke (z[jj]e--z[ii]e); + z[jj].right=directionpoint down of (z[jj]r{z[jj]r-z[ii]r}..{z[ii]l-z[jj]l}z[jj]l); + z[jj].top=directionpoint left of (z[jj]r{z[jj]r-z[ii]r}..{z[ii]l-z[jj]l}z[jj]l); + else: + pickup fine.nib; filldraw stroke (z[jj]e--z[ii]e); + z[jj].right=z[jj].top=z[jj]r; + fi +% adjust and save height (tho the height is never needed): + h:=if is_cap: y[jj].top else: a_ht fi; + if known sharp_calc: saved_height:=h; fi + mark_height(a_ht#); + penlabels([ii],[jj]); +enddef; + +% +% DOT ACCENT ACCESSORIES +% + +%%% good penkind +% is_cap checked by modifier +def put_dot (suffix penkind) (expr dd_) % dot of the lowercase letter `i' + suffix modifier = %!!! + if cyrcaph.modifier: is_cap:=true; else: is_cap:=false; fi %!!! + fix_virgin z; + numeric dd#; % sharp dot diameter + dd#=dd_; define_whole_blacker_pixels(dd); +% adjust height temporarily: + h:=vround(if is_cap: (cap_height#+1.5u#+dd#) + else: i_ht#(dd) + fi\\ *hppp); + pickup penkind.nib; pos[jj](dd,90); pos[ii](dd,0); + x[jj]=x[ii]=good.x(.5w+.25u if known hpos_corr: +hpos_corr fi); %!!! + numeric hpos_corr; %!!! |hpos_corr| is local: forget its value !!! + top y[jj]r=h+1; y[ii]=.5[y[jj]l,y[jj]r]; +% draw the dot: + dot([ii],[jj]); +% dotted `Z' inherits the recently saved height (if known; usually the height +% of the accented `Z') which allows to decrease by one the number of different +% heights in a font; dotted `z' has the height of a lowercase `i' (exception: +% caps and small caps) + if known saved_height: h:=saved_height; fi\\ mark_height(i_ht#(dd)); + penlabels([ii],[jj]); +enddef; + +% +% CYRCROSS ACCESSORIES +% (redefined L's CROSS ACCESSORIES) +% + +% is_cap checked by modifier +def put_cyrcross(expr x_center,y_move,left_jut,right_jut) suffix modifier = %!!! + if cyrcaph.modifier: is_cap:=true; else: is_cap:=false; fi %!!! + fix_virgin z; + numeric dd; dd=if serifs:if is_cap: cap_bar + else: bar fi + else: if is_cap: .2[vair,cap_band] + else: vair fi + fi; + pickup if serifs: crisp.nib else: fine.nib fi; + numeric theta; + if left_jut>0: + theta=angle(11u#,.3[x_height#,cap_height#]); + lft x[ii]r = hround(x_center-left_jut)-eps; + rt x[jj]l = hround(x_center+right_jut)+eps; + else: + theta=angle(11u#,-.3[x_height#,cap_height#]); + rt x[ii]r = hround(x_center-left_jut)-eps; + lft x[jj]l = hround(x_center+right_jut)+eps; + fi + pos[ii](dd,theta+90); pos[jj](dd,theta+90); + z[ii]-z[jj]=whatever*dir theta; + % |.52| is one of CM (Computer Magic) numbers appearing in many CM programs, + % among others in the programs for B, F, and H: + whatever[z[ii],z[jj]]=if not is_cap and hefty: top fi\\ + (x_center,if is_cap:.52cap_height else: bar_height fi\\+y_move); + % before drawing the stroke improve discretization: + save eps_; + eps_:=y[ii]l-good.y(y[ii]l); + forsuffixes $:=l, ,r: y[ii]$:=y[ii]$-eps_; endfor + eps_:=y[jj]r-good.y(y[jj]r); + forsuffixes $:=l, ,r: y[jj]$:=y[jj]$-eps_; endfor + filldraw stroke z[ii]e--z[jj]e; % now draw the stroke + corrital z[jj]l; % correct italic correction + penlabels([ii],[jj]); +enddef; + +% +% EASY OGONEK ACCESSORIES +% simplified ogonek +% there are used some macros from put_ogonek stuff (ec fonts) +% + +% ogonek defaults: +vardef the_ogonek_depth# = % sharp value + if known depth_corr: depth_corr* fi\\ desc_depth# +enddef; + +vardef the_tip_pos = + (if monospace: 1.9 elseif serifs: if hefty: 1.85 + elseif is_bold: 1.75 else: 2 fi\\ else: % sansserif + if is_bold: 2.1 else: 1.95 fi\\ fi\\ hi.u, + if serifs: + if monospace: 1.25 elseif hefty: 1 elseif is_bold: .75 else: 1.45 fi + else: % sansserif + .45 fi\\ hi.u) + if known tip_xcorr: xscaled\\ tip_xcorr fi + if known tip_ycorr: yscaled\\ tip_ycorr fi +enddef; + +vardef the_pre_angle = % refers to the outer edge + if known pre_angle: pre_angle else: + if serifs: if hefty: 208 elseif is_bold: 211 else: 214 fi\\ else: 211 fi + fi +enddef; + +vardef the_post_angle = % refers to the outer edge + if known post_angle: post_angle else: + if serifs: if monospace: 60 elseif hefty: 66 elseif is_bold: 55 else: 74 fi + else: 25 fi\\ fi +enddef; + +% parameters to |put_ogonek|: +numeric join_angle; % starting (inner) ogonek direction, if known + +% common ogonek breath (because of slab changed in a few letters) +numeric ogonek_breadth; % ogonek breadth at the tip +ogonek_breadth=if serifs and is_bold: slab else: xvair fi; + +pair ogonek_pos; % starting (inner for `e' with ogonek, otherwise outer) ogonek position: + +vardef easy_ogonek (suffix penkind)(expr _one,_two,_three)= + pickup penkind.nib; + if monospace: + % excerpt from |mono_adjust|: + save u_; numeric u_; u_:=hi.u#; save u; u#:=u_; + numeric expansion_faktor; + mono_charwd#=2hi.letter_fit#+expansion_faktor*cap_A_wd#; % cap_A_wd=13u + hi.u:=u#*expansion_faktor*hppp; + % now |u| is like in the letter `A' + fi + y_right:=-vround(d+hi.o); % bottom bound + if unknown ogonek_breadth: + ogonek_breadth=if serifs and is_bold: slab else: xvair fi; + fi + if known ogonek_pos: + z[_one]'l=ogonek_pos+(0,eps); + pos[_one]'(max(ogonek_breadth,penkind+eps),0); + z[_one]l=whatever[ogonek_pos, ogonek_pos+dir the_pre_angle]; + bot y[_one]l=0 if known ogonek_move:+ogonek_move fi+eps; + numeric ogonek_move; % it's local + else: + bot z[_one]l=(.5w,0+eps); + fi + pos[_one](max(ogonek_breadth,penkind+eps),0); + bot z[_three]'=(xpart z[_one]l-.5penkind,y_right-eps)+the_tip_pos; + z[_three]l=if is_small_cap: + z[_one]+((z[_three]'-z[_one]) + scaled sqrt(body_height#/higher.body_height#)) + else: + z[_three]' + fi; + pos[_three](max(ogonek_breadth,penkind+eps), + the_post_angle+if serifs: 90 else: 80 fi); + z[_two]l=if serifs: + if monospace: 2/3[z[_one],z[_three]]+ + else: .52[z[_one],z[_three]]+ + fi + else: 3/5[z[_one],z[_three]]+7/8 + fi + (y[_three]-y[_one],x[_one]-x[_three]-eps) + -penoffset (z[_three]-z[_one]) of currentpen; + pos[_two](max(penkind+eps, + if serifs: 7/8 else: 2/3 fi [bar,fudged.stem-2stem_corr]), %from ukreve + angle(z[_one]-z[_three]) - if serifs: 90 else: 80 fi); + if known ogonek_pos: + if y[_one]'<y[_one]: path p; numeric t; + if known join_angle: + prim_angle:=join_angle; + else: + p=z[_one]{dir the_pre_angle}...{(z[_three]-z[_one])}z[_two] + ...{dir (the_post_angle)}z[_three]; + t=ypart (((0,y[_one]')--(w,y[_one]')) intersectiontimes p); + prim_angle:=angle(direction t of p); + fi + filldraw stroke + z[_one]'e{dir prim_angle}...{(z[_three]-z[_one])}z[_two]e + ...{dir (the_post_angle)}z[_three]e; % ogonek stroke + else: + prim_angle:=if known join_angle: join_angle else: the_pre_angle fi; + filldraw stroke + z[_one]'e{dir prim_angle}...z[_one]e{dir the_pre_angle} + ...{(z[_three]-z[_one])}z[_two]e + ...{dir (the_post_angle)}z[_three]e; % ogonek stroke + fi + else: + filldraw stroke + z[_one]e{dir the_pre_angle}... + {(z[_three]-z[_one])}z[_two]e...{dir (the_post_angle)}z[_three]e; % ogonek stroke + fi + numeric join_angle,ogonek_breadth; pair ogonek_pos; % all they are local + penlabels([_one],[_one]',[_two],[_three],ogonek);. +enddef; + +% +% HACHEK ACCESSORIES +% +% This was csaccent.mf in text format, as of 89/05/08 +% written by P. Novak, Prague +% +%!!! edited +def lc_hachek_accent(expr ref) = + if serifs: + pickup crisp.nib; + pos52'(0.75[vair,curve],90); + pos52(0.75[vair,curve],90); + x52=good.x ref; + x52-x51=x53-x52=good.x if hach_sharp:2.5 else:3 fi + accent_u-accent_thin; + top y52' = top y51 = top y53 = lc_hachek_height; + if hach_sharp: + y52=max(2/3[h,hi.x_height],hi.x_height+o+hair); % lower point + pos51(1.5stem,0); pos53(accent_thin,180); + else: + 0.5[y52,y52r] = 0.5[hi.x_height,y52']; + pos51(accent_thin,angle(z52-z51)+90); + pos53(accent_thin,angle(z53-z52)+90); + fi + filldraw stroke z51e -- z52e -- z53e; + else: + pickup fine.nib; + pos51(vair,0); + pos53(vair,0); + x52=good.x ref; + x52-lft x51=rt x53-x52= hround(1.25accent_u + vair); + pos52(stem,0); + bot y52=vround(max(2/3[h,hi.x_height],hi.x_height+o+hair)); + top y51 = top y53 = max(lc_hachek_height,top y52+eps); %!!! + z50 = whatever[z51r,z52r] = whatever[z52l,z53l]; + y54l=y54r=y52; + x54l=good.x .2[x52l,x52]; + x54r-x52 = x52-x54l; + filldraw z54l -- z51l-- z51r -- z50 -- z53l -- z53r -- z54r -- cycle; + fi + penlabels(50,51,52,52',53,54); +enddef; + +def dtl_hachek(text x_ref,y_ref) = +pickup fine.nib; + pickup fine.nib; + x51=hround(x_ref); y51=vround(y_ref); + comma(51,q,pdot_diam,.25accent_u,2/3comma_depth); + penlabels(51); +enddef; + +def uc_hachek_accent(expr ref) = + if serifs: + pickup crisp.nib; + pos52'(0.5[vair,cap_curve],90); + pos52(0.5[vair,cap_curve],90); + x52=good.x ref; + x52-x51=x53-x52=good.x 3accent_u-accent_thin; + top y52' = top y51 = top y53 = % upper points + uc_acc_height-.5[vair,cap_curve]+eps + -max(2/3[uc_acc_height,hi.x_height],hi.x_height+o+hair)+cap_height; + if hach_sharp: + y52=max(2/3[uc_acc_height,hi.x_height],hi.x_height+o+hair) + -hi.x_height+cap_height; % lower point + pos51(cap_stem,0); pos53(2accent_thin,180); + else: + 0.5[y52,y52r] = + if not hefty: + max(2/3[uc_acc_height,hi.x_height],hi.x_height+o+hair) + -hi.x_height+cap_height; + else: + max(2/3[uc_acc_height,hi.x_height],hi.x_height+o) + -hi.x_height+cap_height-hair; + fi + pos51(accent_thin,angle(z52-z51)+90); + pos53(accent_thin,angle(z53-z52)+90); + fi + filldraw stroke z51e -- z52e -- z53e; + else: + pickup fine.nib; + pos51(vair,0); + pos53(vair,0); + x52=good.x ref; + x52-x51=x53-x52= 1.75accent_u + .5vair; + pos52(cap_stem,0); + bot y52= cap_height + .5 accent_gap; + top y51 = top y53 = cap_height + acc_height; + z50 = whatever[z51r,z52r] = whatever[z52l,z53l]; + y54l=y54r=y52; + x54l=good.x .2[x52l,x52]; + x54r-x52 = x52-x54l; + filldraw z54l -- z51l-- z51r -- z50 -- z53l -- z53r -- z54r -- cycle; + fi +penlabels(50,51,52,52',53,54); +enddef; + +endinput; +% end-of-file diff --git a/Master/texmf-dist/fonts/source/lh/base/ldcsc.mf b/Master/texmf-dist/fonts/source/lh/base/ldcsc.mf new file mode 100644 index 00000000000..b454ff0cfab --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/ldcsc.mf @@ -0,0 +1,215 @@ +% +% ldcsc.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Driver file for Caps and Small Caps font +% - modified CSC.MF in Computer Modern fonts +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +font_coding_scheme:=if ligs=0: "TeX typewriter text/Cyr - "&enc_name + else: "TeX text without f-ligs/Cyr - "&enc_name fi; +if altcoding: + spanish_shriek=oct"016"; spanish_query=oct"017"; +fi + +input lxpseudo; + +mode_setup; font_setup; +pseudo_setup; % |pseudo_setup| from ec + +if altcoding: + input romanu; % upper case (majuscules) + input greeku; % upper case greek letters + input romand; % numerals + input romanp; % ampersand, question marks, currency sign + input romspu; % uppercase specials (\AE, \OE, \O) + input punct; % punctuation symbols common to all roman and italic + input accent; % accents common to roman and italic text + input romsub; % substitutes for ligatures +fi + +if not vfcoding: % ligs for both altcoding and wncoding (dashes & quotes) + if ligs>0: input comlig; fi % ligatures common with italic +fi + +input lgcyru; % input uppercase shapes +input lgcyrsym; % <<, >>, No +input lgcyracc; % Cyrillic accents +if old_cyr: + input lgocyrac; % Cyrillic Old Slav accents & signs +fi + +if wncoding: %Part used in WNCYR + input romand; % numerals + input lgpunct; % excerpts from punct.mf + input lgromp; % roman question mark +fi + +font_slant slant; font_x_height x_height#; + +upper.u#:=u#; %save for Cyrillic kerning table + +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; + if altcoding: input llmligtb; fi % input ligs for quotes + if wncoding: input lwnligs; fi % input ligs for Cyrillic in WNCYR +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + % + % Uppercase Latin ligs & kerns + % There are just the same ligs and kerns as in CM + % but they are built in more visible form + % + TITLEfont:=false; SmallCapsfont:=true; ROMANfont:=false; + if altcoding: + ligtable "P": "T": "Y": + "a" kern kk#, + "A" kern kk#; + ligtable "F": "V": "W": + if serifs: "a" kern kkk#, + "A" kern kkk#, + else: "a" kern kk#, + "A" kern kk#, fi + "K": "X": + "o" kern k#, + "O" kern k#, + "c" kern k#, + "C" kern k#, + "g" kern k#, + "G" kern k#, + "q" kern k#, + "Q" kern k#; + ligtable "O": "D": + "x" kern k#, + "X" kern k#, + "w" kern k#, + "W" kern k#, + "a" kern k#, + "A" kern k#, + "v" kern k#, + "V" kern k#, + "y" kern k#, + "Y" kern k#; + ligtable "A": if serifs: "R": fi + "c" kern k#, + "C" kern k#, + "o" kern k#, + "O" kern k#, + "g" kern k#, + "G" kern k#, + "u" kern k#, + "U" kern k#, + "q" kern k#, + "Q" kern k#, + "L": "T" kern kk#, + "t" kern kk#, + "Y" kern kk#, + "y" kern kk#, + "V" kern kkk#, + "v" kern kkk#, + "W" kern kkk#, + "w" kern kkk#; + ligtable "I": "I" kern -k#; %fi % Richard III + % + %% ligature programs for |"-"|, |"`"|, and |"'"| are in the {\tt comlig} file + input llvligtb; % input ligs for quotes + fi + % uppercase Cyrillic ligs & kerns moved down +fi + +%%% fine lower +forsuffixes $= u, width_adj, cap_serif_fit, letter_fit, + body_height, cap_height, x_height, bar_height, comma_depth, + flare, cap_hair, stem, cap_stem, cap_curve, cap_ess, + cap_jut, beak_jut, beak, slab, cap_bar, cap_band, cap_notch_cut, + o, apex_o: $.#:=lower.$.#; endfor +fudge:=lower.fudge; + +if is_small_cap: + cap_sbeak# := 7/8 if serifs: max(beak#,desc_depth#) else: desc_depth# fi; + define_pixels(cap_sbeak); +fi + +% now try again with |lower| settings +font_setup; pseudo_setup; % |pseudo_setup| from ec + +if altcoding: + extra_endchar:=extra_endchar&"charcode:=charcode+code_offset"; + code_offset:=ASCII"a" - ASCII"A"; + input romanu; % majuscules (in lowercase positions) + code_offset:=-3; + input romspu; % \AE, \OE, \O\ (in positions of \ae, \oe, \o) + code_offset:=0; + input cscspu; % substitutes for the remaining characters of romspl +fi + +is_small_cap:=true; +input lgcyru; % Cyrillic majuscules (in lowercase positions) + +if wncoding: %Part used in WNCYR + input lgcspl; % numerals +fi + +if not monospace: + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + % + % Lowercase Latin ligs & kerns + % There are just the same ligs and kerns as in CM + % but they are built in more visible form + % + if altcoding: + ligtable "p": "t": "y": + "a" kern kk#; + ligtable "f": "v": "w": + "a" kern if serifs: kkk# else: kk#\\fi, + "k": "x": + "o" kern k#, + "c" kern k#, + "g" kern k#, + "q" kern k#; + ligtable "o": "d": + "x" kern k#, + "w" kern k#, + "a" kern k#, + "v" kern k#, + "y" kern k#; + ligtable "a": if serifs: "r": fi + "c" kern k#, + "o" kern k#, + "g" kern k#, + "u" kern k#, + "q" kern k#, + "l": "'" kern kk#, + "t" kern kk#, + "y" kern kk#, + "v" kern kkk#, + "w" kern kkk#; + ligtable "i": "i" kern -k#; % skiing + fi + % + u#:=upper.u#; % restored start u parameter + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % repeat three degrees of kerning + scantokens("input "&(substring(fonteq-2,fonteq) of param_base)&"liker"); % Cyrillic ligs & kerns +fi + +bye. +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/ldroman.mf b/Master/texmf-dist/fonts/source/lh/base/ldroman.mf new file mode 100644 index 00000000000..32fbe85173a --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/ldroman.mf @@ -0,0 +1,193 @@ +% +% ldroman.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Driver file for Roman and Sans Serif fonts +% - modified ROMAN.MF in Computer Modern fonts +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% There are also added SliTeX emulation: +% It differs from ldroman.mf (roman.mf) only in that it has been +% adjusted to call for sromanu.mf with a special uppercase I +% for the SLITeX fonts: lcmss8, lcmssb8, and lcmssi8. +% Written by Pierre A. MacKay, 16 Sept. 1986 +% & +% There also used special letters UKR_I LAT_I etc in Cyrillic glyphs +% + +LHver_check(3,4); % like |version_check| in ec + +if ligs>1: font_coding_scheme:="TeX text/Cyr - "&enc_name; + if altcoding: + spanish_shriek=oct"074"; spanish_query=oct"076"; + fi +else: font_coding_scheme:=if ligs=0: "TeX typewriter text/Cyr - "&enc_name + else: "TeX text without f-ligs/Cyr - "&enc_name fi; + if altcoding: + spanish_shriek=oct"016"; spanish_query=oct"017"; + fi +fi + +input lxpseudo; + +mode_setup; font_setup; +pseudo_setup; % |pseudo_setup| from ec + +if altcoding: + if slitex: + input sromanu; % upper case (majuscules) with SliTeX I + else: + input romanu; % upper case (majuscules) + fi + input romanl; % lower case (minuscules) + input greeku; % upper case Greek letters + input romand; % numerals + input romanp; % ampersand, question marks, currency sign + input romspl; % lowercase specials (dotless \i, ligature \ae, etc.) + input romspu; % uppercase specials (\AE, \OE, \O) + input punct; % punctuation symbols common to roman and italic text + input accent; % accents common to roman and italic text + if ligs>1: input romlig; fi % letter ligatures + if ligs<=1: input romsub; fi % substitutes for ligatures +fi + +if not vfcoding: % ligs for both altcoding and wncoding (dashes & quotes) + if ligs>0: input comlig; fi % ligatures common with italic text +fi + +input lgcyru; % Cyrillic upper case (majuscules) +input lgcyrl; % Cyrillic lower case (minuscules) +input lgcyrsym; % << >> ,, No +input lgcyracc; % Cyrillic accents +if old_cyr: + input lgocyrac; % Cyrillic Old Slav accents & signs +fi + +if wncoding: %Part used in WNCYR + input romand; % numerals + input lgpunct; % excerpts from punct.mf + input lgromp; % roman question mark + input lgrlig; % roman dotless i,j +fi + +font_slant slant; font_x_height x_height#; +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; + if altcoding: input llmligtb; fi % input ligs for quotes + if wncoding : input lwnligs; fi % input ligs for Cyrillic letters in WNCYR +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + % + % Latin ligs & kerns: + % There are just the same ligs and kerns as in CM + % but they are built in more visible form + TITLEfont:=false; SmallCapsfont:=false; ROMANfont:=true; + if altcoding: + ligtable "k": + if serifs: "v": + "a" kern -u#, fi\\ + "w": "e" kern k#, + "a" kern k#, + "o" kern k#, + "c" kern k#; + ligtable "P": "A" kern kk#, + "y": "o" kern k#, + "e" kern k#, + "a" kern k#, + "." kern kk#, + "," kern kk#; + ligtable "F": "V": "W": + if serifs: "o" kern kk#, + "e" kern kk#, + "u" kern kk#, + "r" kern kk#, + "a" kern kk#, + "A" kern kkk#, + else: "o" kern k#, + "e" kern k#, + "u" kern k#, + "r" kern k#, + "a" kern k#, + "A" kern kk#, fi + "K": "X": "O" kern k#, + "C" kern k#, + "G" kern k#, + "Q" kern k#; + ligtable "T": "y" kern if serifs: k# else: kk# fi, + "Y": "e" kern kk#, + "o" kern kk#, + "r" kern kk#, + "a" kern kk#, + "A" kern kk#, + "u" kern kk#; + ligtable "O": "D": + "X" kern k#, + "W" kern k#, + "A" kern k#, + "V" kern k#, + "Y" kern k#; + if serifs: + ligtable "h": "m": "n": + "t" kern k#, + "u" kern k#, + "b" kern k#, + "y" kern k#, + "v" kern k#, + "w" kern k#; + ligtable "c": + "h" kern k#, + "k" kern k#; + fi + ligtable "o": "b": "p": + "e" kern -k#, + "o" kern -k#, + "x" kern k#, + "d" kern -k#, + "c" kern -k#, + "q" kern -k#, + "a": if serifs: + "v" kern k#, + "j" kern u#, + else: "r" kern k#, fi + "t": "y" kern k#, + "u": "w" kern k#; + ligtable "A": if serifs: "R": fi\\ + "t" kern k#, + "C" kern k#, + "O" kern k#, + "G" kern k#, + "U" kern k#, + "Q" kern k#, + "L": "T" kern kk#, + "Y" kern kk#, + "V" kern kkk#, + "W" kern kkk#; + ligtable "g": "j" kern -k#; % logjam + ligtable "I": "I" kern -k#; % Richard III + % + % there are ligature/kern programs for |"f"| in the {\tt romlig} file + % and for |"-"|, |"`"|, and |"'"| in the {\tt comlig} file + input llvligtb; % input ligs & kerns for quotes + fi + scantokens("input "&(substring(fonteq-2,fonteq) of param_base)&"liker"); % Cyrillic ligs & kerns +fi + +bye. +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/ldtextit.mf b/Master/texmf-dist/fonts/source/lh/base/ldtextit.mf new file mode 100644 index 00000000000..3d6be4d1494 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/ldtextit.mf @@ -0,0 +1,175 @@ +% +% ldtextit.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Driver file for Text Italic fonts +% - modified TEXTIT.MF in Computer Modern fonts +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + + +input lxpseudo; + +mode_setup; font_setup; +pseudo_setup; % |pseudo_setup| from ec + + +if ligs>1: font_coding_scheme:="TeX text/Cyr - "&enc_name; + spanish_shriek=oct"074"; spanish_query=oct"076"; + if altcoding: + input italig; % letter ligatures + fi +else: font_coding_scheme:=if ligs=0: "TeX typewriter text/Cyr - "&enc_name + else: "TeX text without f-ligs/Cyr - "&enc_name fi; + if altcoding: + spanish_shriek=oct"016"; spanish_query=oct"017"; + fi +fi + +if altcoding: + input itall; % lower case (minuscules) + input italsp; % lowercase specials (dotless \i, ligature \ae, etc.) +fi + +input lgcyri; % Cyrillic lower case (minuscules) + +if wncoding: %Part used in WNCYR + input lgilig; % italic dotless i,j +fi + +font_slant slant; font_x_height x_height#; +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; + letter_fit#:=letter_fit:=0; +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; +fi + + +if altcoding: + input romanu; % upper case (majuscules) + input greeku; % upper case Greek letters + input itald; % numerals + input italp; % ampersand, question marks, currency sign + input romspu; % uppercase specials (\AE, \OE, \O) + input punct; % punctuation symbols common to roman and italic text + input accent; % accents common to roman and italic text + if ligs<=1: + input romsub; % substitutes for ligatures + fi +fi + +if not vfcoding: % ligs for both altcoding and wncoding (dashes & quotes) + if ligs>0: input comlig; fi % ligatures common with roman text +fi + +input lgcyru; % input common shapes +input lgcyrsym; % <<, >>, No +input lgcyracc; % Cyrillic accents +if old_cyr: + input lgocyrac; % Cyrillic Old Slav accents & signs +fi + +if wncoding: %Part used in WNCYR + input itald; % numerals + input lgpunct; % excerpts from punct.mf + input lgitalp; % italic question mark +fi + + +if monospace: + if altcoding: input llmligtb; fi % input ligs for quotes + if wncoding : input lwnligs; fi % input ligs for Cyrillic in WNCYR +else: + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + % + % Latin ligs & kerns + % There are just the same ligs and kerns as in CM + % but they are built in more visible form + % + TITLEfont:=false; SmallCapsfont:=false; ROMANfont:=false; + if altcoding: + ligtable "d": "w": "l": + "l" kern +u#; + ligtable "F": "V": + "o" kern kk#, + "e" kern kk#, + "u" kern kk#, + "r" kern kk#, + "a" kern kk#, + "A" kern kkk#, + "K": "X": "O" kern k#, + "C" kern k#, + "G" kern k#, + "Q" kern k#; + ligtable "T": "y" kern kk#, + "Y": "e" kern kk#, + "o" kern kk#, + "r" kern kk#, + "a" kern kk#, + "u" kern kk#, + "P": "W": "A" kern kk#; + ligtable "O": "D": + "X" kern k#, + "W" kern k#, + "A" kern k#, + "V" kern k#, + "Y" kern k#; + ligtable "A": "R": + "n" kern k#, + "l" kern k#, + "r" kern k#, + "u" kern k#, + "m" kern k#, + "t" kern k#, + "i" kern k#, + "C" kern k#, + "O" kern k#, + "G" kern k#, + "h" kern k#, + "b" kern k#, + "U" kern k#, + "k" kern k#, + "v" kern k#, + "w" kern k#, + "Q" kern k#, + "L": "T" kern kk#, + "Y" kern kk#, + "V" kern kkk#, + "W" kern kkk#, + "b": "c": "e": "o": "p": "r": + "e" kern -u#, + "a" kern -u#, + "o" kern -u#, + "d" kern -u#, + "c" kern -u#, + "g" kern -u#, + "q" kern -u#; + ligtable "n": "'" kern kkk#; + % + % there are ligature/kern programs for |"f"| in the {\tt italig} file + % and for |"-"|, |"`"|, and |"'"| in the {\tt comlig} file + input llvligtb; % input ligs for quotes + fi + scantokens("input "&(substring(fonteq-2,fonteq) of param_base)&"liker"); % Cyrillic ligs & kerns +fi + +bye. +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/ldtitle.mf b/Master/texmf-dist/fonts/source/lh/base/ldtitle.mf new file mode 100644 index 00000000000..9da66a33785 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/ldtitle.mf @@ -0,0 +1,92 @@ +% +% ldtitle.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Driver file for SLITeX Roman and Sans Serif fonts +% - modified TITLE.MF in Computer Modern fonts +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% This makes a short font (caps and digits only) +% + +LHver_check(3,4); % like |version_check| in ec + +font_coding_scheme:="Caps and digits/Cyr - "&enc_name; + +input lxpseudo; + +mode_setup; font_setup; +pseudo_setup; % |pseudo_setup| from ec + +if altcoding: + input romanu; % upper case (majuscules) +fi + +if altcoding or wncoding: + input romand; % numerals +fi + +input lgcyru; % Cyrillic upper case (majuscules) + +font_slant slant; font_x_height x_height#; +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; + if wncoding: input lwnligs; fi % input ligs for Cyrillic in WNCYR +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + % + % Latin ligs & kerns + % There are just the same ligs and kerns as in CM + % but they are built in more visible form + % + TITLEfont:=true; SmallCapsfont:=false; ROMANfont:=false; + if altcoding: + ligtable "P": "T": "Y": + "A" kern kk#; + ligtable "F": "V": "W": + "A" kern if serifs: kkk# else: kk#\\fi, + "K": "X": "O" kern k#, + "C" kern k#, + "G" kern k#, + "Q" kern k#; + ligtable "O": "D": + "X" kern k#, + "W" kern k#, + "A" kern k#, + "V" kern k#, + "Y" kern k#; + ligtable "A": if serifs: "R": fi + "C" kern k#, + "O" kern k#, + "G" kern k#, + "U" kern k#, + "Q" kern k#, + "L": "T" kern kk#, + "Y" kern kkk#, + "V" kern kk#, + "W" kern kkk#; + ligtable "I": "I" kern -k#; % Richard III + fi + % + scantokens("input "&(substring(fonteq-2,fonteq) of param_base)&"liker"); % Cyrillic ligs & kerns +fi + +bye. +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lecsc.mf b/Master/texmf-dist/fonts/source/lh/base/lecsc.mf new file mode 100644 index 00000000000..12cb88e33d1 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lecsc.mf @@ -0,0 +1,129 @@ +% +% lecsc.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Driver file, called by parameter files for "caps and small caps" fonts +% - modified EXCSC.MF in European Computer Modern fonts (ec fonts) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + + +input lxpseudo; + +mode_setup; font_setup; +pseudo_setup; % |pseudo_setup| from ec + +% upper part exr(u/l)(lett/west/east) changed to cyrillic glyphs +%vvv +if roman_ec: + input exrulett; +fi +%<<< +input lgcyru; % input Cyrillic uppercase shapes + +input lgcyrsym; % floating symbols in Cyrillic +input lgengsym; % latin symbols +input lgromp; % roman & ? +input lgrdigit; % roman digits + +is_small_cap:=true; +%%% fine higher +% the `higher' values are used while putting accents and attaching ogoneks +forsuffixes $=u,o,letter_fit,x_height,bar_height,body_height,stem: + higher.$.#:=$.#; higher.$:=$; +endfor + +%%% fine lower +begingroup +forsuffixes $= u, width_adj, cap_serif_fit, letter_fit, + body_height, cap_height, x_height, bar_height, comma_depth, + flare, dot_size, cap_hair, stem, cap_stem, cap_curve, cap_ess, + cap_jut, beak_jut, beak, slab, cap_bar, cap_band, cap_notch_cut, + o, apex_o: save $; $.#:=lower.$.#; endfor +fudge:=lower.fudge; + +% optional part: +forsuffixes $ = depth_corr, left_corr, top_breadth_corr, tip_breadth_corr, + tip_xcorr, tip_ycorr, pre_angle, post_angle, pre_limit, post_limit, + pre_lightness, post_lightness, pre_deflexion, post_deflexion, cap_flat, + ogonek_pen#: if known lower.$: $:=lower.$; fi +endfor + +input lxpseudo; % Recalculate pseudoparameters + +font_setup; pseudo_setup; % now try again with |lower| settings + +% upper part exr(u/l)(lett/west/east) changed to cyrillic glyphs +%vvv +if roman_ec: + extra_endchar:=extra_endchar&"charcode:=charcode+code_offset"; + code_offset:=ASCII"a" - ASCII"A"; + input exrulett; + code_offset:=0; +fi +%<<< +input lgcyru; % input Cyrillic uppercase shapes + +input lgcspl; % Small Caps dotless I, J and FF-ligatures for ec_roman + +input lypseudo; % Recalculate pseudoparameters for capital accents + +font_setup; pseudo_setup; % now try again with |lower| settings + +input lycyracc; % Accents for capital letters with small cap parameters +if old_cyr: + input lgocyrac; % Cyrillic Old Slav accents & signs +fi + + +endgroup; + + +% Fontparameter +% +font_coding_scheme:="TeX Cyrillic Font Encoding - "&enc_name; +boundarychar:=oct"027"; +font_slant slant; +font_x_height x_height#; +font_cap_height cap_height#; +font_asc_height asc_height#; +font_acc_cap_height (max(cap_height#+acc_height#,uc_acc_height#)); +font_desc_depth desc_depth#; +font_max_height (max(asc_height#,body_height#, + cap_height#+acc_height#,uc_acc_height#)); +font_max_depth (max(desc_depth#,paren_depth#,the_ogonek_depth#)); +% font_digit_width % set inside the digits file +% font_cap_stem % set after the programme of the capital I +font_baselineskip (1.2*designsize); + +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; + input llmligtb; % do the ligature programs for monospaced fonts +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + TITLEfont:=false; SmallCapsfont:=true; ROMANfont:=false; + input llvligtb; % do the ligature programs, not for monospaced fonts + if roman_ec: input llcligtb; fi + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + scantokens("input "&(substring(fonteq-2,fonteq) of param_base)&"liker"); % Cyrillic ligs & kerns +fi + +bye. +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/leroman.mf b/Master/texmf-dist/fonts/source/lh/base/leroman.mf new file mode 100644 index 00000000000..03b582c717d --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/leroman.mf @@ -0,0 +1,85 @@ +% +% lecsc.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Driver file, called by parameter files with roman style fonts +% - modified EXROMAN.MF in European Computer Modern fonts (ec fonts) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + + +input lxpseudo; + +mode_setup; font_setup; +pseudo_setup; % |pseudo_setup| from ec + +% upper part exr(u/l)(lett/west/east) changed to cyrillic glyphs +%vvv +if roman_ec: + input exrulett; + input exrllett; +fi +%<<< +input lgcyru; % input Cyrillic Uppercase shapes +input lgcyrl; % input Cyrillic Lowercase shapes + +input lgcyrsym; % floating symbols in Cyrillic +input lgengsym; % latin symbols +input lgromp; % roman & ? +input lgrdigit; % roman digits +input lgrlig; % roman dotless i j (and ff-ligatures) + +input lgcyracc; % accents +if old_cyr: + input lgocyrac; % Cyrillic Old Slav accents & signs +fi + +% +% Fontparameter +% +font_coding_scheme:="TeX Cyrillic Font Encoding - "&enc_name; +boundarychar:=oct"027"; +font_slant slant; +font_x_height x_height#; +font_cap_height cap_height#; +font_asc_height asc_height#; +font_acc_cap_height (max(cap_height#+acc_height#,uc_acc_height#)); +font_desc_depth desc_depth#; +font_max_height (max(asc_height#,body_height#, + cap_height#+acc_height#,uc_acc_height#)); +font_max_depth (max(desc_depth#,paren_depth#,the_ogonek_depth#)); +% font_digit_width % set inside the digits file +% font_cap_stem % set after the programme of the capital I +font_baselineskip (1.2*designsize); + +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; + input llmligtb; % do the ligature programs for monospaced fonts +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + TITLEfont:=false; SmallCapsfont:=false; ROMANfont:=true; + input llvligtb; % do the ligature programs, not for monospaced fonts + if roman_ec: input llrligtb; fi + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + scantokens("input "&(substring(fonteq-2,fonteq) of param_base)&"liker"); % Cyrillic ligs & kerns +fi + +bye. +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/letextit.mf b/Master/texmf-dist/fonts/source/lh/base/letextit.mf new file mode 100644 index 00000000000..19778443a90 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/letextit.mf @@ -0,0 +1,94 @@ +% +% letextit.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Driver file, called by parameter files with italic style fonts +% - modified EXTEXTIT.MF in European Computer Modern fonts (ec fonts) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + + +input lxpseudo; + +mode_setup; font_setup; +pseudo_setup; % |pseudo_setup| from ec + +% upper part exr(u/l)(lett/west/east) changed to cyrillic glyphs +%vvv +if roman_ec: + input exillett; +fi +%<<< +input lgcyri; % input Cyrillic Italic shapes + +input lgilig; % italic dotless i j (and ff-ligatures) + +%!!! this command moved here accordingly to CM textit file +if monospace: letter_fit#:=letter_fit:=0; fi +%vvv +if roman_ec: + input exrulett; +fi +%<<< +input lgcyru; % input Cyrillic uppercase shapes + +input lgcyrsym; % floating symbols in Cyrillic +input lgengsym; % latin symbols +input lgitalp; % italic & ? +input lgidigit; % italic digits + +input lgcyracc; % accents +if old_cyr: + input lgocyrac; % Cyrillic Old Slav accents & signs +fi + +% +% Fontparameter +% +font_coding_scheme:="TeX Cyrillic Font Encoding - "&enc_name; +boundarychar:=oct"027"; +font_slant slant; +font_x_height x_height#; +font_cap_height cap_height#; +font_asc_height asc_height#; +font_acc_cap_height (max(cap_height#+acc_height#,uc_acc_height#)); +font_desc_depth desc_depth#; +font_max_height (max(asc_height#,body_height#, + cap_height#+acc_height#,uc_acc_height#)); +font_max_depth (max(desc_depth#,paren_depth#,the_ogonek_depth#)); +% font_digit_width % set inside the digits file +% font_cap_stem % set after the programme of the capital I +font_baselineskip (1.2*designsize); + +if monospace: font_normal_space 9u#; % no stretching or shrinking + font_quad 18u#; + font_extra_space 9u#; + letter_fit#:=letter_fit:=0; + input llmligtb; % do the ligature programmes for monospaced fonts +else: font_normal_space 6u#+2letter_fit#; + font_normal_stretch 3u#; font_normal_shrink 2u#; + font_quad 18u#+4letter_fit#; + font_extra_space 2u#; + TITLEfont:=false; SmallCapsfont:=false; ROMANfont:=false; + input llvligtb; % do the ligature programmes for proportionally spaced fonts + if roman_ec: input lliligtb; fi + k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + scantokens("input "&(substring(fonteq-2,fonteq) of param_base)&"liker"); % Cyrillic ligs & kerns +fi + +bye. +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcspl.mf b/Master/texmf-dist/fonts/source/lh/base/lgcspl.mf new file mode 100644 index 00000000000..10d16248635 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcspl.mf @@ -0,0 +1,67 @@ +% +% lgcspl.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Metafont program for the characters in positions of ligatures +% for the "caps and small caps" fonts +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% I,J +% if roman_ec: FI,FL,FFI,FFL fi -- for T2* stuff only (lgcsplff.mf) +% + +LHver_check(3,4); % like |version_check| in ec + +if roman_ec: + +input lgcsplff.mf + +fi % roman_ec + +lhchar "Small Caps letter I"; +cyrchar(i_dotl,max(6u#,4u#+cap_stem#),cap_height#,0); +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs or slitex or monospace: + dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif +math_fit(0,.5ic#); penlabels(1,2); endchar; + +lhchar "Small Caps letter J"; +cyrchar(j_dotl,9u#,cap_height#,0); +italcorr cap_height#*slant-cap_serif_fit# + +.75cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(0,cap_serif_fit#); +pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); +top y1=h; rt x1r=hround(w-2u); x2=x1; y2=.21h; +if serifs: pos3(vair,-90); pos4(cap_hair,-180); + pos5(flare+(cap_stem-stem),-180); + bot y3r=-o; x3=.5[x4,x2]; y5=1/6h; rt x5l=hround 2.75u; z5r=z4r; + filldraw stroke z1e--z2e&super_arc.e(2,3); % stem and arc + dish_serif(1,2,a,1/3,1.3cap_jut,b,1/3,.75cap_jut); % serif + pickup tiny.nib; bulb(3,4,5); % bulb +else: filldraw stroke z1e--z2e; % stem + pickup fine.nib; pos3(cap_stem',0); z3=z2; + pos4(flare,angle(6.5u,-h)); pos5(1.1flare,-100); + bot y4r=-o; x4r=.5[x5r,x3r]; lft x5r=hround.75u; bot y5r=vround.06h-o; + filldraw stroke z3e{down}....term.e(4,5,left,1,4); fi % arc and terminal +math_fit(0,.5ic#-.5u#); penlabels(1,2,3,4,5); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcsplff.mf b/Master/texmf-dist/fonts/source/lh/base/lgcsplff.mf new file mode 100644 index 00000000000..53147ac77de --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcsplff.mf @@ -0,0 +1,192 @@ +% +% lgcsplff.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Metafont program for the characters in positions of ligatures +% for the "caps and small caps" fonts +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% if roman_ec: FI,FL,FFI,FFL fi -- for T2* stuff only +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Small Caps letter FF"; +beginchar(oct"033",2(11.5u#-width_adj#),cap_height#,0); +italcorr cap_height#*slant-.25u#; +normal_adjust_fit(cap_serif_fit#,0); +h:=vround(h-stem_corr); +w':=11.5u-width_adj; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: rt x6r=hround(w'-4u+.5hair); y6=good.y(y5l+.6beak)+eps; + rt x9r=hround(w'-.5u); +else: rt x6r=hround(w'-1.5u); y6=y5l+eps; rt x9r=hround(w'-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +% the second F +currentpicture:=currentpicture + currentpicture shifted (w',0); +math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar; + +lhchar "Small Caps letter FI"; +beginchar(oct"034",11.5u#-width_adj#+max(6u#,4u#+cap_stem#),cap_height#,0); +italcorr cap_height#*slant-.25u#; +normal_adjust_fit(cap_serif_fit#,0); +h:=vround(h-stem_corr); +w':=11.5u-width_adj; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: rt x6r=hround(w'-4u+.5hair); y6=good.y(y5l+.6beak)+eps; + rt x9r=hround(w'-.5u); +else: rt x6r=hround(w'-1.5u); y6=y5l+eps; rt x9r=hround(w'-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +% the I +xshift:=w'; +w':=w-xshift; +pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0); +lft x11l=lft x12l=hround(xshift+.5w'-.5cap_stem); top y11=h; bot y12=0; +filldraw stroke z11e--z12e; % stem +if serifs or slitex or monospace: + dish_serif(11,12,aa,1/3,1.05cap_jut,bb,1/3,1.05cap_jut); % upper serif + dish_serif(12,11,gg,1/3,1.05cap_jut,dd,1/3,1.05cap_jut); fi % lower serif +math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar; + +lhchar "Small Caps letter FL"; +beginchar(oct"035",(11.5u#-width_adj#)+11u#-width_adj#,cap_height#,0); +italcorr cap_height#*slant-.25u#; +normal_adjust_fit(cap_serif_fit#,0); +h:=vround(h-stem_corr); +w':=11.5u-width_adj; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: rt x6r=hround(w'-4u+.5hair); y6=good.y(y5l+.6beak)+eps; + rt x9r=hround(w'-.5u); +else: rt x6r=hround(w'-1.5u); y6=y5l+eps; rt x9r=hround(w'-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +% the L +xshift:=w'; +pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0); +lft x11l=lft x12l=hround xshift+max(2u,3u-.5cap_stem); top y11=h; bot y12=0; +filldraw stroke z11e--z12e; % stem +pickup crisp.nib; pos13(slab,-90); pos14(hair,0); +bot y13r=0; x13=x12; y14=y13l+7/6beak+eps; rt x14r=hround(w-.75u); +arm(13,14,eee,1.2beak_darkness,beak_jut); % lower arm and beak +if serifs: dish_serif(11,12,aaa,1/3,cap_jut,bbb,1/3,1.25cap_jut); % upper serif + nodish_serif(12,11,ccc,1/3,cap_jut,ddd,1/3,.5cap_jut); fi % lower serif +math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar; + +lhchar "Small Caps letter FFI"; +beginchar(oct"036",2(11.5u#-width_adj#)+max(6u#,4u#+cap_stem#),cap_height#,0); +italcorr cap_height#*slant-.25u#; +normal_adjust_fit(cap_serif_fit#,0); +h:=vround(h-stem_corr); +w':=11.5u-width_adj; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: rt x6r=hround(w'-4u+.5hair); y6=good.y(y5l+.6beak)+eps; + rt x9r=hround(w'-.5u); +else: rt x6r=hround(w'-1.5u); y6=y5l+eps; rt x9r=hround(w'-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +% the second F +currentpicture:=currentpicture + currentpicture shifted (w',0); +% the I +xshift:=2w'; +w':=w-xshift; +pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0); +lft x11l=lft x12l=hround(xshift+.5w'-.5cap_stem); top y11=h; bot y12=0; +filldraw stroke z11e--z12e; % stem +if serifs or slitex or monospace: + dish_serif(11,12,aa,1/3,1.05cap_jut,bb,1/3,1.05cap_jut); % upper serif + dish_serif(12,11,gg,1/3,1.05cap_jut,dd,1/3,1.05cap_jut); fi % lower serif +math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar; + +lhchar "Small Caps letter FFL"; +beginchar(oct"037",2(11.5u#-width_adj#)+11u#-width_adj#,cap_height#,0); +italcorr cap_height#*slant-.25u#; +normal_adjust_fit(cap_serif_fit#,0); +h:=vround(h-stem_corr); +w':=11.5u-width_adj; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: rt x6r=hround(w'-4u+.5hair); y6=good.y(y5l+.6beak)+eps; + rt x9r=hround(w'-.5u); +else: rt x6r=hround(w'-1.5u); y6=y5l+eps; rt x9r=hround(w'-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +% the I +currentpicture:=currentpicture + currentpicture shifted (w',0); +% the L +xshift:=2w'; +pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0); +lft x11l=lft x12l=hround xshift+max(2u,3u-.5cap_stem); top y11=h; bot y12=0; +filldraw stroke z11e--z12e; % stem +pickup crisp.nib; pos13(slab,-90); pos14(hair,0); +bot y13r=0; x13=x12; y14=y13l+7/6beak+eps; rt x14r=hround(w-.75u); +arm(13,14,eee,1.2beak_darkness,beak_jut); % lower arm and beak +if serifs: dish_serif(11,12,aaa,1/3,cap_jut,bbb,1/3,1.25cap_jut); % upper serif + nodish_serif(12,11,ccc,1/3,cap_jut,ddd,1/3,.5cap_jut); fi % lower serif +math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar; + +endinput; diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcyracc.mf b/Master/texmf-dist/fonts/source/lh/base/lgcyracc.mf new file mode 100644 index 00000000000..637f7883d79 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcyracc.mf @@ -0,0 +1,480 @@ +% +% lgcyracc.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Accents +% - borrowed from ec fonts: "00--"0c +% + additional Cyrilic accents +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of accents +% +% Agrave "00 ` accent grave +% Aacute "01 ' accent acute +% Ahat "02 ^ accent circumflex +% Atilde "03 ~ accent tilde +% Aumlaut "04 accent umlaut +% Aacute_dbl "05 '' accent hungarian umlaut +% Aring "06 Scandinavian circle +% Ahachek "07 accent hacheck +% Abreve "08 accent breve +% Abar "09 accent macron (bar) +% Adot "0a accent dot +% Acedilla "0b cedilla +% Aogonek "0c ogonek +% +% Afrown "12 accent reversed breve +% Agrave_dbl "13 `` accent reversed hungaran umlaut +% Acyrbreve "14 Cyrilllic breve +% Ahcross "17 accent hor cross +% Agrave_cross "19 accent grave_cross +% Aacute_cross "1a accent acute_cross +% +% T2-outsiders +% +% Avcross - accent vert cross +% Abar_long - accent macron (bar) long +% Abreve_long - accent breve long +% Atilde_long - accent tilde long +% Adesc_lo - lowercase descender ? italic +% Adesc_up - uppercase descender +% Alcomma - comma below letter +% Atie - tie accent (like Afrown) +% Acomma - comma above letter +% + +LHver_check(3,4); % like |version_check| in ec + +%accents +% +lhchar "Grave accent"; +cyrchar_twice(Agrave,9u#,x_height#,0); % |put_gravis| changes the height +adjust_fit(0,0); +put_gravis; +repeat_once; +endchar; + +lhchar "Acute accent"; % using acute from plfonts +cyrchar_twice(Aacute,9u#,x_height#,0); % |put_accent| changes the height +italcorr h#*slant-if serifs: 1.5 fi u#; +adjust_fit(0,0); +put_accent; +repeat_once; +endchar; + +lhchar "Circumflex (hat) accent"; +cyrchar(Ahat,9u#,x_height#+acc_height#,0); +lowercase_hat(.5w,oo,0,1,2,3,4); +penlabels(0,1,2,3,4); endchar; + +lhchar "Tilde (squiggle) accent"; +cyrchar(Atilde,9u#,x_height#+acc_height#,0); +italcorr h#*slant-u#; +adjust_fit(0,0); +lowercase_tilde(0,0 if variant_g: -1/6acc_height fi,1,2,3,4,5); +penlabels(1,2,3,4,5); endchar; + +lhchar "Umlaut (double dot) accent"; +cyrchar(Aumlaut,9u#,lc_trema_height#,0); +italcorr h#*slant+.5udot_diam#-2.25u#; +adjust_fit(0,0); +lowercase_umlaut(0,0,1,2,3,4); penlabels(1,2,3,4); endchar; + +lhchar "Double acute accent (Long Hungarian umlaut accent)"; +cyrchar_twice(Aacute_dbl,9u#,x_height#+acc_height#,0); +italcorr h#*slant-u#; +adjust_fit(0,0); +if monospace: hpos_corr=-2u; put_accent; hpos_corr=2u; put_accent; +else: hpos_corr=-1.5u; put_accent; hpos_corr=1.5u; put_accent; fi +repeat_once; +endchar; + +lhchar "Scandinavian circle accent"; +cyrchar(Aring,13u#+4/3acc_height#*slant,x_height#+acc_height#,0); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +lowercase_circle(.5w,vround(1/3[x_height,h]+apex_o),1,2,3,4); +penlabels(1,2,3,4); endchar; + +lhchar "Hachek (check) accent"; +cyrchar(Ahachek,9u#,x_height#+acc_height#,0); +adjust_fit(0,0); +lc_hachek_accent(.5w); +endchar; + +lhchar "Breve accent"; +cyrchar(Abreve,9u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +lowercase_breve(.5w,0,1,2,3); +penlabels(1,2,3); endchar; + +lhchar "Macron (bar) accent"; +cyrchar(Abar,9u#,lc_trema_height#,0); +italcorr h#*slant-.75u#; +adjust_fit(0,0); +numeric macron_breadth; macron_breadth:=Vround .2[vair,stem]; +pickup if serifs: crisp.nib else: fine.nib fi; +pos1(macron_breadth,90); pos2(macron_breadth,90); +top y1r=top y2r=h+o; lft x1=w-rt x2=hround 1.25u; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +lhchar "Dot accent"; +cyrchar_twice(Adot,5u#,x_height#+acc_height#,0); +italcorr h#*slant+.5idot_diam#-2u#; +adjust_fit(0,0); +put_dot(tiny,max(dot_size#,cap_curve#)); +repeat_once; +penlabels(1,2); endchar; + +lhchar "Cedilla accent"; +cyrchar(Acedilla,8u#,0,.875desc_depth#); +adjust_fit(0,0); +lowercase_cedilla(.5w,0,1,2,3,4,5); +penlabels(1,2,3,4,5); endchar; + +lhchar "Ogonek accent"; +cyrchar(Aogonek,5u#,0,desc_depth#); +italcorr 0; +adjust_fit(0,0); +%the_ogonek(.5w,0, 1,2,3); +% polish-like "easy_ogonek" instead of Computer Modern "the_ogonek" +def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi +enddef; +% |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: +ogonek_pos=(.5w if not serifs: +.5stem if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; +easy_ogonek(the_pen, 1,2,3); % ogonek +penlabels(1,2,3); endchar; + +lhchar "Cyrillic accent hcross - horisontal cross"; +cyrchar(Ahcross,5u#,x_height#,0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +% hstroke +numeric outer_jut; +% some funny fonts have an extremally small |jut|: +outer_jut=.5stem+if serifs: max(limit_dist,if hefty: .8 fi\\ jut) else: 1.7u fi; +bar_stroke(.5w-outer_jut,.5w+outer_jut); % bar +endchar; + +lhchar "Cyrillic accent vcross - vertical cross"; +cyrchar(Avcross,5u#,x_height#,0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +% vcross +if serifs: pickup crisp.nib; else: pickup fine.nib; fi +numeric middle_weight; +middle_weight=max(currentbreadth+eps,.6[thin_join,vair]); +pos1(middle_weight,0); pos2(middle_weight,0); +lft x1l=lft x2l=hround(.5w-.5middle_weight); +top y2-bot y1=.55x_height; .5[y1,y2]=bar_height; +filldraw stroke z1e--z2e; +endchar; + +lhchar "Cyrillic accent acute_cross - diagonal cross"; % cross from pl_ml (plfonts) +cyrchar_twice(Aacute_cross,5u#,x_height#,0); +italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#,serif_fit#); +numeric unbalance,outer_jut; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5stem+if serifs: max(limit_dist,if hefty: .8 fi\\ jut) else: 1.7u fi; +put_cyrcross(.5w,0,outer_jut,unbalance*outer_jut); +repeat_once; +endchar; + +lhchar "Cyrillic accent grave_cross - diagonal cross"; % cross from pl_ml (plfonts) +cyrchar_twice(Agrave_cross,5u#,x_height#,0); +italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#,serif_fit#); +numeric unbalance,outer_jut; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5stem+if serifs: max(limit_dist,if hefty: .8 fi\\ jut) else: 1.7u fi; +put_cyrcross(.5w,0,-outer_jut,-unbalance*outer_jut); +repeat_once; +endchar; + +lhchar "Cyrillic accent Agrave_dbl - double grave"; +cyrchar_twice(Agrave_dbl,9u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +if monospace: hpos_corr=-2u; put_gravis; hpos_corr=2u; put_gravis; +else: hpos_corr=-1.5u; put_gravis; hpos_corr=1.5u; put_gravis; fi +repeat_once; +endchar; + +lhchar "Cyrillic accent cyrillic breve"; +cyrchar(Acyrbreve,9u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +cbreve(.5w,0, 1,2,3,4,5,6,7); +endchar; + +lhchar "Cyrillic frown accent"; +cyrchar(Afrown,9u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +%!!! lowercase_breve flipped +x_center:=.5w; y_move:=0; _one:=1; _two:=2; _three:=3; +% +pickup crisp.nib; pos[_one](vair,180); +pos[_three](vair,0); +top y[_two]r=h+oo+eps; %!!!v +x[_two]=x_center; +lft x[_one]r=hround(x[_two]-2.5u + if monospace: /expansion_factor fi -0.5vair); +rt x[_three]r=hround(x[_two]+2.5u + if monospace: /expansion_factor fi +0.5vair); +numeric mid_thickness; mid_thickness=max(crisp.breadth,vround 1/3[vair,stem]);%!!! +bot y[_one]=bot y[_three]= %!!! + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5crisp + else: vround 2/3[x_height+acc_height,x_height] fi; +if y[_two]r<(y[_one]+.5crisp+eps): %!!! + y[_two]r:=y[_one]+.5crisp+eps; fi %!!! +pos[_two](mid_thickness,90); %!!! moved here after if +filldraw stroke z[_one]e{up}... + z[_two]e{right}...{down}z[_three]e; % stroke +% +penlabels(1,2,3); endchar; + +% +% T2-outsiders +% +lhchar"Cyrillic tie accent"; % centered +cyrchar(Atie,9u#,asc_height#,0); +italcorr 4/9[x_height#,asc_height#]*slant+4.5u#+2letter_fit#+.5hair#; +adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi); +pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90); +pos3(hair,0); +lft x1r=w-rt x3r=hround(2u-.5vair); x2=.5w; +y1=y3=4/9[x_height,asc_height]; top y2r=vround 8/9[x_height,asc_height]; +filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % arc +penlabels(1,2,3); endchar; + +lhchar "Cyrillic accent Abreve_long - long breve"; %accent width enlarged by 3u +cyrchar(Abreve_long,12u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +x_center:=.5w; y_move:=0; +_one:=1; _two:=2; _three:=3; +pickup crisp.nib; pos[_one](vair,-180); +pos[_three](vair,0); +top y[_one]=top y[_three]=h; +x[_two]=x_center; +lft x[_one]r=hround(x[_two]-4.75u%!2.5u + if monospace: /expansion_factor fi -0.5vair); +rt x[_three]r=hround(x[_two]+4.75u%!2.5u + if monospace: /expansion_factor fi +0.5vair); +numeric mid_thickness; mid_thickness=vround 1/3[vair,stem]; +pos[_two](mid_thickness,-90); +bot y[_two]r= + vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness); +filldraw stroke z[_one]e{down}... + z[_two]e{right}...{up}z[_three]e; % stroke +endchar; + +lhchar "Cyrillic accent Abar_long - long bar"; %accent width enlarged by 3u +cyrchar(Abar_long,12u#,lc_trema_height#,0); +italcorr h#*slant-.75u#; +adjust_fit(0,0); +numeric macron_breadth; macron_breadth:=Vround .2[vair,stem]; +pickup if serifs: crisp.nib else: fine.nib fi; +pos1(macron_breadth,90); pos2(macron_breadth,90); +top y1r=top y2r=h+o; lft x1=w-rt x2=hround .5u;%!1.25u +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +lhchar "Cyrillic accent Adesc_up - uppercase descender"; +cyrchar(Adesc_up,5u#,pdot_diam#,cap_sbeak#); +adjust_fit(0,cap_serif_fit#); +pickup tiny.nib; +pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); +top y1=h; bot y2=0; +inner_jut:=.5cap_stem+eps; +numeric arm_thickness; arm_thickness=slab+vair_corr; +save slab,bracket; +bracket:=0; slab:=arm_thickness; % bottom.slab +numeric left_jut; +left_jut= + if serifs: max(limit_dist,if monospace: 1.414cap_jut else: 1.1cap_jut fi) + else: hround (r-rt x2r-.65u) fi; +cyr_serif(2,1,a,1/3,beak_darkness,left_jut,beak_jut); % right descender +endchar; + +lhchar "Cyrillic accent Adesc_lo - lowercase descender"; +cyrchar(Adesc_lo,5u#,pdot_diam#,sbeak#); +adjust_fit(0,serif_fit#); +pickup tiny.nib; +pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem-eps); +top y1=h; bot y2=0; +save slab,bracket; +bracket:=0; slab:=vair; % lower.slab +numeric left_jut; +left_jut=if serifs: + max(limit_dist,if monospace: 1.414jut else: 1.1jut fi) + else: hround (r-rt x2r-.5u) fi; +cyr_serif(2,1,a,1/3,beak_darkness,left_jut,.6beak_jut); % right descender +endchar; + +lhchar "Cyrillic accent Adesc_it - italic descender"; +cyrchar(Adesc_it,5u#,pdot_diam#,desc_depth#); +adjust_fit(0,.1u#); +pickup fine.nib; +pos1(vair,180); x1=.5w; y1=.4bar_height; +i_serif(1,x); +endchar; + +lhchar "Cyrillic accent Atilde_long - long tilde"; %accent width enlarged by 3u +cyrchar(Atilde_long,12u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +x_move:=0; y_move:=0; +_one:=1; _two:=2; _three:=3; _four:=4; _five:=5; +h':=min(asc_height,10/7x_height+.5dot_size); +if serifs: numeric theta; + theta=angle(1/6( + 8.5u if monospace: /expansion_factor fi-vair),%!6u + 1/4(h'-x_height)); + pickup crisp.nib; + numeric mid_width; mid_width=.4[vair,stem]; + pos[_one](vair,theta+90); + pos[_two](vair,theta+90); + pos[_three](vair,theta+90); + pos[_four](vair,theta+90); + z[_two]-z[_one]= + z[_four]-z[_three]=(mid_width-crisp)*dir theta; + lft x[_one]r=hround(x_move+0.5w-5.25u if monospace: /expansion_factor fi);%!3u + rt x[_four]l=hround(x_move+0.5w+5.25u if monospace: /expansion_factor fi);%!3u + top y[_four]r=h'; + bot y[_one]l=vround(bot y[_one]l+ + min(2/3[x_height,h'],y[_three]l-.25vair)-top y[_one]r); + pair delta; + ypart delta=3(y[_three]l-y[_one]l); + delta=whatever*dir theta; + filldraw z[_one]l.. + controls(z[_one]l+ + delta)and(z[_three]l-delta)..z[_three]l..z[_four]l + --z[_four]r.. + controls(z[_four]r-delta)and(z[_two]r+delta).. + z[_two]r..z[_one]r--cycle; % stroke +else: + pickup fine.nib; + pos[_one](vair,180); + pos[_two](vair,90); + pos[_three](.5[vair,slab],90); + pos[_four](vair,90); + pos[_five](vair,180); + lft x[_one]r=hround (x_move + 0.5w-5.25u);%!3u + rt x[_five]l=hround (x_move + 0.5w+5.25u);%!3u + x[_two]-x[_one]= + x[_three]-x[_two]= + x[_four]-x[_three]=x[_five]-x[_four]; + bot y[_one]=bot y[_four]l=y_move+vround(.75[x_height,h]-vair); + top y[_two]r=top y[_five]=h+y_move; + y[_three]=.5[y[_two],y[_four]]; + filldraw stroke + z[_one]e{up}... + z[_two]e{right}.. + z[_three]e.. + {right}z[_four]e...{up}z[_five]e; fi % stroke +endchar; + +lhchar "Cyrillic accent Acomma - comma above letter"; +cyrchar(Acomma,5u#,x_height#+1.25acc_height#,0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +%ac_comma(0,0,1.25acc_height, 1,2,3,4,5)(above); +x_move:=0; y_move:=0; +depth:=1.25acc_height; +_zero:=1; _one:=2; _two:=3; _three:=4; _four:=5; +numeric height,bulb_diam; +height=if serifs: depth+.5fine-max(.27depth,o+hair) + else: vround(2/3depth) + fi; +bulb_diam=hround max(fine.breadth,min(dot_size,.55height)); +if square_dots: + % vertical above letter + pickup fine.nib; + pos[_one](vair,0); + pos[_two](.5[vair,stem],0); + top y[_two]=h+y_move; + bot y[_one]=vround(y[_two]-height); + x[_two]=x[_one]=.5w+x_move; + filldraw stroke z[_one]e--z[_two]e; % diagonal +else: + % comma above letter + pickup fine.nib; + x[_four]-.5bulb_diam=hround(.5w+x_move-.5bulb_diam); + y[_four]+.5bulb_diam=h+y_move; + pos[_four](bulb_diam,90); + pos[_one](vair,90); pos[_two](vair,0); pos[_three](vair,-45); + z[_one]r=z[_four]r; rt x[_two]r=hround(x[_four]+.5bulb_diam + +if monospace:.28u / expansion_factor else:.25u fi)+2eps; + x[_three]=x[_four]-.5u if monospace: /expansion_factor fi; + y[_two]=1/3[y[_one],y[_three]]; + bot y[_three]r=vround(y[_four]-(height-.5bulb_diam)); + y_:=ypart((z[_one]{right}...z[_two]{down}...z[_three]) + intersectiontimes (z[_four]l{right}..{left}z[_four]r)); + if y_<0: y_:=1; fi + filldraw z[_four]r{left}..subpath (0,y_) + of (z[_four]l{right}..{left}z[_four]r)--cycle; % dot + filldraw stroke z[_one]e{right}...z[_two]e{down}...z[_three]e; % tail +fi +penlabels([_zero],[_one],[_two],[_three],[_four]); +endchar; + +lhchar "Cyrillic accent Alcomma - comma below letter"; +cyrchar(Alcomma,9u#,x_height#+1.25acc_height#,desc_depth#); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +%ac_comma(0,0,1.25desc_depth,1,2,3,4,5); + x_move:=0; y_move:=0; depth:=1.25desc_depth; + _zero:=1; _one:=2; _two:=3; _three:=4; _four:=5; + numeric height,bulb_diam; + height=if serifs: depth+.5fine-max(.27depth,o+hair) else:.68depth fi; + bulb_diam=max(fine.breadth,min(dot_size,floor(.56height))); + if square_dots: pickup fine.nib; pos[_one](vair,0); + pos[_two](.5[vair,stem],0); + % comma below letter as sans serif cedilla + top y[_one]=-o-2; bot y[_two]=-d-o; + x[_two]=x[_one]-1.25u=.5w+x_move; + filldraw stroke z[_one]e--z[_two]e; % diagonal + else: pickup fine.nib; + x[_four]-.5bulb_diam=hround(.5w+x_move-.5bulb_diam); + y[_four]+.5bulb_diam=-d+y_move+height; + pos[_four](bulb_diam,90); + pos[_one](vair,90); pos[_two](vair,0); pos[_three](vair,-45); + z[_one]r=z[_four]r; rt x[_two]r=hround(x[_four]+.5bulb_diam + +if monospace:.28u / expansion_factor else:.25u fi)+2eps; + x[_three]=x[_four]-.5u if monospace: /expansion_factor fi; + y[_two]=1/3[y[_one],y[_three]]; + bot y[_three]r=vround(y[_four]-(height-.5bulb_diam)); + y_:=ypart((z[_one]{right}...z[_two]{down}...z[_three]) + intersectiontimes (z[_four]l{right}..{left}z[_four]r)); + if y_<0: y_:=1; fi + filldraw z[_four]r{left}..subpath (0,y_) + of (z[_four]l{right}..{left}z[_four]r)--cycle; % dot + filldraw stroke z[_one]e{right}...z[_two]e{down}...z[_three]e; fi % tail + penlabels([_zero],[_one],[_two],[_three],[_four]); +endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcyri.mf b/Master/texmf-dist/fonts/source/lh/base/lgcyri.mf new file mode 100644 index 00000000000..a1cdaf67b19 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcyri.mf @@ -0,0 +1,50 @@ +% +% lgcyri.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Glyph head file for italic letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +altaccent:=true; % for cyrillic breve + +input lgrusi; % Russian letters +input lgt2comi; % Letters common for couple of encodings + +if not more_letters: endinput \\; fi + +if old_cyr: + input lgt2slvi; % Unicode Old Slav letters + if not roman_ec: + input lgt2slxi; % additional Old slav letters + fi +fi + +if not old_cyr or unic: + input lgt2upi; % letters from Upper part (128-255) of X2 container + input lgt2loi; % letters from Lower part (0-127) of X2 container +fi + +if other_cyr: + input lgunici; % Unicode letters not included in T2 + input lgcmodi; % modified letters + input lgcacci; % accended letters + input lgcvaci; % acuted vowels +fi + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcyrl.mf b/Master/texmf-dist/fonts/source/lh/base/lgcyrl.mf new file mode 100644 index 00000000000..fd9e69538cd --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcyrl.mf @@ -0,0 +1,48 @@ +% +% lgcyrl.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Glyph head file for lowercase letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +input lgrusl; % Russian letters +input lgt2coml; % Letters common for couple of encodings + +if not more_letters: endinput \\; fi + +if old_cyr: + input lgt2slvl; % Unicode Old Slav letters + if not roman_ec: + input lgt2slxl; % additional Old slav letters + fi +fi + +if not old_cyr or unic: + input lgt2upl; % letters from Upper part (128-255) of X2 container + input lgt2lol; % letters from Lower part (0-127) of X2 container +fi + +if other_cyr: + input lgunicl; % Unicode letters not included in T2 + input lgcmodl; % modified letters + input lgcaccl; % accended letters + input lgcvacl; % acuted vowels +fi + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcyrsp.mf b/Master/texmf-dist/fonts/source/lh/base/lgcyrsp.mf new file mode 100644 index 00000000000..734cf04319a --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcyrsp.mf @@ -0,0 +1,165 @@ +% +% lgt2lou.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Uppercase Cyrillic letters 0--127 for T2 encoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 +% +% SP_LJE - Special title Lje +% SP_NJE - Specisl title Nje +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Title Cyrillic letter LJE (Soft L)"; +cyrchar(LJE_title,13.5u#,cap_height#,0); % DL_width:N_width +if is_small_cap: getcharcode(lje); fi; +italcorr .52*.7cap_height#*slant-.5u#; % D*.52h +adjust_fit(cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi, %DL_adj + 4u# if serifs:-.5width_adj# fi);%lsftsn_adj;lsftsnwd-.5width_adj +% upper_l; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); +numeric light_hair,bot_vair,left_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +left_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit-rt x2r-.65u) fi; +bot_vair=Vround(.5[vair,light_hair]); +x3=1/3[w-rt x1r-(1/6left_jut),rt x1r] if not serifs:-.5(cap_stem-u) fi+eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(cap_hair,-180); + top y3=h; y6=1/6h-max(0,flare-stem-2vair_corr-.5); z6r=z5r; + lft x6r=l+letter_fit+hround(.5u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); bot y4r=-o; + filldraw stroke z4e{right}.. + controls (min(15/16[x4,x3],max(x4,lft x6r+2flare-eps))+(x3e-x3),y4e) + and (x3e,min(y6-.5,1/3h-eps)+1/3(y4e-y4))..z3e; % left tail + {{less_tense; bulb(4,5,6)}}; +else: + pos3'(slab,90); pos1'(slab,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; + pickup fine.nib; pos3(max(fine.breadth,light_hair),0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=2/3[x3l,x5r]; lft x5=l+letter_fit+hround(.35u-.5); + bot y4r=bot y5r; y3=y3'; x4l:=.25[x4,x5]; + path p; + p=stroke z3{down} + ..controls (x3,y5+.35h-eps) and (min(7/8[x4,x3],x5+2.5light_hair+.5u),y4) + ..{left}z4--z5; + z6=point .35 of p; + pos6(max(fine.breadth,7/8[bot_vair,light_hair]),angle(direction .35 of p)+90); + filldraw stroke z3e{down}...z6e{direction .35 of p}...{left}z4e--z5e; fi % arc +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=.5(lft x1l-rt x3r)+.5crisp+eps; + nodish_serif(2,1,a,1/3,cap_jut,b,1/3,.5cap_jut); %!!! % lower right serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); %upper right serif + nodish_serif(3,0,e,1/3,cap_jut,f,1/3,inner_jut); fi %upper left serif +%%%%% +% now the b part +w:=w+3.75u if serifs:-.5width_adj fi;%lsftsnwd-.25u-.5width_adj +% lsftsn_bowl(2);special +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +numeric bar[],right_curve; +if known lower.cap_height#: % for Small Caps fonts + bar1=cap_band; right_curve=cap_curve if hefty:-3stem_corr fi; + y2.bh-y1.bh=cap_bar; .5[y2.bh,y1.bh]=.52lower.cap_height#*hppp; +else: + bar1=vair'; right_curve=curve if hefty:-3stem_corr fi; + set_bar_axis; +fi +penpos[_three](right_curve,0);%!!! +penpos[_four](bar1,-90); penpos[_five](bar1,-90);%!!! +z[_five]r=(x[_zero],tiny.bot y[_zero]); y[_four]=y[_five];%!!! +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Title Cyrillic letter NJE (Soft N - looks like Hb)"; +cyrchar(NJE_title,13.5u#,cap_height#,0); +if is_small_cap: getcharcode(nje); fi; +italcorr .52*.7cap_height#*slant-.5u#; % D*.52h +adjust_fit(cap_serif_fit#, + 4u# if serifs:-.5width_adj# fi);%lsftsn_adj;lsftsnwd-.5width_adj +% upper_n; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(cap_bar,90); penpos6(cap_bar,90); +x5=x1; x6=x3; y5=y6=.52h; +fill stroke z5e--z6e; % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper rt serif + nodish_serif(4,3,g,1/3,inner_jut,h,1/3,.5cap_jut); fi %!!!% lower rt serif +%%%%% +% now the b part +w:=w+3.75u if serifs:-.5width_adj fi;%lsftsnwd-.25u-.5width_adj +% lsftsn_bowl(4);special +_zero:=4; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +numeric bar[],right_curve; +if known lower.cap_height#: % for Small Caps fonts + bar1=cap_band; right_curve=cap_curve if hefty:-3stem_corr fi; + y2.bh-y1.bh=cap_bar; .5[y2.bh,y1.bh]=.52lower.cap_height#*hppp; +else: + bar1=vair'; right_curve=curve if hefty:-3stem_corr fi; + set_bar_axis; +fi +penpos[_three](right_curve,0);%!!! +penpos[_four](bar1,-90); penpos[_five](bar1,-90);%!!! +z[_five]r=(x[_zero],tiny.bot y[_zero]); y[_four]=y[_five];%!!! +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcyrsym.mf b/Master/texmf-dist/fonts/source/lh/base/lgcyrsym.mf new file mode 100644 index 00000000000..c832b975264 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcyrsym.mf @@ -0,0 +1,459 @@ +% +% lgcyrsym.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Glyphs for ec and Cyrillic symbols used with floating codes +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of signs X2 T2* +% +% palochka "0d "0d symbol Palochka +% openq Single German opening quote (looks like ,) +% angle_left "0e "0e Single left angle bracket +% lguillemet Single left guillemet +% angle_right "0f "0f Single right angle bracket +% rguillemet Single right guillemet +% +% dash "16 "16 Em dash/if monospace Hyphen +% wordmark "17 Compound word mark +% pmzero "18 "18 Zero for p mille sign (ec: "17) +% +% dbl_quotes "22 "22 Straight double quotes +% +% No "9d "9d Cyrillic symbol `Number' +% currency "9e "9e Cyrillic Currency sign +% section "9f "9f Section sign +% +% baseqq "bd "bd German Opening quotes (looks like ,,) (ec: "12) +% flqq "be "be Cyrillic Opening Quotes (looks like <<) (ec: "13) +% frqq "bf "bf Cyrillic Closing Quotes (looks like >>) (ec: "14) +% +% T1/T2-outsiders: +% +% pound ("bf) Sterling sign +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Cyrillic sign palochka (as latin I)"; +cyrchar(palochka,max(6u#,4u#+cap_stem#),cap_height#,0); +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif +penlabels(1,2); endchar; + +lhchar "Cyrillic `German opening comma'"; +cyrchar(openq,5u#,pdot_diam#,comma_depth#); +adjust_fit(0,0); +x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1-.5pdot_diam=0; +comma(1,a,pdot_diam,.2u,comma_depth); % dot and tail +penlabels(1); endchar; + +if unknown math_anglebrackets: + boolean math_anglebrackets; math_anglebrackets:=false; +fi + +lhchar "Single left angle bracket"; +cyrchar(angle_left,7u# if monospace: -u# fi,body_height#,paren_depth#); +italcorr body_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +if math_anglebrackets: + left_angle(rule_thickness); +else: + pickup fine.nib; + pos1(fudged.hair,0); pos2(fudged.stem,0); pos3(fudged.hair,0); + x1=x3=hround(w-u)+eps; lft x2=hround(u)-eps; + top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h]; + filldraw stroke z1e--z2e--z3e; +fi +endchar; + +lhchar "Single right angle bracket"; +cyrchar(angle_right,7u# if monospace: -u# fi,body_height#,paren_depth#); +italcorr math_axis#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +if math_anglebrackets: + right_angle(rule_thickness); +else: + pickup fine.nib; + pos1(fudged.hair,0); pos2(fudged.stem,0); pos3(fudged.hair,0); + x1=x3=hround(u)-eps; x2=hround(w-u)+eps; + top y1=h+eps; 0.5[y1,y3]=y2=good.y 0.5[-d+eps,h]; + filldraw stroke z1e--z2e--z3e; % right > +fi +labels(1,2,3); endchar; + +lhchar "Single left guillemet"; % jk +cyrchar(lguillemet,8u#,2bar_height#,0); +italcorr h#*slant-u#; +adjust_fit(0,0); + pickup fine.nib; + pos1(qvair,0); pos2(if monospace: qvair else: stem fi,0); pos3(qvair,0); + rt x1r=rt x3r=w-2u-eps; + lft x2l=hround(if not monospace: 2 fi\\ u)-eps; + bot y3=0; y2=good.y(h/2); top y1=2y2; + if not serifs or monospace: + filldraw stroke z1e--z2e--z3e; + else: + filldraw stroke + z1e{(x2e-x1e),1.8(y2e-y1e)}..{curl1}z2e{curl1}.. + {(x3e-x2e),1.8(y3e-y2e)}z3e; + fi + penlabels(1,2,3); +endchar; + +lhchar "Single right guillemet"; % jk +cyrchar(rguillemet,8u#,2bar_height#,0); +italcorr h#*slant-u#; +adjust_fit(0,0); + pickup fine.nib; + pos1(qvair,0); pos2(if monospace: qvair else: stem fi,0); pos3(qvair,0); + lft x1l=lft x3l=2u+eps; + rt x2r=w-hround(if not monospace: 2 fi\\ u)+eps; + bot y3=0; y2=good.y(h/2); top y1=2y2; + if not serifs or monospace: + filldraw stroke z1e--z2e--z3e; + else: + filldraw stroke + z1e{(x2e-x1e),1.8(y2e-y1e)}..{curl1}z2e{curl1}.. + {(x3e-x2e),1.8(y3e-y2e)}z3e; + fi +penlabels(1,2,3); endchar; + + +if unknown cyrdash: boolean cyrdash; cyrdash:=true; fi + +iff not monospace: +lhchar "Cyrillic Em dash";%oct"026" +cyrchar(dash,if cyrdash: 14.5u#%.8*18u# + else: 18u# fi + ,x_height#,0); +italcorr .61803x_height#*slant+.5u#; +adjust_fit(letter_fit#,letter_fit#); +pickup crisp.nib; pos1(vair,90); pos2(vair,90); +top y1r=top y2r=vround(.61803h+.5vair); +if cyrdash: + lft x1=.25u-eps; rt x2=w-.25u+eps; +else: + lft x1=-eps; rt x2=w+eps; +fi +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +iff monospace: +lhchar "Hyphen (instead of Cyrillic Em dash)";%oct"026" +cyrchar(dash,6u#,x_height#,0); +italcorr .5x_height#*slant-.5u#; +adjust_fit(0,0); +numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi; +pickup crisp.nib; pos1(thickness,90); pos2(thickness,90); +top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps; +if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +lhchar "Zero for p mille sign"; +cyrchar(pmzero,if serifs: + if monospace: 9u#+max(6u#,2fudge*(hair#+stem#)) else: 7u# fi else: 8u# fi, + body_height#,body_height#-asc_height#); +italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; +adjust_fit(0,0); pickup fine.nib; +numeric left_curve,right_curve; +left_curve=hround 5/6[fudged.hair,fudged.stem]; +right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); +pos1(vair,90); +pos2(left_curve,180); +pos3(vair,270); +pos4(right_curve,360); +bot y3r=-d; +rt x4r=hround(.5w +2.5u ); +lft x2r=hround(.5w -2.5u ) ; +top y1r=vround(if monospace: .3 else: .5 fi\\ asc_height); +x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; +filldraw stroke pulled_super_arc.e(1,2)(superpull) + & pulled_super_arc.e(2,3)(superpull); % left half of lower bowl +filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of lower bowl +penlabels(1,2,3,4); endchar; + +lhchar "Compound word mark"; +cyrchar(wordmark,0,x_height#,0); +zero_width; +endchar; + +% + +lhchar "Straight double quotes"; +cyrchar(dbl_quotes,9u#,asc_height#,0); +numeric top_width#,spread#; +top_width#=if serifs: flare# else: stem# fi; +spread#=max(3u#,top_width#+.5u#); define_pixels(spread); +italcorr asc_height#*slant+.5top_width#+.5spread#-4u#; +adjust_fit(0,0); +x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3; +y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height); +if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0); + pos3(flare,0); pos4(vair,0); + y1+.5stem=h; filldraw circ_stroke z1e--z2e; % left stem and bulb + filldraw circ_stroke z3e--z4e; % right stem and bulb +else: pickup fine.nib; pos1(stem,0); pos2(vair,0); + pos3(stem,0); pos4(vair,0); + top y1=h; filldraw stroke z1e--z2e; % left stem + filldraw stroke z3e--z4e; fi % right stem +penlabels(1,2,3,4); endchar; + +% + +lhchar "Cyrillic symbol No."; %common +cyrchar(No,14.5u#+width_adj#,cap_height#,0); +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(if monospace: 0,0 else: cap_serif_fit# + if serifs: +.5(flare#+(cap_stem#-stem#))-.25u#,cap_serif_fit# else:,0 fi fi); +full_w:=w; w:=if serifs: 10u else: 11.5u fi; +numeric thin_stem; thin_stem=hround(fudged.hair+stem_corr); +pickup tiny.nib; pos1(thin_stem,0); pos2(thin_stem,0); +pos3(thin_stem,0); pos4(thin_stem,0); +pickup tiny.nib; top y1=h; +if serifs: top y3=.79h; bot y2=.21h; else: top y3=h; bot y2=0; fi +bot y4=0; +x1=x2; x3=x4; x1l=w-x3r; +rt x3r=hround min(w-2u,w-3u+.5fudged.cap_stem); +if serifs: numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); + pos21(thin_stem,-90); pos22(cap_hair,-180); pos23(bulb_diam,-180); + pos31(thin_stem,-90); z31'=z31; + pos31'(thin_stem,90); pos32(cap_hair,0); pos33(bulb_diam,0); + y23=vround max(.05fig_height+.5bulb_diam,.1fig_height-.5flare)-o;% + lft x23r=l+letter_fit+.15u; x33=w-x23; y33=h-y22; + x21=max(lft x23r+.5bulb_diam,.45[lft x23r,rt x2r]); + x31=w-x21; bot y21r=-oo; top y31l=h+oo; + bulb(21,22,23); bulb(31',32,33); + filldraw stroke z1e--z2e & pulled_arc.e(2,21); % left stem + filldraw stroke z4e--z3e & pulled_arc.e(3,31); % right stem +else: filldraw stroke z1e--z2e; filldraw stroke z4e--z3e; fi +if hefty: penpos5(fudged.cap_stem,0); penpos6(fudged.cap_stem,0); + x5l=x1; x6r=x4; y5=h; y6=0; + numeric upper_notch,lower_notch; + upper_notch=h-cap_notch_cut; lower_notch=cap_notch_cut; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x4'=lft x4l; z4'=whatever[z5r,z6r]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)--z6r.. + if y4'>lower_notch: {left}(x4'-1,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: penpos5(whatever,0); penpos6(whatever,90); + z5l=z1l; z6l=z4l; + z7=z6l+(max(eps,cap_stem-3stem_corr-tiny),0) rotated (angle(z5l-z6l)-90); + z5r=z7+whatever*(z5l-z6l); z6r=z7+whatever*(z5l-z6l); + filldraw stroke z5e..z6e; fi % diagonal +if serifs: if hefty: serif(1,2,a,1/3,-cap_jut); % upper left serif + else: serif(5,6,a,1/3,-cap_jut); fi % upper left serif +fi +w:=full_w; +penpos71(vair,90); penpos73(vair',-90); +if serifs: x72r=x33+hround max(.25u,u-.4curve); x74r=hround(w-.5u); +else: x72r=x3+1.25u+hround max(0,.75u-.4curve); x74r=hround(w-u); fi +penpos72(min(1/3(x74r-x72r),.8curve),180); +penpos74(min(1/3(x74r-x72r),.8curve),0); +x71=x73=.5[x72r,x74r]; y71r=h-3u+vround 1.5oo; y73r=x_height-3u-oo; +y72=y74=.5[h,x_height]-3u-vair_corr; y72l:=y74l:=.52[h,x_height]-3u; +penstroke pulled_arc.e(71,72) & pulled_arc.e(72,73) + & pulled_arc.e(73,74) & pulled_arc.e(74,71) & cycle; % bowl +pickup fine.nib; pos81(bar,90); pos82(bar,90); +lft x81=x72r-.25fine; rt x82=x74r+.25fine; y81=y82=.8x_height-3u; +filldraw stroke z81e--z82e; +penlabels(1,1',2,3,4,4',5,6,7); endchar; + +lhchar "Cyrillic Currency sign"; % from ec ... from rsym (wasy) +cyrchar(currency,1.13 min(asc_height#,9/7x_height#)+2u#, + min(asc_height#,9/7x_height#),0); +italcorr x_height#*slant; +adjust_fit(if monospace: u#,u# else: 0,0 fi); +pickup rule.nib; autorounded; +x4 = good.x .5w; x2-x6=y8-y4; y2=good.y .5h; bot y4=-oo; +circle_points; +z9 = 1.30[z5,z1]; +z10 = 1.30[z7,z3]; +z11 = 1.30[z1,z5]; +z12 = 1.30[z3,z7]; +draw_circle; +draw z1--z9; +draw z3--z10; +draw z5--z11; +draw z7--z12; +labels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Section sign"; % taken from DC/EC +cyrchar(section,6.5u#+max(1.5u#,stem#),asc_height#,desc_depth#); +adjust_fit(0,0); pickup fine.nib; +numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; +numeric ess'; ess'=max(fine.breadth,cap_ess); +numeric sstem; sstem=hround .5[s_slab,ess']-fine; +if sstem < fine.breadth: sstem:=fine.breadth; fi +pos2(vair,90); pos3(sstem,180); +pos4(ess',270); pos4'(vair,270); +pos5'(sstem,0); pos5(sstem,180); +pos6(ess',90); pos6'(vair,90); pos7(sstem,0); +pos8(vair,-90); +top y2r=h+oo; bot y8r=-d-oo; +y3=.52[y4,y2]; y5=.52[y4,y6]; y7=.52[y6,y8]; y5'=.52[y6,y4]; +y2-y4=y4-y6=y6-y8; +bot z4'=bot z4; top z6'=top z6; +lft x3r=hround 1.25u; +x2=x4=x6=x8=.5w; x5=x7=w-x3; x5'=x3; +if serifs: + pos0(stem,0); pos1(hair,0); pos9(hair,-180); pos10(stem,-180); + rt x1r=hround(w-1.5u); x9=w-x1; y2-y1=y9-y8=(y2-y8)/8; + bulb(2,1,0); bulb(8,9,10); % bulbs +else: + pos1(.6[slab,flare],-100); pos9(flare,-100); pos2'(vair,-90); + rt x1l=hround(w-1.3u); lft x9r=hround .8u; z2'=z2; + top y1l=vround .92asc_height+oo; bot y9r=vround .1asc_height-d-oo; + filldraw stroke term.e(2',1,right,.9,4); % upper arc and terminal + filldraw stroke term.e(8,9,left,.9,4); % lower arc and terminal +fi +filldraw stroke z2e{left}...z3e{down}...z4e{3(x5-x3),y5-y3} + ...z5e{down}...{left}z6'e; % upper stroke +filldraw stroke z4'e{left}...z5'e{down}...z6e{3(x7-x5'),y7-y5'} + ...z7e{down}...{left}z8e; % upper stroke +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +% + +lhchar "Cyrillic `German Opening quotes' (looks like ,,)"; +cyrchar(baseqq,3u#+max(2u#,pdot_diam#),pdot_diam#,comma_depth#); +italcorr asc_height#*slant+pdot_diam#-4.1u#; +adjust_fit(.5u#,.5u#); +x2+.5pdot_diam=hround(w-.6u+.5pdot_diam); y2-.5pdot_diam=0; +x1=w-x2; y2=y1; +comma(1,a,pdot_diam,.25u,comma_depth); % left dot and tail +comma(2,b,pdot_diam,.25u,comma_depth); % right dot and tail +penlabels(1,2); endchar; + +lhchar "Cyrillic `French Opening Quotes' (looks like <<)"; +cyrchar_twice( % compilation of A.Shen's and ec (polish: pl_cud) quotes + if not hefty: flqq,10u#,2bar_height#,0 % ec metrics + else: flqq,12u#,2bar_height#,0 + fi); +adjust_fit(0,0); +pickup fine.nib; +numeric the_shift,shift_corr; +the_shift=hround(max(3u,1.7stem)); shift_corr=the_shift-3u; +pos1(max(fine.breadth, + if serifs: qvair else: 7/8[vair,fudged.hair]-3stem_corr fi),0); +pos2(max(fine.breadth,if serifs: + if monospace: qvair else: stem fi else:7/8[vair,fudged.hair] fi),0); +pos3(max(fine.breadth, + if serifs: qvair else: 7/8[vair,fudged.hair]-3stem_corr fi),0); +rt x1r=rt x3r= + hround(if hefty: .6 else: 2/3 fi w-shift_corr)-eps; +lft x2l=hround(if not monospace: 2 fi\\ u-shift_corr)-eps; +y2=good.y min(bar_height,.5x_height); top y1=vround 2y2; +y1-y2=y2-y3; +if hefty: + for i:=1,2,3: + forsuffixes $:=r, ,l: z[i]'$=z[i]$ + the_shift*right; endfor + endfor + filldraw stroke z1e--z2e--z3e; % outer < + filldraw stroke z1'e--z2'e--z3'e; % inner < +else: + pos1'(qvair,0); + pos2'(7/8 [hair,stem],0); + pos3'(qvair,0); + z2'=z2+the_shift*right; + y1'-y2'=y2'-y3'=.8(y1-y2); + z1'=z2'+whatever*(z1r-z2r); z3'=z2'+whatever*(z2r-z3r); + filldraw stroke + z1e{(x2e-x1e),1.2(y2e-y1e)}..{curl1}z2e{curl1}.. + {(x3e-x2e),1.2(y3e-y2e)}z3e; % outer < + filldraw stroke + z1'e{(x2'e-x1'e),1.2(y2'e-y1'e)}..{curl1}z2'e{curl1}.. + {(x3'e-x2'e),1.2(y3'e-y2'e)}z3'e; % inner < +fi +% italic correction is set to |0| in |beginchar|, so let's correct it +corrital z1'r; +repeat_once; +penlabels(1,2,3,1',2',3'); endchar; + +lhchar "Cyrillic `French closing quotes'"; +cyrchar_twice( % compilation of A.Shen's and ec (polish: pl_cud) quotes + if not hefty: frqq,10u#,2bar_height#,0 % ec metrics + else: frqq,12u#,2bar_height#,0 + fi); +adjust_fit(0,0); +pickup fine.nib; +numeric the_shift,shift_corr; +the_shift=hround(max(3u,1.7stem)); shift_corr=the_shift-3u; +pos1(max(fine.breadth, + if serifs: qvair else: 7/8[vair,fudged.hair]-3stem_corr fi),0); +pos2(max(fine.breadth,if serifs: + if monospace: qvair else: stem fi else:7/8[vair,fudged.hair] fi),0); +pos3(max(fine.breadth, + if serifs: qvair else: 7/8[vair,fudged.hair]-3stem_corr fi),0); +lft x1l=lft x3l=w- + hround(if hefty: .6 else: 2/3 fi w-shift_corr)+eps; +rt x2r=w-hround(if not monospace: 2 fi\\ u-shift_corr)+eps; +y2=good.y min(bar_height,.5x_height); top y1=vround 2y2; +y1-y2=y2-y3; +if hefty: + for i:=1,2,3: + forsuffixes $:=r, ,l: z[i]'$=z[i]$ + the_shift*left; endfor + endfor + filldraw stroke z1e--z2e--z3e; % outer < + filldraw stroke z1'e--z2'e--z3'e; % inner < +else: + pos1'(qvair,0); + pos2'(7/8 [hair,stem],0); + pos3'(qvair,0); + z2'=z2+the_shift*left; + y1'-y2'=y2'-y3'=.8(y1-y2); + z1'=z2'+whatever*(z1l-z2l); z3'=z2'+whatever*(z2l-z3l); + filldraw stroke + z1e{(x2e-x1e),1.2(y2e-y1e)}..{curl1}z2e{curl1}.. + {(x3e-x2e),1.2(y3e-y2e)}z3e; % outer < + filldraw stroke + z1'e{(x2'e-x1'e),1.2(y2'e-y1'e)}..{curl1}z2'e{curl1}.. + {(x3'e-x2'e),1.2(y3'e-y2'e)}z3'e; % inner < +fi +% italic correction is set to |0| in |beginchar|, so let's correct it +corrital z2r; +repeat_once; +penlabels(1,2,3,1',2',3'); endchar; + +lhchar "Sterling sign"; % from ec +cyrchar(pound,12u#,asc_height#,0); +adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib; +pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180); +pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4; +x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u; +y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo; +rt x1r=hround(w-1.5u); bulb(2,1,0); % bulb +filldraw stroke pulled_arc.e(2,3)..z4e; % stem +numeric light_stem; light_stem=2/3[vair,vstem]; +pos6(.5[hair,light_stem],-180); pos7(light_stem,-300); +pos8(light_stem,-300); pos9(hair,-180); +lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9l=hround(w-u); +y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h; +filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right} + ..{right}z8e...{up}z9e; % loop and arm +pos10(bar,90); pos11(bar,90); x10=3u; x11=w-4.5u; +top y10r=top y11r=vround(.5h+.5bar); filldraw stroke z10e--z11e; % bar +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgcyru.mf b/Master/texmf-dist/fonts/source/lh/base/lgcyru.mf new file mode 100644 index 00000000000..0437b340dd0 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgcyru.mf @@ -0,0 +1,62 @@ +% +% lgcyru.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Glyph head file for uppercase letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +if is_small_cap: % for accents + %%% fine higher + % the `higher' values are used while putting accents + forsuffixes $=u,o,letter_fit,x_height,bar_height,body_height,stem: + higher.$.#:=$.#; higher.$:=$; + endfor +fi + +input lgrusu; % Russian letters +input lgt2comu; % Letters common for couple of encodings + +if not is_small_cap: + if (known CYR_.LJE_title) or (known CYR_.NJE_title): + input lgcyrsp; % special title LJE NJE + fi +fi + +if not more_letters: endinput \\; fi + +if old_cyr: + input lgt2slvu; % Unicode Old Slav letters + if not roman_ec: + input lgt2slxu; % additional Old slav letters + fi +fi + +if not old_cyr or unic: + input lgt2upu; % letters from Upper part (128-255) of X2 container + input lgt2lou; % letters from Lower part (0-127) of X2 container +fi + +if other_cyr: + input lgunicu; % Unicode letters not included in T2 + input lgcmodu; % modified letters + input lgcaccu; % accended letters + input lgcvacu; % acuted vowels +fi + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgengsym.mf b/Master/texmf-dist/fonts/source/lh/base/lgengsym.mf new file mode 100644 index 00000000000..01397b58735 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgengsym.mf @@ -0,0 +1,586 @@ +% +% lgengsym.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Glyphs for ec and Cyrillic symbols used with unchanged codes +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of signs +% +% "10 oct"020" `` Opening quotes +% "11 oct"021" '' Closing quotes +% "15 oct"025" -- En dash/if monospace Hyphen +% ***Em dash ("16) in file lgcyrsym changed to Cyrillic length +% +% "20 oct"040" Blank-space sign +% "21 "!" ! Exclamation point +% ***Double quotes ("22) in file lgcyrsym for possible floating +% "23 "#" # Hash mark (number sign) +% "24 "$" $ Dollar sign +% "25 "%" % Per cent sign +% ***Ampresand ("26) in files lg(rom/ital)p +% "27 "'" ' Apostrophe +% "28 "(" ( Left parenthesis +% "29 ")" ) Right parenthesis +% "2a "*" * Asterisk +% "2b "+" + Plus sign +% "2c "," , Comma +% "2d "-" - Hyphen +% "2e "." . Period +% "2f "/" / Virgule (slash) +% +% ***Digits in files lg(r/i)digit +% "3a ":" : Colon +% "3b ";" ; Semicolon +% "3c "<" < Less than sign +% "3d "=" = Equals sign +% "3e ">" > Greater than sign +% ***Question mark ("3f) in files lg(rom/ital)p +% +% "40 "@" @ At sign +% ***Uppercase Latin/Cyrillic letters +% "5b "[" [ Left bracket +% "5c oct"134" \ Reverse slash (backslash) +% "5d "]" ] Right bracket +% "5e oct"136" ^ Circumflex (hat) +% "5f oct"137" _ Underbar +% +% "60 "`" ` Reverse apostrophe +% ***Lowercase Latin/Cyrillic letters +% "7b oct"173" { Left curly brace +% "7c oct"174" | Vertical line +% "7d oct"175" } Right curly brace +% "7e oct"176" ~ Tilde (squiggle) +% "7f oct"177" - Hyphenchar +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Opening quotes"; +beginchar(oct"020",3u#+max(2u#,pdot_diam#),asc_height#,0); +italcorr asc_height#*slant-.1u#; +adjust_fit(.5u#,.5u#); +x2+.5pdot_diam=hround(w-.6u+.5pdot_diam); y1+.5pdot_diam=h-comma_depth; +x1=w-x2; y2=y1; +ammoc(1,a,pdot_diam,.25u,comma_depth); % left dot and tail +ammoc(2,b,pdot_diam,.25u,comma_depth); % right dot and tail +penlabels(1,2); endchar; + +lhchar "Closing quotes"; +beginchar(oct"021",3u#+max(2u#,pdot_diam#),asc_height#,0); +italcorr asc_height#*slant+pdot_diam#-4.1u#; +adjust_fit(.5u#,.5u#); +x1+.5pdot_diam=hround(.6u+.5pdot_diam); y2+.5pdot_diam=h; +x2=w-x1; y2=y1; +comma(1,a,pdot_diam,.25u,comma_depth); % left dot and tail +comma(2,b,pdot_diam,.25u,comma_depth); % right dot and tail +penlabels(1,2); endchar; + +iff not monospace: +lhchar "En dash"; +beginchar(oct"025",9u#,x_height#,0); +italcorr .61803x_height#*slant+.5u#; +adjust_fit(0,0); +pickup crisp.nib; pos1(vair,90); pos2(vair,90); +top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +iff monospace: +lhchar "Hyphen"; +beginchar(oct"025",6u#,x_height#,0); +italcorr .5x_height#*slant-.5u#; +adjust_fit(0,0); +numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi; +pickup crisp.nib; pos1(thickness,90); pos2(thickness,90); +top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps; +if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +iff hefty: % Sans or typewriter +lhchar "Blank-space sign"; +beginchar(oct"040",9u#,x_height#,.5desc_depth#); +italcorr bar_height#*slant-.25u#; +adjust_fit(0,0); +numeric thin_vair#; thin_vair#=.7vair#; +define_whole_blacker_pixels(thin_vair); +h:=bar_height; +forsuffixes $=1,2,3,4: penpos$(thin_vair,0); endfor +penpos0(thin_vair,90); x0=.5w; y0l=vround(-d-.5thin_vair); +x1=x2; x3=x4=w-x1; lft x1l=hround .75u; +y1=y4=h; y2=y3=y0; +fill z1l---z2l...(x2,y0l)---(x3,y0l)...z3r---z4r + ..z4l---(x3l,y0r)--(x2r,y0r)---z1r..cycle; % the stroke +penlabels(0,1,2,3,4); endchar; + +iff not hefty: % Other than the above mentioned +lhchar "Blank-space sign"; % jk +beginchar(oct"040",9u#,x_height#,.5desc_depth#); +italcorr bar_height#*slant-.25u#; +adjust_fit(0,0); +numeric shaved_stem; shaved_stem=hround .9[vair,.85cap_stem]; +if shaved_stem<crisp.breadth: shaved_stem:=crisp.breadth; fi +pickup crisp.nib; +pos1(shaved_stem,-90); pos2(hair,0); +bot y1r=-d; x1=.5w; rt x2r=hround(w-.75u); y2=good.y(y1l+.5beak)+eps; +arm(1,2,a,beak_darkness,2beak_jut); % lower right arm and beak +pos3(hair,180); x3=w-x2; y3=y2; +arm(1,3,b,beak_darkness,-2beak_jut); % lower left arm and beak +math_fit(0,.5ic#); +penlabels(1,2,3); endchar; + +lhchar "Exclamation point"; +beginchar("!",5u#+width_adj#,asc_height#,0); +italcorr asc_height#*slant-2u#-.5width_adj#+.5pdot_diam#; +adjust_fit(0,0); +pickup tiny.nib; pos3(pdot_diam,0); pos4(pdot_diam,90); +lft x3l=hround(.5w-.5pdot_diam); bot y4l=0; z3=z4; dot(3,4); % dot +numeric bot_width; +bot_width=if hefty:max(hround .8pdot_diam,fine.breadth) else: hair fi; +pickup fine.nib; pos1(pdot_diam,0); pos2(bot_width,0); +x1=x2=x3; bot y2=.25[top y4r,x_height]+1; +if square_dots: top y1=h; + filldraw stroke z1e--z2e; % stem +else: top z0=(x1,h+o); y1+.5pdot_diam=h+o; + filldraw z1r...z0...z1l---z2l--z2r---cycle; fi % stem and bulb +penlabels(0,1,2,3,4); endchar; + +lhchar "Hash mark (number sign)"; +if monospace: compute_spread(.6x_height#,.7x_height#); +else: compute_spread(.45x_height#,.55x_height#); fi +beginchar("#",15u#,asc_height#,asc_depth#); +italcorr (math_axis#+.5(spread#+rule_thickness#))*slant-.5u#; +adjust_fit(0,0); +pickup extra_rule.nib; lft x1=hround u-eps; x3=x1; x2=x4=w-x1; +y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; +draw z1--z2; % upper bar +draw z3--z4; % lower bar +lft x6=hround 3u; rt x7=hround(w-3u); x5-x6=x7-x8; +x8=good.x if monospace: .6 else: .5 fi\\w; +top y5=top y7=h+eps; bot y6=bot y8=-d-eps; +y15=y1; z15=whatever[z5,z6]; y36=y3; z36=whatever[z5,z6]; +y27=y2; z27=whatever[z7,z8]; y48=y4; z48=whatever[z7,z8]; +draw z5--if x5>x6+1:(good.x(x15+.5),y1)--(good.x(x15-.5),y1) + --(good.x(x36+.5),y3)--(good.x(x36-.5),y3)--fi\\z6; % left diagonal +draw z7--if x7>x8+1:(good.x(x27+.5),y2)--(good.x(x27-.5),y2) + --(good.x(x48+.5),y4)--(good.x(x48-.5),y4)--fi\\z8; % right diagonal +labels(1,2,3,4,5,6,7,8,15,27,36,48); endchar; + + +lhchar "Dollar sign"; +beginchar("$",9u#,body_height#,body_height#-asc_height#); +italcorr fig_height#*slant-.5u#; % same as for digits +adjust_fit(0,0); +numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u; +pickup fine.nib; pos2(slab,-90); +pos0(cap_stem,theta); pos7(slab,-90); +x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo; +y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u); +x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-fine; +ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; +ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; +filldraw stroke super_arc.e(2,3) & z3e{down} + ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke +if serifs: pos1(hair,0); pos8(hair,180); + pos10(flare,0); pos9(flare,180); + rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7]; + {{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10); % upper arc and bulb + bulb(7,8,9)}}; % lower arc and bulb +else: pos1(.6[slab,flare],-100); pos8(flare,-100); + rt x1l=hround(w-1.3u); lft x8r=hround .8u; + top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo; + filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal + filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal +pickup crisp.nib; pos12(bar,0); pos11(bar,0); +lft x12l=lft x11l=hround(.5w-.5bar); top y12=h; bot y11=-d; +filldraw stroke z12e--z11e; % vertical crossbar +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar; + + +lhchar "Per cent sign"; +beginchar("%",9u#+max(6u#,2fudge*(hair#+stem#)), + body_height#,body_height#-asc_height#); +italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; +adjust_fit(0,0); pickup fine.nib; +numeric left_curve,right_curve; +left_curve=hround 5/6[fudged.hair,fudged.stem]; +right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); +pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360); +top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u); +bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height); +x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; +filldraw stroke pulled_super_arc.e(1,2)(superpull) + & pulled_super_arc.e(2,3)(superpull); % left half of upper bowl +filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl +pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360); +bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u); +top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height); +x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7]; +filldraw stroke pulled_super_arc.e(5,6)(superpull) + & pulled_super_arc.e(6,7)(superpull); % left half of lower bowl +filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl +pickup rule.nib; top y9=h; bot y10=-d; +if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps); + draw z9--z10; % diagonal +else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10; % diagonal + pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90); + pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90); + path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r; + filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi % link +penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Apostrophe"; +beginchar("'",5u#,asc_height#,0); +italcorr asc_height#*slant+.5pdot_diam#-2u#; +adjust_fit(0,0); +x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1+.5pdot_diam=h; +if monospace: comma(1,a,pdot_diam,.28u,vround 1.5comma_depth); % large comma +else: comma(1,a,pdot_diam,.25u,comma_depth); fi % comma with increased jut +penlabels(1); endchar; + +lhchar "Left parenthesis"; +beginchar("(",7u# if monospace: -u# fi,body_height#,paren_depth#); +italcorr body_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); +rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u if monospace: +4/3u fi); +top y1=h; y2=.5[y1,y3]=math_axis; +filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e + ...{3(x3e-x2e),y3-y2}z3e; % arc +penlabels(1,2,3); endchar; + +lhchar "Right parenthesis"; +beginchar(")",7u# if monospace: -u# fi,body_height#,paren_depth#); +italcorr math_axis#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); +lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u if monospace: -4/3u fi); +top y1=h; y2=.5[y1,y3]=math_axis; +filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e + ...{3(x3e-x2e),y3-y2}z3e; % arc +penlabels(1,2,3); endchar; + +lhchar "Asterisk"; +beginchar("*",9u#, + if low_asterisk:math_axis#+.5x_height# else: body_height# fi,0); +italcorr h#*slant-.75u#; +adjust_fit(0,0); +numeric ast_flare; ast_flare=hround .7[thin_join,stem]; +x0=.5w; y0=h-.5x_height; +for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height; + numeric theta; theta=angle(z[d]-z0); + fill z0+.5(0,-thin_join)rotated theta + ---z[d]+.5(-ast_flare,-ast_flare)rotated theta + ..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta + ---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d| +labels(0,[-150],[-90],[-30],30,90,150); endchar; + +lhchar "Plus sign"; +beginarithchar("+"); pickup extra_rule.nib; +x1=x2=good.x .5w; top y1=h+eps; .5[y1,y2]=math_axis; +lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis; +draw z1--z2; % stem +draw z3--z4; % crossbar +labels(1,2,3,4); endchar; + +lhchar "Comma"; +beginchar(",",5u#,pdot_diam#,comma_depth#); +adjust_fit(0,0); +x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1-.5pdot_diam=0; +comma(1,a,pdot_diam,.2u,comma_depth); % dot and tail +penlabels(1); endchar; + +lhchar "Hyphen"; +beginchar("-",6u#,x_height#,0); +italcorr .5x_height#*slant-.5u#; +adjust_fit(0,0); +numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi; +pickup crisp.nib; pos1(thickness,90); pos2(thickness,90); +top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps; +if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +lhchar "Period"; +beginchar(".",5u#,pdot_diam#,0); +adjust_fit(0,0); pickup fine.nib; +pos1(pdot_diam,0); pos2(pdot_diam,90); +lft x1l=hround(.5w-.5pdot_diam); bot y2l=0; z1=z2; dot(1,2); % dot +penlabels(1,2); endchar; + +lhchar "Virgule (slash)"; +beginchar("/",9u#,body_height#,paren_depth#); +italcorr body_height#*slant-.5u#; +adjust_fit(0,0); pickup extra_rule.nib; +rt x1=hround(w-u)+eps; top y1=h+eps; +lft x2=hround u-eps; bot y2=-d-eps; +draw z1--z2; % diagonal +penlabels(1,2); endchar; + +lhchar "Colon"; +beginchar(":",5u#,x_height#,0); +italcorr x_height#*slant+.5pdot_diam#-2u#; +adjust_fit(0,0); pickup fine.nib; +pos1(pdot_diam,0); pos2(pdot_diam,90); +lft x1l=hround(.5w-.5pdot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot +pos3(pdot_diam,0); pos4(pdot_diam,90); +x3=x1; bot y4l=0; z3=z4; dot(3,4); % lower dot +penlabels(1,2,3,4); endchar; + +lhchar "Semicolon"; +beginchar(";",5u#,x_height#,comma_depth#); +italcorr x_height#*slant+.5pdot_diam#-2u#; +adjust_fit(0,0); pickup fine.nib; +pos1(pdot_diam,0); pos2(pdot_diam,90); +lft x1l=hround(.5w-.5pdot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot +x3-.5pdot_diam=hround(.5w-.5pdot_diam); y3-.5pdot_diam=0; +comma(3,a,pdot_diam,.2u,comma_depth); % lower dot and tail +penlabels(1,2,3); endchar; + +lhchar "Less than sign"; +compute_spread(5/4x_height#,3/2x_height#); +beginchar("<",14u#,v_center(spread#+rule_thickness#)); +italcorr h#*slant-u#; +adjust_fit(0,0); pickup extra_rule.nib; +lft x2=hround 1.5u-eps; x1=x3=w-x2; +y1-y3=spread; y2=.5[y1,y3]=math_axis; +draw z1--z2--z3; % diagonals +labels(1,2,3); endchar; + +lhchar "Greater than sign"; +compute_spread(5/4x_height#,3/2x_height#); +beginchar(">",14u#,v_center(spread#+rule_thickness#)); +italcorr math_axis#*slant-u#; +adjust_fit(0,0); pickup extra_rule.nib; +rt x2=hround(w-1.5u)+eps; x1=x3=w-x2; +y1-y3=spread; y2=.5[y1,y3]=math_axis; +draw z1--z2--z3; % diagonals +labels(1,2,3); endchar; + +lhchar "Equals sign"; +compute_spread(.45x_height#,.55x_height#); +beginchar("=",14u#,v_center(spread#+rule_thickness#)); +italcorr h#*slant-.5u#; +adjust_fit(0,0); pickup extra_rule.nib; +lft x1=hround u-eps; x3=x1; x2=x4=w-x1; +y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; +draw z1--z2; % upper bar +draw z3--z4; % lower bar +labels(1,2,3,4); endchar; + +lhchar "At sign"; +beginchar("@",14u#,asc_height#,0); +italcorr .7asc_height#*slant-.5u#; +adjust_fit(0,if hefty or monospace:-2u# else: 0 fi); +pickup fine.nib; pos0(fudged.hair,0); pos1(vair,90); +pos2(fudged.stem,180); pos3(vair,270); +pos4(fudged.stem,-180); pos5(fudged.stem,-180); +pos6(vair,-90); pos7(fudged.hair,0); +pos8(vair,90); pos9(fudged.hair,180); +pos10(vair,270); pos11(.5[vair,flare],360); +x1=x3=.5[x0,x2]; y0=y2=.5[y1,y3]; +x8=x10=.5w; y7=y9=.5[y8,y10]; +lft x9r=hround u; x7=w-x9; top y8r=h+oo; bot y10r=-oo; +top y1r=vround(.8[y10,y8]+.5vair); bot y3r=vround(.2[y10,y8]-.5vair); +x6l=1/3[x5l,x7l]; y6=y3; y11=good.y(.1[y10,y8]-.5); +x0=x4=x5; y4=.8[y3,y1]; y5=2/3[y7,y6]; +if hefty or monospace: lft x2r=hround(5u-.5fudged.stem); + rt x0r=hround(w-3u); x11r=x0r; +else: lft x2r=hround 3.4u; x0=w-x2; x11r=x7r; fi +filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % left inner bowl +filldraw stroke super_arc.e(3,0) & super_arc.e(0,1); % right inner bowl +filldraw stroke super_arc.e(8,9) & super_arc.e(9,10) + & term.e(10,11,right,1,4); % left outer bowl and terminal +if hefty or monospace: {{interim superness:=hein_super; + filldraw stroke super_arc.e(0,8)}}; % link +else: (x,y6r)=whatever[z6l,z7l]; x6r:=x; + filldraw stroke z4e---z5e...z6e{right}...{up}z7e + & super_arc.e(7,8); fi % stem and link +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Left bracket"; +numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); +beginchar("[",wd#,body_height#,paren_depth#); %%%] +italcorr body_height#*slant; +adjust_fit(0,0); +numeric top_thickness,side_thickness; +% if hefty: + top_thickness=vair; + side_thickness=max(crisp.breadth,stem-stem_corr); +% else: top_thickness=side_thickness=rule_thickness; fi; +pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); +top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5side_thickness)-1-eps; +filldraw stroke z1e--z2e; % stem +pos3(top_thickness,90); pos4(top_thickness,90); +pos5(top_thickness,90); pos6(top_thickness,90); +x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2; +filldraw stroke z3e--z4e; % upper bar +filldraw stroke z5e--z6e; % lower bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Reverse slash (backslash)"; +beginchar(oct"134",9u#,body_height#,paren_depth#); +adjust_fit(0,0); pickup extra_rule.nib; +lft x1=hround u-eps; top y1=h+eps; +rt x2=hround(w-u)+eps; bot y2=-d-eps; +draw z1--z2; % diagonal +labels(1,2); endchar; + +lhchar "Right bracket"; +numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); +beginchar("]",wd#,body_height#,paren_depth#); +italcorr body_height#*slant-2u#+.5if hefty:stem# else:rule_thickness# fi; +adjust_fit(0,0); +numeric top_thickness,side_thickness; +%if hefty: + top_thickness=vair; + side_thickness=max(crisp.breadth,stem-stem_corr); +% else: top_thickness=side_thickness=rule_thickness; fi; +pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); +top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5side_thickness)+1+eps; +filldraw stroke z1e--z2e; % stem +pos3(top_thickness,90); pos4(top_thickness,90); +pos5(top_thickness,90); pos6(top_thickness,90); +x3=x5=x1r; lft x4=lft x6=floor .4u-eps; y3r=y4r=y1; y5l=y6l=y2; +filldraw stroke z3e--z4e; % upper bar +filldraw stroke z5e--z6e; % lower bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Circumflex (hat)"; +beginchar(oct"136",11u#,min(asc_height#,2x_height#),0); +if serifs: italcorr .5[x_height#,h#]*slant+.5hair#-1.75u#; + adjust_fit(0,0); + pickup crisp.nib; pos2(.5[vair,curve],90); top y2r=.75[x_height,h]; x2=.5w; + x1=w-x3=good.x 2.25u; y1=y3=.25[x_height,y2]; + pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90); + filldraw stroke z1e--z2e--z3e; % diagonals +else: italcorr 2/3[x_height#,h#]*slant-.5stem#+.5vair#-.75u#; + adjust_fit(0,0); + pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3; + pos2(stem,0); top y2=2/3[x_height,h]; x2=.5w; bot y1=bot y3=vround x_height-eps; + lft x1l=hround(rt x2r-3.25u-.5vair); + z0=whatever[z1r,z2r]=whatever[z2l,z3l]; + y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l; + filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi % diagonals +penlabels(0,1,2,3,4); endchar; + +lhchar "Underbar"; +compute_spread((5/8+.45)*x_height#,(3/4+.55)*x_height#); +beginchar(oct"137",14u#,0,spread#-math_axis#+.5rule_thickness#); +adjust_fit(0,0); pickup rule.nib; +lft x1=hround 1.5u-eps; x2=w-x1; bot y1=bot y2=-d; +draw z1--z2; % bar +labels(1,2); endchar; + +lhchar "Reverse apostrophe"; +beginchar("`",5u#,asc_height#,0); +italcorr asc_height#*slant+.5pdot_diam#-2u#; +adjust_fit(0,0); +x1-.5pdot_diam=hround(.5w-.5pdot_diam); y1+.5pdot_diam=h-comma_depth; +if monospace: ammoc(1,a,pdot_diam,.28u,vround 1.5comma_depth); % large ammoc +else: ammoc(1,a,pdot_diam,.25u,comma_depth); fi % normal ammoc +penlabels(1); endchar; + +lhchar "Left curly brace"; +beginchar(oct"173",9u#,body_height#,paren_depth#); +italcorr body_height#*slant+.5vair#-u#; +adjust_fit(0,0); pickup fine.nib; +forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor +forsuffixes $=2,3,5,6: pos$(stem,0); endfor +x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4'; +lft x4l=hround(1.5u-.5vair); lft x2l=hround(.5w-.5stem); +top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5]; +y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine; +filldraw z1l{left}...z2l---z3l...{left}z4l + --z4'l{right}...z5l---z6l...{right}z7l + --z7r--z7'r{left}...z6r---z5r...{left}.5[z4r,z4'r]{right} + ...z3r---z2r...{right}z1'r--z1r--cycle; % stroke +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Vertical line"; +beginchar(oct"174",5u#,body_height#,paren_depth#); +italcorr body_height#*slant+.5rule_thickness#-2u#; +adjust_fit(0,0); pickup rule.nib; +x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps; +draw z1--z2; % stem +labels(1,2); endchar; + +lhchar "Right curly brace"; +beginchar(oct"175",9u#,body_height#,paren_depth#); +italcorr math_axis#*slant+.5vair#-u#; +adjust_fit(0,0); pickup fine.nib; +forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor +forsuffixes $=2,3,5,6: pos$(stem,0); endfor +x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4'; +rt x4r=hround(w-1.5u+.5vair); rt x2r=hround(.5w+.5stem); +top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5]; +y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine; +filldraw z1r{right}...z2r---z3r...{right}z4r + --z4'r{left}...z5r---z6r...{left}z7r + --z7l--z7'l{right}...z6l---z5l...{right}.5[z4l,z4'l]{left} + ...z3l---z2l...{left}z1'l--z1l--cycle; % stroke +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Tilde (squiggle)"; +beginchar(oct"176",11u#,min(asc_height#, + 10/7x_height#+.5dot_size#),0); +italcorr h#*slant-u#; +adjust_fit(0,0); +if serifs: numeric theta; theta=angle(1/6(6u-vair),1/4(h-x_height)); + pickup crisp.nib; numeric mid_width; mid_width=.4[vair,stem]; + pos1(vair,theta+90); pos2(vair,theta+90); + pos3(vair,theta+90); pos4(vair,theta+90); + z2-z1=z4-z3=(mid_width-crisp)*dir theta; + lft x1r=w-rt x4l=hround 1.5u; top y4r=h; + bot y1l=vround(bot y1l+min(2/3[x_height,h],y3l-.25vair)-top y1r); + pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta; + filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l + --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle; % stroke +else: pickup fine.nib; pos1(vair,180); pos2(vair,90); + pos3(.5[vair,slab],90); pos4(vair,90); pos5(vair,180); + lft x1r=w-rt x5l=hround 1.5u; x2-x1=x3-x2=x4-x3=x5-x4; + bot y1=bot y4l=vround(.75[x_height,h]-vair); + top y2r=top y5=h; y3=.5[y2,y4]; + filldraw stroke z1e{up}...z2e{right}..z3e..{right}z4e...{up}z5e; fi % stroke +penlabels(1,2,3,4,5); endchar; + +iff not monospace: +lhchar "Hyphenchar"; +beginchar(oct"177",3u#,x_height#,0); +italcorr .5x_height#*slant-.5u#; +adjust_fit(0,0); +numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi; +pickup crisp.nib; pos1(thickness,90); pos2(thickness,90); +top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(2w-u)+eps; +lft x1=hround .2u-eps; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +iff monospace: +lhchar "Hyphenchar"; +beginchar(oct"177",3u#,x_height#,0); +italcorr .5x_height#*slant-.5u#; +adjust_fit(0,0); +numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi; +pickup crisp.nib; pos1(thickness,90); pos2(thickness,90); +top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps; +x2=w-x1; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgidigit.mf b/Master/texmf-dist/fonts/source/lh/base/lgidigit.mf new file mode 100644 index 00000000000..deb2b5d3efa --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgidigit.mf @@ -0,0 +1,286 @@ +% +% lgidigit.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% exidigit.mf (ec fonts) with another beginning :-) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% italic numerals +% + +LHver_check(3,4); % like |version_check| in ec + +% All digits have the same width + +font_digit_width 9u#; + +lhchar "Italic numeral 0"; +beginchar("0",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0); +if not monospace: interim superness:=sqrt(more_super*hein_super); fi +x2r=hround(1.5u-.5curve); x4r=w-x2r; x1=x3=.5w; +y1r=h+o; y3r=-o; y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +penlabels(1,2,3,4); endchar; + +lhchar "Italic numeral 1"; +beginchar("1",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); pickup tiny.nib; +numeric light_stem; light_stem=hround .4[stem',cap_stem']; +pos1(light_stem,0); pos2(light_stem,0); +lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+apex_o; bot y2=0; +filldraw stroke z1e--z2e; % stem +if one_serif: dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u), + b,1/3,min(2.25u,w-1.25u-rt x2r)); fi % serif +pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); +top y3l=h+apex_o; top y4l=.8h+apex_o; +lft x4=max(1.25u,tiny.lft x1l-2.35u); tiny.rt x1r=lft x3+.25[tiny,hair]; +erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} + --(x4l,h+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top +filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..{left}z4e; % point +penlabels(1,2,3,4); endchar; + +lhchar "Italic numeral 2"; +beginchar("2",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180); +pos5(vair,-270); pos6(curve,-360); pos7(hair,-405); pos8(hair,-360); +x1=x2-.5u; rt x2r=hround(3.5u+.5vair); +x3=.6[x2,x4]; lft x4r=hround(u-.5hair); +x5=x7=.5w-.5u; rt x6r=hround(w-u); lft x8l=hround(1.5u-.5hair); +y1=.5[x_height,h]; y2=1/3[y1,y3]; y4=x_height; bot y3r=vround .78y4; +top y5r=h+o; y6=.5[y5,y7]; y7=.52y4; bot y8=-o; +filldraw stroke if not hefty:z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi + z4e{up}...pulled_arc.e(5,6) + ...z7e{2(x7-x6),y7-y6}...{down}z8e; % main stroke +pos9(vair,-90); pos10(vstem+curve-stem,-90); pos11(hair,0); +x9=w-x10=2.5u; rt x11r=hround(w-.5u+.5hair); +y9=.25[y10,y7]; bot y10r=-o; y11=.38x_height; +filldraw stroke z8e{up}...z9e{right}..{right}z10e...{up}z11e; % bar +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Italic numeral 3"; +beginchar("3",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,45); pos2(vair,0); pos3(vair,-90); pos4(hair,-180); +pos5(vair,-270); pos6(stem,-360); pos7(bar,-450); pos8(bar,-450); +x1=x2-.5u; rt x2r=hround(3.5u+.5vair); x3=.5[x2,x4]; lft x4r=hround u; +x5=x7=.5w; rt x6r=hround(w-u); x8=x7-u; +y1=.5[x_height,h]; y2=.5[y1,y3]; y7=y8=.52h; bot y3r=vround 1/4[y7,h]; +y4=1/3[y3,y5]; top y5r=h+o; y6=.5[y5,y7]; +filldraw stroke if not hefty: z1e{2(x2-x1),y2-y1}...{down}z2e...{left}z3e...fi + z4e{up}...pulled_arc.e(5,6) & pulled_arc.e(6,7)..z8e; % upper arc +pos7'(vair,90); z7'l=z7r; +pos9(curve,0); pos10(vair,-90); pos11(hair,-180); pos12(flare,-180); +rt x9r=hround(w-u); x10=.5w-.5u; lft x11r=hround .75u; +y9=.25h; bot y10r=-o; y11=1/3x_height; bulb(10,11,12); % bulb +filldraw stroke pulled_arc.e(7',9) & pulled_arc.e(9,10); % lower arc +penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Italic numeral 4"; +beginchar("4",9u#,fig_height#,desc_depth#); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(stem,0); pos6(stem,0); pos7(stem,0); +pos2(bar,-45); pos3(bar,-90); pos4(bar,-90); pos5(bar,-45); +rt x1r=hround(.5w+.5u+.5stem); lft x2l=hround .25u; +x3=2.75u; x4=w-2u; rt x5r=hround(w-.25u); +rt x6r=rt x7r=hround(2/3w+.5stem); +y1+.5stem=h+o; bot y2r=0; bot y3r=vround(.08h-.5bar); +bot y4r=vround-.5bar; bot y5r=vround(.03h-.5bar); +y6+.5stem=bar_height; y7-.5stem=-d; +filldraw circ_stroke z1e{down}...{3(x2-x1),y2-y1}z2e; % diagonal +filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e + ...{x5-x4,2(y5-y4)}z5e; % bar +filldraw z6l---z7l..z7r---z6r..cycle; % stem +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Italic numeral 5"; +beginchar("5",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric bot_thickness,light_hair; +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +light_hair=hround(cap_hair if hefty: -\\2stem_corr fi); +pickup tiny.nib; pos5(vair,180); pos6(vair,90); +bot y5=vround(.53h-vair); top y6r=max(vround .61803h+o,top y6r+y5+eps-y6l); +pos3(light_hair,0); pos4(light_hair,0); +lft x3l=max(1.35u,2.1u-.5light_hair); x3=x4=x5; y4=y5; +top y3=h if not hefty: +\\o fi; +filldraw stroke z3e--z4e; % thin stem +penpos7(cap_stem-fine,0); penpos8(bot_thickness-fine,-90); +fine.rt x7r=hround(w-.9u); x8=.5[u,x7]; x6=.5[x5,x7]; +erase fill z5--bot z5--(x6,bot y5)--z6{left} + ..tension .9 and 1..{x5-x6,3(y5-y6)}cycle; % erase excess in middle +filldraw stroke z6e{left}..tension .9 and 1..{x5-x6,3(y5-y6)}z5e; % link +pickup fine.nib; pos6'(vair,90); z6'=z6; +y7=.5[y6,y8]; bot y8r=-o; +filldraw stroke pulled_arc.e(6',7) & pulled_arc.e(7,8); % bowl +if serifs: pos9(hair,-180); y9=.5y5; lft x9r=hround .9u; + pos10(flare+1/3(cap_stem-stem),-180); bulb(8,9,10); % bulb +else: pos9(3/7[bot_thickness,flare],angle(-7u,-h)); + lft x9r=hround(tiny.lft x3l-.75u); bot y9r=vround .15h-o; + x9l:=good.x x9l; y9l:=good.y y9l; + filldraw stroke term.e(8,9,left,1,4); fi % terminal +if hefty: pickup crisp.nib; pos1(slab,90); pos2(hair,0); + top y1r=h; x1=x4; rt x2r=hround(w-1.5u); y2=y1l-eps; + arm(1,2,a,0,0); % arm +else: numeric flag_breadth; flag_breadth=7/8[vair,cap_curve]; + pos1(flag_breadth,90); pos2(flag_breadth,60); + pos0(vair,90); top y1r=tiny.top y3; top y2r=vround .95h+o; y0r=y1r; + lft x1=tiny.lft x3l; x2r=.5[x1,x0]; rt x0=hround(w-1.6u); + erase fill top z1r--z1r...{right}z2r + --(x2r,top y1r)--cycle; % erase excess at top + filldraw stroke z1e...{right}z2e...z0e; fi % flag +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic numeral 6"; +beginchar("6",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric top_thickness,bot_thickness,side_thickness,pull; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); +pull=min(.25,1.5superpull); +pickup fine.nib; pos2(top_thickness,-270); +pos3(side_thickness,-180); pos4(bot_thickness,-90); +pos5(side_thickness,0); pos6(vair,90); +lft x3r=w-rt x5r=hround max(.75u,1.5u-.5side_thickness); +x4=x6-.1u=x2-u=.5w; +top y2r=h+o; y3=.5[y2,y4]; bot y4r=-o; +y5=.5[y4,y6]; top y6=vround 5/8h+o; +path p; p=pulled_super_arc.l(3,4)(pull); +numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); +pos7(thin_join,180); z7l=point t of p; +(x,y6r)=whatever[z7l,z6l]; x6r:=min(x,.5[x5r,x6]); +filldraw stroke pulled_super_arc.e(2,3)(pull) + & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} + & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} + & z6e{left}...{direction t of p}z7e; % arc and bowl +if serifs: pos1(hair,-360); pos0(flare,-360); + rt x0r=max(rt x2+eps,hround(w-1.2u)); + y0=vround min(.9h-.5flare,.85h+.5flare)+o; + {{less_tense; bulb(2,1,0)}}; % arc and bulb +else: pos1(vround .1[top_thickness,flare],90); + top y1r=vround .97h+o; rt x1=hround(x5-.5); + filldraw stroke term.e(2,1,right,.9,4); fi % terminal +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Italic numeral 7"; +beginchar("7",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +numeric fat_curve; fat_curve=1.4[stem,curve]; +pos1(hair,0); pos2(hair,0); pos3(vstem+curve-stem,-90); +pos4(vair,-90); pos5(hair,0); pos6(fat_curve,0); +top y1=h+o; y2=x_height; y3l=y5=y1; +bot y4r=vround(.5[y2,h]-.5vair); y6-.5fat_curve=-o; +lft x2l=hround(.5u-.5hair); x3=.5w-.5u; x4=2/3w; +rt x5r=hround(w-.75u+.5hair); rt x6r=hround(.5w+u+.5fat_curve); +z1=z2+whatever*(z5-z6); filldraw stroke z1e--z2e; % serif +filldraw stroke z2e{z1-z2}...z3e{right}..{right}z4e + ...{2(x5-x6),y5-y6}z5e; % bar +filldraw circ_stroke z6e{up}...{2(x5-x6),y5-y6}z5e; % diagonal +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Italic numeral 8"; +beginchar("8",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +x0=.5w; y0=.54h; +if hefty: mid_thickness=vround 2/3vair; upper_side=hround(stem-3stem_corr); + lower_side=hround min(.5[curve,cap_curve]-stem_corr,upper_side+.25u); + penpos1(top_thickness,90); penpos2(upper_side,180); + penpos3(mid_thickness,270); penpos8(upper_side,360); + penpos4(mid_thickness,90); penpos7(lower_side,180); + penpos6(bot_thickness,270); penpos5(lower_side,360); + penpos0(vair,90); z3l=z0r; z4l=z0l; + x1=x6=.5w; x2r=w-x8r=hround u; x7r=w-x5r=hround .75u; + top y1r=h+o; bot y6r=-o; y2=y8=.5[y1l,y3l]; y7=y5=.5[y4l,y6l]; + filldraw stroke pulled_arc.e(1,2) + & pulled_arc.e(2,3); % left half of upper bowl + filldraw stroke pulled_arc.e(4,5) + & pulled_arc.e(5,6); % right half of lower bowl + filldraw stroke pulled_arc.e(6,7) + & pulled_arc.e(7,4); % left half of lower bowl + filldraw stroke pulled_arc.e(3,8) + & pulled_arc.e(8,1); % right half of upper bowl +else: pickup fine.nib; theta=90-angle(18u,h); slope:=-h/18u; + upper_side=max(fine.breadth,hround(.5[hair,stem]-stem_corr)); + lower_side=hround(.5[hair,stem]+stem_corr); + if lower_side>1.2upper_side: upper_side:=lower_side; fi + pos1(top_thickness,-90); pos6(bot_thickness,-90); + x1=x6=.5w; top y1l=h+o; bot y6r=-o; pos0(cap_stem,theta); + lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround .75u; + x2r-x2l=upper_side-fine; x5r-x5l=lower_side-fine; + ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r); + ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r); + numeric tau; tau=max(.8,.20710678/(superness-.5)); + filldraw stroke z1e{left}..tension atleast tau..z2e{down} + ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left}; % S stroke + pos7(lower_side,180); pos8(upper_side,180); + y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=z0; + filldraw stroke z1e{right}..tension atleast tau..z8e{down} + ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke + filldraw stroke z6e{left}..tension atleast tau..z7e{up} + ..tension atleast tau and atleast 1..{18u,.5h}z9e; fi % lower left stroke +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic numeral 9"; +beginchar("9",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric top_thickness,bot_thickness,side_thickness,pull; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); +pull=min(.25,1.5superpull); +pickup fine.nib; pos2(bot_thickness,-90); +pos3(side_thickness,0); pos4(top_thickness,90); +pos5(side_thickness,180); pos6(vair,270); +w-rt x3r=lft x5r=hround max(.75u,1.5u-.5side_thickness); +x4-.1u=x6+.1u=x2+.75u=.5w; +bot y2r=-o; y3=.5[y2,y4]; top y4r=h+o; +y5=.5[y4,y6]; bot y6=vround 3/8h-o; +path p; p=pulled_super_arc.l(3,4)(pull); +numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); +pos7(thin_join,360); z7l=point t of p; +(x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]); +filldraw stroke pulled_super_arc.e(2,3)(pull) + & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} + & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} + & z6e{right}...{direction t of p}z7e; % arc and bowl +if serifs: pos1(hair,-180); pos0(flare,-180); + lft x0r=min(lft x2-eps,hround 1.2u); + y0=vround max(.1h+.5flare,.15h-.5flare)-o; + {{less_tense; bulb(2,1,0)}}; % arc and bulb +else: pos1(.1[bot_thickness,flare],-120); + bot y1r=vround .07h-o; lft x1r=hround 1.3u; + filldraw stroke term.e(2,1,left,.9,4); fi % terminal +penlabels(0,1,2,3,4,5,6,7); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgilig.mf b/Master/texmf-dist/fonts/source/lh/base/lgilig.mf new file mode 100644 index 00000000000..98bbe913b79 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgilig.mf @@ -0,0 +1,59 @@ +% +% lgilig.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% roman dotless i,j +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Special letters +% +% i_dotl "19 i dotless +% j_dotl "1a j dotless +% ff-ligs (lgiligff.mf) +% + +LHver_check(3,4); % like |version_check| in ec + +if (roman_ec=true) and (old_cyr=false): + +input lgiligff.mf + +fi %roman_ec + +lhchar "Italic Cyrillic letter dotless i"; +cyrchar(i_dotl,5u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib; +x0=0; x5=w; x2=.5w+.25u; x3=.5w-.25u; +hook_in(0,1,2)(skewed); hook_out(3,4,5)(skewed); % hooks +filldraw stroke z2e--z3e; % stem +penlabels(0,1,2,3,4,5); endchar; + +lhchar "Italic Cyrillic dotless j"; +cyrchar(j_dotl,5.5u#,x_height#,desc_depth#); +italcorr x_height#*slant+.5stem#-2u#; +adjust_fit(if monospace:2u# else: 0 fi, 0); pickup fine.nib; +x0=0; x2=x3; pos3(stem,0); lft x3l=hround(w-2u-.5stem); +hook_in(0,1,2); % opening hook +pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); +bot y3=-1/3d; bot y4r=-d-oo; y6-.5flare=-vround.9d; +x4=1/3(w-u); lft x5r=min(hround-.5u,lft x5r+x4-x5l-eps); +filldraw stroke z2e---z3e...{left}z4e; % stem and arc +bulb(4,5,6); % bulb +penlabels(0,1,2,3,4,5,6); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgiligff.mf b/Master/texmf-dist/fonts/source/lh/base/lgiligff.mf new file mode 100644 index 00000000000..648b9fbb69f --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgiligff.mf @@ -0,0 +1,242 @@ +% +% lgilig.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% roman dotless i,j +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Special letters +% +% ff-ligs +% + +LHver_check(3,4); % like |version_check| in ec + +numeric itc; % modified italic correction on `f' and `ff' +itc=(asc_height#-x_height#)*slant+.75u#; + +lhchar "Italic ligature ff"; +beginchar(oct"033", +%if monospace: 12u# else: +(5u#+max(1.5u#,stem#)+max(3.5u#,2flare#))+2letter_fit#, % fi, + asc_height#,desc_depth#); +italcorr asc_height#*slant+.75u#; +normal_adjust_fit(0,0); pickup fine.nib; +z98-z88=z99-z89=z14-z4=z15-z5=(if monospace: 4.3u else: 4.8u fi +2letter_fit,0); +.5[x88,x99]=.5w-.1u; x89-x88=u; y98=h; y99=-d; +numeric theta; theta=angle(z88-z89); +pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(.5[hair,stem],180); pos4(stem,theta+90); +pos5(stem,theta-90); pos6(.5[hair,stem],0); +pos7(vair,-90); pos8(hair,-180); pos9(flare,-180); +if monospace: rt x1r=hround(.5w+.75u); +else: + rt x1r=hround(.5w+1.25u); +fi +%if monospace: lft x8r=hround-.35u; +%else: +lft x8r=hround-.35u; +%fi +x2=.5[x1,x4]; x7=.6[x8,x5]; +y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo; +y4=.25[x_height,h]; y5=.5[-d,y4]; +z4=whatever[z88,z89]; z5=whatever[z88,z89]; +x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7]; +bulb(2,1,0); bulb(7,8,9); % left bulbs +filldraw stroke z2e{left}...z3e...{z89-z88}z4e; % upper middle arc +filldraw z4r--z5l--z5r--z4l--cycle; % left stem +filldraw stroke z5e{z89-z88}...z6e...{left}z7e; % lower left arc +pos10(flare,0); pos11(hair,0); pos12(vair,90); +pos13(.5[hair,stem],180); pos14(stem,theta+90); +pos15(stem,theta-90); pos16(.5[hair,stem],0); +pos17(vair,-90); pos18(hair,-180); pos19(flare,-180); +rt x11r=hround(w+.25u); +if monospace: lft x18r=hround(.5w-.75u); +else: lft x18r=hround(.5w-1.25u); fi +x12=.6[x11,x14]; x17=.5[x18,x15]; +x13=.8[x12+x14-x98,x98]; x16=.8[x17+x15-x99,x99]; +y0=y10; y2=y12; y3=y13; y6=y16; y7=y17; y9=y19; +bulb(12,11,10); bulb(17,18,19); % right bulbs +filldraw stroke z12e{left}...z13e...{z99-z98}z14e; % upper right arc +filldraw z14r--z15l--z15r--z14l--cycle; % right stem +filldraw stroke z15e{z99-z98}...z16e...{left}z17e; % lower middle arc +pickup crisp.nib; pos20(bar,90); pos21(bar,90); +top y20r=top y21r=x_height; +lft x20=lft x4r-.5stem-u; rt x21=rt x14l+.5stem+1.5u; +filldraw stroke z20e--z21e; % crossbar +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, + 20,21,88,89,98,99); endchar; + +lhchar "Italic ligature fi"; +beginchar(oct"034",if monospace: 4.5u# else: 6.5u# fi +.5max(1.5u#,stem#)+.5max(3.5u#,2flare#) + +2letter_fit#,asc_height#,desc_depth#); +italcorr max(asc_height#*slant+.5stem#-2u#,1/3x_height#*slant+.5hair#+.5u#); +normal_adjust_fit(0,0); pickup fine.nib; +.5[x88,x89]=.5(w-if monospace: 2u else: 4u fi -2letter_fit); x89-x88=u; y88=h; y89=-d; +numeric theta; theta=angle(z88-z89); +pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(.5[hair,stem],180); pos4(stem,theta+90); +pos5(stem,theta-90); pos6(.5[hair,stem],0); +pos7(vair,-90); pos8(hair,-180); pos9(flare,-180); +pos11(stem,0); rt x11r=hround(w-2.5u+.5stem); +x12=x11; x14=w; hook_out(12,13,14); % closing hook +x1r=x11r; lft x8r=hround-.35u; x2=.5[x1,x4]; x7=.6[x8,x5]; +y9-.5flare=vround-.85d; bot y7r=-d-oo; +y0+.5flare=vround(.85[x_height,h]); top y2r=h+oo; +y4=.25[x_height,h]; y5=.5[-d,y4]; +z4=whatever[z88,z89]; z5=whatever[z88,z89]; +x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7]; +bulb(2,1,0); bulb(7,8,9); % bulbs +filldraw stroke z2e{left}...z3e...{z89-z88}z4e; % upper arc +filldraw z4r--z5l--z5r--z4l--cycle; % left stem +filldraw stroke z5e{z89-z88}...z6e...{left}z7e; % lower arc +top y11=x_height; filldraw stroke z11e--z12e; % right stem +pickup crisp.nib; pos20(bar,90); pos21(bar,90); +top y20r=top y21r=x_height; +lft x20=lft x4r-.5stem-u; x21=x11; +filldraw stroke z20e--z21e; % crossbar +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,20,21,88,89); endchar; + +lhchar "Italic ligature fl"; +beginchar(oct"035",if monospace: 5u# else: 7u# fi +.5max(1.5u#,stem#)+.5max(3.5u#,2flare#) + +2letter_fit#,asc_height#,desc_depth#); +italcorr max(asc_height#*slant+.5stem#-2u#,1/3x_height#*slant+.5hair#+.5u#); +normal_adjust_fit(0,0); pickup fine.nib; +.5[x88,x89]=.5(w-if monospace: 3.5u else: 4.5u fi -2letter_fit); +x89-x88=u; y88=h; y89=-d; +numeric theta; theta=angle(z88-z89); +pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(.5[hair,stem],180); pos4(stem,theta+90); +pos5(stem,theta-90); pos6(.5[hair,stem],0); +pos7(vair,-90); pos8(hair,-180); pos9(flare,-180); +pos11(stem,0); rt x11r=hround(w-2.5u+.5stem); rt x1r=lft x11l; +x12=x11; x14=w; hook_out(12,13,14); % closing hook +if monospace: lft x8r=hround-.55u; +else: lft x8r=hround-.35u; fi +x2=.5[x1,x4]; x7=.6[x8,x5]; +y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo; +y4=.25[x_height,h]; y5=.5[-d,y4]; +z4=whatever[z88,z89]; z5=whatever[z88,z89]; +x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7]; +bulb(2,1,0); bulb(7,8,9); % bulbs +filldraw stroke z2e{left}...z3e...{z89-z88}z4e; % upper arc +filldraw z4r--z5l--z5r--z4l--cycle; % left stem +filldraw stroke z5e{z89-z88}...z6e...{left}z7e; % lower arc +top y11=h; filldraw stroke z11e--z12e; % right stem +pickup crisp.nib; pos20(bar,90); pos21(bar,90); +top y20r=top y21r=x_height; +lft x20=lft x4r-.5stem-u; x21=x11; +filldraw stroke z20e--z21e; % crossbar +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,20,21,88,89); endchar; + +lhchar "Italic ligature ffi"; +beginchar(oct"036", +if monospace: 7.75u# else: 11.75u# fi +.5max(1.5u#,stem#)+.5max(3.5u#,2flare#) + +4letter_fit#,asc_height#,desc_depth#); +italcorr max(asc_height#*slant+.5stem#-2u#,1/3x_height#*slant+.5hair#+.5u#); +normal_adjust_fit(0,0); pickup fine.nib; +z98-z88=z99-z89=z14-z4=z15-z5=(if monospace: 3u else: 5u fi +2letter_fit,0); +numeric theta,mid_f; +mid_f=.5[x88,x99]=.5(w-if monospace: 2.25u else: 4.25u fi -2letter_fit); +x89-x88=u; +y98=h; y99=-d; theta=angle(z88-z89); +pos21(stem,0); rt x21r=hround(w-2.5u+.5stem); +x22=x21; x24=w; hook_out(22,23,24); % closing hook +pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(.5[hair,stem],180); pos4(stem,theta+90); +pos5(stem,theta-90); pos6(.5[hair,stem],0); +pos7(vair,-90); pos8(hair,-180); pos9(flare,-180); +if monospace: rt x1r=hround(mid_f+u); +else: rt x1r=hround(mid_f+1.75u); fi +if monospace: lft x8r=hround -.65u; +else: lft x8r=hround-.35u; fi +x2=.5[x1,x4]; x7=.6[x8,x5]; +y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo; +y4=.25[x_height,h]; y5=.5[-d,y4]; +z4=whatever[z88,z89]; z5=whatever[z88,z89]; +x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7]; +bulb(2,1,0); bulb(7,8,9); % left bulbs +filldraw stroke z2e{left}...z3e...{z89-z88}z4e; % upper middle arc +filldraw z4r--z5l--z5r--z4l--cycle; % left stem +filldraw stroke z5e{z89-z88}...z6e...{left}z7e; % lower left arc +pos10(flare,0); pos11(hair,0); pos12(vair,90); +pos13(.5[hair,stem],180); pos14(stem,theta+90); +pos15(stem,theta-90); pos16(.5[hair,stem],0); +pos17(vair,-90); pos18(hair,-180); pos19(flare,-180); +x11r=x21r; lft x18r=hround(mid_f-1.25u); x12=.5[x11,x14]; x17=.5[x18,x15]; +x13=.8[x12+x14-x98,x98]; x16=.8[x17+x15-x99,x99]; +y10+.5flare=vround .85[x_height,h]; +y2=y12; y3=y13; y6=y16; y7=y17; y9=y19; +bulb(12,11,10); bulb(17,18,19); % right bulbs +filldraw stroke z12e{left}...z13e...{z99-z98}z14e; % upper right arc +filldraw z14r--z15l--z15r--z14l--cycle; % middle stem +filldraw stroke z15e{z99-z98}...z16e...{left}z17e; % lower middle arc +top y21=x_height; filldraw stroke z21e--z22e; % right stem +pickup crisp.nib; pos30(bar,90); pos31(bar,90); +top y30r=top y31r=x_height; +lft x30=lft x4r-.5stem-u; x31=x21; +filldraw stroke z30e--z31e; % crossbar +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, + 20,21,22,23,24,30,31,88,89,98,99); endchar; + +lhchar "Italic ligature ffl"; +beginchar(oct"037", + if monospace: 8u# else: 12u# fi +.5max(1.5u#,stem#)+.5max(3.5u#,2flare#) + +4letter_fit#,asc_height#,desc_depth#); +italcorr max(asc_height#*slant+.5stem#-2u#,1/3x_height#*slant+.5hair#+.5u#); +normal_adjust_fit(0,0); pickup fine.nib; +z98-z88=z99-z89=z14-z4=z15-z5=(if monospace: 3u else: 5u fi+2letter_fit,0); +numeric theta,mid_f; +mid_f=.5[x88,x99]=.5(w-if monospace: 2u else: 4.5u fi-2letter_fit); x89-x88=u; +y98=h; y99=-d; theta=angle(z88-z89); +pos21(stem,0); rt x21r=hround(w-2.5u+.5stem); +x22=x21; x24=w; hook_out(22,23,24); % closing hook +pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(.5[hair,stem],180); pos4(stem,theta+90); +pos5(stem,theta-90); pos6(.5[hair,stem],0); +pos7(vair,-90); pos8(hair,-180); pos9(flare,-180); +if monospace: rt x1r=hround(mid_f+u); +else: rt x1r=hround(mid_f+1.25u); fi +lft x8r=hround-.35u; +x2=.5[x1,x4]; x7=.6[x8,x5]; +y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo; +y4=.25[x_height,h]; y5=.5[-d,y4]; +z4=whatever[z88,z89]; z5=whatever[z88,z89]; +x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7]; +bulb(2,1,0); bulb(7,8,9); % left bulbs +filldraw stroke z2e{left}...z3e...{z89-z88}z4e; % upper middle arc +filldraw z4r--z5l--z5r--z4l--cycle; % left stem +filldraw stroke z5e{z89-z88}...z6e...{left}z7e; % lower left arc +pos10(flare,0); pos11(hair,0); pos12(vair,90); +pos13(.5[hair,stem],180); pos14(stem,theta+90); +pos15(stem,theta-90); pos16(.5[hair,stem],0); +pos17(vair,-90); pos18(hair,-180); pos19(flare,-180); rt x11r=lft x21l; +lft x18r=hround(mid_f-1.25u); x12=.5[x11,x14]; x17=.5[x18,x15]; +x13=.8[x12+x14-x98,x98]; x16=.8[x17+x15-x99,x99]; +y0=y10; y2=y12; y3=y13; y6=y16; y7=y17; y9=y19; +bulb(12,11,10); bulb(17,18,19); % right bulbs +filldraw stroke z12e{left}...z13e...{z99-z98}z14e; % upper right arc +filldraw z14r--z15l--z15r--z14l--cycle; % middle stem +filldraw stroke z15e{z99-z98}...z16e...{left}z17e; % lower middle arc +top y21=h; filldraw stroke z21e--z22e; % right stem +pickup crisp.nib; pos30(bar,90); pos31(bar,90); +top y30r=top y31r=x_height; +lft x30=lft x4r-.5stem-u; x31=x21; +filldraw stroke z30e--z31e; % crossbar +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, + 20,21,22,23,24,30,31,88,89,98,99); endchar; + +endinput; diff --git a/Master/texmf-dist/fonts/source/lh/base/lgitalp.mf b/Master/texmf-dist/fonts/source/lh/base/lgitalp.mf new file mode 100644 index 00000000000..4300d00c534 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgitalp.mf @@ -0,0 +1,86 @@ +% +% lgitalp.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% exitalp.mf (ec fonts) with another beginning :-) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of signs +% +% "26 & Ampersand +% "3f & Question mark +% * Spanish open question mark moved out +% + +LHver_check(3,4); % like |version_check| in ec + +iff not wncoding:% +lhchar "Italic ampersand"; +beginchar("&",14u#,asc_height#,0); +italcorr asc_height#*slant-1.5u#; +adjust_fit(if monospace:-u#,-2u# else: 0,0 fi); pickup fine.nib; +pos1(flare,0); pos2(hair,0); pos3(vair,90); +rt x2r=hround.5w; x3=1/3(w-u); +top y3r=h+o; y2=.5[x_height,h]; bulb(3,2,1); % left bulb +pos4(stem,180); pos5(vair,270); pos6(hair,360); pos7(vair,450); +pos8(curve,540); pos9(vair,630); pos10(hair,720); +lft x4r=hround 1.25u; x5=x7=x3+1/6u; rt x6r=hround(x5+1.5u); +lft x8r=hround u; x9=.5w; rt x10r=hround(w-1.5u); +y4=.5[y3,y5]; top y5l=vround .77x_height; y6=.5[y5,y7]; +y7l=good.y 1/3[y5,y3]; y8=.5[y7,y9]; bot y9r=-o; y10=bar_height; +pos12(hair,0); pos13(curve,0); pos14(hair,0); pos15(vair,90); pos16(curve,90); +rt x12r=rt x13r=hround(w-2u); lft x14l=hround(.5w+.5u); +x15=x16=rt x14r+u; +y12=y13=h-.5curve; y14=.5[bar_height,x_height]; +bot y15l=bot y16l=vround y10; +numeric theta; theta=angle((z12-z14)xscaled 2); +pos11(hair,theta); x11=w-4u; y11=.5[y13,y16]; +filldraw stroke pulled_arc.e(3,4) & pulled_arc.e(4,5) & pulled_arc.e(5,6) + & pulled_arc.e(6,7) & pulled_arc.e(7,8) & pulled_arc.e(8,9) + & {{interim superness:=more_super; pulled_arc.e(9,10)}} + ..tension .9 and 1..{dir(theta+100)}z11e; % bowls, loop, and stem +pos11'(hair,theta-90); z11'=z11; +forsuffixes $=l,r: path p$; + p$=z12${down}..z11'${-dir theta}..{down}z14$...{right}z15$; endfor +filldraw p.l--reverse p.r--cycle; % arms +path q[]; q1=z13r{up}..z13l{down}..cycle; +q2=z16l{right}..z16r{left}..cycle; +filldraw subpath(0,ypart(p.l intersectiontimes q1)) of q1--cycle; % upper bulb +filldraw subpath(0,ypart(p.r intersectiontimes q2)) of q2--cycle; % lower bulb +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar; + +lhchar "Italic question mark"; +beginchar("?",9u#,asc_height#,0); +italcorr asc_height#*slant-u#; +adjust_fit(0,0); pickup tiny.nib; pos10(dot_size,0); pos11(dot_size,90); +lft x10l=hround(.5w-.5dot_size); bot y11l=0; z10=z11; dot(10,11); % dot +pickup fine.nib; pos1(flare,180); pos2(hair,180); pos3(vair,90); +lft x1r=hround u; x3=.5w; +y1-.5flare=x_height; top y3r=h+o; bulb(3,2,1); % bulb +pos8(vair,-90); x8=.5w; bot y8r=.25[top y11r,x_height]+1; +numeric theta; theta=90+angle(10u,y3-y8); slope:=(y3-y8)/10u; +pos3'(vair,-90); z3'=z3; pos0(vstem,theta); x0=x3; y0=1/3[y8,y3]; +rt x4l=hround(w-1.5u); lft x7r=hround 1/3w; +x4l-x4r=x7l-x7r=hround .5[vair,vstem]-fine; +ellipse_set(3'l,4l,5l,0l); ellipse_set(3'r,4r,5r,0r); y4=y4r; +ellipse_set(8l,7l,6l,0l); ellipse_set(8r,7r,6r,0r); y7=y7r; +pos9(hair,0); rt x9r=hround(2/3w+.5hair); y9=good.y .5[y8,y0]; +filldraw stroke super_arc.e(3',4) & z4e{down} + ..z5e---z6e..z7e{down} & super_arc.e(7,8)...{up}z9e; % main stroke +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgocyrac.mf b/Master/texmf-dist/fonts/source/lh/base/lgocyrac.mf new file mode 100644 index 00000000000..9965a9cf47c --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgocyrac.mf @@ -0,0 +1,779 @@ +% +% lgocyrac.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Old Slav Accents and Signs +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of accents & signs +% +% thousands +% titlo +% paerok +% kamora +% dasia +% psili +% zvat +% pneuac +% pneugr +% accte +% palatal (round titlo) +% tlo_c +% tlo_d +% tlo_o +% tlo_g +% tlo_r +% +% tma +% legion +% leodr +% vran +% koloda +% tmatem +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Cyrillic sign thousands"; % ss uses SlavTeX form +cyrchar(thousands,if serifs:8u# else:7u# fi,x_height#,desc_depth#); +adjust_fit(0,0); +if serifs: pickup tiny.nib; %pickup crisp.nib; + numeric bulb_diam,mid_thickness,stem[]; + stem1=fudged.hair if hefty:-4stem_corr fi; bulb_diam=.7[vair,flare]; + mid_thickness=vround if serifs:1/4 else: 1/3 fi[vair,stem]; + x0=w-u; y0=vround .5bar_height; pos0(vair,90); + lft x2r=u; bot y2=-.5d if serifs:+.25bulb_diam fi; pos2(vair,180); + pos3(bulb_diam,180); cyrbulb(0,2,3); + numeric theta; theta=-135; + pos4(vair,theta); pos4'(vair,theta); pos5(vair,theta); pos5'(vair,theta); + path thous_p; thous_p=z0{left}...z2{down}; + z1'=((.3[x2r,x0],-d)--(.3[x2r,x0],h)) intersectionpoint thous_p; + z2'=((.75[x2r,x0],-d)--(.75[x2r,x0],h)) intersectionpoint thous_p; + z4 =z1'+1.5u*dir(theta-90); z4'=z1'-1.5u*dir(theta-90); + z5 =z2'+1.5u*dir(theta-90); z5'=z2'-1.5u*dir(theta-90); + filldraw stroke z4e--z4'e; filldraw stroke z5e--z5'e; +else: pickup fine.nib; + numeric middle_weight,theta,stem[]; + middle_weight=max(fine.breadth,.6[thin_join,vair]); + stem1=1/3[max(fine.breadth,.6[thin_join,vair]),stem]; + theta=angle(1/2(w-fine-max(u,.5u+.5stem1)-stem1),d); z0=(w/2,0); + z1=z0+5u*dir(theta); z2=z0-5u*dir(theta); if y2<-d: y2:=-d; y1:=2y0-y2; fi + pos1(stem1,theta-90); pos2(stem1,theta-90); + filldraw stroke z1e--z2e; + z3=z0+min(2u,.5(x0-x2))*dir(theta)+2u*dir(theta-90); + z4=z0+min(2u,.5(x0-x2))*dir(theta)-2u*dir(theta-90); + z5=z0-min(2u,.5(x0-x2))*dir(theta)+2u*dir(theta-90); + z6=z0-min(2u,.5(x0-x2))*dir(theta)-2u*dir(theta-90); + pos3(middle_weight,theta); pos4(middle_weight,theta); + pos5(middle_weight,theta); pos6(middle_weight,theta); + filldraw stroke z3e--z4e; filldraw stroke z5e--z6e; fi +penlabels(0,1,1',2,2',3,4,4',5,5',6); endchar; + +lhchar "Cyrillic accent titlo"; +cyrchar(titlo,8u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); x1=.5w; +% low_titlo (1); +_zero:=1; +_one:=2; _two:=3; _three:=4; _four:=5; _five:=6; _six:=7; +% +pickup fine.nib; numeric stem[]; +stem0=if serifs: .8[hair,stem] else: fudged.hair-4stem_corr fi; +pos[_one](stem0,0); pos[_two](stem0,0); +pos[_three](stem0,0); pos[_four](stem0,0); +numeric middle_weight; +middle_weight=if serifs: vair else: max(fine.breadth,.6[thin_join,vair]) fi; +pos[_five](middle_weight,90); pos[_six](middle_weight,90); +lft x[_one]l=lft x[_two]l=x[_zero]-hround(2.75u+.5stem0); +rt x[_four]r=rt x[_three]r=x[_zero]+hround(2.75u+.5stem0); +x[_five]=x[_one]r; x[_six]=x[_three]l; +top y[_five]r=top y[_one]; bot y[_six]l=bot y[_four]; +top y[_three]=h+o; +bot y[_two]=if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5crisp + else: vround 2/3[x_height+acc_height,x_height] fi; +y[_one]=5/6[y[_two],y[_three]]; y[_four]=1/6[y[_two],y[_three]]; +filldraw stroke z[_five]e--z[_six]e; % bar +filldraw stroke z[_one]e--z[_two]e; filldraw stroke z[_three]e--z[_four]e; % stems +%%% +endchar; + +lhchar "Cyrillic accent paerok - vertical tilde"; +cyrchar(paerok,5u#,asc_height#,0);%Apostrophe height +italcorr asc_height#*slant+.5pdot_diam#-2u#;%Apostrophe +adjust_fit(if monospace: u#,u# else: 0,0 fi); +pickup if serifs: crisp.nib; + if not monospace: if vair#>.8curve#: pickup rule.nib; autorounded; fi fi +else: fine.nib; fi +numeric stem[]; +stem1=max(currentbreadth+eps,if serifs: .7 rule_thickness else:1/3[thin_join,vair] fi); +stem2=max(currentbreadth+eps,if serifs:1.4 rule_thickness else:vair fi); +theta:=30; +x1=hround(.5w-1.25u if monospace: /expansion_factor fi)-eps; +x3=hround(.5w+1.25u if monospace: /expansion_factor fi)+eps; +bot y1r=good.y(asc_height-comma_depth-pdot_diam)-eps; +top y3l=h+oo+eps; z2=1/2[z1,z3]; +pos1(stem1,theta-90); pos3(stem1,theta-90); pos2(stem2,theta); +filldraw stroke z1e{dir theta}..{dir(theta+90)}z2e..{dir theta}z3e; +penlabels(1,2,3); endchar; + +lhchar "Cyrillic accent kamora"; +cyrchar(kamora,9u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +%!!! lowercase_breve flipped +x_center:=.5w; y_move:=0; _one:=1; _two:=2; _three:=3; +% +numeric stem[]; +stem1=if serifs:vround (1/3[vair,stem]) else: .6[thin_join,vair] fi; +stem2=stem1; +pickup if serifs: crisp else: fine fi nib; +pos[_one](stem1,180); pos[_three](stem1,0); +top y[_two]r=h+oo+eps; x[_two]=x_center; %!!!v +lft x[_one]r=hround(x[_two]-if serifs: 2 else: 1.5 fi u%narrower frown + if monospace: /expansion_factor fi -0.5stem1); +rt x[_three]r=hround(x[_two]+if serifs: 2 else: 1.5 fi u%narrower frown + if monospace: /expansion_factor fi +0.5stem1); +bot y[_one]=bot y[_three]= %!!! + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5crisp + else: vround 2/3[x_height+acc_height,x_height] fi; +if y[_two]r<(y[_one]+.5if serifs: crisp else: fine fi+eps): %!!! + y[_two]r:=y[_one]+.5if serifs: crisp else: fine fi+eps; fi %!!! +pos[_two](stem2,90); %!!! moved here after if +filldraw stroke z[_one]e{((x[_one]r-x[_three]r),3acc_height)}... + z[_two]e{right}...{((x[_one]r-x[_three]r),-3acc_height)}z[_three]e; % stroke +% +penlabels(1,2,3); endchar; + +lhchar "Cyrillic accent dasia pneumata"; +cyrchar(dasia,9u#,min(asc_height#,2x_height#),0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +pickup if serifs: crisp else: fine fi nib; +numeric bulb_diam,stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs:vround (1/4[vair,stem]) else: vair fi; +if serifs: + bulb_diam=max(currentbreadth+eps,min(flare,3u-vair-1-eps)); + lft x0r=hround (.5w-1.25u if monospace: /expansion_factor fi -0.5stem1); + bot y0=if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5crisp + else: vround 2/3[x_height+acc_height,x_height] fi; + pos0(stem1,180); x1=.5w; top y1r=h+o; pos1(stem2,90); + y2=if hefty: y0 if monospace:+.5bulb_diam-.5currentbreadth fi + else: min(bot y0+7/8bulb_diam,top y1r-currentbreadth-eps) fi; + rt x2r=hround (.5w+2u if monospace: /expansion_factor fi); + pos2(stem1,0); pos3(bulb_diam,0); cyrbulb(1,2,3); + if y1r<(y2+.5currentbreadth+eps): y1r:=y2+.5currentbreadth+eps; fi + filldraw stroke z0e{(3(x0-x2),acc_height)}...{right}z1e; +else: +% zvat!!!; + x_center:=.5w-.5u; _one:=1; _two:=2; _three:=3; +% +theta:=45; +z[_one]=(x_center-1.15u,.55[y[_three],h]); z[_two]=(x_center+1.15u,4/5[y[_three],h]); +bot z[_three]r=(x_center+.65u, + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair) + -.5 if serifs: crisp else: fine fi + else: vround 2/3[x_height+acc_height,x_height] fi); +pos[_one](stem1,theta+90); pos[_two](stem2,theta); +pos[_three](stem1,theta-90); +filldraw stroke z[_one]e{dir(theta+45)} + ..{dir(theta-90)}z[_two]e..{dir(theta+180)}z[_three]e; % stroke +fi +endchar; + +lhchar "Cyrillic accent psili pneumata"; +cyrchar(psili,9u#,min(asc_height#,2x_height#),0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +pickup if serifs: crisp else: fine fi nib; +numeric bulb_diam,stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=vround if serifs:(1/4[vair,stem]) else: vair fi; +if serifs: + bulb_diam=max(currentbreadth+eps,min(flare,3u-vair-1-eps)); + rt x0r=hround (.5w+1.25u if monospace: /expansion_factor fi +0.5stem1); + bot y0=if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5crisp + else: vround 2/3[x_height+acc_height,x_height] fi; + pos0(stem1,0); x1=.5w; top y1r=h+o; pos1(stem2,90); + y2=if hefty: y0 if monospace:+.5bulb_diam-.5currentbreadth fi + else: min(bot y0+7/8bulb_diam,top y1r-currentbreadth-eps) fi; + lft x2r=hround (.5w- 2u if monospace: /expansion_factor fi); + pos2(stem1,180); pos3(bulb_diam,180); cyrbulb(1,2,3); + if y1r<(y2+.5currentbreadth+eps): y1r:=y2+.5currentbreadth+eps; fi + filldraw stroke z0e{(3(x0-x2),acc_height)}...{left}z1e; +else: +% zvat!!!; + x_center:=.5w-.5u; _one:=1; _two:=2; _three:=3; +% + theta:=135; + z[_one]=(x_center+1.15u,.55[y[_three],h]); z[_two]=(x_center-1.15u,4/5[y[_three],h]); + bot z[_three]r=(x_center-.65u, + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair) + -.5 if serifs: crisp else: fine fi + else: vround 2/3[x_height+acc_height,x_height] fi); + pos[_one](stem1,theta-90); pos[_two](stem2,theta); + pos[_three](stem1,theta+90); + filldraw stroke z[_one]e{dir(theta-45)} + ..{dir(theta+90)}z[_two]e..{dir(theta-180)}z[_three]e; % stroke +fi +endchar; + +lhchar "Cyrillic zvatel'stvo accent"; +cyrchar(zvat,9u#,min(asc_height#,2x_height#),0);%height enlarged +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +pickup if serifs: crisp else: fine fi nib; +% zvat; +x_center:=.5w-.5u; _one:=1; _two:=2; _three:=3; +% +numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs:vround (1/3[vair,stem]) else: vair fi; +theta:=45; +z[_one]=(x_center-u,.55[y[_three],h]); z[_two]=(x_center+u,4/5[y[_three],h]); +bot z[_three]r=(x_center+.5u, + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair) + -.5 if serifs: crisp else: fine fi + else: vround 2/3[x_height+acc_height,x_height] fi); +pos[_one](stem1,theta+90); pos[_two](stem2,theta); +pos[_three](stem1,theta-90); +filldraw stroke z[_one]e{dir(theta+45)} + ..{dir(theta-90)}z[_two]e..{dir(theta+180)}z[_three]e; % stroke +% +penlabels(1,2,3); endchar; + +lhchar "Cyrillic accent pneuac - pneumata acute"; +cyrchar(pneuac,9u#,min(asc_height#,2x_height#),0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +old_u:=u; u:=.75u; +% classic acute +if serifs: pickup crisp.nib; x1+.5fudged.stem=hround(w-2u)+x_move; + x2=2/3[x1,w+x_move-x1+(w+x_move-9u)]; + y1+.5fudged.stem=h+eps; + y2=max(2/3[x_height+acc_height,x_height],x_height+o+hair); + numeric theta; theta=angle(z2-z1)+90; + pos1(fudged.stem,theta); pos2(min(fudged.stem,hair),theta); + filldraw circ_stroke z1e--z2e; % diagonal +else: pickup fine.nib; pos1(fudged.stem,0); pos2(vair,0); + rt x1r=hround(w-1.5u)+x_move; + lft x2l=hround(.5[w+x_move-9u,w+x_move]-.25u-.5vair); + top y1=h; bot y2=vround 2/3[x_height+acc_height,x_height]; + filldraw stroke z1e--z2e; fi % diagonal +u:=old_u; +% zvat; +x_center:=.5w-1.5u; _one:=3; _two:=4; _three:=5; +% +numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs:vround (1/3[vair,stem]) else: vair fi; +theta:=45; +z[_one]=(x_center-u,.55[y[_three],h]); z[_two]=(x_center+u,4/5[y[_three],h]); +bot z[_three]r=(x_center+.5u, + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair) + -.5 if serifs: crisp else: fine fi + else: vround 2/3[x_height+acc_height,x_height] fi); +pos[_one](stem1,theta+90); pos[_two](stem2,theta); +pos[_three](stem1,theta-90); +filldraw stroke z[_one]e{dir(theta+45)} + ..{dir(theta-90)}z[_two]e..{dir(theta+180)}z[_three]e; % stroke +% +penlabels(1,2,3,4,5); endchar; + +lhchar "Cyrillic accent pneugr - pneumata grave"; +cyrchar(pneugr,9u#,min(asc_height#,2x_height#),0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +old_u:=u; u:=.75u; +x_move:=if monospace:2u else: 2.5u fi; +% classic gravis +if serifs: pickup crisp.nib; + x1-.5fudged.stem=hround 2u+(w-9u)+x_move; + x2=2/3[x1,w+x_move-x1+(w+x_move-9u)]; + y1+.5fudged.stem=h+eps; + y2=max(2/3[x_height+acc_height,x_height],x_height+o+hair); + numeric theta; theta=angle(z2-z1)+90; + pos1(fudged.stem,theta); pos2(min(fudged.stem,hair),theta); + filldraw circ_stroke z1e--z2e; % diagonal +else: pickup fine.nib; pos1(fudged.stem,0); pos2(vair,0); + lft x1l=hround 1.5u+(w-9u)+x_move; + rt x2r=hround(.5[w+x_move-9u,w+x_move]+.25u+.5vair); + top y1=h; bot y2=vround 2/3[x_height+acc_height,x_height]; + filldraw stroke z1e--z2e; fi % diagonal +u:=old_u; +% zvat; +x_center:=.5w-1.5u; _one:=3; _two:=4; _three:=5; +% +numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs:vround (1/3[vair,stem]) else: vair fi; +theta:=45; +z[_one]=(x_center-u,.55[y[_three],h]); z[_two]=(x_center+u,4/5[y[_three],h]); +bot z[_three]r=(x_center+.5u, + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair) + -.5 if serifs: crisp else: fine fi + else: vround 2/3[x_height+acc_height,x_height] fi); +pos[_one](stem1,theta+90); pos[_two](stem2,theta); +pos[_three](stem1,theta-90); +filldraw stroke z[_one]e{dir(theta+45)} + ..{dir(theta-90)}z[_two]e..{dir(theta+180)}z[_three]e; % stroke +% +penlabels(1,2,3,4,5); endchar; + +lhchar "Cyrillic accent accte - accent te"; +cyrchar(accte,8u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); h:=x_height; +% low_te(0); +_zero:=0; x0=.5w; +_one:=1; _two:=2; _three:=3; _four:=4; _five:=5; +% +if serifs: pickup crisp.nib; + else: pickup pencircle scaled min(.5fine,.15vair); fi +numeric stem[]; stem1=if hefty: fudged.hair-2stem_corr else: .7[vair,stem] fi; +stem2=if serifs: vair else: max(currentbreadth+eps,.6[thin_join,vair]) fi; +stem3=min(stem1,if serifs: hair else: max(currentbreadth+eps,7/8[thin_join,vair]) fi); +pos[_one](stem1,0); pos[_two](stem1,0); +lft x[_one]l=lft x[_two]l=hround(x[_zero]-.5stem1); +numeric mid_thickness; +mid_thickness=vround if serifs:1/4 else: 1/3 fi[vair,stem]; +bot y[_two]=bot y[_four]=bot y[_five]= + vround max(h+o+max(tiny,.5mid_thickness),1/3[h,h+acc_height]+o-.5mid_thickness); +top y[_one]=top y[_three]r=max(h+acc_height,bot y[_two]+1.5vair); +filldraw stroke z[_one]e--z[_two]e; % stem +pos[_three](stem2,90); pos[_four](stem3,0); pos[_five](stem3,180); +x[_three]=x[_one]; +rt x[_four]r=hround(x[_zero]+2.5u if monospace:/expansion_factor fi+.5vair); +x[_four]-x[_three]=x[_three]-x[_five]; +z[_four]'=beak_darkness[(x[_four]l,y[_three]l), + .5[(x[_one]r,y[_three]l),z[_four]l] ]; +z[_five]'=beak_darkness[(x[_five]l,y[_three]l), + .5[(x[_one]l,y[_three]l),z[_five]l] ]; +filldraw z[_four]r--z[_four]l{up}...z[_four]' + ...{left}(x[_one]r,y[_three]l)--(x[_one]r,y[_three]l){left}...z[_five]' + ...{down}z[_five]l--z[_five]r--- + (x[_five]r,y[_three]r)---(x[_four]r,y[_three]r)---cycle; +%%% +endchar; + +lhchar "Cyrillic accent palatalization (round titlo)"; +cyrchar(palatal,10u#,x_height#+acc_height#,0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +% low_palatal; +x_center:=.5w-.25u; x_move:=0; y_move:=-o; +_one:=1; _two:=2; _three:=3; _four:=4; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o; x[_two]=x_center; +rt x[_one]l =hround(x[_two]-3.5u if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+3.5u if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5fine + else: vround 2/3[x_height+acc_height,x_height] fi; +bot y[_four]l=x_height+o; x[_four]=w+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}... + z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +penlabels(1,2,3,4); endchar; + +lhchar "Cyrillic accent titlo with letter c"; +cyrchar(tlo_c,10u#,min(asc_height#,2x_height#),0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +full_h:=h; h:=x_height+acc_height; +% low_palatal; +x_center:=.5w-.25u; x_move:=0; y_move:=full_h-h; +_one:=1; _two:=2; _three:=3; _four:=4; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o+y_move; x[_two]=x_center; +rt x[_one]l =hround(x[_two]-3.5u if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+3.5u if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5fine + else: vround 2/3[x_height+acc_height,x_height] fi+y_move; +bot y[_four]l=x_height+o+y_move; x[_four]=w+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}... + z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +%tlo_c +begingroup +stem2:=1/3[hair,fudged.stem]; +if not serifs: stem2:=max(fine.breadth,1/2[thin_join,vair]); +stem1:=max(fine.breadth,thin_join); fi +save curve; curve:=stem2; +if not serifs: save vair,flare; vair:=stem1; flare:=1/3[stem1,stem2]; fi +numeric hh,ll,rr; hh=min(acc_height,bot y[_two]l-x_height)-o-oo-eps; +y_move:=x_height+oo; old_u:=u; u:=u*(acc_height/x_height); +ll=hround(.5w-5.25u); rr=hround(.5w+3.25u); +clearxy; +% +if serifs: + pickup fine.nib; pos1(hair,0); pos2(vair,90); + pos3(curve,180); pos4(vair',270); pos5(hair,360); + rt x1r=rt x5r=hround(rr-u); lft x3r=hround(ll+u); x2=x4=.55[x3,x1]; + top y2r=hh+oo+y_move; bot y4r=o+y_move; y3=.5[y2,y4]; + bot y1=min(vround max(.65hh,.75hh-.5vair),bot y2l-eps)+y_move; + y5=max(good.y (.95(hh-y1)+y_move),y4l+eps-y_move)+y_move; + (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); + (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); + filldraw stroke z1e{x2-x1,10(y2-y1)} + ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc + pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=hh+oo+y_move; + x1r-x1'=2cap_curve-fine; y1'=y1; + path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; + numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); + filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +else: + pickup fine.nib; pos1(flare,80); pos2(vair,90); + pos3(curve,180); pos4(vair,270); pos5(flare,275); + rt x1r=hround(rr-1.1u); x2=x4=.55[x3,x1]; + lft x3r=ll+hround max(u,2u-.5cap_curve); rt x5r=hround(rr-.9u); + top y1r=vround .9hh+oo+y_move; top y2r=hh+oo+y_move; y3=.5hh+y_move; + bot y4r=o+y_move+eps; bot y5r=vround .15[oo,hh]+y_move; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals +endgroup; +penlabels(1,2,3,4); endchar; + + +lhchar "Cyrillic accent titlo with letter d"; +cyrchar(tlo_d,10u#,min(asc_height#,2x_height#),0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +full_h:=h; h:=x_height+acc_height; +% low_palatal; +x_center:=.5w-.25u; x_move:=0; y_move:=full_h-h;%!!! +_one:=1; _two:=2; _three:=3; _four:=4; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o+y_move; x[_two]=x_center; +rt x[_one]l =hround(x[_two]-3.5u if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+3.5u if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5fine + else: vround 2/3[x_height+acc_height,x_height] fi+y_move;%!!! +bot y[_four]l=min(bot y[_one]-.5y_move,x_height+o+.5y_move)-eps; x[_four]=w+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}... + z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +%tlo_d +stem2:=1/3[hair,fudged.stem]; +if not serifs: stem2:=max(fine.breadth,1/2[thin_join,vair]); +stem1:=max(fine.breadth,thin_join); fi +pos5(stem2,90); pos6(stem2,90); pos5'(stem1,90); pos7(stem1,-15); pos8(stem1,0); +bot y5'l=bot y[_four]l; top y5r=top y6r=top y5'r; +z8l=z[_three]'l; x8-x[_four]=x7-x8; bot y7=bot y[_four]l; +rt x6=rt x[_four]+eps; lft x5=lft x7l-eps; x5'=.5[x5,x6]; +filldraw stroke z7e..{dir75}z8e; +filldraw z6r--z5r--z5l{up}...z5'l...{down}z6l--cycle; +penlabels(1,2,3,4); endchar; + +lhchar "Cyrillic accent titlo with letter o"; +cyrchar(tlo_o,10u#,min(asc_height#,2x_height#),0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +full_h:=h; h:=x_height+acc_height; +% low_palatal; +x_center:=.5w-.25u; x_move:=0; y_move:=full_h-h; +_one:=1; _two:=2; _three:=3; _four:=4; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o+y_move; x[_two]=x_center; +rt x[_one]l =hround(x[_two]-3.5u if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+3.5u if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5fine + else: vround 2/3[x_height+acc_height,x_height] fi+y_move; +bot y[_four]l=x_height+o+y_move; x[_four]=w+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}... + z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +%tlo_o +begingroup +stem2:=1/3[hair,fudged.stem]; +if not serifs: stem2:=max(fine.breadth,1/2[thin_join,vair]); +stem1:=max(fine.breadth,thin_join); fi +save curve; curve:=stem2; +if not serifs: save vair; vair:=stem1; fi +numeric hh,ll,rr; hh=min(acc_height,bot y[_two]l-x_height)-o-oo-eps; +y_move:=x_height+oo; old_u:=u; u:=u*(acc_height/x_height); +ll=hround(.5w-4.5u); rr=hround(.5w+3u); +clearxy; +% +penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0); +x2r=hround max(ll+.5u,ll+1.25u-.5curve); +x4r=rr-(ll-x2r); x1=x3=.5[x2r,x4r]; y1r=hh+oo+y_move; y3r=o+y_move+eps; +y2=y4=.5[o,hh]-.5vair_corr+y_move; y2l:=y4l:=.52[o,hh]+y_move; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +endgroup; +penlabels(1,2,3,4); endchar; + +lhchar "Cyrillic accent titlo with letter g"; +cyrchar(tlo_g,10u#,min(asc_height#,2x_height#),0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +full_h:=h; h:=x_height+acc_height; +% low_palatal; +x_center:=.5w-.25u; x_move:=0; y_move:=full_h-h; +_one:=1; _two:=2; _three:=3; _four:=4; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o+y_move; x[_two]=x_center; +rt x[_one]l =hround(x[_two]-3.5u if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+3.5u if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5fine + else: vround 2/3[x_height+acc_height,x_height] fi+y_move; +bot y[_four]l=x_height+o+y_move; x[_four]=w+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}... + z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +%tlo_g +begingroup +stem2:=1/3[hair,fudged.stem]; +if not serifs: stem2:=max(fine.breadth,1/2[thin_join,vair]); +stem1:=max(fine.breadth,thin_join); fi +if not serifs: save vair,hair; vair:=stem1; hair:=stem1; fi +numeric hh,ll,rr; hh=min(acc_height,bot y[_two]l-x_height)-o-oo-eps; +y_move:=x_height+oo; old_u:=u; u:=u*(acc_height/x_height); +ll=hround(.5w-4u); rr=hround(.5w+3u); +clearxy; +% +pickup if serifs: tiny else: fine fi nib; +pos1(stem2,0); pos2(stem2,0); +lft x1l=lft x2l=hround (ll+2.5u-.5stem2); top y1=hh+y_move; bot y2=o+y_move+eps; +filldraw stroke z1e--z2e; % stem +pickup if serifs: crisp else: fine fi nib; +pos3(vair,90); pos4(vair,0); +top y3r=hh+y_move; x3=x1; rt x4r=hround(rr-.45u); +y4=good.y(y3l-if serifs: .15 fi beak)-eps; +arm(3,4,e,beak_darkness,.2beak_jut); % upper arm and beak +if serifs: save slab; slab:=max(crisp.breadth,Vround(vair-2vair_corr)); % lower.slab + nodish_serif(1,2,a,1/3,.2jut,b,1/3,.1jut); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,.2jut,d,1/3,.2jut); fi % lower serif +endgroup; +penlabels(1,2,3,4); endchar; + +lhchar "Cyrillic accent titlo with letter r"; +cyrchar(tlo_r,10u#,min(asc_height#,2x_height#),0); % +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +full_h:=h; h:=x_height+acc_height; +% low_palatal; +x_center:=.5w-.25u; x_move:=0; y_move:=full_h-h; +_one:=1; _two:=2; _three:=3; _four:=4; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o+y_move; x[_two]=x_center; +rt x[_one]l =hround(x[_two]-3.5u if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+3.5u if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5fine + else: vround 2/3[x_height+acc_height,x_height] fi+y_move; +bot y[_four]l=x_height+o+y_move; x[_four]=w+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}... + z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +%tlo_r +begingroup +stem2:=1/3[hair,fudged.stem]; +if not serifs: stem2:=max(fine.breadth,1/2[thin_join,vair]); +stem1:=max(fine.breadth,thin_join); fi +save curve; curve:=stem2; +if not serifs: save vair,hair; vair:=stem1; hair:=stem1; fi +numeric hh,ll,rr,dd; hh=min(acc_height,bot y[_two]l-x_height)-o-oo-eps; +dd:=d*(acc_height/x_height); +y_move:=x_height+oo; old_u:=u; u:=u*(acc_height/x_height); +ll=hround(.5w-4.75u); rr=hround(.5w+3.25u); +clearxy; +% +pickup if serifs: tiny else: fine fi nib; +pos2(stem2,0); pos3'(stem2,0); +lft x2l=hround(ll+2.5u-.5stem2); bot y2=o+y_move+eps; +y3'=min(hh+1.5oo+y_move-vair-eps,1/3[.55hh,hh]+y_move); rt x3'r=rt x2r; z3'=z3; +filldraw stroke z2e--z3'e; %stem +pickup fine.nib; +pos3(stem2,180); pos4(vair,90); +pos5(curve,0); pos6(vair,-90); pos7(if hefty: thin_join else: hair fi,-180); +numeric edge; edge=rt x2r; +x4l=rr-(.5(rr-ll)-.25serif_fit)+.5u; top y4r=hh+1.5oo+y_move; +rt x5r=hround min(rr-1.35u+.5curve,rr-.6u); y5=.25[hh,oo]+y_move; +x6l=x4l-.2u; bot y6r=max(.4[oo,hh],.45[oo,hh]-oo)+y_move; +rt x7l=tiny.rt x2r; y7=min(y3,y6+y4-y3); +(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); +(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]); +filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5) + &super_arc.e(5,6)&z6e{left}...{up}z7e; % bowl +if serifs: save slab; slab:=max(crisp.breadth,Vround(vair-2vair_corr)); % lower.slab + dish_serif(2,3',b,1/3,.2jut,c,1/3,.2jut); fi % lower serif +endgroup; +penlabels(1,2,3,4); endchar; +% +% Number symbols +% +lhchar"Cyrillic Tma number symbol"; +cyrchar(tma,20u#,body_height#,max(paren_depth#,desc_depth#)); +autorounded; +adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib; +if .5w <> good.x .5w: change_width; fi +lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o; +circle_points; draw_circle; % circle +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar"Cyrillic Legion number symbol"; +cyrchar(legion,20u#,body_height#,max(paren_depth#,desc_depth#)); +autorounded; +adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib; +if .5w <> good.x .5w: change_width; fi +lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o; +circle_points; %draw_circle; % circle +pickup pencircle scaled .5rule_thickness; +def temp (suffix $) = numeric t; t:=rule_thickness+eps; + filldraw (x$-t,y$)...(x$,y$-t)...(x$+t,y$)...(x$,y$+t)...cycle; % roundish dot +enddef; +temp(1); temp(2); temp(3); temp(4); temp(5); temp(6); temp(7); temp(8); +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar"Cyrillic Leodr number symbol"; +cyrchar(leodr,20u#,body_height#,max(paren_depth#,desc_depth#)); +autorounded; +adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib; +if .5w <> good.x .5w: change_width; fi +lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o; +circle_points; %draw_circle; % circle +numeric theta; pickup pencircle scaled .5rule_thickness; +def temp (suffix $,$$) = numeric t; t:=rule_thickness; + filldraw (x$-t,y$)...(x$,y$-t)...(x$+t,y$)...(x$,y$+t)...cycle; % roundish dot + z$'=z$+t*(unitvector((x$,y$)-(x$$,y$$))rotated 90); + z$''=z$+2.5t*unitvector((x$,y$)-(x$$,y$$)); + theta:=angle((x$,y$)-(x$$,y$$))-60; + draw stroke z$'{(x$,y$)-(x$$,y$$)}...z$''; % comma tail +enddef; +temp(1,6); temp(2,7); temp(3,8); temp(4,1); +temp(5,2); temp(6,3); temp(7,4); temp(8,5); +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar"Cyrillic Vran number symbol"; +cyrchar(vran,20u#,body_height#,max(paren_depth#,desc_depth#)); +autorounded; +adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib; +if .5w <> good.x .5w: change_width; fi +lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o; +circle_points; %draw_circle; % circle +pickup pencircle scaled .5rule_thickness; +def temp (suffix $) = numeric t; t:=rule_thickness+1+eps; + draw (x$,y$-t)...(x$,y$+t); draw (x$-t,y$)...(x$+t,y$); % plus sign +enddef; +temp(1); temp(2); temp(3); temp(4); temp(5); temp(6); temp(7); temp(8); +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Cyrillic koloda number symbol"; +cyrchar(koloda,18u#,body_height#,max(paren_depth#,desc_depth#));% +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); +%!!! lowercase_breve flipped +x_center:=.5w; y_move:=0; _one:=1; _two:=2; _three:=3; +% +pickup pencircle scaled .5rule_thickness; +pos[_one](vair,180); pos[_three](vair,0); +top y[_two]r=h+oo; %!!! +x[_two]=x_center; +lft x[_one]r=hround (1.5u); rt x[_three]r=hround(w-1.5u); +numeric mid_thickness; mid_thickness=max(currentbreadth+eps,vround 1/3[vair,stem]);%!!! +bot y[_one]=bot y[_three]= %!!! + vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness)-.5acc_height; +if y[_two]r<(y[_one]+.5crisp+eps): %!!! + y[_two]r:=y[_one]+.5crisp+eps; fi %!!! +pos[_two](mid_thickness,90); %!!! moved here after if +filldraw stroke (z[_one]e+(u,0))--z[_one]e{up}...z[_two]e{right} + ...{down}z[_three]e--(z[_three]e+(-u,0)); % stroke +%flip +forsuffixes $ = [_one]l,[_one],[_one]r,[_two]l,[_two],[_two]r, + [_three]l,[_three],[_three]r : + y$:=h-d-y$; endfor; +filldraw stroke (z[_three]e+(-u,0))--z[_three]e{down}...z[_two]e{left} + ...{up}z[_one]e--(z[_one]e+(u,0)); % stroke +penlabels(1,2,3); endchar; + +lhchar"Cyrillic Tma Tem number symbol"; +cyrchar(tmatem,20u#,body_height#,max(paren_depth#,desc_depth#)); +autorounded; +adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib; +if .5w <> good.x .5w: change_width; fi +lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o; +circle_points; %draw_circle; % circle +pickup pencircle scaled .5rule_thickness; +def temp (suffix $) = numeric t; t:=rule_thickness+1+eps; + draw (x$-t,y$)...(x$+t,y$); % minus sign +enddef; +temp(1); temp(2); temp(3); temp(4); temp(5); temp(6); temp(7); %temp(8); +draw (x8-t,y8)...(x8+t,y8); draw (x8,y8-t)...(x8,y8+t);% plus sign +penlabels(1,2,3,4,5,6,7,8); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgpunct.mf b/Master/texmf-dist/fonts/source/lh/base/lgpunct.mf new file mode 100644 index 00000000000..c87fde4ebde --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgpunct.mf @@ -0,0 +1,288 @@ +% +% lgpunct.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% rearranged Computer Modern punct.mf for wncoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of signs +% +% "21 ! +% "25 % +% "27 ' +% "28 ( +% "29 ) +% "2a * +% "2c , +% "2e . +% "2f / +% "3a : +% "3b ; +% "5b [ +% "5d ] +% "60 ` +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Exclamation point"; +beginchar("!",5u#+width_adj#,asc_height#,0); +italcorr asc_height#*slant-2u#-.5width_adj#+.5dot_size#; +adjust_fit(0,0); +pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90); +lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4); % dot +numeric bot_width; +bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; +pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0); +x1=x2=x3; bot y2=.25[top y4r,x_height]+1; +if square_dots: top y1=h; + filldraw stroke z1e--z2e; % stem +else: top z0=(x1,h+o); y1+.5dot_size=h+o; + filldraw z1r...z0...z1l---z2l--z2r---cycle; fi % stem and bulb +penlabels(0,1,2,3,4); endchar; + +lhchar "Per cent sign"; +beginchar("%",9u#+max(6u#,2fudge*(hair#+stem#)), + body_height#,body_height#-asc_height#); +italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi; +adjust_fit(0,0); pickup fine.nib; +numeric left_curve,right_curve; +left_curve=hround 5/6[fudged.hair,fudged.stem]; +right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); +pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360); +top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u); +bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height); +x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3]; +filldraw stroke pulled_super_arc.e(1,2)(superpull) + & pulled_super_arc.e(2,3)(superpull); % left half of upper bowl +filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl +pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360); +bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u); +top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height); +x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7]; +filldraw stroke pulled_super_arc.e(5,6)(superpull) + & pulled_super_arc.e(6,7)(superpull); % left half of lower bowl +filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl +pickup rule.nib; top y9=h; bot y10=-d; +if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps); + draw z9--z10; % diagonal +else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10; % diagonal + pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90); + pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90); + path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r; + filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi % link +penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Apostrophe"; +beginchar("'",5u#,asc_height#,0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h; +if monospace: comma(1,a,dot_size,.28u,vround 1.5comma_depth); % large comma +else: comma(1,a,dot_size,.25u,comma_depth); fi % comma with increased jut +penlabels(1); endchar; + +lhchar "Left parenthesis"; +beginchar("(",7u# if monospace: -u# fi,body_height#,paren_depth#); +italcorr body_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); +rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u if monospace: +4/3u fi); +top y1=h; y2=.5[y1,y3]=math_axis; +filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e + ...{3(x3e-x2e),y3-y2}z3e; % arc +penlabels(1,2,3); endchar; + +lhchar "Right parenthesis"; +beginchar(")",7u# if monospace: -u# fi,body_height#,paren_depth#); +italcorr math_axis#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); +lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u if monospace: -4/3u fi); +top y1=h; y2=.5[y1,y3]=math_axis; +filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e + ...{3(x3e-x2e),y3-y2}z3e; % arc +penlabels(1,2,3); endchar; + +lhchar "Asterisk"; +beginchar("*",9u#, + if low_asterisk:math_axis#+.5x_height# else: body_height# fi,0); +italcorr h#*slant-.75u#; +adjust_fit(0,0); +numeric ast_flare; ast_flare=hround .7[thin_join,stem]; +x0=.5w; y0=h-.5x_height; +for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height; + numeric theta; theta=angle(z[d]-z0); + fill z0+.5(0,-thin_join)rotated theta + ---z[d]+.5(-ast_flare,-ast_flare)rotated theta + ..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta + ---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d| +labels(0,[-150],[-90],[-30],30,90,150); endchar; + +lhchar "Comma"; +numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; +define_whole_blacker_pixels(dot_diam); +beginchar(",",5u#,dot_diam#,comma_depth#); +adjust_fit(0,0); +x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0; +comma(1,a,dot_diam,.2u,comma_depth); % dot and tail +penlabels(1); endchar; + +lhchar "Period"; +numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; +define_whole_blacker_pixels(dot_diam); +beginchar(".",5u#,dot_diam#,0); +adjust_fit(0,0); pickup fine.nib; +pos1(dot_diam,0); pos2(dot_diam,90); +lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2); % dot +penlabels(1,2); endchar; + +lhchar "Virgule (slash)"; +beginchar("/",9u#,body_height#,paren_depth#); +italcorr body_height#*slant-.5u#; +adjust_fit(0,0); pickup rule.nib; +rt x1=hround(w-u)+eps; top y1=h+eps; +lft x2=hround u-eps; bot y2=-d-eps; +draw z1--z2; % diagonal +penlabels(1,2); endchar; + +lhchar "Colon"; +numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; +define_whole_blacker_pixels(dot_diam); +beginchar(":",5u#,x_height#,0); +italcorr x_height#*slant+.5dot_diam#-2u#; +adjust_fit(0,0); pickup fine.nib; +pos1(dot_diam,0); pos2(dot_diam,90); +lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot +pos3(dot_diam,0); pos4(dot_diam,90); +x3=x1; bot y4l=0; z3=z4; dot(3,4); % lower dot +penlabels(1,2,3,4); endchar; + +lhchar "Semicolon"; +numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#; +define_whole_blacker_pixels(dot_diam); +beginchar(";",5u#,x_height#,comma_depth#); +italcorr x_height#*slant+.5dot_diam#-2u#; +adjust_fit(0,0); pickup fine.nib; +pos1(dot_diam,0); pos2(dot_diam,90); +lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot +x3-.5dot_diam=hround(.5w-.5dot_diam); y3-.5dot_diam=0; +comma(3,a,dot_diam,.05u,comma_depth); % lower dot and tail +penlabels(1,2,3); endchar; + +lhchar "Left bracket"; +numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); +beginchar("[",wd#,body_height#,paren_depth#); +italcorr body_height#*slant; +adjust_fit(0,0); +numeric top_thickness,side_thickness; +if hefty: top_thickness=vair; + side_thickness=max(crisp.breadth,stem-2stem_corr); +else: top_thickness=side_thickness=rule_thickness; fi; +pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); +top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5side_thickness)-1-eps; +filldraw stroke z1e--z2e; % stem +pos3(top_thickness,90); pos4(top_thickness,90); +pos5(top_thickness,90); pos6(top_thickness,90); +x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2; +filldraw stroke z3e--z4e; % upper bar +filldraw stroke z5e--z6e; % lower bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Right bracket"; +numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi); +beginchar("]",wd#,body_height#,paren_depth#); +italcorr body_height#*slant-2u#+.5if hefty:stem# else:rule_thickness# fi; +adjust_fit(0,0); +numeric top_thickness,side_thickness; +if hefty: top_thickness=vair; + side_thickness=max(crisp.breadth,stem-2stem_corr); +else: top_thickness=side_thickness=rule_thickness; fi; +pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0); +top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5side_thickness)+1+eps; +filldraw stroke z1e--z2e; % stem +pos3(top_thickness,90); pos4(top_thickness,90); +pos5(top_thickness,90); pos6(top_thickness,90); +x3=x5=x1r; lft x4=lft x6=floor .4u-eps; y3r=y4r=y1; y5l=y6l=y2; +filldraw stroke z3e--z4e; % upper bar +filldraw stroke z5e--z6e; % lower bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Reverse apostrophe"; +beginchar("`",5u#,asc_height#,0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h-comma_depth; +if monospace: ammoc(1,a,dot_size,.28u,vround 1.5comma_depth); % large ammoc +else: ammoc(1,a,dot_size,.25u,comma_depth); fi % normal ammoc +penlabels(1); endchar; + +% +% excerpts from CM's files romsub.mf and sym.mf +% +if wncoding and monospace: +minus=ASCII"-"; +backslash=ASCII"\"; +vertical=ASCII"|"; +straight_quotes=oct"042"; +fi + +iff known minus: +lhchar "Minus sign"; +beginarithchar(minus); pickup rule.nib; +lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis; +draw z1--z2; % bar +labels(1,2); endchar; + +iff known backslash: +lhchar "Reverse slash (backslash)"; +beginchar(backslash,9u#,body_height#,paren_depth#); +adjust_fit(0,0); pickup rule.nib; +lft x1=hround u-eps; top y1=h+eps; +rt x2=hround(w-u)+eps; bot y2=-d-eps; +draw z1--z2; % diagonal +labels(1,2); endchar; + +iff known vertical: +lhchar "Vertical line"; +beginchar(vertical,5u#,body_height#,paren_depth#); +italcorr body_height#*slant+.5rule_thickness#-2u#; +adjust_fit(0,0); pickup rule.nib; +x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps; +draw z1--z2; % stem +labels(1,2); endchar; + +iff known straight_quotes: +lhchar "Straight double quotes"; +beginchar(straight_quotes,9u#,asc_height#,0); +numeric top_width#,spread#; top_width#=if serifs: flare# else: stem# fi; +spread#=max(3u#,top_width#+.5u#); define_pixels(spread); +italcorr asc_height#*slant+.5top_width#+.5spread#-4u#; +adjust_fit(0,0); +x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3; +y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height); +if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0); + pos3(flare,0); pos4(vair,0); + y1+.5stem=h; filldraw circ_stroke z1e--z2e; % left stem and bulb + filldraw circ_stroke z3e--z4e; % right stem and bulb +else: pickup fine.nib; pos1(stem,0); pos2(vair,0); + pos3(stem,0); pos4(vair,0); + top y1=h; filldraw stroke z1e--z2e; % left stem + filldraw stroke z3e--z4e; fi % right stem +penlabels(1,2,3,4); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgrdigit.mf b/Master/texmf-dist/fonts/source/lh/base/lgrdigit.mf new file mode 100644 index 00000000000..23b5a724aa5 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgrdigit.mf @@ -0,0 +1,344 @@ +% +% lgrdigit.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% exrdigit.mf (ec fonts) with another beginning :-) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% numerals 0 .. 9 +% + +LHver_check(3,4); % like |version_check| in ec + +% All digits have the same height, width, depth, and italic correction. + +font_digit_width 9u#; + +lhchar "The numeral 0"; +beginchar("0",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0); +if not monospace: interim superness:=sqrt(more_super*hein_super); fi +x2r=hround max(.7u,1.45u-.5curve); x4r=w-x2r; x1=x3=.5w; +y1r=h+o; y3r=-o; y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +penlabels(1,2,3,4); endchar; + +lhchar "The numeral 1"; +beginchar("1",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric light_stem; light_stem=hround .4[stem',cap_stem']; +pickup tiny.nib; +pos1(light_stem,0); pos2(light_stem,0); +lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+o; bot y2=0; +filldraw stroke z1e--z2e; % stem +if not serifs: save slab; slab=bar; fi +if one_serif: dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u), + b,1/3,min(2.25u,w-1.25u-rt x2r)); fi % serif +pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); +top y3l=h+o; top y4l=if monospace: .8 else: .9 fi\\ h+o; +lft x4=max(1.25u,tiny.lft x1l-2.35u); +tiny.rt x1r=lft x3+.25[tiny,hair]; +erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} + --(x4l,h+o+1)--(x3l,h+o+1)--cycle; % erase excess at top +filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left}; % point +penlabels(1,2,3,4); endchar; + +lhchar "The numeral 2"; +beginchar("2",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair]; +arm_thickness=Vround(if hefty:slab+2stem_corr else:.4[stem,cap_stem] fi); +pickup crisp.nib; pos7(arm_thickness,-90); pos8(hair,0); +bot y7r=0; lft x7=hround .9u; rt x8r=hround(w-.9u); y8=good.y(y7l+beak/2)+eps; +arm(7,8,a,.3beak_darkness,beak_jut); % arm and beak +pickup fine.nib; pos2(slab,90); pos3(.4[curve,cap_curve],0); +top y2r=h+o; x2=.5(w-.5u); rt x3r=hround(w-.9u); y3+.5vair=.75h; +if serifs: numeric bulb_diam; bulb_diam=hround(flare+2/3(cap_stem-stem)); + pos0(bulb_diam,180); pos1(cap_hair,180); + lft x1r=hround .9u; y1-.5bulb_diam=2/3h; + (x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0); % bulb and arc +else: x2l:=x2l-.25u; pos1(flare,angle(-9u,h)); + lft x1r=hround .75u; bot y1l=vround .7h; y1r:=good.y y1r+eps; x1l:=good.x x1l; + filldraw stroke term.e(2,1,left,.9,4); fi % terminal and arc +pos4(.25[hair_vair,cap_stem],0); +pos5(hair_vair,0); pos6(hair_vair,0); +y5=arm_thickness; y4=.3[y5,y3]; top y6=min(y5,slab,top y7l); +lft x6l=crisp.lft x7; z4l=whatever[z6l,(x3l,bot .58h)]; z5l=whatever[z6l,z4l]; +erase fill z4l--z6l--lft z6l--(lft x6l,y4l)--cycle; % erase excess at left +filldraw stroke z2e{right}..tension atleast .9 and atleast 1 + ..z3e{down}.. z4e---z5e--z6e; % stroke +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +lhchar "The numeral 3"; +beginchar("3",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric top_thickness,mid_thickness,bot_thickness; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +mid_thickness=max(fine.breadth,vround 2/3vair); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +pickup fine.nib; pos2(top_thickness,90); top y2r=h+o; +pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),0); +rt x3r=hround(w-1.25u); +pos4(vair,-90); pos5(vair,-90); +pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7]; +pos7(cap_curve,0); rt x7r=hround(w-.75u); lft x5=min(hround 3u,lft x6)-eps; +pos8(bot_thickness,-90); bot y8r=-o; +y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l]; +top y5l=vround(.54h+.5vair); y5r=y6l; +x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h); +filldraw stroke pulled_super_arc.e(2,3)(.5superpull) + & z3e{down}...z4e---z5e; % upper bowl +filldraw z5r--z6l--z6r--z5l---cycle; % middle tip +filldraw stroke pulled_super_arc.e(6,7)(.5superpull) + & pulled_super_arc.e(7,8)(.5superpull); % lower bowl +if serifs: numeric bulb_diam[]; + bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem; + pos0(bulb_diam1,180); pos1(hair,180); + lft x0r=hround 1.25u; y0=min(.9h-.5bulb_diam1,.75h+.5bulb_diam1); + bulb(2,1,0); % upper bulb + pos10(bulb_diam2,-180); pos9(cap_hair,-180); + lft x10r=hround .75u; y10=max(.1h+.5bulb_diam2,.3h-.5bulb_diam2); + bulb(8,9,10); % lower bulb +else: pos1(.5[vair,flare],angle(-8u,h)); + lft x1r=hround u; bot y1l=vround .75h+o; + y1r:=good.y y1r+eps; x1l:=good.x x1l; + pos9(bot_thickness,angle(-2u,-h)); + lft x9r=hround .75u; top y9l=vround .25h-o; + y9r:=good.y y9r-eps; x9l:=good.x x9l; + filldraw stroke term.e(2,1,left,1,4); % upper terminal + filldraw stroke term.e(8,9,left,1,4); fi % lower terminal +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "The numeral 4"; +beginchar("4",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric light_stem, light_stem', diag_stem, alpha, cut; cut=.75notch_cut; +light_stem=hround .4[fudged.stem,fudged.cap_stem]; +light_stem'=hround max(tiny.breadth,light_stem-2stem_corr); +diag_stem=max(tiny.breadth,.4[vair,fudged.hair]); +pickup crisp.nib; pos5(cap_bar,90); pos6(cap_bar,90); +lft x5=hround .5u; rt x6=hround(w-.5u); +top y5r=vround(if serifs: 5/18[slab,h-light_stem]+1 + else:.35(h-light_stem) fi+.5cap_bar); +z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=hround(w-3u+.5light_stem); +penpos1(light_stem',0); penpos2(light_stem',0); y1=y3=h+apex_o+apex_oo; +x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l); +penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0); +x0=x1l; z0=whatever[z3r,z4r]; +x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l]; +fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5' + ---lft z5l -- (x4r,y5l) -- z4r + if y0<h-cut:{z3r-z4r}...{up}(x1l-1,h-cut) + --(x1l,h-cut) else: -- z0 fi + --z2l--z2r--cycle; % diagonal and upper stem +filldraw stroke z5e--z6e; % bar +pickup tiny.nib; pos7(light_stem,0); rt x7r=x1r; bot y7=0; +pos2'(light_stem,0); x2'=x7; +filldraw stroke z2'e--z7e; % lower stem +if serifs: dish_serif(7,2',a,1/3,1.75u, + b,1/3,min(1.75u,w-.5u-rt x7r)); fi % serif +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "The numeral 5"; +beginchar("5",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric bot_thickness,light_hair; +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +light_hair=hround(cap_hair if hefty: -\\2stem_corr fi); +pickup tiny.nib; pos5(vair,180); pos6(vair,90); +bot y5=vround(.53h-vair); top y6r=max(vround .61803h+o,top y6r+y5+eps-y6l); +pos3(light_hair,0); pos4(light_hair,0); +lft x3l=max(1.35u,2.1u-.5light_hair); x3=x4=x5; y4=y5; +top y3=h if not hefty: +\\o fi; +filldraw stroke z3e--z4e; % thin stem +penpos7(cap_stem-fine,0); penpos8(bot_thickness-fine,-90); +fine.rt x7r=hround(w-.9u); x8=.5[u,x7]; x6=.5[x5,x7]; +erase fill z5--bot z5--(x6,bot y5)--z6{left} + ..tension .9 and 1..{x5-x6,3(y5-y6)}cycle; % erase excess in middle +filldraw stroke z6e{left}..tension .9 and 1..{x5-x6,3(y5-y6)}z5e; % link +pickup fine.nib; pos6'(vair,90); z6'=z6; +y7=.5[y6,y8]; bot y8r=-o; +filldraw stroke pulled_arc.e(6',7) & pulled_arc.e(7,8); % bowl +if serifs: pos9(hair,-180); y9=.5y5; lft x9r=hround .9u; + pos10(flare+1/3(cap_stem-stem),-180); bulb(8,9,10); % bulb +else: pos9(3/7[bot_thickness,flare],angle(-7u,-h)); + lft x9r=hround(tiny.lft x3l-.75u); bot y9r=vround .15h-o; + x9l:=good.x x9l; y9l:=good.y y9l; + filldraw stroke term.e(8,9,left,1,4); fi % terminal +if hefty: pickup crisp.nib; pos1(slab,90); pos2(hair,0); + top y1r=h; x1=x4; rt x2r=hround(w-1.5u); y2=y1l-eps; + arm(1,2,a,0,0); % arm +else: numeric flag_breadth; flag_breadth=7/8[vair,cap_curve]; + pos1(flag_breadth,90); pos2(flag_breadth,60); + pos0(vair,90); top y1r=tiny.top y3; top y2r=vround .95h+o; y0r=y1r; + lft x1=tiny.lft x3l; x2r=.5[x1,x0]; rt x0=hround(w-1.6u); + erase fill top z1r--z1r...{right}z2r + --(x2r,top y1r)--cycle; % erase excess at top + filldraw stroke z1e...{right}z2e...z0e; fi % flag +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "The numeral 6"; +beginchar("6",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric top_thickness,bot_thickness,side_thickness,pull; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); +pull=min(.25,1.5superpull); +pickup fine.nib; pos2(top_thickness,-270); +pos3(side_thickness,-180); pos4(bot_thickness,-90); +pos5(side_thickness,0); pos6(vair,90); +lft x3r=w-rt x5r=hround max(.75u,1.5u-.5side_thickness); +x4=x6-.1u=x2-u=.5w; +top y2r=h+o; y3=.5[y2,y4]; bot y4r=-o; +y5=.5[y4,y6]; top y6=vround 5/8h+o; +path p; p=pulled_super_arc.l(3,4)(pull); +numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); +pos7(thin_join,180); z7l=point t of p; +(x,y6r)=whatever[z7l,z6l]; x6r:=min(x,.5[x5r,x6]); +filldraw stroke pulled_super_arc.e(2,3)(pull) + & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} + & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} + & z6e{left}...{direction t of p}z7e; % arc and bowl +if serifs: pos1(hair,-360); pos0(flare,-360); + rt x0r=max(rt x2+eps,hround(w-1.2u)); + y0=vround min(.9h-.5flare,.85h+.5flare)+o; + {{less_tense; bulb(2,1,0)}}; % arc and bulb +else: pos1(vround .1[top_thickness,flare],90); + top y1r=vround .97h+o; rt x1=hround(x5-.5); + filldraw stroke term.e(2,1,right,.9,4); fi % terminal +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "The numeral 7"; +beginchar("7",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric arm_thickness, bot_width, top_shift, top_hair; +if hefty: arm_thickness=Vround(slab+2stem_corr); top_shift=0; + bot_width=hround .51[curve,cap_curve]; top_hair=.4[thin_join,bot_width]; +else: arm_thickness=Vround .4[stem,cap_stem]; top_shift=.5u; + bot_width=flare; top_hair=cap_hair; fi +if top_hair<tiny.breadth: top_hair:=tiny.breadth; fi +pickup crisp.nib; pos2(arm_thickness,90); pos1(hair,180); +top y2r=h; rt x2=hround(w-.75u+top_shift); +lft x1r=hround(.75u+.5top_shift); y1=good.y(y2l-beak/2)-eps; +arm(2,1,a,.3beak_darkness,-beak_jut); % arm and beak +pos3(hair,180); y3=good.y(y2r+beak/6)+eps; z3r=whatever[z1r,z.a0]; +penpos2'(eps,-90); z2'=z2r; +arm(2',3,b,beak_darkness,x3r-x.a0); % upward extension of beak +pickup tiny.nib; pos4(top_hair,0); pos6(bot_width,0); +bot y4=max(h-arm_thickness,h-slab,bot y2l); rt x4r=crisp.rt x2; +lft x6l=hround(3.5u+top_shift-.5bot_width); +if serifs: y6-.5bot_width=-o; filldraw z6l{down}..{up}z6r--cycle; % bulb +else: bot y6=-oo; fi +if hefty: erase fill rt z4r--z4r...{down}z6r + --(rt x4r,y6)--cycle; % erase excess at top + filldraw stroke z4e...{down}z6e; % stroke +else: pos5(top_hair,0); y5=2/3h; z5=whatever[z4,(.75u,y6)]; + erase fill rt z4r--z4r--z5r--(rt x4r,y5)--cycle; % erase excess at top + filldraw stroke z4e---z5e...{down}z6e; fi % stroke +penlabels(1,2,3,4,5,6); endchar; + +lhchar "The numeral 8"; +beginchar("8",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +x0=.5w; y0=.54h; +if hefty: mid_thickness=vround 2/3vair; upper_side=hround(stem-3stem_corr); + lower_side=hround min(.5[curve,cap_curve]-stem_corr,upper_side+.25u); + penpos1(top_thickness,90); penpos2(upper_side,180); + penpos3(mid_thickness,270); penpos8(upper_side,360); + penpos4(mid_thickness,90); penpos7(lower_side,180); + penpos6(bot_thickness,270); penpos5(lower_side,360); + penpos0(vair,90); z3l=z0r; z4l=z0l; + x1=x6=.5w; x2r=w-x8r=hround u; x7r=w-x5r=hround .75u; + top y1r=h+o; bot y6r=-o; y2=y8=.5[y1l,y3l]; y7=y5=.5[y4l,y6l]; + filldraw stroke pulled_arc.e(1,2) + & pulled_arc.e(2,3); % left half of upper bowl + filldraw stroke pulled_arc.e(4,5) + & pulled_arc.e(5,6); % right half of lower bowl + filldraw stroke pulled_arc.e(6,7) + & pulled_arc.e(7,4); % left half of lower bowl + filldraw stroke pulled_arc.e(3,8) + & pulled_arc.e(8,1); % right half of upper bowl +else: pickup fine.nib; theta=90-angle(18u,h); slope:=-h/18u; + upper_side=max(fine.breadth,hround(.5[hair,stem]-stem_corr)); + lower_side=hround(.5[hair,stem]+stem_corr); + if lower_side>1.2upper_side: upper_side:=lower_side; fi + pos1(top_thickness,-90); pos6(bot_thickness,-90); + x1=x6=.5w; top y1l=h+o; bot y6r=-o; pos0(cap_stem,theta); + lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround .75u; + x2r-x2l=upper_side-fine; x5r-x5l=lower_side-fine; + ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r); + ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r); + numeric tau; tau=max(.8,.20710678/(superness-.5)); + filldraw stroke z1e{left}..tension atleast tau..z2e{down} + ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left}; % S stroke + pos7(lower_side,180); pos8(upper_side,180); + y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=z0; + filldraw stroke z1e{right}..tension atleast tau..z8e{down} + ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke + filldraw stroke z6e{left}..tension atleast tau..z7e{up} + ..tension atleast tau and atleast 1..{18u,.5h}z9e; fi % lower left stroke +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "The numeral 9"; +beginchar("9",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +numeric top_thickness,bot_thickness,side_thickness,pull; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); +pull=min(.25,1.5superpull); +pickup fine.nib; pos2(bot_thickness,-90); +pos3(side_thickness,0); pos4(top_thickness,90); +pos5(side_thickness,180); pos6(vair,270); +w-rt x3r=lft x5r=hround max(.75u,1.5u-.5side_thickness); +x4-.1u=x6+.1u=x2+.75u=.5w; +bot y2r=-o; y3=.5[y2,y4]; top y4r=h+o; +y5=.5[y4,y6]; bot y6=vround 3/8h-o; +path p; p=pulled_super_arc.l(3,4)(pull); +numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); +pos7(thin_join,360); z7l=point t of p; +(x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]); +filldraw stroke pulled_super_arc.e(2,3)(pull) + & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} + & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} + & z6e{right}...{direction t of p}z7e; % arc and bowl +if serifs: pos1(hair,-180); pos0(flare,-180); + lft x0r=min(lft x2-eps,hround 1.2u); + y0=vround max(.1h+.5flare,.15h-.5flare)-o; + {{less_tense; bulb(2,1,0)}}; % arc and bulb +else: pos1(.1[bot_thickness,flare],-120); + bot y1r=vround .07h-o; lft x1r=hround 1.3u; + filldraw stroke term.e(2,1,left,.9,4); fi % terminal +penlabels(0,1,2,3,4,5,6,7); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgrlig.mf b/Master/texmf-dist/fonts/source/lh/base/lgrlig.mf new file mode 100644 index 00000000000..b1b5b50f363 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgrlig.mf @@ -0,0 +1,77 @@ +% +% lgrlig.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% roman dotless i,j +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Special letters +% +% i_dotl "19 i dotless +% j_dotl "1a j dotless +% ff-ligs (lgrligff.mf) +% + +LHver_check(3,4); % like |version_check| in ec + +if (roman_ec=true) and (old_cyr=false): + +input lgrligff; + +fi % roman_ec + +lhchar "Lowercase Cyrillic letter dotless i"; +cyrchar(i_dotl,5u#,x_height#,0); +italcorr x_height#*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); +pickup tiny.nib; pos1(stem',0); pos2(stem',0); +if odd(w-stem'): change_width; fi +lft x1l=hround(.5w-.5stem'); x1=x2; +top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop); % upper serif + save slab; slab:=vair';%serif.lower.slab + dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif +penlabels(1,2); endchar; + +lhchar "Lowercase Cyrillic letter dotless j"; +cyrchar(j_dotl,5.5u#,x_height#,desc_depth#); +italcorr x_height#*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#+2stem_shift# if monospace:+.5u# fi, + serif_fit#-2stem_shift# if monospace:-.5u# fi); +pickup tiny.nib; pos1(stem',0); pos2(stem',0); +rt x1r=hround(.5w+.25u+.5stem'); x1=x2; +top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d; +filldraw stroke z1e--z2e; % stem +if serifs: sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop); % upper serif + pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180); + x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d; + if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi; + (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]); + filldraw stroke z2e{down}...z5e{left}; bulb(5,6,7); % arc and bulb +else: pickup fine.nib; pos2'(stem',0); z2'=z2; + pos6(.2[vair,stem'],-90); pos7(vair,-90); + lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo); + x3r=x1r; top y4r=min(2x_height,h+1); + (x,y7l)=whatever[z7r,(x1,min(h,asc_height))]; x7l:=x; + z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r; + x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo; + filldraw stroke z2'e..{down}z5e & super_arc.e(5,6) + & term.e(6,7,left,1,4); fi % arc and terminal +penlabels(1,2,5,6,7); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgrligff.mf b/Master/texmf-dist/fonts/source/lh/base/lgrligff.mf new file mode 100644 index 00000000000..0b3256a4054 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgrligff.mf @@ -0,0 +1,184 @@ +% +% lgrlig.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% roman dotless i,j +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Special letters +% +% ff-ligs +% + +LHver_check(3,4); % like |version_check| in ec + +numeric itc#; % modified italic correction on `f' and `ff' +itc#=if serifs: max(0,flare#-.25u#) else: 1.25u# fi; + +lhchar "The ligature fi"; +beginchar(oct"034",10u#+2letter_fit#,asc_height#,0); +italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_size# fi-2u#; +normal_adjust_fit(0,serif_fit#); +pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem'); +pos11(stem',0); rt x11r=hround(w-2.5u+.5stem'); +pos12(stem',0); x11=x12; bot y12=0; +pickup fine.nib; numeric bulb_diam, inner_jut; +if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size]; + pos2(bulb_diam,0); x2r=x12r; + y2+.5bulb_diam=.8[x_height,h+oo]; top y11=x_height+min(oo,serif_drop); + if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi +else: bulb_diam=max(stem,dot_size); + pos2(6/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u; + pickup tiny.nib; pos13(bulb_diam,0); pos14(bulb_diam,90); + x13=x11-.5; top y14r=min(2x_height,h+1); top y11=x_height; + if bot y14l-x_height<tiny: y14l:=min(y14r-eps,y11+2tiny); fi + x13=x14; y13=.5[y14l,y14r]; dot(13,14); % dot +fi; % this is the ligature we're drawing +f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif +pickup tiny.nib; filldraw stroke z11e--z12e; % right stem +pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1; +pos3(bar,90); pos4(bar,90); +if serifs: x4=x11; % bar will overlap upper right serif + sloped_serif.l(11,12,d,1/3,jut,min(oo,serif_drop)); % upper right serif + dish_serif(12,11,e,1/3,inner_jut,f,1/3,jut); % lower right serif +else: rt x4= hround 5.3u; fi +pickup crisp.nib; filldraw stroke z3e--z4e; % bar +penlabels(1,2,3,4,11,12,13,14); endchar; + +lhchar "The ligature ff"; +beginchar(oct"033",10.5u#+2letter_fit#,asc_height#,0); +italcorr asc_height#*slant+if serifs:flare#-.25u# else: 1.25u# fi; +normal_adjust_fit(0,0); +pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem'); +pos11(stem',0); rt x11r=hround(w-3u+.5stem'); +pickup fine.nib; numeric bulb_diam, inner_jut; +if serifs: bulb_diam=hround .8[stem,flare]; + pos2(bulb_diam,0); pos12(bulb_diam,0); + rt x2r=hround(rt x11r-stem_corr); lft x12l=hround(w-.75u+.5); + y2+.5bulb_diam=.85[x_height,h+oo]; y12+.5bulb_diam=.9[x_height,h+oo]; + if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi +else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 6.25u; + pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(w+.75u); fi +f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif +f_stroke(11,12,d,e,f,inner_jut,1.25jut); % right stem, arc, terminal, serif +pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1; +pos3(bar,90); pos4(bar,90); +rt x4=hround(w-1/3u); +if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3; + pos4'(bar,90); x4'=x11; y4'=y4; + filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars +else: filldraw stroke z3e--z4e; fi % bar +penlabels(1,2,3,4,11,12); endchar; + +lhchar "The ligature fl"; +beginchar(oct"035",10u#+2letter_fit#,asc_height#,0); +italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; +normal_adjust_fit(0,serif_fit#); +pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem'); +pos11(stem',0); rt x11r=hround(w-2.5u+.5stem'); +pos12(stem',0); x11=x12; bot y12=0; top y11=h; +filldraw stroke z11e--z12e; % right stem +pickup fine.nib; numeric bulb_diam, inner_jut; +if serifs: bulb_diam=hround .8[stem,flare]; + pos2(bulb_diam,0); x2r=x11r-stem_corr; + y2+.5bulb_diam=.9[x_height,h+oo]; + sloped_serif.l(11,12,d,1/3,eps,max(serif_drop,oo)); % erase excess at top + if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi +else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u; fi +f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif +pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1; +pos3(bar,90); pos4(bar,90); +if serifs: x4=x11; + dish_serif(12,11,e,1/3,inner_jut,f,1/3,jut); % lower right serif +else: rt x4= hround 5.3u; fi +pickup crisp.nib; filldraw stroke z3e--z4e; % bar +penlabels(1,2,3,4,11,12); endchar; + +lhchar "The ligature ffi"; +beginchar(oct"036",15u#+4letter_fit#,asc_height#,0); +italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_size# fi-2u#; +normal_adjust_fit(0,serif_fit#); +pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem'); +pos11(stem',0); lft x11l=hround(.5w-.5stem'); +pos21(stem',0); rt x21r=hround(w-2.5u+.5stem'); +pos22(stem',0); x21=x22; bot y22=0; +pickup fine.nib; numeric bulb_diam, inner_jut; +if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size]; + pos2(bulb_diam,0); x2r=x11r-stem_corr; + pos12(bulb_diam,0); x12r=x21r; + top y21=x_height+min(oo,serif_drop); + y2+.5bulb_diam=.8[x_height,h+oo]; y12=y2; + if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi +else: bulb_diam=max(stem,dot_size); + pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u; + pos12(6/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u); + pickup tiny.nib; pos23(bulb_diam,0); pos24(bulb_diam,90); + x23=x21-.5; top y24r=min(2x_height,h+1); top y21=x_height; + if bot y24l-x_height<tiny: y24l:=min(y24r-eps,y21+2tiny); fi + x23=x24; y23=.5[y24l,y24r]; dot(23,24); fi % dot +f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif +f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto +pickup tiny.nib; filldraw stroke z21e--z22e; % right stem +pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1; +pos3(bar,90); pos4(bar,90); +if serifs: x4=x21; % bar will overlap upper right serif + sloped_serif.l(21,22,g,1/3,jut,min(oo,serif_drop)); % upper right serif + dish_serif(22,21,h,1/3,inner_jut,i,1/3,jut); % lower right serif +else: rt x4=hround(.5w+2.8u); fi +pickup crisp.nib; +if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3; + pos4'(bar,90); x4'=x11; y4'=y4; + filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars +else: filldraw stroke z3e--z4e; fi % bar +penlabels(1,2,3,4,11,12,21,22,23,24); endchar; + +lhchar "The ligature ffl"; +beginchar(oct"037",15u#+4letter_fit#,asc_height#,0); +italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; +normal_adjust_fit(0,serif_fit#); +pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem'); +pos11(stem',0); lft x11l=hround(.5w-.5stem'); +pos21(stem',0); rt x21r=hround(w-2.5u+.5stem'); +pos22(stem',0); x21=x22; bot y22=0; top y21=h; +filldraw stroke z21e--z22e; % right stem +pickup fine.nib; numeric bulb_diam, inner_jut; +if serifs: bulb_diam=hround .8[stem,flare]; + pos2(bulb_diam,0); x2r=x11r-stem_corr; + pos12(bulb_diam,0); x12r=x21r-stem_corr; + y2+.5bulb_diam=.85[x_height,h+oo]; y12+.5bulb_diam=.9[x_height,h+oo]; + sloped_serif.l(21,22,g,1/3,eps,max(serif_drop,oo)); % erase excess at top + if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi +else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u; + pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u); fi +f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif +f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto +pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1; +pos3(bar,90); pos4(bar,90); +if serifs: dish_serif(22,21,h,1/3,inner_jut,i,1/3,jut); % lower right serif + pickup crisp.nib; x4=x21; +else: rt x4=hround(.5w+2.8u); fi +if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3; + pos4'(bar,90); x4'=x11; y4'=y4; + filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e; % bars +else: filldraw stroke z3e--z4e; fi % bar +penlabels(1,2,3,4,11,12,21,22); endchar; + +endinput; diff --git a/Master/texmf-dist/fonts/source/lh/base/lgromp.mf b/Master/texmf-dist/fonts/source/lh/base/lgromp.mf new file mode 100644 index 00000000000..c1475195d1f --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgromp.mf @@ -0,0 +1,97 @@ +% +% lgromp.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% exromp.mf (ec fonts) with another beginning :-) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of signs +% +% Ampersand "26 +% Question mark "3f +% * Spanish open question mark moved out +% + +LHver_check(3,4); % like |version_check| in ec + +iff not wncoding:% +lhchar "Ampersand"; +beginchar("&",14u#,asc_height#,0); +italcorr x_height#*slant-serif_fit# - if serifs: .4u# else: 1.5u# fi; +adjust_fit(0,serif_fit#); +pickup tiny.nib; pos2(slab,-90); x2=4u; bot y2r=-o; +if not hefty:(x,y2l)=whatever[z2r,(w-5u,x_height)]; x2l:=x; fi +if serifs: pos0(fudged.hair,0); + rt x0r+jut=hround(w-.9u); top y0=x_height; + pos1(fudged.hair,0); z1=whatever[z0,(.6[x0,x2],0)]; + y1=max(y0-1.5bracket-.2x_height,2/3x_height); + filldraw stroke z0e---z1e...{left}z2e; % short diagonal +else: pickup fine.nib; pos1(.25[slab,flare],-15); rt x1r=hround(w-2u); + y1r=good.y .75[bar_height,x_height]; x1l:=good.x x1l; y1l:=good.y y1l; + top z2'l=(x2l,tiny.top y2l); bot z2'r=(x2r,tiny.bot y2r); + filldraw stroke term.e(2',1,right,1,4); fi % short diagonal and terminal +pickup tiny.nib; numeric slope,theta,reduced_hair; +slope=(h-2vair-slab)/10.5u; theta=angle(-slope,1); +reduced_hair=max(tiny.breadth,hround(fudged.hair if hefty:-2stem_corr fi)); +lft x3r=hround .75u; x5=.5[x3r,x6l]; lft x6r=hround .5(w-u); +x3l-x3r=curve-tiny; pos6(reduced_hair,180); +pos5(vair,theta); y5=.5h; +ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r); +pos7(vair,270); top y7l=h+o; x7=.45[x6r,x8r]; +pos8(fudged.stem,30); x8l=good.x(x8l+3.5u-x8); y8r=y6; +ellipse_set(7l,6l,5',5l); +filldraw stroke z2e{left}...z3e{up}...z4e---z5e...{up}z6e + ...z7e{left}...z8e{down}; % bowls +pos10(slab,90); x10=w-3.5u; bot y10l=-o; +pos9(fudged.stem,angle(z8-z10)-90); +z9=.5[z8,z10]+(1.75u,0) rotated(angle(z8-z10)+90); +filldraw stroke z8e{down}...z9e{z10-z8}...{right}z10e; % long diagonal +if serifs: pickup crisp.nib; pos10'(slab,90); z10'=z10; + pos11(fudged.hair,180); rt x11l=hround(w-u); y11=.5bar_height; + filldraw stroke z10'e{right}...{up}z11e; % terminal + numeric inner_jut; if rt x6l+.5u<lft x0l-1.5jut: inner_jut=1.5jut; + else: rt x6l+.5u=lft x0l-inner_jut; fi + dish_serif(0,1,a,.6,inner_jut,b,.5,jut)(dark); % serif +else: pickup fine.nib; pos10'(slab,90); z10'=z10; + pos11(Vround .5[slab,flare],90); + rt x11=hround(r-letter_fit-u); bot y11l=vround .07bar_height-o; + filldraw stroke term.e(10',11,right,1,4); fi % terminal +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Question mark"; +beginchar("?",8.5u#,asc_height#,0); +italcorr .8asc_height#*slant; +adjust_fit(0,0); +pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90); +lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8; dot(7,8); % dot +numeric bot_width; +bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi; +pickup fine.nib; pos2(vair,90); pos3(curve,0); +pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0); +x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.25[top y8r,x_height]; +top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2]; +{{interim superness:=more_super; +filldraw stroke pulled_super_arc.e(2,3)(superpull) + & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}}; % arc and stem +if serifs: pos1(hair,180); pos0(flare,180); + lft x1r=hround u; y1=y3; bulb(2,1,0); % bulb +else: pos1(Vround 5/7[vair,flare],110); + lft x1r=hround u; top y1r=vround .9[y6,top y2r]; + filldraw stroke term.e(2,1,left,1,4); fi % terminal +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgrusi.mf b/Master/texmf-dist/fonts/source/lh/base/lgrusi.mf new file mode 100644 index 00000000000..f08f332bfae --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgrusi.mf @@ -0,0 +1,838 @@ +% +% lgrusi.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Italic Russian letters from a to ya and yo +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% (there are some letters with common witdh +% they have comments as: v_width (the witdh of russian letter v) +% and n_width (russian letter n) at the end of `cyrchar...' line) +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Italic Russian letter a"; +cyrchar(a,9u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(if monospace:0 else:-.35u#fi,0); % !cadj +% ital_a; +pickup fine.nib; +pos0(hair,0); pos1(vair,90); pos2(curve,180); pos3(vair,270); +pos4(stem,0); x4=x0; y4+.5stem=vround .98h; +x1=x3=.5[x0,x2]; lft x2r=hround(1.5u-.5curve); +rt x4r=hround(w-2.5u+.5stem); +top y1r=h+oo; bot y3r=-oo; y0=y2=.5[y1,y3]; +filldraw stroke super_arc.e(0,1) & pulled_arc.e(1,2) + & pulled_arc.e(2,3) & super_arc.e(3,0); % bowl +x5=x4; x7=w; hook_out(5,6,7); % closing hook +filldraw circ_stroke z4e--z5e; % stem +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Italic Russian letter b"; +cyrchar(b,9u#,asc_height#,0); +italcorr asc_height#*slant+.5stem#-u#; %y->asc_height +adjust_fit(if monospace: 0,0 else: -.35u#,-.35u# fi); +numeric stem[]; stem1=.5[vair,curve]; +stem2= max(fine.breadth,if serifs: hair else: vair fi); +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +x1=x3=.5w; y1r=x_height+oo; y3r=-oo; +x2r=hround(1.5u-.5curve); x4r=w-x2r; +y2=y4=.5x_height-vair_corr; y2l:=y4l:=.52x_height; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % o bowl +pickup fine.nib; +pos7(stem2,180); rt x7l=min(w-u,rt 4r-.1u); top y7=h; +pos2'(stem2,180); lft x2'r=x2r; y2'=y2; +if hefty: + pos5(stem1,90); pos6(stem1,90); + x5=max(x1l,lft x1); x6=x4+if monospace:-.5 else:+.5 fi fine; + x6'=x6-.5stem1; + top y6r=h; y5=y6 if 1/18(h-x_height)>=2:-1/18(h-x_height) fi; y6'=y6l; + filldraw z6r---z6...z6'---z5l....{down}z2'l--z2'r{up}....z5r---cycle; % upper tail +else: + pos5(max(stem2,.7[fudged.hair,fudged.stem]),135); + pos6(max(stem2,.9[fudged.hair,fudged.stem]),120); + x5=max(.55[x2r,x1],x2l+.1u); + forsuffixes $=l,r: + z5'$=((x5,0)..(x5,h)) intersectionpoint (z2${up}...{right}z1$); endfor + y5=max(y5'r+.7(y5'r-y5'l),h-.45(asc_height-x_height)); + z6r=whatever[z5r,z7r]; x6=x7-1.2max(u,stem2); + filldraw stroke z7e..z6e{z5-z6}..z5e....{down}z2'e; fi +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Italic Russian letter v (looks like B)"; +cyrchar(v,9u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e +adjust_fit(if monospace:0 else:-.35u# fi,0); pickup fine.nib; +%numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo +pos0(vair,-90); pos0'(vair,90); pos6(vair,90); +pos1(heavy_hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(curve,0); +x0=x6=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x0'=x2=x4=.5(w+u); +lft x3r=hround(1.5u-.5curve); x5l=x1l; y5=.5[y4,y0]; +y0=y0'=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; +filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,5) + & pulled_arc.e(5,0')...z6{left}; % main bowl +penlabels(0,0',1,2,3,4,5,6); endchar; + +lhchar "Italic Russian letter g"; +cyrchar(g,6.25u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e +adjust_fit(if monospace:u#,u# else: 0.5u#,0.5u# fi); +% ital_g; +pickup fine.nib; x0l=hround eps; x0'=x0; x5r=good.x(w-eps); x6=x5; +x2=.5w+2u; x3=.5w-2u; x1=x4=x7=.5[x3l,x2r]; y7=.5[y2,y3]; +h-y0=y5; top y5l=vround .5bar_height; y6=bar_height; y0'=h-bar_height; +h-y2=y3=1/4x_height; h-y1=y4; bot y4r=-oo; +pos0(hair,320); pos1(vair,270); pos2(stem,180); +pos3(stem,180); pos4(vair,270); pos5(hair,320); pos7(stem,135); +path p.l,p.r; p.l=z0'..z0..z1{right}; p.r=z4{right}..z5..z6; +filldraw stroke z0e{direction 1 of p.l} + ...z1e{right}...{down}z2e...z7e...z3e{down}...z4e{right} + ...{direction 1 of p.r}z5e; % main stroke +%%% +penlabels(0,1,2,3,4,5); endchar; + +lhchar "Italic Russian letter d"; +cyrchar(d,9u#,asc_height#,0); +italcorr .7asc_height#*slant-.15u#; % O+.35u +adjust_fit(if monospace:0,0 else:-.35u#,-.35u#fi); +numeric top_thickness,bot_thickness,side_thickness,pull; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +bot_thickness=max(fine.breadth,vround(slab-vair_corr)); +side_thickness=max(fine.breadth,hround 1/4[curve,cap_curve]); +pull=min(.25,1.5superpull); +pickup fine.nib; pos1(hair,140); pos2(vair,90); +pos3(side_thickness,0); pos4(bot_thickness,-90); +pos5(side_thickness,-180); pos6(vair,-270); +lft x5r=lft x1r=w-rt x3r=hround max(.75u,1.5u-.5side_thickness); +x4=x2+u=x6+.1u=.5w; y1=h-.35bar_height; +top y2r=h+oo; y3=.5[y2,y4]; bot y4r=-oo; +y5=.5[y4,y6]; top y6=x_height+oo; +forsuffixes e=l,r: path p.e; p.e=z1e...{right}z2e; endfor +path p; p=pulled_super_arc.l(3,4)(pull); +numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); +pos7(thin_join,0); z7l=point t of p; +(x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]); +filldraw stroke subpath (.5,1) of p.e + & pulled_super_arc.e(2,3)(superpull) + & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} + & {{less_tense; pulled_super_arc.e(4,5)(pull) + & pulled_super_arc.e(5,6)(pull)}} + & z6e{right}...{direction t of p}z7e; % arc and bowl +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Italic Russian letter e"; +cyrchar(e,8u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e +adjust_fit(if monospace:0 else:-.35u#fi,0); +% ital_e; +pickup fine.nib; +%numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo +pos0(vair,-90); pos1(heavy_hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+u); +lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; +y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; +top y5l=vround .5bar_height; path p; p=z4{right}..z5..z6; +filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Italic Russian letter zh"; +cyrchar(zh,20u#,x_height#,0); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %c +adjust_fit(-.5u#,0 if monospace:-.5u# fi); %zh_adj +% ital_zh; +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal - AS +pickup fine.nib; pos1(flare,0); pos2(hair,0); pos3(vair,90); +pos4(curve,180); pos5(vair,270); pos6(hair,320); +if monospace: x3=x5=.5[lft x4r,rt x2r]-eps; rt x2r=good.x (w+eps); +else: x3=x5=good.x(w-3.5u); rt x2r=hround max(rt x3,w-u)+eps; fi +lft x4r=hround max(.5w+.5stem+.5,w-6.5u-.5curve+eps); x6r=good.x(w+eps); x0=x6; +y2=.5[bar_height,h]; top y3r=h+oo; bulb(3,2,1); % bulb +bot y5r=-oo; y4=.5[y3,y5]; top y6l=vround .5bar_height; y0=bar_height; +path p; p=z5{right}..z6..z0; +filldraw stroke pulled_arc.e(3,4) + & pulled_arc.e(4,5)...{direction 1 of p}z6e; % right arc +pos12(flare,180); pos11(hair,180); pos10(vair,270); +pos9(curve,360); pos8(vair,450); pos7(hair,500); +if monospace: lft x11r=good.x (-eps); x10=x8=.5[lft x11r,rt x9r]+eps; +else: x10=x8=3.5u; lft x11r=hround min(lft x10,u)-eps; fi +rt x9r=hround min(.5w-.5stem-.5,6.5u+.5curve-eps); +x7r=good.x (if not monospace:rt x11r-.67u fi-eps); x0'=x7; +y11=h-.5[bar_height,h]; bot y10r=-oo; bulb(10,11,12); % bulb +top y8r=h+oo; y9=.5[y10,y8]; bot y7l=vround (h-.65bar_height); y0'=bar_height; +path p_; p_=z8{left}..z7..z0; +filldraw stroke pulled_arc.e(10,9) + & pulled_arc.e(9,8)...{direction 1 of p_}z7e; % left arc +y13=bar_height; x13=x4; y14=y13; x14=w-x4; x15=x16=.5w; +y15+.5stem=h+oo; bot y16=0; +pos13(vair,90); pos14(vair,90); pos15(fudged.stem,0); pos16(fudged.stem,0); +filldraw stroke z13e--z14e; filldraw circ_stroke z15e--z16e; % stem & cross +%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar; + +lhchar "Italic Russian letter z"; +cyrchar(z,8u#,x_height#,0); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %e +adjust_fit(0,0); +% ital_z; +pickup fine.nib; pos0(flare,180); pos1(hair,180); pos2(vair,-90); +pos7(curve,0); pos8(curve,0); pos4(vair,90); pos5(hair,160); +pos3(vair,90); pos3'(vair,-90); pos9(vair,90); pos9'(vair,-90); +x2=x4=.5(w-u); lft x1r=min(lft x2,hround(.25u))-eps; +lft x5r=good.x x1r+.15u+eps; x6=x5; +y1=.5bar_height; bot y2r=-oo; bulb(2,1,0); % bulb +rt x7r=w-hround(1.5u-.5curve); rt x8r=w-hround(2u-.5curve); +top y4r=h+oo; y7=.5[y2,y3]; y5r=y8=.5[y3,y4]; y6=bar_height; +x3=x2; lft x9=hround min(lft x2-1-eps,rt x0l+1+eps); +y3=y9=bar_height; z9'=z9; z3'=z3; +path p; p=z4{left}..(x5,h-.52bar_height)..z6; +filldraw stroke z9e{right}...pulled_arc.e(3,7) & pulled_arc.e(7,2); % lower arc +filldraw stroke z9'e{right}...pulled_arc.e(3',8) & pulled_arc.e(8,4) + ...{direction 1 of p}z5e; % upper arc +%%% +penlabels(0,1,2,3,4,5,7,8,9); endchar; + + +lhchar "Italic Russian letter i (looks like u)"; +cyrchar(i,10u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(0,0); +% ital_i; +pickup fine.nib; interim superness:=more_super; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; + pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; x9=w; hook_out(7,8,9); % closing hook +y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Russian letter i_shrt - short i (looks like breve u)"; +cyrchar(i_shrt,10u#,x_height#+acc_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(0,0); full_h:=h; h:=x_height; +% ital_i; +pickup fine.nib; interim superness:=more_super; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; + pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; x9=w; hook_out(7,8,9); % closing hook +y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +% the accent +h:=x_height+acc_height; cbreve(.5w,0, 10,11,12,13,14,15,16); +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16); endchar; + +lhchar "Italic Russian letter k"; +cyrchar(k,9u#,x_height#,0); +italcorr x_height#*slant; +adjust_fit(0,0); +% ital_k; +pickup fine.nib; x2-.5stem=hround(2.5u-.5stem); +%ihalfstem; +if monospace: pos2(stem,0); top y2=h; +else: x0=0; hook_in(0,1,2); fi % opening hook +pos2'(stem,0); pos11(stem,0); z2'=z2; x11=x2'; y11-.5stem=-oo; +filldraw circ_stroke z11e--z2'e; % left stem +pos3(vair,90); x3=x11; y3=bar_height; +pos4(vair,90); x4=w-2u; top y4r=x_height+oo; +filldraw stroke z3e{right}..{right}z4e; % upper diagonal +pos5(hair,0); pos6(flare,0); +rt x5r=hround(w-.5u); y5+.5flare=vround(bot y4l-.03x_height); +bulb(4,5,6); % bulb +pos7(stem,0); pos8(vair,90); pos9(hair,180); +x9+.5hair=hround(w+.5hair-eps); y9=1/3x_height; +lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; +filldraw stroke z3e{right}...z7e{down} + ...z8e{right}...{up}z9e; % lower diagonal +%%% +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Russian letter l"; +cyrchar(l,9u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %n +adjust_fit(.5u#,0); +% ital_l; +pickup fine.nib; +pos1(vair,-90); pos2(stem,180); pos3(hair,0); pos10(stem,0); +pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); +top y1l=h+oo; x1=.5[x3,x2]; +x3=3u; y3=.35h; +y6-.5flare=.1h; lft x6r=-.25u; z5r=z6r; +bot y4r=-oo; x4=max(.4[lft x6r,rt x3r],lft x6r+.5flare-eps); +y10=.8h; lft x10l=lft x7l=hround(w-2.5u-.5stem); z10=z2; +bulb(4,5,6); % bulb +filldraw stroke pulled_arc.e(4,3) + & super_arc.e(3,1) & super_arc.e(1,2); % left stem +x9=w; hook_out(7,8,9); % hook +filldraw stroke z10e--z7e; % right stem +%%% +penlabels(1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Russian letter m"; +cyrchar(m,13u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(if monospace:-.5u#,-1.5u# else:.5u#,0 fi); %wbulb_adj&rstem_adj +%ital_m; +pickup fine.nib; +pos1(hair,0); pos6(stem,0); +pos2(hair,0); pos3(vair,-90); pos4(hair,-180); pos5(flare,-180); +x1=x2=3u; y2=.35h; top y1=h; bot y3r=-oo; lft x5r=-.25u; z4r=z5r; +x3=min(lft x5r+flare,lft x2l-eps); y5-.5flare=.1h; +bulb(3,4,5); % bulb +filldraw stroke pulled_arc.e(3,2) & z2e--z1e; % left stem +rt x7r=hround(w-2.5u+.5stem); x6=x7; top y6=h; +% right_stem; +_one:=7; _two:=8; _three:=9; +if monospace: pos[_three](vair,90); pos[_one](stem,0); + x[_three]=good.x .5[x[_one],w]; bot y[_three]l=0; y[_one]=1/3h; + filldraw stroke z[_one]e{down}...{right}z[_three]e; % terminal +else: x[_three]=w; hook_out([_one],[_two],[_three]); fi % opening hook +% +filldraw stroke z6e--z7e; % right stem +% diagonals;m +numeric stem[]; % thicknesses of the strokes +stem1=hround(fudged.stem-stem_corr); +stem2=min(stem1,hround(fudged.hair-stem_corr)); +penpos10(stem1,0); penpos11(stem1,0); penpos12(stem2,0); penpos13(stem2,0); +x10l=lft x1l; x11l=x12l; x13l=lft x7l; x11-x10=x13-x12; +y10=y13=top y6; y11=y12; +if hefty: + y11=if monospace: vround 1/3h-.5stem1 else: oo fi; + numeric upper_notch,lower_notch; + upper_notch=h-notch_cut; lower_notch=y11+notch_cut; + x1'=rt x1r; z1'=whatever[z10l,z11l]; + x6'=lft x6l; z6'=whatever[z12r,z13r]; + z0=whatever[z10r,z11r]=whatever[z12l,z13l]; + fill z10l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z11-z10}diag_in(10l,11l,1,11r)..diag_out(12l,1,12r,13r){z13-z12} + if y6'<upper_notch: ...{up}(x6'-1,upper_notch){right} fi + ..z13r--diag_out(13r,1,13l,12l){z12-z13} + if y0<=lower_notch: ..{z12-z13}z0{z10-z11}.. + else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi + {z10-z11}diag_in(11r,10r,1,10l)--cycle; % diagonals +else: + y11=0; z0=whatever[z10r,z11r]=whatever[z12l,z13l]; + fill z10l..{z11-z10}diag_in(10l,11l,1,11r)..diag_out(12l,1,12r,13r){z13-z12} + ..z13r--diag_out(13r,1,13l,12l){z12-z13}..{z12-z13}z0{z10-z11} + ..{z10-z11}diag_in(11r,10r,1,10l)--cycle; fi % diagonals +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); +endchar; + +lhchar "Italic Russian letter n (looks like H)"; +cyrchar(n,10u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(0,0); +% ital_n; +pickup fine.nib; x2=x3; pos3(stem,0); lft x3l=hround(2.5u-.5stem); +%ihalfstem; +if monospace: + pos2(stem,0); top y2=h; +else: + x0=0; hook_in(0,1,2); fi % opening hook +y3-.5stem=-oo; +filldraw circ_stroke z3e--z2e; % left stem +x10=x3l; y10=y11=bar_height; pos10(vair,90); pos11(vair,90); +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); y6+.5stem=h; +x7=x6; x9=w; hook_out(7,8,9); % closing hook +z7'=z7; pos7'(stem,0); x11=x6l; +filldraw circ_stroke z6e--z7'e; % right stem +filldraw stroke z10e--z11e; % bar +%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Italic Russian letter o"; +cyrchar(o,9u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %o +adjust_fit(if monospace:0,0 else:-.35u#,-.35u#fi); pickup fine.nib; +pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(curve,360); +x1=x3=.5w; lft x2r=hround(1.5u-.5curve); x4=w-x2; +top y1r=h+oo; y2=y4=.5[y1,y3]; bot y3r=-oo; +filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1); % bowl +penlabels(1,2,3,4); endchar; + +lhchar "Italic Russian letter p (looks like n)"; +cyrchar(p,10u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %n +adjust_fit(0,0); pickup fine.nib; +x1=x2; pos2(stem,0); lft x2l=hround(2.5u-.5stem); y2-.5stem=-oo; +%ihalfstem; +if monospace: + pos1(stem,0); top y1=h; +else: + x0=0; hook_in(0,a,1); fi % opening hook +filldraw circ_stroke z2e--z1e; % left stem +x4+.5stem=hround(w-2.5u+.5stem); x5=x4-.25u; ital_arch(2,3,4); % arch +x7=w; hook_out(5,6,7)(skewed); % closing hook +filldraw stroke z4e{down}..{-u,-x_height}z5e; % right stem +penlabels(0,a,1,2,3,4,5,6,7); endchar; + +lhchar "Italic Russian letter r (looks like p)"; +cyrchar(r,if monospace:9u# else:9.25u# fi,x_height#,desc_depth#); % !rusw +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %p +adjust_fit(0,if monospace:0 else:-.35u#fi); +% ital_r; +pickup fine.nib; +x0=0; x2-.5stem=hround(2.5u-.5stem); hook_in(0,1,2); % opening hook +pos4(hair,-180); pos5(vair,-90); pos6(curve,0); pos7(vair,90); +x4=x2; rt x6r=hround(w-1.5u+.5curve); x5=x7=.5[x4,x6]; +bot y5r=-oo; top y7r=h+oo; y4=y6=.5[y5,y7]; +filldraw stroke super_arc.e(4,5) & pulled_arc.e(5,6) + & pulled_arc.e(6,7) & super_arc.e(7,4); % bowl +pickup tiny.nib; pos2'(stem,0); pos3(stem,0); +z2=z2'; x3=x2; bot y3=-d; +filldraw stroke z2'e--z3e; % stem +dish_serif(3,2',a,1/3,.75jut,b,1/3,jut); % serif +%%% +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Italic Russian letter s (looks like c)"; +cyrchar(s,8u#,x_height#,0); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %c +adjust_fit(if monospace:0 else:-.35u#fi,0); +% ital_s; +pickup fine.nib; pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x2=x4=.5(w+u); rt x1r=max(rt x2,hround(w-u))+eps; +lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; +y1=.5[bar_height,h]; top y2r=h+oo; bulb(2,1,0); % bulb +bot y4r=-oo; y3=.5[y2,y4]; top y5l=vround .5bar_height; y6=bar_height; +path p; p=z4{right}..z5..z6; +filldraw stroke pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Italic Russian letter t (looks like m)"; +cyrchar(t,15u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %m +adjust_fit(if monospace:-1.5u#,-2u# else: 0,0 fi); +% ital_t; +pickup fine.nib; numeric shaved_stem; shaved_stem=mfudged.stem; +save stem; stem=shaved_stem; pos2(stem,0); x1=x2; +if monospace: + pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h; +else: + x0=0; lft x2l=hround(2.5u-.5stem); hook_in(0,a,1); fi % opening hook +y2-.5stem=-oo; filldraw circ_stroke z2e--z1e; % left stem +x4+.5stem=hround(.5w+.5stem); ital_arch(2,3,4); % left arch +pos5(stem,0); y5=y2; x5=x4; +filldraw circ_stroke z5e--z4e; % middle stem +x7+.5stem=hround(w-2.5u+.5stem); +x8=x7-.25u; ital_arch(5,6,7); % right arch +if monospace: + pos9(vair,90); x9=good.x .5[x8,w]; bot y9l=0; y8=1/3h; pos8(stem,0); + filldraw stroke z8e{-u,-x_height}...{right}z9e; % terminal +else: + x9=w; hook_out(8,b,9)(skewed); fi % closing hook +filldraw stroke z7e{down}..{-u,-x_height}z8e; % right stem +penlabels(0,a,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Russian letter u (looks like y)"; +cyrchar(u,if monospace:8.5u# else:9u# fi,x_height#,desc_depth#); % !rusw +italcorr x_height#*slant+.5stem#-u#; %y +adjust_fit(0,0); +% ital_u; +pickup fine.nib; interim superness:=more_super; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; + pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-1.5u+.5stem); +pos7(stem,0); pos8(vair,-90); +y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +y7=0; bot y8r=-d-oo; x5=x6=x7; x8=.5w; +pos9(hair,-180); pos10(flare,-180); y9=-.5d; +lft x9r=hround(2.75u-.5flare); bulb(8,9,10); % bulb +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e---z7e...{left}z8e; % right stem and link +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Russian letter f"; +cyrchar(f,max(2u#,stem#)+max(4u#,2flare#),asc_height#,desc_depth#); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %p +adjust_fit(3.15u#,3.15u#); pickup fine.nib; +pickup fine.nib; +numeric theta; theta=angle(-u,d+h); +pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(.5[hair,stem],180); pos4(stem,theta+90); +pos5(stem,theta-90); pos6(.5[hair,stem],0); +pos7(vair,-90); pos8(hair,-180); pos9(flare,-180); +crisp.top y15r=x_height+oo; crisp.bot y17r=-oo; +x14=.5w; y14=y16=y19=.5[y15r,y17r]; +rt x1r=hround(w+.25u); lft x8r=hround-.35u; x2=.6[x1,x4]; x7=.6[x8,x5]; +y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo; +y4=.25[x_height,h]; z4=whatever[z14,z14+dir theta]; +y5=.5[-d,y4]; z5=whatever[z14,z14+dir theta]; +y12=h; z12=whatever[z14,z14+dir theta]; +y13=-d; z13=whatever[z14,z14+dir theta]; +x3=.8[x2+x4-x12,x12]; x6=.8[x7+x5-x13,x13]; y3=.8[y4,y2]; y6=.8[y5,y7]; +bulb(2,1,0); bulb(7,8,9); % bulbs +filldraw stroke z2e{left}...z3e...{z13-z12}z4e; % upper arc +filldraw z4r--z5l--z5r--z4l--cycle; % stem +filldraw stroke z5e{z13-z12}...z6e...{left}z7e; % lower arc +pickup crisp.nib; +pos14(hair,0); pos15(vair,90); pos16(curve,180); pos17(vair,270); +pos14'(hair,180); z14'=z14; +pos18(vair,90); pos19(curve,0); pos20(vair,-90); +x15=x17=.5[x16,x14]; +lft x16r=l+letter_fit+hround(1.5u-.5curve) if monospace:-.75u else:-.35u fi; +y18=y15; y20=y17; x18=w-x15; x19=w-x16; x20=w-x17; +filldraw stroke super_arc.e(14,15) & pulled_arc.e(15,16) + & pulled_arc.e(16,17) & super_arc.e(17,14); % left bowl +filldraw stroke super_arc.e(14',18) & pulled_arc.e(18,19) + & pulled_arc.e(19,20) & super_arc.e(20,14'); % right bowl +math_fit(desc_depth#*slant+u#,x_height#*slant); +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); +endchar; + +lhchar "Italic Russian letter h - kha (looks like x)"; +cyrchar(h,if monospace:6.5u# else:7.5u# fi+max(1.5u#,flare#), % !rusw + x_height#,0); +italcorr max(1/3x_height#*slant+.5hair#+.5u#,x_height#*slant+.25u#); %x +adjust_fit(if monospace: 0,0 else: 0.25u#,0.25u# fi); +% ital_h; +pickup fine.nib; pos0(hair,180); pos1(vair,90); pos2(stem,0); +pos3(stem,-180); pos4(vair,-90); pos5(hair,0); +y0=y2=2/3h; y3=y5=1/3h; top y1r=h+oo; bot y4r=-oo; +rt x2r=hround(.5w+.5stem-eps); x2=x3; +x0-.5hair=hround-.5hair; x5+.5hair=hround(w+.5hair-eps); +x1=.5[x0,x2]; x4=.5[x3,x5]; +filldraw stroke z0e{up}...pulled_arc.e(1,2); % opening hook +filldraw z2l--z3r--z3l--z2r--cycle; % stem +filldraw stroke pulled_arc.e(3,4)...{up}z5e; % closing hook +pos3'(hair,180); pos6(hair,180); pos7(vair,90); pos8(hair,0); pos9(flare,0); +x3'l=x6l=x3l; y3'=y3; y6=3/4h; x7=.5[x8,x2]; top y7r=h+oo; +rt x8r=hround(w-.25u); y8+.5flare=vround(bot y7l-.03x_height); +filldraw stroke z3'e---z6e...{right}z7e; bulb(7,8,9); % upper link and bulb +pos2'(hair,0); pos16(hair,0); pos17(vair,-90); +pos18(hair,-180); pos19(flare,-180); +x2'l=x16l=x2l; y2'=y2; y16=1/4h; x17=.5[x18,x3]; bot y17r=-oo; +lft x18r=hround.25u; y18-.5flare=vround(top y17l+.03x_height); +filldraw stroke z2'e---z16e...{left}z17e; bulb(17,18,19); % lower link and bulb +penlabels(0,1,2,3,4,5,6,7,8,9,16,17,18,19); endchar; + +lhchar "Italic Russian letter c - tse"; +cyrchar(c,10u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %a +adjust_fit(0,.1u#); %iserif_adj +% ital_c; +pickup fine.nib; interim superness:=more_super; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; + pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +pos8(vair,90); pos9(vair,180); pos7(stem,0); +filldraw circ_stroke z6e--z7e; % right stem +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; % closing hook +% italic descender +i_serif(9,x); +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Russian letter ch"; +cyrchar(ch,9.5u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(0,0); +% ital_ch; +pickup fine.nib; interim superness:=more_super; +x2=x3; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); + filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; x9=w; hook_out(7,8,9); % closing hook +bot y4r=.75bar_height; y5=.75h; y3=min(y2-eps,.7[y4,y5]); y6+.5stem=h; +filldraw stroke z2'e...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +%%% +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Russian letter sh"; +cyrchar(sh,15u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(if monospace:-2u#,-1.5u# else: 0,0 fi); %rshstem_adj&rstem_adj +% ital_sh; +pickup fine.nib; interim superness:=more_super; +numeric shaved_stem; shaved_stem=mfudged.stem; save stem; stem=shaved_stem; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); + filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(min(stem,hair),0); x4=.5[x3,x5]; x5=x7'; +pos5'(min(stem,hair),0); pos6'(vair,-90); pos7'(stem,-180); x5'=x7; y5'=y5; +pos8'(stem,-180); x8'=x7'; y8'+.5stem=h; +pos6(stem,0); rt x7r=hround(w-2.5u+.5stem); +x6=x7; y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +x7'+.5stem=hround(.5w+.5stem); +% right_stem; +_one:=7; _two:=8; _three:=9; +if monospace: + pos[_three](vair,90); pos[_one](stem,0); + x[_three]=good.x .5[x[_one],w]; bot y[_three]l=0; y[_one]=1/3h; + filldraw stroke z[_one]e{down}...{right}z[_three]e; % terminal +else: + x[_three]=w; hook_out([_one],[_two],[_three]); fi % opening hook +x6'=.6[x5',x7']; bot y6'r=bot y4r; y7'=.35x_height; +filldraw stroke super_arc.e(7',6')...{up}z5'e; % middle stroke +filldraw circ_stroke z8'e--z7'e; % middle stem +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Italic Russian letter shch"; +cyrchar(shch,15u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(if monospace:-2u# else:0 fi,.1u#); %rshstem_adj&iserif_adj +% ital_sh; +pickup fine.nib; interim superness:=more_super; +numeric shaved_stem; shaved_stem=mfudged.stem; save stem; stem=shaved_stem; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left skewstem; +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); + filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(min(stem,hair),0); x4=.5[x3,x5]; +x7'+.5stem=hround(.5w+.5stem); x5=x7'; +pos5'(min(stem,hair),0); pos6'(vair,-90); pos7'(stem,-180); x5'=x7; y5'=y5; +pos8'(stem,-180); x8'=x7'; y8'+.5stem=h; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x6=x7; y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +x6'=.6[x5',x7']; bot y6'r=-oo; y7'=.35x_height; +filldraw stroke super_arc.e(7',6')...{up}z5'e; % middle stroke +filldraw circ_stroke z8'e--z7'e; % middle stem +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +pos8(vair,90); pos9(vair,180); pos7(stem,0); +filldraw circ_stroke z6e--z7e; % right stem +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; % closing hook +% italic descender +i_serif(9,x); +penlabels(0,1,2,3,4,5,6,7,8,9,5',6',7',8'); endchar; + +lhchar "Italic Russian letter hrdsn - hard sign"; +cyrchar(hrdsn,if monospace: 6u# else:7.5u#fi,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %"Weierstrass p" +adjust_fit(u#,0); +% ital_hrdsn; +pickup tiny.nib; +pos1(hair,0); pos1'(hair,-45); pos2(hair,0); +rt x1r=hround(w-2u-eps); top y1=h; +lft x2l=hround(u-.5stem); y2=.6bar_height; +z1'=(.35[x1,x2],.65[y1,1.2bar_height+oo]); +filldraw stroke z2e{up}....{2(x1-x2),(y1-1.2bar_height)}z1'e..{up}z1e; % stem +% hrdsn_beak; +pos6(hair,180); pos7(.6[hair,curve],60); pos8(hair,90); +z8r=z1r; x6=-u; y6=3/4x_height; x7=.5[x6,x8]; +top y7r=top y8r; +filldraw stroke z6e{up}...{3,-1}z7e...{2,1}z8e; % fillip +pickup fine.nib; pos2'(stem,-180); pos3(vair,-90); +pos4(curve,0); pos5(vair,90); +lft x2'r=tiny.lft x2l; +y2'=y2; x3=x5=.5[x2,x4]; rt x4r=hround(w-u+.5curve); +bot y3r=-oo; top y5r=1.2bar_height+oo; y4=y2; +filldraw stroke pulled_arc.e(2',3) & pulled_arc.e(3,4) + & pulled_arc.e(4,5) & pulled_arc.e(5,2'); % bowl +%%% +penlabels(1,1',2,2',3,4,5,6,7,8); endchar; + +lhchar "Italic Russian letter ery"; +cyrchar(ery,8u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(if monospace:-2u#,2.5u# else:0,4u# fi); +% ital_ery; +pickup tiny.nib; pos2(stem,0); y2=.6bar_height; +% left skewstem; +if monospace: + x1=x2; pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h; +else: + x1=x2+.25u; x0'=0; lft x2l=hround(2.5u-.5stem); + hook_in(0',a,1)(skewed); fi % opening hook +pickup fine.nib; pos1'(stem,-180); pos2'(stem,-180); pos3(vair,-90); +pos4(curve,0); pos5(vair,90); pos0(hair,180); +z1'=z1; z0=z2=z2'; x3=x5=.5[x2,x4]; rt x4r=hround(w-u+.5curve); +bot y3r=-oo; top y5r=1.2bar_height+oo; y4=y2; +filldraw stroke z1'e{-u,-x_height}...pulled_arc.e(2',3) & pulled_arc.e(3,4) + & pulled_arc.e(4,5) & super_arc.e(5,0); % bowl +% I +w:=w+4u; +pos6(stem,0); y6+.5stem=h; rt x7r=hround(w-2.5u+.5stem); x7=x6; +% right_stem; +_one:=7; _two:=8; _three:=9; +if monospace: + pos[_three](vair,90); pos[_one](stem,0); + x[_three]=good.x .5[x[_one],w]; bot y[_three]l=0; y[_one]=1/3h; + filldraw stroke z[_one]e{down}...{right}z[_three]e; % terminal +else: + x[_three]=w; hook_out([_one],[_two],[_three]); fi % opening hook +filldraw circ_stroke z6e--z7e; % stem +penlabels(0,1,1',2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Russian letter sftsn - soft sign"; +cyrchar(sftsn,if monospace: 9u# else: 9u# fi,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %"Weierstrass p" +adjust_fit(if monospace:.5u#,.5u# else:0,0 fi); pickup tiny.nib; +pos2(stem,0); y2=.6bar_height; +% left skewstem; +if monospace: + x1=x2; pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h; +else: + x1=x2+.25u; x0'=0; lft x2l=hround(2.5u-.5stem); + hook_in(0',a,1)(skewed); fi % opening hook +pickup fine.nib; pos1'(stem,-180); pos2'(stem,-180); pos3(vair,-90); +pos4(curve,0); pos5(vair,90); pos0(hair,180); +z1'=z1; z0=z2=z2'; x3=x5=.5[x2,x4]; rt x4r=hround(w-u+.5curve); +bot y3r=-oo; top y5r=1.2bar_height+oo; y4=y2; +filldraw stroke z1'e{-u,-x_height}...pulled_arc.e(2',3) & pulled_arc.e(3,4) + & pulled_arc.e(4,5) & super_arc.e(5,0); % bowl +penlabels(0,1,a,1',2,3,4,5,6); endchar; + +lhchar "Italic Russian letter erev - reverse e"; +cyrchar(erev,8u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %o +adjust_fit(0,if monospace:0 else:-.35u# fi); %o +% ital_erev; +pickup fine.nib; +pos0(flare,180); pos1(hair,-180); pos2(vair,-90); +pos3(curve,0); pos4(vair,90); pos5(hair,140); +x2+.5u=x4=.5(w-u); lft x1r=min(lft x2,hround(.25u))-eps; +rt x3r=w-hround(1.5u-.5curve); lft x5r=good.x (lft x1r-eps); x6=x5; +y1-.5flare=.1h; bot y2r=-oo; bulb(2,1,0); % bulb +top y4r=h+oo; y3=.5[y2,y4]; top y5r=vround .5[bar_height,h]; +y6=bar_height; path p; p=z4{left}....z5..z6; +filldraw stroke pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +x7=x3; y7=bar_height; y8=y7; lft x8=hround min(lft x2-1-eps,rt x0l+eps); +pos7(vair,90); pos8(vair,90); +filldraw stroke z7e--z8e; +%%% +penlabels(0,1,2,3,4,5,6,8); endchar; + +lhchar "Italic Russian letter yu (looks like io)"; +cyrchar(yu,9u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %o +adjust_fit(if monospace:3u# else:4.5u# fi, + if monospace:-.75u# else:-.35u# fi); +% ital_yu; +pickup fine.nib; +pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(curve,360); +x1=x3=.5w; lft x2r=hround(1.5u-.5curve); x4=w-x2; +top y1r=h+oo; y2=y4=.5[y1,y3]; bot y3r=-oo; +filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1); % bowl +% i half +_one:=5; _two:=6; _three:=7; _four:=8; _five:=9; _six:=10; +% +pos[_four](stem,0); +lft x[_four]l=l+letter_fit if not monospace: +hround(2.5u-.5stem) fi; +y[_four]-.5stem=-oo; x[_three]=x[_four]; +if monospace: + pos[_three](stem,0); top y[_three]=h; +else: + x[_one]=l+letter_fit; hook_in([_one],[_two],[_three]); fi % opening hook +filldraw circ_stroke z[_four]e--z[_three]e; % stem +pos[_five](vair,90); pos[_six](vair,90); %!!! +x[_five]=x[_four]; x[_six]=x2; y[_five]=y[_six]=bar_height; %!!! +filldraw stroke z[_five]e--z[_six]e; % bar %!!! +%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Russian letter ya (looks like backward R)"; +cyrchar(ya,9u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(.5u#,0); +% ital_ya; +pickup fine.nib; +rt x1r=rt x2r=hround(w-2.5u+.5stem); top y1=h; x4=w; +hook_out(2,3,4); % closing hook +pos1(stem,0); filldraw stroke z1e--z2e; % stem +pos5(vair,90); pos6(vair,90); pos7(curve,180); pos8(vair,270); pos9(vair,270); +x5=x9=x1; top y5r=top y6r=h; x6=x8=.5[x5,x7]; +lft x7l=hround(1.5u if not monospace:+.5curve fi); +y7=.5[y5,y9]; y8=y9=bar_height; +filldraw stroke z5e...pulled_arc.e(6,7) & pulled_arc.e(7,8)...z9e; % bowl +pos10(stem,0); pos11(vair,-90); +x10=.3[x11,x9]; y10=1/2y9; x11-flare=-.25u; bot y11r=-oo; +filldraw stroke z11e{right}...z10e{up}...{right}z9e; % lower diagonal +pos12(hair,180); pos13(flare,180); +lft x13r=-.25u; y13-.5flare=.1h; bulb(11,12,13); % bulb +%%% +penlabels(1,2,3,4,5,6,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Italic Russian letter yo (looks like e umlaut)"; +cyrchar(yo,8u#,lc_trema_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e +adjust_fit(if monospace:0 else:-.35u# fi,0); full_h:=h; h:=x_height; +% ital_e; +pickup fine.nib; %numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo +pos0(vair,-90); pos1(heavy_hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+u); +lft x3r=hround(1.5u-.35curve); x5r=good.x(w-eps); x6=x5; +y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; +top y5l=vround .5bar_height; path p; p=z4{right}..z5..z6; +filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +%the accent +h:=x_height+acc_height; lowercase_umlaut(0,0,71,72,73,74); %2 +penlabels(0,1,2,3,4,5,6); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgrusl.mf b/Master/texmf-dist/fonts/source/lh/base/lgrusl.mf new file mode 100644 index 00000000000..e03c302404f --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgrusl.mf @@ -0,0 +1,1414 @@ +% +% lgrusl.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lowercase Russian letters from a to ya and yo +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% (there are some letters with common witdh +% they have comments as: v_width (the witdh of russian letter v) +% and n_width (russian letter n) at the end of `cyrchar...' line) +% + +LHver_check(3,4); % like |version_check| in ec + +if kapitel: input lgcrusl; fi + +iff not kapitel:% +lhchar "Lowercase Russian letter a"; +cyrchar(a,9u#,x_height#,0); +bh#:=min(bar_height#,1.14x_height#-bar_height#); define_pixels(bh); +italcorr 1/3[bh#,x_height#]*slant+.5stem#-serif_fit#-2u#; +adjust_fit(0,serif_fit# if serifs: if hair#+.5stem#>1.5u#:-.25u# fi\\fi); +% lower_a; +pickup fine.nib; top y3r=h+vround 1.5oo; +if serifs: + pos1(flare,180); pos2(hair,180); pos3(vair,90); + lft x1r=hround max(u,2.1u-.5flare); x3=.5w-.5u; + y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare); + bulb(3,2,1); % bulb +else: + pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r; + pos3(1/8[vair,thin_join],90); x3=.5w-.2u; + top y1r=vround .82[bh,top y3r]; + filldraw stroke term.e(3,1,left,.9,4); fi % terminal +pos4(stem,0); rt x4r=hround(w-2.5u+.5stem); y4=1/3[bh,h]; +pos5(stem,0); x5=x4; y5=max(.55bh,2vair); +filldraw stroke super_arc.e(3,4)&z4e..z5e; % arc and stem +pos6(.3[thin_join,vair],90); x6=x4; bot y6=bh; +pos7(hround(curve-2stem_corr),180); +lft x7r=hround max(.5u,1.5u-.5curve); y7=1/3[top y8l,top y6r]; +pos8(vair,270); x8l=.5w-.75u; bot y8r=-oo; +pos9(thin_join,360); z9l=z5l; (x,y8r)=whatever[z8l,z9l]; x8r:=max(x,x8-u); +{{interim superness:=more_super; + filldraw stroke z9e{down}...z8e{left}...{up}z7e&super_arc.e(7,6)}}; % bowl +if serifs: + numeric shaved_stem; shaved_stem=hround(stem-3stem_corr); + if hair#+.5stem#>1.5u#: + pickup tiny.nib; + pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5; + pos10(shaved_stem,0); x10=x5'; y10=.2[.5tiny,bh]; + pos11(shaved_stem,0); rt x11r=hround(w-.25u); bot y11=0; + pos12(shaved_stem,0); x11=x12; top y12=slab+eps; + filldraw z5'l---z10l...z11l{right}--z11r + --z12r{left}...z10r+.75(z12-z11)---z5'r--cycle; % foot + else: + pickup crisp.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5; + pos10(shaved_stem,0); x10=x5'; y10=1/3bh; + pos11(.2[vair,stem],90); x11r=.5[x10r,x12r]; bot y11l=-vround .5oo; + pos12(hair,180); rt x12l=hround(w-.1u); y12=max(y10,y11+vair); + pos13(hair,180); x13=x12; top y13=max(vround .6bh,top y12); + (x',y11l)=whatever[z11r,z12r]; x11l:=max(x',x10); + filldraw stroke z5'e---z10e...z11e{right}...z12e---z13e; fi % hook +else: + numeric shaved_stem; shaved_stem=hround(stem-stem_corr); + pickup tiny.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5; + pos10(shaved_stem,0); x10=x5'; bot y10=0; + filldraw stroke z5'e--z10e; fi % base of stem +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +iff not kapitel:% +lhchar "Lowercase Russian letter b"; +cyrchar(b,9u#,asc_height#,0); % v_witdh +italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; %d +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +numeric stem[]; stem1=.5[vair,curve]; +stem2= max(fine.breadth,if serifs: hair else: vair fi); +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +x1=x3=.5w; y1r=x_height+vround 1.5oo; y3r=-oo; +x2r=hround max(.5u,1.25u-.5curve); x4r=w-x2r; +y2=y4=.5x_height-vair_corr; y2l:=y4l:=.52x_height; +if serifs: + penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % o bowl +else: + penpos2''(.7[fudged.hair,vair]-3stem_corr,180); z2''l=z2l; + penstroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + & pulled_arc.e(4,1) & pulled_arc.e(1,2'')..cycle; fi % o bowl +pickup fine.nib; +pos7(stem2,180); rt x7l=min(w-u,rt 4r-.1u); top y7=h; +pos2'(stem2,180); lft x2'r=x2r; y2'=y2; +if hefty: + pos5(stem1,90); pos6(stem1,90); + x5=max(x1l,lft x1); x6=x4+if monospace:-.5 else:+.5 fi fine; + x6'=x6-.5stem1; + top y6r=h; y5=y6-1/15(h-x_height-.5tiny); y6'=y6l; + filldraw z6r---z6...z6'---z5l....{down}z2'l--z2'r{up}....z5r---cycle; % upper tail +else: + pos5(max(stem2,.7[fudged.hair,fudged.stem]),135); + pos6(max(stem2,.9[fudged.hair,fudged.stem]),120); + x5=max(.55[x2r,x1],x2l+.1u); + forsuffixes $=l,r: + z5'$=((x5,0)..(x5,h)) intersectionpoint (z2${up}...{right}z1$); endfor + y5=max(y5'r+.7(y5'r-y5'l),h-.45(asc_height-x_height)); + z6r=whatever[z5r,z7r]; x6=x7-1.2max(u,stem2); + filldraw stroke z7e..z6e{z5-z6}..z5e....{down}z2'e; fi +penlabels(1,2,2',3,4,5,6,7); endchar; + +lhchar "Lowercase Russian letter v (looks like B)"; +cyrchar(v,9u#,x_height#,0); % v_witdh +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit#,if monospace:.5u# else:0 fi); +numeric right_curve; pickup tiny.nib; +pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem'); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +penpos3(Vround(vair-vair_corr),90); penpos4(Vround(vair-vair_corr),90); +penpos5(right_curve-stem_corr,0); penpos10(right_curve,0); +penpos11(vair,-90); penpos12(vair,-90); +z3r=top z1; y4=y3; y5=.5[y4,y6]+eps; +set_bar_axis; y6l=y7l=y8r=y9r=y2.bh; y6r=y7r=y8l=y9l=y1.bh; y6=y7=y8=y9=y0.bh; +z12r=bot z2; y11=y12; y10=.5[y11,y9]; +x6l=x6r=x4-if not serifs:2 fi u; +x9l=x9r=x11-if serifs:.5 fi u=x4 if not serifs:-u fi; +x7l=x7r=x8l=x8r=x1; x9l:=x4 if serifs:+.25u else:-.25u fi; +x10r=hround(w-.6u); x5r=min(x10r-1-eps,hround(w-u)); +if serifs: + right_curve=curve-stem_corr; x4=.5[x1,w-1.5u]; +else: + right_curve=curve-3stem_corr; x4=.5[x1,w-1u]; + x4l:=x4l-.5u; x9l:=x9l-.5u; fi +x6l:=x6l+.5u; x11l:=x11l-.5u; x9r:=max(x6r,x9r-u); +fill stroke + {{if not serifs:interim superness:=hein_super; fi z3e..super_arc.e(4,5)}} + & super_arc.e(5,6)..z7e; % upper lobe +fill stroke z8e..super_arc.e(9,10) & + {{if not serifs:interim superness:=hein_super; fi super_arc.e(10,11)..z12e}}; % lower lobe +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,.5jut); % upper serif + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,.5jut); fi % lower serif +penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Lowercase Russian letter g (looks like Gamma)"; +cyrchar(g,8u#-.5width_adj#,x_height#,0); +italcorr x_height#*slant-beak_jut#+.25u#; %Gamma->x_height+.5u# +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ 0); +% lower_g; +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(Vround(vair-vair_corr),90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.45u); y4=good.y(y3l-beak/1.4)-eps; +arm(3,4,e,beak_darkness,.4beak_jut); % upper arm and beak +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,.5jut); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,1.25jut); fi % lower serif +%%%%% +penlabels(1,2,3,4); endchar; + +iff not concrete:% +lhchar "Lowercase Russian letter d"; +cyrchar(d,10u# %if not serifs:+.5width_adj# fi % dl_width;n_width + ,x_height#,sbeak#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit# + if not serifs:+\\.5(stem#-u#),.5(stem#-u#)+ else:,fi\\ serif_fit#); %dl_adj +% lower_d; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric light_hair,light_stem,outer_jut; +light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi; +light_stem=max(tiny.breadth+eps,min(fudged.stem,fudged.hair if hefty:-4stem_corr fi)); +outer_jut= + if serifs: max(limit_dist,1.1jut) else: hround (r-rt x2r-.5u) fi; +penpos3(light_hair,0); penpos0(light_hair,0); x0=x3-eps; y0=0; y3=h; +x3=1/3[w-rt x1r-1/8(outer_jut if not serifs:-.5(stem-u) fi),rt x1r] + if not serifs: -.5(stem-u) fi +eps; +x4l=w-rt x1r-1/3outer_jut-eps; y4l=vair; +x2'=x2; y2'=if serifs: 1/2 else: 2/3 fi h; +penpos4(light_hair,angle((y2',-x2')-(y4l,-x4l))); if y4r<0: y4r:=0; fi +fill z4l{z2'-z4}...{up}diag_end(0l,3l,1,1,3r,0){down} + ...{z4-z2'}z4r--cycle; %left stem +numeric inner_jut; inner_jut=min(.5(lft x1l-x3r)-eps,.5jut); +save slab; % lower.slab +if serifs: + prime_points_inside(3,0); + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(3',0,a,1/3,jut,b,1/3,inner_jut); % upper left serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut); % upper right serif + filldraw z.b0--z.b1--z.c1--z.c0--cycle; % upper inter_serif bar +else: + pos3'(vair,90); pos1'(vair,90); + lft x3'=x3l; top y3'r=top y1'r=h; rt x1'=x1; + filldraw stroke z3'e--z1'e; fi % upper bar +% lower descenders +slab:=vair; % lower.slab +r_serif(2,1,e,1/3,inner_jut,f,1/3,beak_darkness,outer_jut,.6beak_jut); % lower right descender +% lower de_serif +y5=y.f1; y0'=y.f4; x5=good.x(w-x.f1); y6=y7=y.f3; +x6=good.x(w-x.f2); x7=good.x(w-x.f3); +pair beak_corner; ypart beak_corner=y0'; beak_corner=z7+whatever*(z5-z6); +x8=good.x(w-x.f4); x0'=w-x.e1; y8=y0'; +filldraw z5--z6--z7{z5-z6}...beak_darkness[beak_corner,.5[z7,z8]] + ...{right}z8---z0'--(x0',y5)--cycle; % de_serif +filldraw z.f1--z.f4--z0'--(x0',y5)--cycle; % lower inter_serif bar +if serifs: + numeric bracket_height; + bracket_height=min(y2+bracket,y1); + if bracket_height>y4l: + path p.r,p.l; y5:=top y5; + p.r=(z4r{z2'-z4}...{up}z3r); p.l=(z4l{z2'-z4}...{up}z3l); + forsuffixes e=l,r: + z9e=((0,bracket_height)--(w,bracket_height)) intersectionpoint p.e; + endfor + vardef t (suffix @) = + angle direction directiontime z9@ of p.@ of p.@ enddef; + fill z9l{dir (t(l)+180)}...1/3[(x4l,y5),.5[z9l,z5]]{z5-z9l} + ...{left}z5--(x5,y0')--z0'--(x0',y5) + --(x8-1/6outer_jut-eps,y5){left} + ...{dir t(r)}z9r--cycle; % top part of de_serif + fi +fi +%%%%% +penlabels(0',1',1,2,3,4,5,6,7,8,9,10); endchar; + +iff not kapitel:% +lhchar "Lowercase Russian letter e"; +cyrchar(e,7.25u#+max(.75u#,.5curve#),x_height#,0); +italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); +adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi); +% lower_e; +numeric left_curve,right_curve; +left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; pos1(right_curve,0); +pos2(vair,90); pos3(left_curve,180); +y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1; +rt x1r=hround min(w-.5u,w-u+.5right_curve); +lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u; +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; +if serifs: + pos4(vair',270); pos5(hair,360); + y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; + (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal +else: + pos4(vair,270); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,270); z4=z4'; + pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke term.e(4',5,right,1,4); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: + x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +%%%%% +penlabels(0,1,2,3,4,5); endchar; + +iff not concrete:% +iff not specific:% +lhchar "Lowercase Russian letter zh (`roman')"; +cyrchar(zh,if serifs: 10u# else: 9.5u# fi % zhk_width: n_width;keng_width + ,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(w#-5u#+ %zhr_adj + if monospace: 0,0 else: serif_fit#,serif_fit# fi); %wlett_adj +% lowerr_zh; +pickup tiny.nib; numeric stem[]; +stem0=max(tiny.breadth,hround(fudged.stem-stem_corr)); +if odd((r-l)-stem0): change_width; fi % symmetric & all three equal +pos1(stem0,0); pos2(stem0,0); +lft x1l=lft x2l=hround (.5[l,r]-.5fudged.stem)-eps; % middle stem point +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi% lower stem serif +% k_rbowl;zh%monospace:+.25u +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); +stem2=max(tiny.breadth,fudged.stem-3stem_corr); +rt x3r=hround(r-letter_fit-.7u-right_jut if monospace:+.25u fi)+eps; %!!! +rt x6r=hround(r-letter_fit-.3u-right_jut if monospace:+.25u fi)+eps; %!!! +y4=.7bar_height; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + slab:=vair; % lower.slab + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +% mirror +forsuffixes $ = 3'r,3,3'l,4r,4,4l,5l,5,5r,6'l,6,6'r: + x.m$=l+(r-x$); y.m$=y$; endfor; +fill z.m4r--diag_end(.m4r,.m3'r,1,.5,.m3'l,.m4l)--z.m4l--cycle; % upper diagonal +fill z.m5l--diag_end(.m5l,.m6'l,.5,1,.m6'r,.m5r)--z.m5r--cycle; % lower diagonal +%% +if serifs: + penpos7(alpha1*(stem1-tiny),0); penpos8(whatever,-90); + penpos10(alpha2*(stem2-tiny),0); + z7=z.m3; z8=z.m4; z9l=z.m5r; z9=z.m5; z9r=z.m5l; z10=z.m6; + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(7,8,i,1/2,right_jut,j,2/3,up_inner_jut)(dark); % upper diagonal serif + slab:=vair; % lower.slab + dish_serif(10,9,k,1/3,right_jut,l,1/2,inner_jut)(dark); fi % lower diagonal serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Russian letter z"; +cyrchar(z,8u#,x_height#,0); +italcorr .5x_height#*slant+min(.5curve#-.65u#,+.1u#); %p+.2u# +adjust_fit(if monospace:.5u#,.5u# else: 0,0 fi); +% lower_z; +set_bar_axis; y4l=y5r=y6r=y2.bh; y6l=y5l=y4r=y1.bh; y6=y0.bh; +pickup fine.nib; numeric right_curve; +if serifs: right_curve=curve-stem_corr; else: right_curve=curve-3stem_corr; fi +penpos2(vair,90); penpos3(max(vair+stem_corr,right_curve-stem_corr),0); +penpos7(max(vair'+stem_corr,right_curve),0); penpos8(vair',-90); +y2r=vround(h+1.5oo); x2=x6l=x6r=x8=.5(w-u); x7r=hround(w-.6u); +x3r=min(rt x7r-1,hround(w-.8u)); y3=.5[y4l,y2l]+eps; y8r=-oo; +y7=.5[y6l,y8l]; x4l=x4r=1/3[x5l,x3l]; +if serifs: + pos1(hair,180); pos9(hair,-180); + lft x1r=lft x9r+.1u=hround.5u; + y1=min(y2.bh+flare-.25vair+eps,.9[bar_height,h]-.75flare); + y9=max(good.y(.5bar_height-.9),y8l+vair'); +else: + pos1(4/7[vair,flare],115); pos9(.6[vair',flare],-115); + lft x1r=good.x .6u; lft x9r=good.x .5u; + top y1r=vround .82[bar_height,y2r]; + y9r=good.y(y9r+1/3bar_height-y9); y9l:=good.y y9l; x9l:=good.x x9l; +fi +lft x5l=lft x5r=hround (2.5u-.5)-eps; +x4r:=max(x5r,x4r-u); x6r:=max(x5r,x6r-u); +fill stroke + {{interim superness:=if serifs: more_super else: hein_super fi; + super_arc.e(2,3)}} & super_arc.e(3,4)..(x5e,y4e); % upper bowl +{{interim superness:=more_super; + fill stroke z5e..super_arc.e(6,7) & super_arc.e(7,8)}}; % lower bowl +fill + z5r{left} + if bot y5r>top y5l:..(lft x5r,bot y5r)---(lft x5l,top y5l).. + else: ... fi + {right}z5l--cycle; % bar point +pos2'(vair,90); z2'=z2; pos8'(vair',-90); z8'=z8; +if serifs: + filldraw stroke z1e{x2-x1,7(y2-y1)}....{right}z2'e; % upper arc + {{interim superness:=more_super; + filldraw stroke super_arc.e(8',9)}}; % lower arc +else: + filldraw stroke term.e(2',1,left,.8,4); % upper terminal + forsuffixes e=l,r: path p.e; p.e=z8'e{left}..tension .9 and 1..z9e; + if angle direction 1 of p.e<105: + p.e:=z8'e{left}..tension atleast.9 and 1..{dir 105}z9e; fi endfor + filldraw stroke p.e; % lower arc +fi +if serifs: + path upper_arc; upper_arc=z1{x2-x1,7(y2-y1)}....{right}z2; + pos10(.3[fine.breadth,hair],0); x10l=x1r; top y10=vround(h+1.5oo); + x1'-x1l=1.5curve; y1'=y1; + numeric t; t=xpart(upper_arc intersectiontimes (z10r--z1')); + filldraw z1r--z10l--z10r--subpath(t,0) of upper_arc--cycle; fi % upper serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Lowercase Russian letter i (looks like backwards N)"; +cyrchar(i,10u# if not serifs:+.5width_adj# fi,x_height#,0); % n_width +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_i; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-2stem_corr; + upper_notch=y6-cap_notch_cut-eps; lower_notch=y5+cap_notch_cut+eps; + if monospace: + x5r =rt x1r; x6l =lft x3l; y5=vround(vair'+eps); y6=vround(h-vair-eps); + alpha1=diag_ratio(1,stem1,y6-y5,x5r-x6l); + penpos5(min(2fudged.stem,alpha1*stem1),0); + penpos6(min(2fudged.stem,alpha1*stem1),0); + x5'=lft x1l; z5'=whatever[z5l,z6l]; x6'=rt x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; + else: + y5l=0; y6r=h; x5=x1r; x6=x3l; penpos5(stem1,0); penpos6(stem1,0); + fi + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5l.. + if y2'>lower_notch: {right}(x2'+1,lower_notch){up}... fi + {z6-z5}diag_in(5l,6l,1,6r)--z6r.. + if y3'<upper_notch: {left}(x3'-1,upper_notch){down}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + y5l=vround(y2+bracket+eps); y6r=vround(y3-bracket-eps); + stem1=max(tiny.breadth,fudged.hair-2stem_corr); + alpha1=diag_ratio(1,stem1,x6-x5,top y6r-bot y5l); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Russian letter i_shrt - short i"; +cyrchar(i_shrt,10u# if not serifs:+.5width_adj# fi, % n_width + x_height#+acc_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); full_h:=h; h:=x_height; +% lower_i; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-2stem_corr; + upper_notch=y6-cap_notch_cut-eps; lower_notch=y5+cap_notch_cut+eps; + if monospace: + x5r =rt x1r; x6l =lft x3l; y5=vround(vair'+eps); y6=vround(h-vair-eps); + alpha1=diag_ratio(1,stem1,y6-y5,x5r-x6l); + penpos5(min(2fudged.stem,alpha1*stem1),0); + penpos6(min(2fudged.stem,alpha1*stem1),0); + x5'=lft x1l; z5'=whatever[z5l,z6l]; x6'=rt x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; + else: + y5l=0; y6r=h; x5=x1r; x6=x3l; penpos5(stem1,0); penpos6(stem1,0); + fi + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5l.. + if y2'>lower_notch: {right}(x2'+1,lower_notch){up}... fi + {z6-z5}diag_in(5l,6l,1,6r)--z6r.. + if y3'<upper_notch: {left}(x3'-1,upper_notch){down}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + y5l=vround(y2+bracket+eps); y6r=vround(y3-bracket-eps); + stem1=max(tiny.breadth,fudged.hair-2stem_corr); + alpha1=diag_ratio(1,stem1,x6-x5,top y6r-bot y5l); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +%%%%% +% the accent +h:=full_h; cbreve(.5w,0, 7,8,9,10,11,12,13); +penlabels(1,2,3,4,5,6, 7,8,9,10,11,12,13); endchar; + +iff not concrete:% +iff not specific:% +lhchar "Lowercase Russian letter k (`roman')"; +cyrchar(k,if serifs: 10u# else: 9.5u# fi % zhk_width: n_width;keng_width + ,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(serif_fit#,serif_fit#); +% lowerr_k; +pickup tiny.nib; numeric stem[]; +stem0=max(tiny.breadth,hround(fudged.stem-stem_corr)); +pos1(stem0,0); pos2(stem0,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr);%lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi% lower stem serif +% k_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); +stem2=max(tiny.breadth,fudged.stem-3stem_corr); +rt x3r=hround(r-letter_fit-.7u-right_jut)+eps; +rt x6r=hround(r-letter_fit-.3u-right_jut)+eps; +y4=.7bar_height; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + slab:=vair; % lower.slab + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +iff not concrete:% +lhchar "Lowercase Russian letter l"; +cyrchar(l,10u# % if not serifs:+.5width_adj# fi % dl_width;n_width + ,x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit# if not serifs:+.5(stem#-u#) fi, %dl_adj + serif_fit#); % +% lower_l; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric light_hair,bot_vair,bulb_diam,left_jut; +light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi; +bot_vair=Vround(.5[vair,light_hair]); +bulb_diam=hround 7/8[hair,flare]; +left_jut= + if serifs: max(limit_dist,1.1jut) else: hround (w+serif_fit-rt x2r-.5u) fi; +x3=1/3[w-rt x1r-(1/8left_jut),rt x1r] if not serifs: -.5(stem-u) fi +eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(hair,-180); + top y3=h; y6-.5bulb_diam=.12desc_depth-eps; z6r=z5r; + lft x6r=l+letter_fit+hround(.35u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); + bot y4r=-1.5oo-eps; {{less_tense; bulb(4,5,6)}}; %bulb + filldraw stroke z4e{right} + ..controls (min(15/16[x4,x3],max(x4,lft x6r+1.75bulb_diam))+(x3e-x3),y4e) + and (x3e,max(y4l,min(y6-.5,1/3h+eps))+1/3(y4e-y4))..{up}z3e; % left tail +else: + pos3'(vair,90); pos1'(vair,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; % upper bar + pickup fine.nib; pos3(light_hair,0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=.67[x3l,x5]; + lft x5=l+letter_fit+hround(.35u-.5); bot y4r=bot y5r; y3=y3'; + filldraw stroke z3e{down}..controls (x3e,y5e+.35h) + and (min(7/8[x4e,x3e],x4e+2light_hair)+eps,y4e-eps)..{left}z4e--z5e; fi % left stem +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5jut); + save slab; slab:=vair; % lower.slab + dish_serif(2,1,a,1/3,jut,b,1/3,jut); % lower right serif + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut); % upper right serif + nodish_serif(3,0,e,1/3,1.05jut,f,1/3,inner_jut); % upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +penlabels(0,1,1',2,3,3',4,5,6);endchar; + +lhchar "Lowercase Russian letter m"; +cyrchar(m,12u# if not serifs:+width_adj# fi,x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0,0 else: serif_fit#,serif_fit# fi); %wlett_adj +% lower_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.stem-3stem_corr); +stem3=min(stem2,hround (fudged.hair-2stem_corr)); +stem4=max(stem1,hround(fudged.stem-3stem_corr)); +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround (w-2.5u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: + y6=if monospace: vround 1/3h else: oo fi; + numeric upper_notch,lower_notch; + upper_notch=h-notch_cut+eps; lower_notch=y5+notch_cut-eps; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5+eps,lower_notch)--(x0-.5-eps,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: + y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +if serifs: + numeric inner_jut; + if rt x2r+jut+.5u+1+eps+.5stem3<=lft x4l-.5stem3-jut: inner_jut=jut; + else: rt x2r+inner_jut+.5u+1+eps+.5stem3=lft x4l-.5stem3-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + serif(1,2,a,1/3,-jut); % upper left serif + serif(3,4,d,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,b,1/2,jut,c,1/2,jut)(dark); % lower left serif + dish_serif(4,3,e,1/3,jut,f,1/3,jut); fi % lower right serif +%%%%% +penlabels(0,1,1',2,3,3',4,5,6,7,8); endchar; + +lhchar "Lowercase Russian letter n (looks like H)"; +cyrchar(n,10u#, % if not serifs:+.5width_adj# fi, % n_width + x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_n; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +bar_stroke(x1,x3); % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Russian letter o"; +cyrchar(o,9u#,x_height#,0); +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); %o +% lower_o; +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +%%%%% +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Russian letter p (looks like PI)"; +cyrchar(p,10u#, % if not serifs:+.5width_adj# fi, % n_width + x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_p; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); % lower right serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + nodish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + filldraw z.b0--z.b1--z.e1--z.e0--cycle; % upper inter_serif bar +else: + lft x1'= lft x1l; top y1'r=h; pos1'(vair,90); + rt x3'=rt x3r; y3'=y1'; pos3'(vair,90); + filldraw stroke z1'e--z3'e; fi % upper bar +%%%%% +penlabels(1,2,3,4); endchar; + +iff not kapitel:% +lhchar "Lowercase Russian letter r (looks like p)"; +cyrchar(r,10u#+serif_fit#,x_height#,desc_depth#); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit#,0); +% lower_r; +pickup tiny.nib; pos1(stem',0); pos2(stem,0); +pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; +lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi; +numeric edge; edge=rt x2r; +pickup fine.nib; pos3(if hefty: thin_join else: hair fi,180); +pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180); +rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]); +y3=1/8[bar_height,x_height]; +x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo; +rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height; +x6l=x4l-.2u; bot y6r=-oo; +x7=x3; y7=min(y3,y6+y4-y3+.6vair); +(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); +(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]); +filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5) + &super_arc.e(5,6)&z6e{left}...{up}z7e; % bowl +y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); +pickup tiny.nib; bot y2=-d; +filldraw stroke z1e--z0'e--z0e--z2e; % stem +pickup crisp.nib; pos8(hair,0); pos7'(stem,0); +z7'=z2; x8l=x7'l; bot y8=0; +filldraw stroke z7'e--z8e; % point +if serifs: + sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif + dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +lhchar "Lowercase Russian letter s (looks like c)"; +cyrchar(s,8u#,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +% lower_s; +pickup fine.nib; pos2(vair',90); pos4(vair',270); +x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo; +pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h; % eng +if serifs: + pos1(hair,0); pos0(flare,0); + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + rt x1r=hround(w-.7u); bulb(2,1,0); % bulb + pos5(hair,0); rt x5r=hround(w-.5u); + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: + pos1(4/7[vair',flare],80); + rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2,1,right,.8,4); % upper terminal + pos5(.6[vair',flare],275); rt x5r=hround(w-.5u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e; + if angle direction 1 of p.e>75: + p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal +%%%%% +penlabels(0,1,2,3,4,5); endchar; + +lhchar "Lowercase Russian letter t"; +cyrchar(t,9u#-width_adj#,x_height#,0); +italcorr x_height#*slant-beak_jut#+.35u#; %Gamma->x_height+.65u# +adjust_fit(0,0); if odd(stem-w): change_width; fi % symmetric & all three equal +% lower_t; +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround(.5w-.5stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(vair,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.45u); y4=good.y(y3l-beak/1.4)-eps; +arm(3,4,e,beak_darkness,.4beak_jut); % right arm and beak +pos5(hair,180); x5=w-x4; y5=y4; +arm(3,5,f,beak_darkness,-.4beak_jut); % left arm and beak +%%% +if serifs: + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,1.414jut,d,1/3,1.414jut); % lower serif + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,.5jut,b,1/3,.5jut); fi % upper bracketing +%%%%% +penlabels(1,2,3,4,5); endchar; + +iff not kapitel:% +lhchar "Lowercase Russian letter u (looks like y)"; +cyrchar(u,if serifs: 9.5u# else: 9u# fi,x_height#,desc_depth#); % eng +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +% lower_u; +numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut; +left_stem=fudged.stem-stem_corr; right_stem=fudged.hair if hefty:-2stem_corr fi; +bot_stem=fudged.hair if hefty:-8stem_corr fi; +bot_vair=Vround(if serifs: vair else:.5[vair,bot_stem] fi); outer_jut=.75jut; +x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4r=h; y2=y3=0; x2l=x3l; +numeric alpha,alpha[]; x9=3u; y9=bot_vair-d-oo; +alpha1=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-apex_corr); +alpha2=diag_ratio(1,bot_stem,y1-y9,x4r-x9); +if alpha1<alpha2: + x2l-x1l=x4r-x3r+apex_corr; alpha=alpha1; +else: + alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot_stem,0)]; fi +penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0); +alpha3=(y1++(x2l-x1l))/y1; +penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0); +z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r); +if y0>notch_cut: + y0:=notch_cut; + fill z0+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r) + --z3r--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: + fill z0--diag_end(0,4l,1,1,4r,3r)--z3r--z2l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(alpha*bot_stem,0); z5r=whatever[z3r,z4r]; y5-.5vair=-.5d; +if serifs: + numeric light_bulb; light_bulb=hround 7/8[hair,flare]; clearpen; + penpos6(vair,-90); penpos7(hair,-180); penpos8(light_bulb,-180); + x6=2u; y6r=-d-oo; y8-.5light_bulb=-.85d; x8r=hround .35u; + fill stroke z3e---z5e...{left}z6e; bulb(6,7,8); % arc and bulb + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif +else: + penpos6(bot_vair,-90); x6=2.5u; y6r=-d-oo; + fill stroke z3e---z5e...{left}z6e; % arc + pickup fine.nib; pos6'(bot_vair,-90); z6'=z6; + pos7(2/3[bot_vair,flare],-85); + lft x7l=hround u; bot y7r=vround-.96d-oo; y7l:=good.y y7l; + filldraw stroke term.e(6',7,left,1,4); fi % arc and terminal +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +iff not kapitel:% +lhchar "Lowercase Russian letter f (looks like phi)"; +cyrchar(f,if serifs: 9.5u# else: 9.75u# fi+serif_fit#, + asc_height#,desc_depth#); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); +adjust_fit(w#-5u# if monospace:-\\.5u#,-.5u#+ else:,fi\\ 0); +if odd((r-l)-stem'): change_width; fi % symmetric & all three equal +pickup tiny.nib; pos1(stem',0); pos2(stem',0); +lft x1l=lft x2l=hround(.5[l,r]-.5stem')-eps; top y1=h; bot y2=-d; % middle stem point +numeric edge; edge=rt x2r; +% f_bowl + pickup fine.nib; + pos3(if hefty: thin_join else:hair fi,180); + pos4(vair',90); pos5(curve,0); pos6(vair,-90); + rt x3l=(max(rt x3l-(lft x3r-tiny.lft x2l),1/3[rt x2,edge])); + penpos7(x3l-x3r,-180); + y3=1/8[bar_height,x_height]; + x4l=(w-.5(w-serif_fit)if not serifs:+.3u fi); + rt x5r=(hround min(w-1.35u+.5curve,w-.6u)+eps); + top y4r=x_height+oo; y5=.5x_height; + x6l=x4l; bot y6r=-oo; x7=x3; y7=min(y3,y6+y4-y3+.6vair); + (x,y4r)=whatever[z3l,z4l]; + x4r:=min(x,.5[x5r,x4]); (x',y6r)=whatever[z7l,z6l]; + x6r:=min(x',.5[x5r,x6]); + filldraw stroke z3e{up}...{right}z4e & super_arc.e(4,5) + & super_arc.e(5,6) & z6e{left}...{up}z7e; % bowl +% mirror +forsuffixes $ = 3l,3r,4l,4,4r,5l,5,5r,6l,6,6r,7l,7r: + x.m$=l+(r-x$); y.m$=y$; endfor; + filldraw stroke z.m3e{up}...{left}z.m4e & super_arc.e(.m4,.m5) + & super_arc.e(.m5,.m6) & z.m6e{right}...{up}z.m7e; % bowl +% stem +pickup tiny.nib; filldraw stroke z1e--z2e; % stem +if serifs: + numeric outer_jut; outer_jut=if monospace: 1.414 fi jut; + sloped_serif.l(1,2,a,1/3,outer_jut,serif_drop); % upper serif + dish_serif(2,1,b,1/3,outer_jut,c,1/3,outer_jut); fi % lower serif +penlabels(0,0',1,2,3,4,5,6,7,7',8); endchar; + +lhchar "Lowercase Russian letter h - kha (looks like X)"; +cyrchar(h,if serifs: 9.5u# else: 9u# fi,x_height#,0); +italcorr x_height#*slant-.05u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +% lower_h; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=fudged.stem-4stem_corr; stem2=min(fudged.hair,stem1); +outer_jut=.75jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.1u+outer_jut; x2r=r-letter_fit-.3u-outer_jut-xjut; +x3l=l+letter_fit+outer_jut+xjut; x4r=r-letter_fit-outer_jut; y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +if hefty: + z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.2[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' + --diag_end(34',4l,.5,1,4r,24')--z24' + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: + fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +if serifs: + numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,4); prime_points_inside(2,3); + prime_points_inside(3,2); prime_points_inside(4,1); + if rt x1'r+jut+.5u+1<=lft x2'l-jut-xjut: inner_jut1=jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + if rt x3'r+jut+.5u+1<=lft x4'l-jut-xjut: inner_jut2=jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + slab:=vair; % lower.slab + dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +penlabels(0,1,2,3,4,12,13,24,34); endchar; + +lhchar "Lowercase Russian letter c - tse"; +cyrchar(c,10u# if not serifs:+.5width_adj# fi, % n_width + x_height#,sbeak#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#, + serif_fit# if not serifs:+.5(stem#-u#) fi); %dl_adj +% lower_c; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric inner_jut,right_jut; +save slab; % lower.slab +if serifs: + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif +else: + lft x2'= lft x2l; bot y2'l=0; pos2'(vair,90); + rt x4'= rt x4r; y4'=y2'; pos4'(vair,90); + filldraw stroke z2'e--z4'e; fi +% lowercase descender +inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); +slab:=vair; % lower.slab +right_jut=if serifs: max(limit_dist,1.1jut) else: hround (r-rt x4r-.5u) fi; +r_serif(4,3,g,1/3,inner_jut,h,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender +if serifs: + filldraw z.d0--z.d1--z.g1--z.g0--cycle; fi % lower inter_serif bar +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Russian letter ch"; +cyrchar(ch,10u# if not serifs:+.5width_adj# fi,x_height#,0); % n_width +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_ch; +pickup tiny.nib; +numeric middle_weight; middle_weight=.6[thin_join,vair]; +pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +penpos2'(fudged.stem,0); z2'=z2; +penpos5(middle_weight,90); penpos6(middle_weight,90); +penpos6'(middle_weight,90); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; x5l=1/3[x1,x3]; +y6l=vround(.48h-.5middle_weight if serifs:-.15(.5[hair,.7stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +y5l=y6l; x6=x6'=x3; +if serifs: y6'l=min(3/5h,y6l-hair+1.05stem); fi +if serifs: + if ((y6'l-y6l)>=middle_weight+1+eps): + fill stroke z2'e{down}..z5e{right}...{.75(z5-z6)+z6'}z6'e; % arc + else: + fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); % lower right serif +else: + fill stroke pulled_arc.e(2',5) & z5e{right}...{right}z6e; fi % arc +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Russian letter sh"; +cyrchar(sh,14.5u# if serifs:+.5width_adj# fi,x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0,0 else: serif_fit#,serif_fit# fi); %wlett_adj +% lower_sh; +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; +pos1(fudged.stem,0); pos2(fudged.stem,0); pos3(fudged.stem,0); +pos4(fudged.stem,0); pos5(fudged.stem,0); pos6(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=top y5=h; bot y2=bot y4=bot y6=0; +lft x5l=lft x6l=hround (.5[x1,x3]-.5fudged.stem); % middle stem point +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x5l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif + nodish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); % lower right serif + filldraw z.d0--z.d1--z.g1--z.g0--cycle; % lower inter_serif bar +else: + lft x2'= lft x2l; bot y2'l=0; pos2'(vair,90); + rt x4'=rt x4r; y4'=y2'; pos4'(vair,90); + filldraw stroke z2'e--z4'e; fi +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Russian letter shch"; +cyrchar(shch,14.5u# if serifs:+.5width_adj# fi,x_height#,sbeak#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0 else: serif_fit# fi, %wlett_adj + if monospace: 0 else: serif_fit# if not serifs:+.5(stem#-u#) fi fi) %dl_adj&wlett_adj +% lower_sh; +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; +pos1(fudged.stem,0); pos2(fudged.stem,0); pos3(fudged.stem,0); +pos4(fudged.stem,0); pos5(fudged.stem,0); pos6(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=top y5=h; bot y2=bot y4=bot y6=0; +lft x5l=lft x6l=hround (.5[x1,x3]-.5fudged.stem); % middle stem point +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +save slab; % lower.slab +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x5l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif +else: + lft x2'= lft x2l; bot y2'l=0; pos2'(vair,90); + rt x4'=rt x4r; y4'=y2'; pos4'(vair,90); + filldraw stroke z2'e--z4'e; fi +% lowercase descender +slab:=vair; % lower.slab +numeric right_jut; +inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); +right_jut:=if serifs: max(limit_dist,1.1jut) else: hround (r-rt x4r-.5u) fi; +r_serif(4,3,o,1/3,inner_jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender +if serifs: + filldraw z.d0--z.d1--z.o1--z.o0--cycle; fi % lower inter_serif bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Russian letter hrdsn - hard sign"; +cyrchar(hrdsn,9u#,x_height#,0); % v_witdh +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(2u#-.5width_adj#,if monospace:.5u# else:0 fi); +% lower_hrdsn; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +% lower left beak +pickup crisp.nib; top y3r=h; x3=x1; pos3(vair,90); +pos4(hair,180); lft x4r=l+letter_fit+hround.45u; y4=good.y(y3l-beak/1.4)-eps; +arm(3,4,q,beak_darkness,-.4beak_jut); +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,.5jut,b,1/3,.5jut); % upper serif + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,.5jut); fi % lower serif +% lsftsn_bowl(2); +_zero:=2; +_one:=5; _two:=6; _three:=7; _four:=8; _five:=9; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +%%%%% +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Lowercase Russian letter ery"; +cyrchar(ery,9u#,x_height#,0); % v_witdh +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0,0 else: serif_fit#,serif_fit# fi %wlett_adj + +4u#); +% lower_ery; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper serif + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,.5jut); fi % lower serif +% lsftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% I +w:=w+4u; +rt x8r=rt x9r=w-lft x1l; top y8=h; bot y9=0; +pos8(fudged.stem,0); pos9(fudged.stem,0); +filldraw stroke z8e--z9e; % stem +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(8,9,e,1/3,jut,f,1/3,jut); % upper serif + slab:=vair; % lower.slab + dish_serif(9,8,g,1/3,jut,h,1/3,jut); fi% lower serif +%%%%% +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Lowercase Russian letter sftsn - soft sign"; +cyrchar(sftsn,9u#,x_height#,0); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+else:,fi\\0); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper serif + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,.5jut); fi % lower serif +% lsftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +%%%%% +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Russian letter erev - reverse e"; +cyrchar(erev,8u#,x_height#,0); +italcorr .7x_height#*slant-.1u#; %o +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +% lower_erev; +set_bar_axis; +pickup fine.nib; pos2(vair',90); pos3(curve,0); pos4(vair',-90); +x2=x4=w-.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo; +rt x3r=w-hround max(.6u,1.35u-.5curve); y3=.5h; % eng +if serifs: + pos1(hair,180); pos5(hair,-180); + y1=min(y2.bh+flare-.25vair+eps,.9[bar_height,h]-.75flare); + lft x1r=lft x5r=hround.5u; + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=max(x,x4l-.5u); + filldraw stroke z1e{x2-x1,5(y2-y1)}...pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal + pos6(.3[fine.breadth,hair],180); x6r=x1r; top y6=h+oo; + x1'-x1r=1.5curve; y1'=y1; + path upper_arc; upper_arc=z1{x2-x1,5(y2-y1)}..z2{right}; + numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); + filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +else: + pos1(4/7[vair',flare],100); pos5(.6[vair',flare],-95); + lft x1r=good.x .6u; top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2,1,left,.8,4); % upper terminal + lft x5r=good.x .5u; + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + forsuffixes e=l,r: path p.e; p.e=z4e{left}..tension .9 and 1..z5e; + if angle direction 1 of p.e<105: + p.e:=z4e{left}..tension atleast.9 and 1..{dir 105}z5e; fi + endfor + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal +%%% +% lerev_bar; +if (serifs=true) and (bar#<=.5curve#): + x7r=max(rt x1l+.5hair,0.85[x3l,x1l]); x8r=x3l; + y7l=y8l=y1.bh; y7r=y8r=y2.bh; x7l=x7r; x8l=x8r; + numeric bar[]; + bar2=7/8[bar,fudged.stem-2stem_corr]; + penpos9(bar2,45); z9=.475[z7l,z8l]; + fill circ_stroke z7e{2,1}..{2,-1}z9e..{2,1}z8e; % curve /\/ +else: + bar_stroke(max(rt x1l+.5hair,0.85[x3l,x1l]),x3l); % bar -- +fi +%%%%% +penlabels(1,1',2,3,4,5,6,7,8,9); endchar; + +lhchar "Lowercase Russian letter yu (looks like IO)"; +cyrchar(yu,9u#,x_height#,0); +italcorr .7x_height#*slant; %o +adjust_fit(if monospace: 4u# else: 4.5u# fi +serif_fit#, %li_part_adj + if monospace: -.45u# else: 0 fi); +% lower_yu; +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +save slab; % lower.slab +% barh_i_part(2); +_zero:=2; +_one:=5; _two:=6; +% +pickup tiny.nib; +pos[_one](stem,0); pos[_two](stem,0); +lft x[_one]l=lft x[_two]l= + l+letter_fit+if not monospace: serif_fit+ fi hround (2.5u-.5stem-eps); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +bar_stroke(x[_one],x[_zero]); % bar +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper serif + slab:=vair; % lower.slab + dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); % lower serif +fi +%%%%% +penlabels(1,2,3,4,5,6,7,8); endchar; + +iff not concrete:% +iff not specific:% +lhchar "Lowercase Russian letter ya (looks like backward R) (`roman')"; +cyrchar(ya,if serifs: 9.75u# else: 10u# fi-.5width_adj#,x_height#,0); %ya (~n_width:10u) +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if serifs:serif_fit# else:0 fi,serif_fit#); +% lowerr_ya; +pickup tiny.nib; pos1(stem',0); pos2(stem',0); +rt x1r=rt x2r=hround(w-2.5u+.5stem'); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +penpos3(vair,90); penpos4(vair,90); penpos5(curve if hefty:-3stem_corr fi,180); +y6r=y7r=hround (if serifs:.52h else:.5h fi-.6[thin_join,vair]/2); +y6l=y7l=y6r+.6[thin_join,vair]; y6=y7=.5[y6l,y6r];% +z3r=top z1; y4=y3; y5=.52[y6r,y4r]+eps; +x7l=x7r=x2; x4+.25u=x6l=x6r; x4=.5w if serifs:+.25u else:-.25u fi; +x5r=hround min(1.25u,2u-.5curve)+eps; +x4l:=x4+.125curve; x6l:=x6l+.125curve; +fill stroke +{{interim superness:=more_super; z7e..pulled_arc.e(6,5) & + pulled_arc.e(5,4)..z3e}}; % lobe +numeric stem[],alpha,right_jut; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.stem-3stem_corr)); +lft x9l=hround(l+letter_fit+.3u+right_jut)-eps; bot y9=0; +alpha=diag_ratio(1,.5(stem1-tiny),y1-y9,x9l-x1); +penpos9(alpha*(stem1-tiny),0); +x8=x6l-if serifs:.75u else:.25u fi; y8=y6; +forsuffixes $=l,r: y9'$=0; endfor +z9'r=z9r+penoffset z1-z9 of currentpen+whatever*(z1-z9); +z9'l=z9l+penoffset z9-z1 of currentpen+whatever*(z1-z9); +z8=z9'+whatever*(z1-z9); +penpos8(if serifs: x9'r-x9'l else: stem fi-2stem_corr,0); +fill z8l--diag_end(8l,9'l,1,.5,9'r,8r)--z8r--cycle; % diagonal +if serifs: + numeric inner_jut; + if lft x2l-jut-.5u+1>=rt x9r+jut: inner_jut=jut; + else: lft x2l-jut-.5u+1=rt x9r+inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,.5jut,b,1/3,jut); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower serif + dish_serif(9,8,g,1/2,right_jut,h,1/3,inner_jut)(dark); fi % lower diagonal serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +iff not kapitel:% +lhchar "Lowercase Russian letter yo (looks like e umlaut)"; +cyrchar(yo,7.25u#+max(.75u#,.5curve#),lc_trema_height#,0); +italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); +adjust_fit(if monospace:.25u#,.5u# else:0,0 fi); full_h:=h; h:=x_height; +% lower_e; +numeric left_curve,right_curve; +left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; pos1(right_curve,0); +pos2(vair,90); pos3(left_curve,180); +y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1; +rt x1r=hround min(w-.5u,w-u+.5right_curve); +lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u; +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; +if serifs: + pos4(vair',270); pos5(hair,360); + y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; + (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal +else: + pos4(vair,270); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,270); z4=z4'; + pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke term.e(4',5,right,1,4); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: + x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +%%%%% +% the accent +h:=full_h; lowercase_umlaut(0,0, 6,7,8,9); +penlabels(0,1,2,3,4,5, 6,7,8,9); endchar; + +if concrete: input lgrucl; fi % Russian concrete letters + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgrusu.mf b/Master/texmf-dist/fonts/source/lh/base/lgrusu.mf new file mode 100644 index 00000000000..0ff385ef871 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgrusu.mf @@ -0,0 +1,1374 @@ +% +% lgrusu.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Uppercase Russian letters from a to ya and yo +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Uppercase Russian letter A"; +cyrchar(A,13u#,cap_height#,0); +if is_small_cap: getcharcode(a); fi +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_a; +numeric left_stem,right_stem,outer_jut,alpha; outer_jut=.8cap_jut; +x1l=w-x4r=l+letter_fit+outer_jut+.5u; +right_stem=cap_stem-stem_corr; +left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); +y1=y4=0; x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo; +alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0<h-cap_notch_cut: + y0:=h-cap_notch_cut; + fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{up}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2]; +penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5; +if hefty: y5r else: y5 fi =5/12y0; +y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line +if serifs: + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark); % left serif + dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi % right serif +%%%%% +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter B"; +cyrchar(B,12.5u#,cap_height#,0); +if is_small_cap: getcharcode(b); fi +italcorr cap_height#*slant-beak_jut#-1.5u#; %Gamma +adjust_fit(cap_serif_fit#,0); +numeric left_stem; left_stem=cap_stem-hround 2stem_corr; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +% upper right beak +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-2u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +% usftsn_bowl(2); +_zero:=2; +_one:=5; _two:=6; _three:=7; _four:=8; _five:=9; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Uppercase Russian letter V (looks like B)"; +cyrchar(V,12.5u#,cap_height#,0); %V_width#=12.5u# +if is_small_cap: getcharcode(v); fi +italcorr .75cap_height#*slant-u#; %P-.5u# +adjust_fit(cap_serif_fit#,0); +numeric left_stem,right_curve,middle_weight; +left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +penpos3(cap_band,90); penpos4(cap_band,90); +penpos6(middle_weight,-90); penpos7(middle_weight,-90); +penpos8(middle_weight,90); penpos9(middle_weight,90); +penpos5(right_curve-stem_corr,0); penpos10(right_curve,0); +penpos11(cap_band,-90); penpos12(cap_band,-90); +z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair; .5[y7l,y8l]=.52h; +z12r=bot z2; y11=y12; y10=.5[y11,y9]; y9=y8; +x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u; +x10r=hround(w-u); x5r=min(x10r-1,hround(w-1.5u)); +if serifs: + right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u]; +else: + right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u]; + x4l:=x4l-.5u; x9l:=x9l-.5u; fi +x6l:=x6l-.5u; x11l:=x11l-.5u; +fill stroke z3e..super_arc.e(4,5) & super_arc.e(5,6)..z7e; % upper lobe +fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e; % lower lobe +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Uppercase Russian letter G (looks like Gamma)"; +cyrchar(G,if monospace: 9u# else: 11u# fi-width_adj#, %G_width + cap_height#,0); +if is_small_cap: getcharcode(g); fi +italcorr cap_height#*slant-beak_jut#-.25u#; %Gamma +adjust_fit(cap_serif_fit#,0); +% upper_g; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u ,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +%%%%% +penlabels(1,2,3,4); endchar; + +iff not concrete:% +lhchar "Uppercase Russian letter D"; +cyrchar(D,13.5u#,cap_height#,cap_sbeak#); % DL_width:N_width +if is_small_cap: getcharcode(d); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit# if not serifs: + +\\.5(cap_stem#-u#),.5(cap_stem#-u#)+ else:,fi\\ cap_serif_fit#); %D_adj +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %right stem +numeric light_hair,light_stem,outer_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +light_stem=max(tiny.breadth+eps,min(fudged.stem,fudged.hair if hefty:-4stem_corr fi)); +outer_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (r-rt x2r-.65u) fi; +penpos3(light_hair,0); penpos0(light_hair,0); x0=x3-eps; y0=0; y3=h; +x3=1/3[w-rt x1r-1/6(outer_jut if not serifs:-.5(cap_stem-u) fi),rt x1r] + if not serifs:-.5(cap_stem-u) fi +eps; +x2'=x2; y2'=if serifs: 2/3 else: 3/4 fi h; +x4l=w-rt x1r-1/3outer_jut-eps; y4l=slab; +penpos4(light_hair,angle((y2',-x2')-(y4l,-x4l))); if y4r<0: y4r:=0; fi +fill z4l{z2'-z4}...{up}diag_end(0l,3l,1,1,3r,0r){down} + ...{z4-z2'}z4r--cycle; %left stem +numeric inner_jut; inner_jut=min(.5(lft x1l-x3r)-eps,.5cap_jut); +if serifs: + prime_points_inside(3,0); + nodish_serif(3',0,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); % upper right serif + filldraw z.b0--z.b1--z.c1--z.c0--cycle; % upper inter_serif bar +else: + pos3''(slab,90); pos1'(slab,90); + lft x3''=x3l; top y3''r=top y1'r=h; rt x1'=x1; + filldraw stroke z3''e--z1'e; fi % upper bar +% upper descenders +numeric arm_thickness; arm_thickness=vround(slab+vair_corr+eps); +save slab; slab:=arm_thickness; % bottom.bar.slab +r_serif(2,1,e,1/3,inner_jut,f,1/3,beak_darkness,outer_jut,beak_jut); % lower right serif +% upper de_serif +y5=y.f1; y0'=y.f4; x5=good.x(w-x.f1); y6=y7=y.f3; +x6=good.x(w-x.f2); x7=good.x(w-x.f3); +pair beak_corner; ypart beak_corner=y0'; beak_corner=z7+whatever*(z5-z6); +x8=good.x(w-x.f4); x0'=w-x.e1; y8=y0'; +filldraw z5--z6--z7{z5-z6} + ...beak_darkness[beak_corner,.5[z7,z8]] + ...{right}z8---z0'--(x0',y5)--cycle; % de_serif +filldraw z.f1--z.f4--z0'--(x0',y5)--cycle; % lower inter_serif bar +if serifs: + numeric bracket_height; + bracket_height=min(y2+bracket,y1); + if bracket_height>y4l: + path p.r,p.l; y5:=top y5; + p.r=(z4r{z2'-z4}...{up}z3r); p.l=(z4l{z2'-z4}...{up}z3l); + forsuffixes e=l,r: + z9e=((0,bracket_height)--(w,bracket_height)) intersectionpoint p.e; + endfor + vardef t (suffix @) = + angle direction directiontime z9@ of p.@ of p.@ enddef; + fill z9l{dir (t(l)+180)}...1/3[(x4l,y5),.5[z9l,z5]]{z5-z9l} + ...{left}z5--(x5,y0')--z0'--(x0',y5) + --(x8-1/3outer_jut-eps,y5){left} + ...{dir t(r)}z9r--cycle; % top part of de_serif + fi +fi +penlabels(0',1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Uppercase Russian letter E"; +cyrchar(E,12u#-width_adj#,cap_height#,0); +if is_small_cap: getcharcode(e); fi +italcorr cap_height#*slant-beak_jut#-.5u#; +adjust_fit(cap_serif_fit#,0); +% upper_e; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: + rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps; + rt x9r=hround(w-.5u); +else: + rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0); +bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps; +arm(8,9,h,beak_darkness,1.5beak_jut); % lower arm and beak +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +iff not concrete:% +iff not specific:% +lhchar "Uppercase Russian letter ZH (`roman')"; +cyrchar(ZH,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(zh); fi +italcorr cap_height#*slant-.5u#; %K +adjust_fit(w#-2max(2u#+.5fudged.cap_stem#,3u#)+\\ %ZHr_adj + if monospace: 0,0 else: cap_serif_fit#,cap_serif_fit# fi); %uwlett_adj +% upperr_zh; +if odd((r-l)-fudged.cap_stem): change_width; fi % symmetric & all three equal +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround (.5[l,r]-.5fudged.cap_stem)-eps; % middle stem point +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi % lower stem serif +% K_rbowl;zh%monospace:+.75u +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +rt x3r=hround(r-letter_fit-u-right_jut if monospace:+.75u fi); %!!! +rt x6r=hround(r-letter_fit-.75u-right_jut if monospace:+.75u fi); %!!! +y4=1/3h; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +numeric inner_jut,up_inner_jut; +%% +if serifs: + if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; + else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +% mirror +forsuffixes $ = 3r,3,3l,3'r,3'l,4r,4,4l,5l,5,5r,6l,6,6r,6'l,6'r: + x.m$=l+(r-x$); y.m$=y$; endfor; +fill z.m4r--diag_end(.m4r,.m3'r,1,.5,.m3'l,.m4l)--z.m4l--cycle; % upper diagonal +fill z.m5l--diag_end(.m5l,.m6'l,.5,1,.m6'r,.m5r)--z.m5r--cycle; % lower diagonal +%% +if serifs: + penpos7(alpha1*(stem1-tiny),0); penpos8(whatever,-90); + penpos10(alpha2*(stem2-tiny),0); + z7=z.m3; z8=z.m4; z9l=z.m5r; z9=z.m5; z9r=z.m5l; z10=z.m6; + dish_serif(7,8,i,1/2,right_jut,j,2/3,up_inner_jut)(dark); % upper diagonal serif + dish_serif(10,9,k,1/3,right_jut,l,1/2,inner_jut)(dark); fi % lower diagonal serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter Z (looks like numeral 3)"; +cyrchar(Z,11u#,cap_height#,0); +if is_small_cap: getcharcode(z); fi +italcorr .75cap_height#*slant-.5u#; %B +adjust_fit(if monospace: .35u#,.25u# else: 0,0 fi); +% upper_z; +pickup fine.nib; numeric right_curve,middle_weight; +middle_weight=max(fine.breadth,.6vair+.5); +pos2(cap_band,90); pos8(cap_band,-90); +if serifs: + right_curve=cap_curve-stem_corr; + pos1(cap_hair,180); pos9(cap_hair,-180); y1=.4[y5l,y2l]; +else: + right_curve=cap_curve-3stem_corr; + pos1(1.1flare,120); pos9(flare,-120); + top y1r=vround 7/8h+o; bot y9r=vround 1/7h-o; fi +pos4(middle_weight,-90); pos5(middle_weight,-90); +pos6(middle_weight,90); pos5'(middle_weight,90); +pos3(max(fine.breadth,right_curve-stem_corr),0); +pos7(max(fine.breadth,right_curve),0); +top y2r=h+o; bot y8r=-o; +x2=x6=x8=.5[1.5u,x7]; rt x7r=hround(w-.75u); rt x3r=hround(w-1.25u); +lft x5=lft x5'=min(hround 3.5u,lft x6)+eps; +y3=.5[y4l,y2l]; y7=.5[y6l,y8l]; x4=1/3[x5,x3l]; y4=y5; y5'=y6; +lft x1r=hround 1.1u; lft x9r=hround.9u; +top y5l-bot y5'l=vair; .5[y5l,y5'l]=.52h; +if serifs: y9=max(.52[top y8l,bot y5'l],y7+1); + else: y9l:=good.y y9l; x9l:=good.x x9l; fi +filldraw stroke {{if not serifs:interim superness:=hein_super; fi + super_arc.e(2,3)}} & super_arc.e(3,4)..z5e; % upper bowl +filldraw stroke z5'e..super_arc.e(6,7) & super_arc.e(7,8); % lower bowl +if serifs: + filldraw stroke z1e{x2-x1,15(y2-y1)}....{right}z2e; % upper arc + filldraw stroke + {{interim superness:=more_super; super_arc.e(8,9)}}; % lower arc +else: + filldraw stroke rterm.e(2,1,left,.9,4); % upper arc + filldraw stroke term.e(8,9,left,.8,4); % lower arc +fi +if serifs: + path upper_arc; upper_arc=z1{x2-x1,15(y2-y1)}....{right}z2; + pos10(.3[fine.breadth,cap_hair],0); x10l=x1r; top y10=h+o; + x1'-x1l=2cap_curve; y1'=y1; + numeric t; t=xpart(upper_arc intersectiontimes (z10r--z1')); + filldraw z1r--z10l--z10r--subpath(t,0) of upper_arc--cycle; fi % upper serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Uppercase Russian letter I (looks like backwards N)"; +cyrchar(I,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(i); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_i; +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-stem_corr; + upper_notch=y6-cap_notch_cut-eps; lower_notch=y5+cap_notch_cut+eps; + if monospace: + x5r =rt x1r; x6l =lft x3l; y5=vround(slab+eps); y6=vround(h-slab-eps); + alpha1=diag_ratio(1,stem1,y6-y5,x5r-x6l); + penpos5(min(2fudged.cap_stem,alpha1*stem1),0); + penpos6(min(2fudged.cap_stem,alpha1*stem1),0); + x5'=lft x1l; z5'=whatever[z5l,z6l]; x6'=rt x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; + else: + y5l=0; y6r=h; x5=x1r; x6=x3l; penpos5(stem1,0); penpos6(stem1,0); + fi + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5l.. + if y2'>lower_notch: {right}(x2'+1,lower_notch){up}... fi + {z6-z5}diag_in(5l,6l,1,6r)--z6r.. + if y3'<upper_notch: {left}(x3'-1,upper_notch){down}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: y5l=y2+bracket+eps; y6r=y3-bracket-eps; + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + stem1=max(tiny.breadth,fudged.hair); + alpha1=diag_ratio(1,stem1,x6-x5,top y6r-bot y5l); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +%%% +if serifs: numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter I_shrt - SHORT I"; +cyrchar(I_shrt,13.5u#,cap_height#+acc_height#,0); % N_width +if is_small_cap: getcharcode(i_shrt); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); full_h:=h; h:=cap_height; +% upper_i; +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-stem_corr; + upper_notch=y6-cap_notch_cut-eps; lower_notch=y5+cap_notch_cut+eps; + if monospace: + x5r =rt x1r; x6l =lft x3l; y5=vround(slab+eps); y6=vround(h-slab-eps); + alpha1=diag_ratio(1,stem1,y6-y5,x5r-x6l); + penpos5(min(2fudged.cap_stem,alpha1*stem1),0); + penpos6(min(2fudged.cap_stem,alpha1*stem1),0); + x5'=lft x1l; z5'=whatever[z5l,z6l]; x6'=rt x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; + else: + y5l=0; y6r=h; x5=x1r; x6=x3l; penpos5(stem1,0); penpos6(stem1,0); + fi + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5l.. + if y2'>lower_notch: {right}(x2'+1,lower_notch){up}... fi + {z6-z5}diag_in(5l,6l,1,6r)--z6r.. + if y3'<upper_notch: {left}(x3'-1,upper_notch){down}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: y5l=y2+bracket+eps; y6r=y3-bracket-eps; + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + stem1=max(tiny.breadth,fudged.hair); + alpha1=diag_ratio(1,stem1,x6-x5,top y6r-bot y5l); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +%%% +if serifs: numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +% the accent +h:=cap_height+acc_height; +cbreve(.5w,0, 7,8,9,10,11,12,13)(cyrcaph); +penlabels(1,2,3,4,5,6, 7,8,9,10,11,12,13); endchar; + +iff not concrete:% +iff not specific:% +lhchar "Uppercase Russian letter K (`roman')"; +cyrchar(K,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(k); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upperr_k; +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi % lower stem serif +% K_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +rt x3r=hround(r-letter_fit-u-right_jut); +rt x6r=hround(r-letter_fit-.75u-right_jut); +y4=1/3h; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +numeric inner_jut,up_inner_jut; +%% +if serifs: + if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; + else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +iff not concrete:% +lhchar "Uppercase Russian letter L"; +cyrchar(L,13.5u#,cap_height#,0); % DL_width:N_width +if is_small_cap: getcharcode(l); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi, %DL_adj + cap_serif_fit#); % +% upper_l; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); +numeric light_hair,bot_vair,left_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +left_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit-rt x2r-.65u) fi; +bot_vair=Vround(.5[vair,light_hair]); +x3=1/3[w-rt x1r-(1/6left_jut),rt x1r] if not serifs:-.5(cap_stem-u) fi+eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(cap_hair,-180); + top y3=h; y6=1/6h-max(0,flare-stem-2vair_corr-.5); z6r=z5r; + lft x6r=l+letter_fit+hround(.5u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); bot y4r=-o; + filldraw stroke z4e{right}.. + controls (min(15/16[x4,x3],max(x4,lft x6r+2flare))+(x3e-x3)+eps,y4e) + and (x3e,good.y(min(y6-.5,1/3h)+1/3(y4e-y4))-eps)..z3e; % left tail + {{less_tense; bulb(4,5,6)}}; +else: + pos3'(slab,90); pos1'(slab,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; + pickup fine.nib; pos3(max(fine.breadth,light_hair),0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=2/3[x3l,x5r]; lft x5=l+letter_fit+hround(.35u-.5); + bot y4r=bot y5r; y3=y3'; x4l:=.25[x4,x5]; + path p; + p=stroke z3{down} + ..controls (x3,y5+.35h-eps) and (min(7/8[x4,x3],x5+2.5light_hair+.5u),y4) + ..{left}z4--z5; + z6=point .35 of p; + pos6(max(fine.breadth,7/8[bot_vair,light_hair]),angle(direction .35 of p)+90); + filldraw stroke z3e{down}...z6e{direction .35 of p}...{left}z4e--z5e; fi % arc +%%% +if serifs: x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5cap_jut); + dish_serif(2,1,a,1/3,cap_jut,b,1/3,cap_jut); %lower right serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); %upper right serif + nodish_serif(3,0,e,1/3,1.05cap_jut,f,1/3,inner_jut); %upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +penlabels(0,1,2,3,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter M"; +cyrchar(M,16u#+width_adj#,cap_height#,0); +if is_small_cap: getcharcode(m); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.cap_stem-4stem_corr); +stem3=hround(fudged.hair-stem_corr); +stem4=hround(fudged.cap_stem-3stem_corr); +if stem4<stem1: stem4:=stem1; fi +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: + y6=if monospace: vround 1/3h else: o fi; + numeric upper_notch,lower_notch; + upper_notch=h-cap_notch_cut; lower_notch=y6+cap_notch_cut; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: + y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +if serifs: + serif(1,2,a,1/3,-cap_jut); % upper left serif + dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif + serif(3,4,d,1/3,cap_jut); % upper right serif + dish_serif(4,3,e,1/3,cap_jut,f,1/3,cap_jut); fi % lower right serif +%%%%% +penlabels(0,1,1',2,3,3',4,5,6,7,8); endchar; + +lhchar "Uppercase Russian letter N (looks like H)"; +cyrchar(N,13.5u#,cap_height#,0); %N_width# +if is_small_cap: getcharcode(n); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_n; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(cap_bar,90); penpos6(cap_bar,90); +x5=x1; x6=x3; y5=y6=.52h; +fill stroke z5e--z6e; % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter O"; +cyrchar(O,14u#-width_adj#,cap_height#,0); +if is_small_cap: getcharcode(o); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0,0); +% upper_o; +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +%%%%% +penlabels(1,2,3,4); endchar; + +lhchar "Uppercase Russian letter P (looks like PI)"; +cyrchar(P,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(p); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_p; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +%%% +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower left serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + nodish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif + filldraw z.b0--z.b1--z.e1--z.e0--cycle; % upper inter_serif bar +else: + lft x1'= lft x1l; top y1'r=h; pos1'(slab,90); + rt x3'=rt x3r; y3'=y1'; pos3'(slab,90); + filldraw stroke z1'e--z3'e; fi % upper_bar +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter R (looks like P)"; +cyrchar(R,12u#,cap_height#,0); +if is_small_cap: getcharcode(r); fi +italcorr .75cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,0); +% upper_r; +pickup tiny.nib; penpos1(cap_stem'-tiny,0); penpos2(cap_stem-tiny,0); +pos0(cap_stem',0); pos0'(cap_stem,0); +lft x1l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0; +x1l=x2l=x0l=x0'l; y0=y0'=y7; +penpos3(cap_band,90); penpos4(cap_band,90); +penpos5(cap_curve if hefty:-3stem_corr fi,0); +penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90); +z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; +x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u); +x4l:=x6l:=x4-.25cap_curve; +filldraw stroke z1e--z0e--z0'e--z2e; % stem +fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe +%%% +if serifs: + nodish_serif(1,0,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,0',c,1/3,cap_jut,d,1/3,cap_jut); fi % lower serif +%%%%% +penlabels(0,1,2,3,4,5,6,7); endchar; + +iff serifs:% +lhchar "Uppercase Russian letter S (looks like C)"; +cyrchar(S,13u#,cap_height#,0); +if is_small_cap: getcharcode(s); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% upper_s; +pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); +pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); +rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1]; +top y2r=h+o; bot y4r=-o; y3=.5[y2,y4]; +bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps); +y5=max(good.y .95(h-y1),y4l+eps); +(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); +(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); +filldraw stroke z1e{x2-x1,10(y2-y1)} + ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc +pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; +x1r-x1'=2cap_curve-fine; y1'=y1; +path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; +numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); +filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +%%%%% +penlabels(1,1',2,3,4,5,6); endchar; + +iff not serifs:% +lhchar "Uppercase Russian letter S (looks like C)"; +cyrchar(S,11.5u#,cap_height#,0); +if is_small_cap: getcharcode(s); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% uppers_s; +pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); +pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); +rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; +lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); +top y1r=vround .95h+o; top y2r=h+o; y3=.5h; +bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; +filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,.8,4); % arc and terminals +%%%%% +penlabels(1,2,3,4,5); endchar; + +lhchar "Uppercase Russian letter T"; +cyrchar(T,13u#-width_adj#,cap_height#,0); +if is_small_cap: getcharcode(t); fi +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(0,0); +% upper_t; +if odd(cap_stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.65u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,.7beak_jut); % right arm and beak +pos5(hair,180); x5=w-x4; y5=y4; +arm(3,5,f,beak_darkness,-.7beak_jut); % left arm and beak +%%% +if serifs: + dish_serif(2,1,c,1/3,1.414cap_jut,d,1/3,1.414cap_jut); % lower serif + nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); fi % upper bracketing +%%%%% +penlabels(1,2,3,4,5); endchar; + +lhchar "Uppercase Russian letter U (looks like y)"; +cyrchar(U,13u#,cap_height#,0); +if is_small_cap: getcharcode(u); fi +italcorr cap_height#*slant+.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_u; +numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +bot_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +bot_vair=Vround(if serifs:.5[vair',bot_stem] else:slab fi); +outer_jut=.7cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; % W jut +y1=y4r=h; x2l=x3l; +if monospace: y2=y3=.3h; else: y2=y3=max(if not serifs:1.095 fi stem,1/6h); fi +numeric alpha; x9=.5w-1/2(.5[bot_stem,right_stem]); y9=-o; +alpha=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-2apex_corr); +numeric u_ratio; u_ratio=(y3-y9)/(y1-y9); +x2l-x1l=x4r-x3r+ + if monospace: 2apex_corr else: if serifs: 2 fi (u_ratio*.5[x1l,x4r]) fi; +penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0); +numeric alpha[]; alpha3=(y1++(x2l-x1l))/y1; +penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0); +z0l=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r); penpos0(alpha*bot_stem,0); +z0'=whatever[rt z3r,rt z4r]; y0'=bot y6r=if serifs:-o else: 0 fi; +penpos6(bot_vair,-90); x6r=if serifs:.6 else:.5 fi[x3r,x1]; +numeric t; t=if monospace: 1.25right_stem else: (x3r-x0')++(y3r-y0') fi; +penpos5(bot_vair,.5[angle(z4r-z6r),angle(z4r-z3r)]-90); +path p; numeric tau; p=z0r{z3r-z4r}....{left}z6r; +z5r=p intersectionpoint ((0,y2l-.5bot_vair)--(w,y2l-.5bot_vair)); +tau=xpart(p intersectiontimes (z2l--z2r)); +if y0>notch_cut+y2: + y0l:=notch_cut+y2; % +y2 added for sanserif face + fill z0l+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r) + --subpath(0,tau) of p--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0l+.5left--cycle; % left and right diagonals +else: + fill z0l--diag_end(0,4l,1,1,4r,3r)--subpath(0,tau) of p + --z2l--diag_end(2l,1l,1,1,1r,0)--cycle; % left and right diagonals +fi +fill p--z6l{right}...{-direction tau of p} + if x5l>x2l: z2l else: z5l fi..{z4r-z3r}z0l--cycle; +pickup fine.nib; +if serifs: + numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); + pos6'(bot_vair,-90); z6'=z6; pos7(hair,-180); pos8(bulb_diam,-180); + y8=1/6h; z7r=z8r; lft x8r=x1; + cyrbulb(6',7,8); % arc and bulb + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % right serif +else: + top z6'l=z6l; bot z6'r=z6r; + pos7(bot_vair,-90); lft x7l=max(3.5u,rt x6r-t); bot y7r=bot y6'r; + filldraw stroke z6'e--z7e; fi % arc +%%%%% +penlabels(0,0',1,2,3,4,5,6,6',7,8,9); endchar; + +lhchar "Uppercase Russian letter F (looks like PHI)"; +cyrchar(F,15u#,cap_height#,0); +if is_small_cap: getcharcode(f); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(if monospace: -.5u#,-.5u# else: 0,0 fi); +numeric shaved_stem,light_curve; shaved_stem=cap_stem-hround 2stem_corr; +light_curve=cap_curve-hround stem_corr; +if odd(shaved_stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; pos1(shaved_stem,0); pos2(shaved_stem,0); +lft x1l=lft x2l=hround (.5w-.5shaved_stem); % middle stem point +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +penpos3(vair,90); penpos5(vair,-90); +penpos4(light_curve,180); penpos6(light_curve,0); +x4r=hround u; x6r=w-x4r; x3=x5=.5w; +y3r=vround(.89h if serifs:-.5slab fi); y4=y6=.5[y3,y5]; +y5r=vround(.15h if serifs:+.5slab fi); +clearpen; interim superness:=hein_super; % make |"F"|, not |"fita"| +penstroke pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,5)(.5superpull) + & pulled_super_arc.e(5,6)(.5superpull) + & pulled_super_arc.e(6,3)(.5superpull) & cycle; % bowl +if serifs: + dish_serif(1,2,a,1/3,1.25cap_jut,b,1/3,1.25cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.25cap_jut,d,1/3,1.25cap_jut); fi % lower serif +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter H (looks like X)"; +cyrchar(H,13u#,cap_height#,0); +if is_small_cap: getcharcode(h); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_h; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1); +outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut; +x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-outer_jut; +y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); +alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +if hefty: + z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.1[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' + --diag_end(34',4l,.5,1,4r,24')--z24' + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: + fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +if serifs: + numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,4); prime_points_inside(2,3); + prime_points_inside(3,2); prime_points_inside(4,1); + if rt x1'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +penlabels(0,1,2,3,4,12,13,24,34); endchar; + +lhchar "Uppercase Russian letter C"; +cyrchar(C,13.5u#,cap_height#,cap_sbeak#); % N_width +if is_small_cap: getcharcode(c); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#, + cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi); %DL_adj +% upper_c; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric inner_jut,arm_thickness; +arm_thickness=vround(slab+vair_corr); +if serifs: + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + save slab; slab:=arm_thickness; % bottom.bar.slab + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif +else: + save slab; slab:=arm_thickness; % bottom.bar.slab + lft x2'= lft x2l; bot y2'l=0; pos2'(slab,90); + rt x4'= rt x4r; y4'=y2'; pos4'(slab,90); + filldraw stroke z2'e--z4'e; fi % lower bar +% uppercase descender +inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); +numeric right_jut; +right_jut=if serifs: max(limit_dist,1.1cap_jut) else: hround (r-rt x4r-.65u) fi; +r_serif(4,3,g,1/3,inner_jut,h,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +if serifs: + filldraw z.d0--z.d1--z.g1--z.g0--cycle; fi % lower inter_serif bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter CH"; +cyrchar(CH,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(ch); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_ch; +pickup tiny.nib; +pos1(cap_stem,0); pos2(cap_stem,0); pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; +x5l=1/3[x1,x3]; y5=y6; if serifs: y6'=y6-cap_hair+1.05cap_stem; fi +x6=x6'=x3; y6=good.y (h-.52h if serifs: -.35(.5[cap_hair,.7cap_stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +clearpen; penpos2'(cap_stem,0); z2'=z2; +numeric middle_weight; middle_weight=.5[vair,cap_band]; +penpos5(middle_weight,90); penpos6(middle_weight,90); penpos6'(middle_weight,90); +if serifs: + if((y6'-y6)>=middle_weight+1+eps): + fill stroke pulled_arc.e(2',5) & z5e{right}...{.75(z5-z6)+z6'}z6'e; + else: + fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif +else: + filldraw stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter SH"; +cyrchar(SH,19.75u#+width_adj#,cap_height#,0); +if is_small_cap: getcharcode(sh); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(if monospace: 0,0 else:cap_serif_fit#,cap_serif_fit# fi); %uwlett_adj +% upper_sh; +if odd(fudged.cap_stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; +pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +pos5(fudged.cap_stem,0); pos6(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=top y5=h; bot y2=bot y4=bot y6=0; +lft x5l=lft x6l=hround (.5[x1,x3]-.5cap_stem); % middle stem point +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +numeric inner_jut,arm_thickness; +arm_thickness=vround(slab+vair_corr); +if serifs: + if rt x1r+cap_jut+.5u+1<=lft x5l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + save slab; slab:=arm_thickness; % bottom.bar.slab + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif + nodish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif + filldraw z.d0--z.d1--z.g1--z.g0--cycle; % lower inter_serif bar +else: + save slab; slab:=arm_thickness; % bottom.bar.slab + lft x2'= lft x2l; bot y2'l=0; pos2'(slab,90); + rt x4'=rt x4r; y4'=y2'; pos4'(slab,90); + filldraw stroke z2'e--z4'e; fi % lower bar +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter SHCH"; +cyrchar(SHCH,19.75u#+width_adj#,cap_height#,cap_sbeak#); +if is_small_cap: getcharcode(shch); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(if monospace: 0 else: cap_serif_fit# fi, %uwlett_adj + if monospace: 0 else: cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi fi); %DL_adj&uwlett_adj +% upper_sh; +if odd(fudged.cap_stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; +pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +pos5(fudged.cap_stem,0); pos6(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=top y5=h; bot y2=bot y4=bot y6=0; +lft x5l=lft x6l=hround (.5[x1,x3]-.5cap_stem); % middle stem point +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +numeric inner_jut,arm_thickness; +arm_thickness=vround(slab+vair_corr); +if serifs: + if rt x1r+cap_jut+.5u+1<=lft x5l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + save slab; slab:=arm_thickness; % bottom.bar.slab + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif +else: + save slab; slab:=arm_thickness; % bottom.bar.slab + lft x2'= lft x2l; bot y2'l=0; pos2'(slab,90); + rt x4'=rt x4r; y4'=y2'; pos4'(slab,90); + filldraw stroke z2'e--z4'e; fi % lower bar +%%%%% +% uppercase descender +inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); +numeric right_jut; +right_jut=if serifs: max(limit_dist,1.1cap_jut) else: hround (r-rt x4r-.65u) fi; +r_serif(4,3,o,1/3,inner_jut,p,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +if serifs: + filldraw z.d0--z.d1--z.o1--z.o0--cycle; fi % lower inter_serif bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Russian letter HRDSN - HARD SIGN"; +cyrchar(HRDSN,12.5u#,cap_height#,0); %V_width#=12.5u# +if is_small_cap: getcharcode(hrdsn); fi +italcorr .52*.7cap_height#*slant-.5u#; % D*.52h +adjust_fit(min(4.5u#-.5stem#,3.5u#)-.5width_adj#, % Beak_adj + 0); +% upper_hrdsn; +numeric left_stem; left_stem=cap_stem-hround 2stem_corr; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +% upper left beak +pickup crisp.nib; pos3(slab,90); pos4(hair,180); +top y3r=h; x3=x1; lft x4r=l+letter_fit+hround.65u; y4=good.y(y3l-beak)-eps; +arm(3,4,q,beak_darkness,-.7beak_jut); +if serifs: + nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +% usftsn_bowl(2); +_zero:=2; +_one:=5; _two:=6; _three:=7; _four:=8; _five:=9; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%%%% +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Uppercase Russian letter ERY"; +cyrchar(ERY,12.5u#,cap_height#,0); %V_width#=12.5u# +if is_small_cap: getcharcode(ery); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(if monospace: 0,0 else:cap_serif_fit#,cap_serif_fit# fi %uwlett_adj + +4.5u#); %ERYadj +% upper_ery; +numeric left_stem; left_stem=cap_stem-hround 2stem_corr; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +% usftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% I +w:=w+4.5u; pickup tiny.nib; rt x8r=rt x9r=w-hround max(2u,3u-.5stem); +top y8=h; bot y9=0; pos8(cap_stem,0); pos9(cap_stem,0); +filldraw stroke z8e--z9e; +if serifs: + dish_serif(8,9,e,1/3,cap_jut,f,1/3,cap_jut); + dish_serif(9,8,g,1/3,cap_jut,h,1/3,cap_jut); fi +%%%%% +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Uppercase Russian letter SFTSN - SOFT SIGN"; +cyrchar(SFTSN,if monospace: 9u# else: 12.5u# fi %V_width#=12.5u# + ,cap_height#,0); +if is_small_cap: getcharcode(sftsn); fi +italcorr .52*.7cap_height#*slant-.5u#; % D*.52h +adjust_fit(cap_serif_fit#,0); +numeric left_stem; left_stem=cap_stem-hround 2stem_corr; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +% usftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%%%% +penlabels(1,2,3,4,5,6,7); endchar; + +iff serifs:% +lhchar "Uppercase Russian letter EREV - REVERSE E"; +cyrchar(EREV,13u#,cap_height#,0); +if is_small_cap: getcharcode(erev); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0,0); +% upper_erev; +pickup fine.nib; pos1(cap_hair,180); pos2(cap_band,90); +pos3(cap_curve,0); pos4(cap_band,-90); pos5(hair,-180); +lft x1r=lft x5r=hround u; rt x3r=hround(w-u); x2=x4=.55[x3,x1]; +top y2r=h+o; bot y4r=-o; y3=.5h-vair_corr; y3l:=.52h; +bot y1=min(vround.675h,bot y2l-eps); y5=max(good.y .95(h-y1),y4l+eps); +(x2l',y2l)=whatever[z2r,z1l]; x2l:=max(x2l',x2l-.5u); +(x4l',y4l)=whatever[z4r,z5l]; x4l:=max(x4l',x4l-.5u); +filldraw stroke z1e{x2-x1,10(y2-y1)}...pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull)...{up}z5e; % arc +pos6(.3[fine.breadth,cap_hair],180); x6r=x1r; top y6=h+o; +x1'-x1r=2cap_curve-fine; y1'=y1; +path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{right}; +numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); +filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +%%% +% uerev_bar; +numeric bar[]; y8=y7=y3; +x8=x3l; x7=max(rt x1l+.5hair,0.85[x3l,x1l]); +if (bar#<=.5curve#): + penpos7(cap_bar,90); penpos8(cap_bar,90); + bar2=7/8[cap_bar,fudged.cap_stem-3stem_corr]; + penpos9(bar2,45); z9=.475[z7l,z8l]; + fill circ_stroke z7e{2,1}..{2,-1}z9e..{2,1}z8e; % curve /\/ +else: + pickup fine.nib; pos7(cap_bar,90); pos8(cap_bar,90); + filldraw stroke z7e--z8e; % bar -- +fi +%%%%% +penlabels(1,1',2,3,4,5,6,7,8,9); endchar; + +iff not serifs:% +lhchar "Uppercase Russian letter EREV - REVERSE E"; +cyrchar(EREV,11.5u#,cap_height#,0); +if is_small_cap: getcharcode(erev); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0,0); +% uppers_erev; + pickup fine.nib; pos1(1.2flare,100); pos2(slab,90); + pos3(cap_curve,0); pos4(slab,-90); pos5(flare,-95); + lft x1r=hround1.1u; x2=x4=w-(.5w+1.25u); + rt x3r=w-hround max(u,2u-.5cap_curve); + lft x5r=hround.9u; + top y1r=vround .95h+o; top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke rterm.e(2,1,left,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,left,.8,4); +%%% +% urevs_bar; +pickup fine.nib; numeric bar[]; +bar1=if is_small_cap: max(fine.breadth+eps,.6[thin_join,vair]) + else: cap_bar fi; +pos6(bar1,90); pos7(bar1,90); +y7=y6=y3; x7=x3l; x6=max(rt x1l+.5hair,0.85[x3l,x1l]); +filldraw stroke z6e--z7e; % bar -- +%%%%% +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Uppercase Russian letter YU (looks like IO)"; +cyrchar(YU,14u#-width_adj#,cap_height#,0); +if is_small_cap: getcharcode(yu); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(if monospace: 6.5u# else: + max(5u#+.5cap_stem#,6u#)+cap_serif_fit# fi, %Ipart_adj + if monospace:-1.25u# else: 0 fi); +% upper_yu; +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +%I_part(2); +_zero:=2; +_one:=5; _two:=6; _three:=7; _four:=8; +% +pickup tiny.nib; pos[_one](cap_stem,0); pos[_two](cap_stem,0);%pos +lft x[_one]l=lft x[_two]l= + l+letter_fit+if monospace:-.35u else: cap_serif_fit fi + +hround max(2u,3u-.5cap_stem); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +x[_three]=x[_one]; y[_three]=y[_zero]; +x[_four]=x[_zero]; y[_four]=y[_three]; +pos[_three](cap_bar,90); pos[_four](cap_bar,90); +filldraw stroke z[_three]e--z[_four]e; % bar +if serifs: dish_serif([_one],[_two],s,1/3,cap_jut,t,1/3,cap_jut); + dish_serif([_two],[_one],u,1/3,cap_jut,v,1/3,cap_jut); fi +%%%%% +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +iff not concrete:% +iff not specific:% +lhchar "Uppercase Russian letter YA (looks like backward R) (`roman')"; +cyrchar(YA,if serifs:13.5u# else:12.5u#-.5width_adj# fi %N_width; upss R + ,cap_height#,0); +if is_small_cap: getcharcode(ya); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(if serifs:cap_serif_fit# else:0 fi,cap_serif_fit#); +% upperr_ya; +pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); +rt x1r=rt x2r=hround(w-max(2u,3u-.5cap_stem')); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +penpos3(cap_band,90); penpos4(cap_band,90); +penpos5(cap_curve if hefty:-3stem_corr fi,180); +numeric middle_weight; middle_weight=.5[vair,cap_band]; +penpos6(middle_weight,-90); penpos7(middle_weight,-90); +z3r=top z1; y4=y3; y5=.52[y6l,y4l]; y6=y7; +x7=x2; y7l=vround(.5h+.5vair); x4=x6; +if serifs: x4=.5w+.5u; x5r=hround (2u); + else: x4=.5w-.5u; x5r=hround u; fi +x4l:=x6l:=x4+.125cap_curve; +fill stroke z7e..pulled_arc.e(6,5) & pulled_arc.e(5,4)..z3e; % lobe +pickup tiny.nib; numeric stem[],alpha,right_jut; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +if serifs: bot y9=bot y2; else: y9=0; fi +lft x9l=hround(if serifs:l+letter_fit+.75u+right_jut else:.5u fi); y8=y6; +stem1=max(tiny.breadth,fudged.cap_stem-3stem_corr); +alpha=diag_ratio(1,.5(stem1-tiny),y1-y9,x9l-x1); +penpos9(alpha*(stem1-tiny),0); +forsuffixes $=l,r: y9'$=0; endfor +z9'r=z9r+penoffset z1-z9 of currentpen+whatever*(z1-z9); +z9'l=z9l+penoffset z9-z1 of currentpen+whatever*(z1-z9); +if serifs: z8r=z9'r+whatever*(z1r-z9); else: x8=x6+.5u; fi +penpos8(if serifs:x9'r-x9'l else: cap_stem fi-2stem_corr,0); +fill z8l--diag_end(8l,9'l,1,.5,9'r,8r)--z8r--cycle; % diagonal +numeric inner_jut; +if lft x2l-cap_jut-.5u+1>=rt x9r+cap_jut: inner_jut=cap_jut; + else: lft x2r-cap_jut-.5u+1=rt x9r+inner_jut; fi +if serifs: + nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower serif + dish_serif(9,8,g,1/2,right_jut,h,1/3,inner_jut)(dark); fi % lower diagonal serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Uppercase Russian letter YO (looks like E umlaut)"; +cyrchar(YO,12u#-width_adj#,cap_height#+acc_height#,0); +if is_small_cap: getcharcode(yo); fi +italcorr cap_height#*slant-beak_jut#-.5u#; +adjust_fit(cap_serif_fit#,0); h:=cap_height; +% upper_e; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: + rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps; + rt x9r=hround(w-.5u); +else: + rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0); +bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps; +arm(8,9,h,beak_darkness,1.5beak_jut); % lower arm and beak +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +%%%%% +% the accent +h:=cap_height+acc_height; +uppercase_umlaut(if serifs: 0 else: (.5[lft x1l,rt x4r]-.5w) fi,0, 10,11,12,13); +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13); endchar; + +if concrete: input lgrucu; fi % Russian concrete letters + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2comi.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2comi.mf new file mode 100644 index 00000000000..a0320e98e13 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2comi.mf @@ -0,0 +1,529 @@ +% +% lgt2comi.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Italic Cyrillic letters common for couple of encodings +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 & Ko +% +% X2 T2A T2B T2C T2D X2S LH WNCYR +% +% tshe "62 b "a2 - - - - - "0e Tshe +% dje "63 c "a3 - - - - - "0f Dje +% lat_i "69 i - - - "a9 - "f7 "0c Latin letter I +% lat_j "6a j - - - - - - "6a Je - Latin letter J +% lje "6b k "a7 "a8 - - - - "09 Lje +% nje "6d m "bb "b9 - - - - "08 Nje +% lat_s "73 s "af - - "af - - "1e Latin letter S - Dze +% dzhe "75 u "b6 - "b6 - - - "0a Dzhe +% yat "78 x - - - "b3 - - "2b Yat +% b_yus "79 y - - - "b8 - - - Big Yus +% izh "7a z - - - "aa - - "1c Izhitsa +% g_up "a0 "a0 - - - - "f3 - Ghe upturn +% ukr_i "a8 "a8 - - "a8 - "f9 - Ukrainian i - latin i with umlaut (goes first for LH font) +% ng "ae "ae "ae - - "xx - - Ligature en-ghe +% otld "b0 "b0 "b0 "b0 - "xx - - O tilded & Variant Old Cyrillic Fita (goes first for wncoding) +% u_shrt "b2 "b2 "b2 - - - "fb - Short U (goes first for LH font) +% ukr_e "b9 "b9 - - "b9 - "f5 "0d Ukrainian e +% eps "bb - - "bb - "bb - - - Epsilon; Narrow E +% fita - - - - "b0 - - "1d Old Slav Fita +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Italic Cyrillic letter tshe (soft t - looks like barred h)"; +cyrchar(tshe,9u#,asc_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %h +%adjust_fit(1.5u#,0); pickup tiny.nib; +adjust_fit(0,0); pickup tiny.nib; +pos1(stem,0); pos2(stem,0); x1=x2; +lft x1l=hround(1.5u-.5stem); top y1=h; y2-.5stem=-oo; +filldraw circ_stroke z2e--z1e; % left stem +sloped_serif.l(1,2,a,1/3,jut,serif_drop); % serif +pickup fine.nib; x4+.5stem=hround(w-2.5u+.5stem); +x5=x4-.25u; ital_arch(2,3,4); % arch +x7=w; hook_out(5,6,7)(skewed); % closing hook +filldraw stroke z4e{down}..{-u,-x_height}z5e; % right stem +% hcross +pickup crisp.nib; pos8(bar,90); pos9(bar,90); +top y8r=top y9r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +%lft x8=hround(l+letter_fit-.75u); x9=x4; +lft x8=hround(l+letter_fit-2.25u); x9=x4; +filldraw stroke z8e--z9e; % cross bar +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Cyrillic letter dje (soft dj - barred h with tail)"; +cyrchar(dje,8u#,asc_height#,desc_depth#); +italcorr (.5x_height#+.5asc_height#)*slant-2u#+.5 + if hefty:stem# else:rule_thickness# fi; %] to cross height +italcorr .7x_height#*slant; %o +%adjust_fit(1.5u#,0); pickup tiny.nib; +adjust_fit(0,0); pickup tiny.nib; +pos1(stem,0); pos2(stem,0); x1=x2; +lft x1l=hround(1.5u-.5stem); top y1=h; y2-.5stem=-oo; +filldraw circ_stroke z2e--z1e; % left stem +sloped_serif.l(1,2,a,1/3,jut,serif_drop); % serif +pickup fine.nib; x4+.5stem=hround(w-.75u+.5stem); +x5=x4; ital_arch(2,3,4); % arch +pos7(hair,-90); x7=.45[x2,x4]; bot y7r=-d; +filldraw stroke pulled_arc.e(4,7); % tail +% hcross +pickup crisp.nib; pos8(bar,90); pos9(bar,90); +top y8r=top y9r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +%lft x8=hround(l+letter_fit-.75u); x9=x4; +lft x8=hround(l+letter_fit-2.25u); x9=x4; +filldraw stroke z8e--z9e; % cross bar +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Cyrillic letter lat_i - Ukrainian letter i (as latin i)"; +cyrchar(lat_i,5u#,min(asc_height#,10/7x_height#+.5flare#),0); +italcorr max(1/3x_height#*slant+.5hair#+.5u#,h#*slant+.5flare#-2u#); %i +adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib; +x0=0; x5=w; x2=.5w+.25u; x3=.5w-.25u; +hook_in(0,1,2)(skewed); hook_out(3,4,5)(skewed); % hooks +filldraw stroke z2e--z3e; % stem +pos8(flare,0); pos9(flare,90); +x8=.5w if not monospace:-.4(h-x_height)*slant fi; top y9r=h+1; +if bot y9l-top y1<slab: y9l:=min(y9r-eps,y1+fine+slab); fi +x8=x9; y8=.5[y9l,y9r]; dot(8,9); % dot +penlabels(0,1,2,3,4,5,8,9); endchar; + +lhchar "Italic Cyrillic letter lat_j (as latin j)"; +cyrchar(lat_j,5u#,min(asc_height#,10/7x_height#+.5flare#),desc_depth#); +italcorr h#*slant+.5stem#-u#; %j +adjust_fit(if monospace:2u#,.5u# else: 0,0 fi); pickup fine.nib; +x0=0; x2=x3; pos3(stem,0); lft x3l=hround(w-1.5u-.5stem); +hook_in(0,1,2); % opening hook +pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); +bot y3=-1/3d; bot y4r=-d-oo; y6-.5flare=-vround.9d; +x4=1/3(w-u); lft x5r=min(hround-.5u,lft x5r+x4-x5l-eps); +filldraw stroke z2e---z3e...{left}z4e; % stem and arc +bulb(4,5,6); % bulb +pos8(flare,0); pos9(flare,90); +rt x8r=rt x2r if not monospace:-.6(h-x_height)*slant fi; top y9r=h+1; +if bot y9l-top y1<slab: y9l:=min(y9r-eps,y1+fine+slab); fi +x8=x9; y8=.5[y9l,y9r]; dot(8,9); % dot +penlabels(0,1,2,3,4,5,6,8,9); endchar; + +lhchar "Italic Cyrillic letter lje (soft l)"; +cyrchar(lje,12u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %"Weierstrass p" +adjust_fit(if monospace:-.5u#,-.35u# else:.5u#,0 fi); %wbulb_adj&bowl_adj +full_w:=w; w:=9u; +% ital_l;lje +pickup fine.nib; +pos1(vair,-90); pos2(stem,180); pos3(hair,0); %!!! +pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); +top y1l=h+oo; x1=.5[x3,x2]; +x3=3u; y3=.35h; +y6-.5flare=.1h; lft x6r=-.25u; z5r=z6r; +bot y4r=-oo; x4=max(.4[lft x6r,rt x3r],lft x6r+.5flare-eps); +y2=.8h; lft x2r=lft x7r=hround(w-2.5u-.5stem); %!!! +bulb(4,5,6); % bulb +filldraw stroke pulled_arc.e(4,3) + & super_arc.e(3,1) & super_arc.e(1,2); % left stem +pos7(stem,180); y7=.6bar_height; +filldraw stroke z2e--z7e; % right stem +w:=full_w; +pos15(hair,180); z15=z7; +pos12(vair,-90); pos13(curve,0); pos14(vair,90); +x12=x14=.5[x7,x13]; rt x13r=hround(w-u+.5curve); +bot y12r=-oo; top y14r=1.2bar_height+oo; y13=y7; +filldraw stroke pulled_arc.e(7,12) & pulled_arc.e(12,13) + & pulled_arc.e(13,14) & super_arc.e(14,15); % bowl +penlabels(0,1,2,3,4,5,6,8,9,10,11,12,13,14,15); endchar; + +lhchar "Italic Cyrillic letter nje (soft n - looks like nb)"; +cyrchar(nje,6.5u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %"Weierstrass p" +adjust_fit(if monospace:5u#,-.35u# else:6.5u#,0 fi); %ipart_adj&bowl_adj +% soft sign part +pickup tiny.nib; pos1(stem,0); pos2(stem,0); x1=x2; +lft x1l=hround(u-.5stem); y1+.5stem=h+oo; y2=.6bar_height; +filldraw circ_stroke z1e--z2e; % stem +pickup fine.nib; pos2'(stem,-180); pos3(vair,-90); +pos4(curve,0); pos5(vair,90); pos0(hair,180); +z0=z2=z2'; x3=x5=.5[x2,x4]; rt x4r=hround(w-u+.5curve); +bot y3r=-oo; top y5r=1.2bar_height+oo; y4=y2; +filldraw stroke pulled_arc.e(2',3) & pulled_arc.e(3,4) + & pulled_arc.e(4,5) & super_arc.e(5,0); % bowl +% i half; +_one:=6; _two:=7; _three:=8; _four:=9; _five:=10; _six:=11; +% +pos[_four](stem,0); +lft x[_four]l=l+letter_fit if not monospace: +hround(2.5u-.5stem) fi; +y[_four]-.5stem=-oo; x[_three]=x[_four]; +if monospace: + pos[_three](stem,0); top y[_three]=h; +else: + x[_one]=l+letter_fit; hook_in([_one],[_two],[_three]); fi % opening hook +filldraw circ_stroke z[_four]e--z[_three]e; % stem +pos[_five](vair,90); pos[_six](vair,90); %!!! +x[_five]=x[_four]; x[_six]=x2; y[_five]=y[_six]=bar_height; %!!! +filldraw stroke z[_five]e--z[_six]e; % bar %!!! +%%% +penlabels(0,1,2,3,4,5,6,8,9,10,11,12); endchar; + +lhchar "Italic Cyrillic letter lat_s -- dze"; +cyrchar(lat_s,5.25u#+max(1.75u#,flare#),x_height#,0); +italcorr x_height#*slant-.5u#; %s +adjust_fit(0,0); pickup fine.nib; +numeric theta; theta=90-angle(40u,h); slope:=-h/40u; % angle at middle +pos2(vair,-90); pos0(max(fine.breadth,ess),theta); pos7(vair,-90); +x2l=x0=x7=.5w; top y2l=h+oo; bot y7r=-oo; +y0-.5ess=y7l+.55(y2r-y7l-ess); +lft x3l=hround u-eps; rt x6r=hround(w-.5u)+eps; +x3r-x3l=x6r-x6l=hround .5[vair,ess]-fine; +ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; +ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; +interim superness:=more_super; +filldraw stroke super_arc.e(2,3) & z3e{down} + ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke +pos1(hair,0); pos10(hround .75[hair,flare],0); +pos2'(vair,90); z2'=z2; +pos8(hair,-180); pos9(flare,-180); +rt x10r=hround(w-u)+2eps; lft x9r=hround .5u-2eps; y10=.78h; y9=.25h; +bulb(2',1,10); bulb(7,8,9); % bulbs +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Cyrillic letter dzhe (hard dj)"; +cyrchar(dzhe,9.5u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(0,0); +% ital_i; +pickup fine.nib; interim superness:=more_super; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; + pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; x9=w; hook_out(7,8,9); % closing hook +y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +%%% +% dzhe middle descender +path p.r; numeric t; t=if hefty: 2.3 else: 2.2 fi; +p.r=super_arc.r(3,4)...{up}z5r; +_zero:=10; _one:=11; _two:=12; _three:=13; +penpos[_zero](xvair,0); z[_zero]r=point t of p.r; +penpos[_one](xvair,0); x[_one]=x[_zero]+2/3u; y[_one]=-1/3d; +penpos[_two](2/3[bar,fudged.stem-2stem_corr],-90); +x[_two]=.5[x[_one],x[_three]]; y[_two]=-.8d; +penpos[_three](xvair,-180); +x[_three]=x[_one]-5u; y[_three]=y[_two]+ypart the_tip_pos; +pickup pencircle scaled 1; +fill circ_stroke z[_three]e{down} + ...{right}z[_two]e...z[_one]e..{dir (360-the_pre_angle)}z[_zero]e; % middle descender +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13); endchar; + +lhchar "Italic Cyrillic letter yat"; +cyrchar(yat,13u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %"Weierstrass p" +adjust_fit(if monospace:-1.5u#,-.35u# else:0,0 fi); %lstem_adj&bowl_adj +full_w:=w; w:=10u; +% ital_yat; +pickup fine.nib; x1=x2; pos2(stem,0); +if monospace: + pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h; +else: + x0=0; lft x2l=hround(2.5u-.5stem); + hook_in(0,a,1); fi % opening hook +y2-.5stem=-oo; +filldraw circ_stroke z2e--z1e; % left stem +x4+.5stem=hround(w-2.5u+.5stem); x5=x4; ital_arch(2,3,4); % arch +y5=.6bar_height; pos5(stem,0); +filldraw stroke z4e--z5e; % right stem +w:=full_w; +pos6(stem,-180); pos10(hair,180); z6=z5; z10=z5; +pos7(vair,-90); pos8(curve,0); pos9(vair,90); +x7=x9=.5[x5,x8]; rt x8r=hround(w-u+.5curve); +bot y7r=-oo; top y9r=1.2bar_height+oo; y8=y5; +filldraw stroke pulled_arc.e(6,7) & pulled_arc.e(7,8) + & pulled_arc.e(8,9) & super_arc.e(9,10); % bowl +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Cyrillic letter b_yus - big yus"; +cyrchar(b_yus,9u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %h +adjust_fit(w#-5u#if monospace:-1.5u# fi,if monospace:-1.5u# else:0 fi); +% ital_yus; +% itop_yus; +pickup fine.nib; +penpos1(fudged.stem,0); penpos2(fudged.hair,0); +penpos3(fudged.stem,0); penpos4(fudged.hair,0); +w-x2r=.24w; x2-x3=x3-x1; y1=h; y2=y1; y3=y4=bar_height; +x3l=hround(2.5u-.5stem); x3r=x4r; +z0=whatever[z4l,z2l]=whatever[z1r,z3r]; +if hefty: + y0:=bar_height+.5fine; + fill z3l--diag_end(3l,1l,1,1,1r,3r){z3r-z1r} + ...{down}(x0-.5,y0)..(x0+.5,y0){up}... + {z2l-z4l}diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; % diagonals +else: + fill z3l--diag_end(3l,1l,1,1,1r,3r)--z0-- + diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; fi % diagonals +penpos5(fudged.stem,0); x5=x3; y5-.5stem=-oo; +fill circ_stroke z5e--z3e; %middle stem +z6=whatever[z4,z2]; z7=whatever[z1,z3]; y6=y7=good.y(y1-vair)-eps; +fill z1--z7--z6--z2--cycle; % upper bar +% bowls +pos8(vair,90); pos9(stem,0); pos10(vair,90); pos11(hair,180); +pos12(stem,180); pos13(vair,90); pos14(hair,0); z8=z3; +x11=hround(w+.5hair-eps)-.5hair; x11-x3=x3-x14; y11=y14=1/3x_height; +lft x9l=hround(w-2.75u-.5stem); x9-x3=x3-x12; y9=y12=1/2y8; +x10=hround(w-1.2u); x10-x3=x3-x13; bot y10l=bot y13l=-oo; +filldraw stroke + if not monospace:z14e{down}... fi + z13e{right}...z12e{up}...z8e{right}...z9e{down}...z10e{right} + if not monospace:...{up}z11e fi; % left lower diagonal +%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar; + +lhchar "Italic Cyrillic letter izh - izhitsa (looks like v)"; +cyrchar(izh,9.5u#,x_height#,0); +italcorr x_height#*slant+.25u#; +adjust_fit(.25u#,max(u#,.5u#+.5flare#)); %izhy_adj +% ital_izh; +numeric left_stem,right_stem,outer_jut,alpha,bulb_diam; +left_stem=stem-stem_corr; bulb_diam=7/8[hair,flare]; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75jut; x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos4''(alpha*right_stem,0); +penpos5(vair,90); penpos6(hair,0); penpos7(flare,0); +x5=if serifs:.5[x4'',rt x6r] else: rt x6r fi; top y5r=h+oo; +y4''=min(.9x_height,y5l-vair); z4''=whatever[z3,z4]; +rt x6r=hround(r-.5u-.5); +y6=max(vround(top y5r-.5hair)-1-.5flare, + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); +cyrbulb(5,6,7); % bulb +penpos1'(alpha*left_stem,0); y1'=3/4x_height; z1'=whatever[z1,z2]; +x10=l+letter_fit; x10:=hround(x10-.5hair)+.5hair; y10=2/3x_height; +penpos9(vair,90); y9r=x_height+oo; x9=min(x1l-.5,x10+u); +if y0>cap_notch_cut: + y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z4''l...{right}z5r--z5l{left} + ...z4''r{z3-z4}--diag_end(4r,3r,1,1,2l,1l)-- + z1'l{z1-z2}...{left}z9l--z9r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + ...{down}z0+.5left--cycle; % left and right diagonals +else: + pickup pencircle scaled1; + fill z0--z4''l{z4-z3}...{right}z5r--z5l{left}...{z3-z4}z4''r + --diag_end(4r,3r,1,1,2l,1l)-- + z1'l{z1-z2}...{left}z9l--z9r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + --cycle; fi % left and right diagonals +pickup fine.nib; +pos9'(vair,90); z9'=z9; pos10(hair,180); +filldraw stroke z10e{up}...z9'e{right}; % hook +%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Cyrillic letter g_up - ghe upturn"; +cyrchar(g_up,9u#-.5width_adj#,asc_height#,0); +italcorr x_height#*slant+.5stem#-u#; %tau +adjust_fit(.5u#+serif_fit#,0); +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround(3.5u-.5stem); top y1=x_height; +pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); +bot y2=2/3desc_depth; bot y4r=-oo; y6-.5flare=vround.1desc_depth; +x4=4/3u; lft x5r=min(hround-.5u,lft x5r+x4-x5l-eps); +filldraw stroke z1e---z2e...{left}z4e; % stem +bulb(4,5,6); % bulb +% upper part +pickup crisp.nib; +pos7(vair,90); pos8(vair,90); pos9(flare,180); pos10(flare,180); +x7=x1; top y7r=top y8r=x_height; +rt x9l=rt x10l=w-.25u; x8+.25flare=lft x9r; y9=top y8r+.25flare; +y10+.5flare=top y7r+beak; x8l:=rt x10l-(y9-top y8l); +filldraw circ_stroke z10e{down}--z9e{down}...z8e{left}--z7e; % ital beak +penlabels(0,1,2,3,4,5,6,7,8,9,7,8,9,10); endchar; + +lhchar "Italic Cyrillic letter ukr_i (i with umlaut)"; +cyrchar(ukr_i,5u#,lc_trema_height#,0);% +italcorr max(1/3x_height#*slant+.5hair#+.5u#,h#*slant+.5flare#-2u#); %i +adjust_fit(if monospace:u#,u# else: 0,0 fi); h:=x_height; +pickup fine.nib; x0=0; x5=w; x2=.5w+.25u; x3=.5w-.25u; +hook_in(0,1,2)(skewed); hook_out(3,4,5)(skewed); % hooks +filldraw stroke z2e--z3e; % stem +% the accent +lowercase_umlaut(0,0, 6,7,8,9); +penlabels(0,1,2,3,4,5,8,9); endchar; + +if old_cyr: +lhchar "Italic Cyrillic letter ng - ligature enghe"; +cyrcharmoving(ng); +fi\\; + +iff not old_cyr: +lhchar "Italic Cyrillic letter ng - ligature enghe"; +cyrchar(ng,10u#,x_height#,0); +italcorr x_height#*slant+.5stem#-u#; %tau +adjust_fit(if monospace:-1.5u# else: 0 fi,max(2u#,u#+stem#)); +% ital_ng; +pickup fine.nib; x2=x3; pos3(stem,0); lft x3l=hround(2.5u-.5stem); +%ihalfstem; +if monospace: pos2(stem,0); top y2=h; +else: x0=0; hook_in(0,1,2); fi % opening hook +y3-.5stem=-oo; +filldraw circ_stroke z3e--z2e; +x10=x3l; y10=y11=bar_height; pos10(vair,90); pos11(vair,90); +pos6(stem,0); rt x7r=hround(w-2.5u+.5stem); top y6=h; x7=x6; +% right_stem; +_one:=7; _two:=8; _three:=9; +if monospace: + pos[_three](vair,90); pos[_one](stem,0); + x[_three]=good.x .5[x[_one],w]; bot y[_three]l=0; y[_one]=1/3h; + filldraw stroke z[_one]e{down}...{right}z[_three]e; % terminal +else: + x[_three]=w; hook_out([_one],[_two],[_three]); fi % opening hook +z7'=z7; pos7'(stem,0); +filldraw circ_stroke z7'e--z6e; x11=x6l; +filldraw stroke z10e--z11e; +% italic beak +pickup fine.nib; +pos12(stem,0); rt x12r=r-letter_fit if monospace:+.5stem else:-.25u fi; +y12-.5stem=2/3x_height-.5fine; +pos13(stem,0); pos14(vair,90); pos15(vair,90); +x15=x6; top y15r=top y14r=x_height; x13=x12; y13=bot y14l-.25flare; +x14+.25flare=lft x12l; x14r:=lft x12l-(top y14r-y13); +filldraw circ_stroke z12e{up}--z13e{up}...z14e{left}--z15e; % ital_beak +%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar; + +lhchar "Italic Cyrillic letter otld - o tilded"; +cyrchar(otld,9u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; +adjust_fit(0,0); pickup fine.nib; +% ital_o;tld +pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(curve,360); +x1=x3=.5w; lft x2r=hround(1.5u-.5curve); x4=w-x2; +top y1r=h+oo; y2=y4=.5[y1,y3]; bot y3r=-oo; +filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1); % bowl +%%% +% oltilde; +if (serifs=true) and (bar#<=.5curve#): + numeric bar[]; + set_bar_axis; + x5r=x2l; x6r=x4l; + y5r=y6r=y2.bh; y5l=y6l=y1.bh; x5r=x5l; x6l=x6r; + bar2=2/3[bar,fudged.stem]; + penpos7(bar2,45); z7=.5[z5l,z6l]; + fill stroke z6e{-2,-1}..{-2,1}z7e..{-2,-1}z5e; +else: + bar_stroke(x2l,x4l); +fi +%%%%% +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Italic Cyrillic letter u_shrt - short u (as latin y)"; +cyrchar(u_shrt,if monospace:8.5u# else:9u#fi, + x_height#+acc_height#,desc_depth#); +italcorr x_height#*slant+.5stem#-u#; %y +adjust_fit(0,0); full_h:=h; h:=x_height; +% ital_u; +pickup fine.nib; interim superness:=more_super; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); + filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-1.5u+.5stem); +pos7(stem,0); pos8(vair,-90); +y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +y7=0; bot y8r=-d-oo; x5=x6=x7; x8=.5w; +pos9(hair,-180); pos10(flare,-180); y9=-.5d; +lft x9r=hround(2.75u-.5flare); bulb(8,9,10); % bulb +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e---z7e...{left}z8e; % right stem and link +% the accent +h:=full_h; cbreve(.5w,0, 11,12,13,14,15,16,17); +penlabels(0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15,16,17); endchar; + +lhchar "Italic Cyrillic letter ukr_e - Ukrainian e (c with mid-line)"; +cyrchar(ukr_e,8u#,x_height#,0); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-.5u# fi; %c+.5u +adjust_fit(if monospace:0 else:-.35u#fi,0); %c +% ital_ukre; +pickup fine.nib; pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x2=x4=.5(w+u); rt x1r=max(rt x2,hround(w-.5u))+eps; +lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; +y1=.5[bar_height,h]; top y2r=h+oo; bulb(2,1,0); % bulb +bot y4r=-oo; y3=.5[y2,y4]; top y5l=vround .5bar_height; y6=bar_height; +path p; p=z4{right}..z5..z6; +filldraw stroke pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +pos7(vair,90); pos8(vair,90); +y7=bar_height; rt x7=hround max(rt x2+1+eps,lft x0l-eps); x8=x3; y7=y8; +filldraw stroke z7e--z8e; +penlabels(1,2,3,4,5,6,7,8); endchar; + +%WNCYR shape without serifs +lhchar "Italic Cyrillic letter fita (looks like theta)"; +cyrchar(fita,8u#,x_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(curve,360); +x1=x3=.5w; lft x2r=hround(1.5u-.5curve); +x4=w-x2; +top y1r=h+oo; y2=y4=.5[y1,y3]; bot y3r=-oo; +filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1); % bowl +bar_stroke(x2,x4); % bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Italic Cyrillic letter eps - epsilon"; +cyrchar(eps,if serifs:8u# else:7.5u# fi,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +% ital_eps; +pickup fine.nib; pos0(flare,0); pos1(hair,0); pos2(vair,90); pos7(curve,180); +pos9(vair,270); pos3(vair,270); pos9'(vair,90); pos3'(vair,90); +pos8(curve,180); pos4(vair,270); pos5(hair,320); +x2=x4=.5(w+u); rt x1r=max(rt x2,hround(w-.25u))+eps; +x5r=good.x w-eps; x6=x5; +y1=.5[bar_height,h]; top y2r=h+oo; bulb(2,1,0); % bulb +lft x7r=hround(2u-.5curve); lft x8r=hround(1.5u-.5curve); +bot y4r=-oo; y7=.5[y2,y3]; y5r=y8=.5[y3,y4]; y6=bar_height; +x3=x2; rt x9=hround max(rt x2+1+eps,lft x0l-eps); y3=y9=bar_height; +z9'=z9; z3'=z3; +path p; p=z4{left}..(x5,15/16bar_height)..z6; +filldraw stroke z9e{left}...super_arc.e(3,7) & super_arc.e(7,2); % lower arc +filldraw stroke z9'e{left}...pulled_arc.e(3',8) & pulled_arc.e(8,4) + ...{direction 1 of p}z5e; % upper arc +%%% +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2coml.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2coml.mf new file mode 100644 index 00000000000..fd047b31d23 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2coml.mf @@ -0,0 +1,796 @@ +% +% lgt2coml.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lowercase Cyrillic letters common for couple of encodings +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 & Ko +% +% X2 T2A T2B T2C T2D X2S LH WNCYR +% +% tshe "62 b "a2 - - - - - "0e Tshe +% dje "63 c "a3 - - - - - "0f Dje +% lat_i "69 i - - - "a9 - "f7 "0c Latin letter I +% lat_j "6a j - - - - - - "6a Je - Latin letter J +% lje "6b k "a7 "a8 - - - - "09 Lje +% nje "6d m "bb "b9 - - - - "08 Nje +% lat_s "73 s "af - - "af - - "1e Latin letter S - Dze; zelo +% dzhe "75 u "b6 - "b6 - - - "0a Dzhe +% yat "78 x - - - "b3 - - "2b Yat +% b_yus "79 y - - - "b8 - - - Big Yus +% izh "7a z - - - "aa - - "1c Izhitsa +% g_up "a0 "a0 - - - - "f3 - Ghe upturn +% ukr_i "a8 "a8 - - "a8 - "f9 - Ukrainian i - latin i with umlaut (goes first for LH font) +% ng "ae "ae "ae - - "xx - - Ligature en-ghe +% otld "b0 "b0 "b0 "b0 - - "xx - O tilded & Variant Old Cyrillic Fita (goes first for wncoding) +% u_shrt "b2 "b2 "b2 - - - "fb - Short U (goes first for LH font) +% ukr_e "b9 "b9 - - "b9 - "f5 "0d Ukrainian e +% eps "bb - - "bb - "bb - - - Epsilon; Narrow E +% fita - - - - "b0 - - "1d Old Slav Fita +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Lowercase Cyrillic letter tshe (soft t - looks like barred h)"; +cyrchar(tshe,10u#,asc_height#,0); +italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#); +% latin h +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +pos1'(stem',0); pos2'(stem',0); pos3(stem,0); +lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1; +top y1=h; bot y2=0; y1=y1'; y2=y2'; +filldraw stroke z1'e--z2'e; % left stem +h_stroke(2,a,3,4); % arch and right stem +if serifs: + sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif + numeric inner_jut; + if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif + dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif +% hcross +pickup crisp.nib; pos5(bar,90); pos6(bar,90); +top y5r=top y6r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +x5=hround 1/3u-serif_fit; x6=x4; +filldraw stroke z5e--z6e; % cross bar +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter dje (soft dj - barred h with tail)"; +cyrchar(dje,9.5u#,asc_height#,desc_depth#); +italcorr .7x_height#*slant; %o +adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#); +pickup tiny.nib; pos1(stem,0); pos2(stem,0); pos3(stem,0); +pos1'(stem',0); pos2'(stem',0); +lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; rt x3r=hround(w-u); +top y1=h; bot y2=0; y1=y1'; y2=y2'; +filldraw stroke z1'e--z2'e; % left stem +% h_stroke_part +y3=1/3[bar_height,x_height]; +penpos0(x2r-x2l,0); x0=x2; y0=1/8[bar_height,x_height]; +filldraw stroke z0e--z2e; % thicken the lower left stem +penpos2''(min(rt x2r-lft x2l,thin_join)-fine,180); +pickup fine.nib; rt x2''l=tiny.rt x2r; y2''=y0; +pos4(vair,90); pos3'(x3r-x3l+tiny,0); z3'=z3; +x4=.5[rt x2''l,rt x3'r]; top y4r=x_height+oo; +(x,y4l)=whatever[z4r,z2''l]; x4l:=x; +filldraw stroke z2''e{up}...{right}z4e + & {{interim superness:=hein_super; super_arc.e(4,3')}}; % arch +% h_tail +pos5(stem,0); pos6(max(fine.breadth,.6[thin_join,vair]),-90); +x5=x3; y5=bar_height; lft x6r=rt x2r; %even with right edge of stem; +bot y6r=-d; +filldraw stroke z3'e--z5e & pulled_arc.e(5,6); +if serifs: + sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi % lower left serif +% hcross +pickup crisp.nib; pos7(bar,90); pos8(bar,90); +top y7r=top y8r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +x7=hround 1/3u-serif_fit; x8=hround(w-u); +filldraw stroke z7e--z8e; % cross bar +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Lowercase Cyrillic letter lat_i - Ukrainian i (as latin i)"; +cyrchar(lat_i,5u#,min(asc_height#,10/7x_height#+.5idot_diam#),0);%!!!from ec +italcorr h#*slant-serif_fit# + .5idot_diam# -2u#;%!!!from ec +adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); +pickup tiny.nib; pos1(stem',0); pos2(stem',0); +if odd(w-stem'): change_width; fi +lft x1l=hround(.5w-.5stem'); x1=x2; +top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; +filldraw stroke z1e--z2e; % stem +pos3(idot_diam,0); pos4(idot_diam,90);%!!!from ec +if serifs: + x3r=max(x1r,x1+.5(idot_diam-tiny)-.2jut) +else: x3=x1-.5 fi; +top y4r=h+1; +if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi +x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + sloped_serif.l(1,2,a,1/3,.95jut,serif_drop); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter lat_j (as latin j)"; +cyrchar(lat_j,5.5u#,min(asc_height#,10/7x_height#+.5idot_diam#),desc_depth#);%!!!from ec +italcorr h#*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#+2stem_shift# if monospace:+\\.5u# fi, + serif_fit#-2stem_shift# if monospace:-.5u# fi); +pickup tiny.nib; pos1(stem',0); pos2(stem',0); +rt x1r=hround(.5w+.25u+.5stem'); x1=x2; +top y1=x_height if serifs:+min(oo,serif_drop) fi; bot y2=-1/3d; +filldraw stroke z1e--z2e; % stem +pos3(idot_diam,0); pos4(idot_diam,90);%!!!from ec +x3r=x1r; top y4r=h+1; +if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi +x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot +if serifs: + sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop); % upper serif + pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180); + x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d; + if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi; + (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]); + filldraw stroke z2e{down}...z5e{left}; bulb(5,6,7); % arc and bulb +else: + pickup fine.nib; pos2'(stem',0); z2'=z2; + pos6(.2[vair,stem'],-90); pos7(vair,-90); + lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo); + (x,y7l)=whatever[z7r,z3]; x7l:=x; + z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r; + x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo; + filldraw stroke z2'e..{down}z5e & super_arc.e(5,6) + & z6e{left}..z7e; fi % arc and terminal +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter lje (soft l)"; +cyrchar(lje,10u# % if not serifs:+.5width_adj# fi % dl_width;n_width + ,x_height#,0); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit# if not serifs:+.5(stem#-u#) fi, %dl_adj + 3.75u# if serifs:-.5width_adj# fi);%lsftsn_adj;lsftsnwd-.25u-.5width_adj +% lower_l; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric light_hair,bot_vair,bulb_diam,left_jut; +light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi; +bot_vair=Vround(.5[vair,light_hair]); +bulb_diam=hround 7/8[hair,flare]; +left_jut= + if serifs: max(limit_dist,1.1jut) else: hround (w+serif_fit-rt x2r-.5u) fi; +x3=1/3[w-rt x1r-(1/8left_jut),rt x1r] if not serifs: -.5(stem-u) fi +eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(hair,-180); + top y3=h; y6-.5bulb_diam=.12desc_depth-eps; z6r=z5r; + lft x6r=l+letter_fit+hround(.35u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); + bot y4r=-1.5oo-eps; {{less_tense; bulb(4,5,6)}}; %bulb + filldraw stroke z4e{right} + ..controls (min(15/16[x4,x3],max(x4,lft x6r+1.75bulb_diam))+(x3e-x3),y4e) + and (x3e,max(y4l,min(y6-.5,1/3h+eps))+1/3(y4e-y4))..{up}z3e; % left tail +else: + pos3'(vair,90); pos1'(vair,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; % upper bar + pickup fine.nib; pos3(light_hair,0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=.67[x3l,x5]; + lft x5=l+letter_fit+hround(.35u-.5); bot y4r=bot y5r; y3=y3'; + filldraw stroke z3e{down}..controls (x3e,y5e+.35h) + and (min(7/8[x4e,x3e],x4e+2light_hair)+eps,y4e-eps)..{left}z4e--z5e; fi % left stem +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5jut); + save slab; slab:=vair; % lower.slab + nodish_serif(2,1,a,1/3,jut,b,1/3,.5jut); %!!! %lower right serif + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut); %upper right serif + nodish_serif(3,0,e,1/3,1.05jut,f,1/3,inner_jut); %upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% now the b part +w:=w+3.75u if serifs:-.5width_adj fi;%lsftsnwd-.25u-.5width_adj +% lsftsn_bowl(2); +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Lowercase Cyrillic letter nje (soft n - looks like Hb)"; +cyrchar(nje,10u# if not serifs:+.5width_adj# fi,x_height#,0); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit#,3.75u# if serifs:-.5width_adj# fi);%lsftsn_adj;lsftsnwd-.25u-.5width_adj +% lower_n; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +bar_stroke(x1,x3); % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + nodish_serif(4,3,g,1/3,inner_jut,h,1/3,.5jut); fi %!!! % lower right serif +%%%%% +% now the b part +w:=w+3.75u if serifs:-.5width_adj fi;%lsftsnwd-.25u-.5width_adj +% lsftsn_bowl(4); +_zero:=4; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Lowercase Cyrillic letter lat_s -- dze"; +cyrchar(lat_s,7.1u#,x_height#,0); +italcorr x_height#*slant-if serifs:.55u# else:.3u# fi; +adjust_fit(if monospace: .5u#,.4u# else: 0,if serifs:0 else:-.2u# fi fi); +numeric theta; theta=90-angle(40u,h); slope:=-h/40u; % angle at middle +numeric s_slab; s_slab=if serifs: vair else: Vround .1[vair,stem] fi; +numeric ess'; ess'=max(fine.breadth,ess); +pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-100); +pos0(ess',theta); pos7(s_slab,-90); x2l=x0=x7=.5w; +top y2l=h+vround 1.5oo; bot y7r=-oo; +y0-.5ess'=y7l+if serifs:.54 else: .52 fi\\(y2r-y7l-ess'); +lft x3l=hround .6u; rt x6r=hround(w-.6u); +x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine; +ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; +ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; +interim superness:=more_super; +filldraw stroke super_arc.e(2,3) & z3e{down} + ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke +if serifs: + pos1(hair,180); pos8(hair,180); + rt x1l=hround(w-1.05u); lft x8r=hround .6u; + bot y1=min(bot y2r,vround 1/5[top y5r,h]); + top y8=max(top y7l,vround 5/6 bot y4l); + filldraw stroke z1e{up}....{left}z2e; % upper arc + filldraw stroke z7e{left}....{x8-x7,5(y8-y7)}z8e; % lower arc + path upper_arc, lower_arc; + upper_arc=z1{up}....{left}z2; lower_arc=z7{left}....{x8-x7,5(y8-y7)}z8; + pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0); + x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; + x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8; + numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); + filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb + t:=xpart(lower_arc intersectiontimes(z9r--z8')); + filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb +else: + pos1(4/7[s_slab,flare],-100); pos8(flare,-100); + x1l=good.x(x1l+w-u-rt x1); lft x8r=hround .5u; + top y1l=vround(.93h+1.5oo); bot y8r=vround .1h-oo; + filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal + filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal +penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; + +lhchar "Lowercase Cyrillic letter dzhe (hard dj)"; +cyrchar(dzhe,10u# if not serifs:+.5width_adj# fi,x_height#,sbeak#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_c;tse_part +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,c,1/3,jut,d,1/3,inner_jut); % upper left serif + dish_serif(3,4,g,1/3,inner_jut,h,1/3,jut); % upper right serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=vair; % lower.slab + nodish_serif(2,1,a,1/3,jut,b,1/3,inner_jut); % lower left serif + nodish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); % lower right serif + filldraw z.b0--z.b1--z.e1--z.e0--cycle; % lower inter_serif bar +else: + pos1'(vair,90); pos3'(vair,90); + lft x1'= lft x1l; bot y1'l=0; rt x3'=rt x3r; y3'=y1'; + filldraw stroke z1'e--z3'e; fi % lower bar +% lowercase middle descender +x5=.5[x2,x4]; bot y5=0; x6=x5; bot y6=-d; +if hefty: + pos5(max(tiny.breadth,fudged.stem if hefty:-4stem_corr fi),0); + pos6(max(tiny.breadth,fudged.stem if hefty:-4stem_corr fi),0); + filldraw stroke z5e--z6e; +else: numeric light_hair; + light_hair=min(fudged.stem,fudged.hair if hefty:-4stem_corr fi); + pos5(light_hair+jut,0); pos6(light_hair,0); + filldraw z5l{right}... 1/3[.5[z5l,z6l],(x6l,y5l)]{z6l-z5l}...{down}z6l + --z6r{up}...1/3[.5[z6r,z5r],(x6r,y5r)]{z5r-z6r}...{right}z5r + --cycle; % miggle stem +fi +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter yat"; +cyrchar(yat,9u#,x_height#+acc_height#,0); +italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#); +adjust_fit(if serifs: serif_fit# else: 0 fi,if monospace:.5u# else:0 fi); +full_h:=h; h:=x_height; +% lower_yat; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); +top y1=x_height+ if serifs: 1.5u else: 2u fi; bot y2=0; +filldraw stroke z1e--z2e; % body of stem +if serifs: save slab; slab:=vair; % lower.slab + nodish_serif(2,1,a,1/3,jut,b,1/3,.5jut) ; fi % lower serif +% lsftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +h:=full_h; +y10=h;%y1+2jut; +if hefty: + filldraw z1l--(x1l,y10)--(x1r,y10)--z1r--cycle; % stem +else: x10=x1l-jut; x11=x1r+jut; y10=y11; + filldraw z1l--z10--z1r--cycle; + filldraw z1l--z11--z1r--cycle; fi % swallow +% hcross +pickup crisp.nib; pos8(bar,90); pos9(bar,90); +lft x8=hround1/3u if serifs:-serif_fit fi; x9=x1r+2.5u; +top y8r=top y9r=vround x_height+eps; +filldraw stroke z8e--z9e; % cross bar +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +iff not specific:% +lhchar "Lowercase Cyrillic letter b_yus - big yus (`roman')"; +cyrchar(b_yus,15u#,x_height#,0); +adjust_fit(serif_fit#,serif_fit#); +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal +% lowerr_yus; +% ltop_yus; +set_bar_axis; numeric stem[]; +stem1=fudged.stem-3stem_corr; stem2=min(stem1,fudged.hair); +penpos1(stem1,0); penpos2(stem2,0); penpos3(stem1,0); penpos4(stem2,0); +x1l=w-x2r=hround(.2w-.5tiny-.5)-eps; y1=y2=h; y3=y4=3/5[y1.bh,y2.bh]; +x3l=hround(.5w-.5stem1); x3r=x4r; +z0=whatever[z4l,z2l]=whatever[z1r,z3r]; +if hefty: y0:=y2.bh; + fill z3l--diag_end(3l,1l,1,1,1r,3r){z3r-z1r} + ...{down}(x0-.5,y0)..(x0+.5,y0){up}... + {z2l-z4l}diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; % diagonals +else: fill z3l--diag_end(3l,1l,1,1,1r,3r)--z0-- + diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; fi % diagonals +penpos5(stem1,0); x5=x3; y5=0; +fill z3l--diag_end(3l,5l,1,1,5r,3r)--z3r--cycle; %middle stem +z6=whatever[z4,z2]; z7=whatever[z1,z3]; y6=y7=good.y(y1-vair)-eps; +fill z1--z7--z6--z2--cycle; % upper bar +% lyus_rbowl; + numeric stem[],alpha[],right_jut; + right_jut=if serifs:.6jut else:.4tiny fi; + y10l=y1.bh; y10r=y2.bh; x10l=x10r=x3; y9=y12=min(bot y10l-.5,.85y10l); + rt x8r=w-lft x11l=hround(r-letter_fit-.3u-right_jut); bot y8=bot y11=y5; + stem2=max(tiny.breadth,fudged.stem-3stem_corr); + alpha2=diag_ratio(1,.5(stem2-tiny),h-y8,x8r-x3); + penpos8(alpha2*(stem2-tiny),0); penpos11(alpha2*(stem2-tiny),0); + forsuffixes $=l,r: y8'$=0; y11'$=0; endfor + z8'r=z8r+penoffset (x3,h)-z8 of currentpen+whatever*((x3,h)-z8); + z8'l=z8l+penoffset z8-(x3,h) of currentpen+whatever*((x3,h)-z8); + z11'r=z11r+penoffset (x3,h)-z11 of currentpen+whatever*((x3,h)-z11); + z11'l=z11l+penoffset z11-(x3,h) of currentpen+whatever*((x3,h)-z11); + z8'=.5[z8'l,z8'r]; z11'=.5[z11'l,z11'r]; + z9=z8'+whatever*((x3,h)-z8); z12=z11'+whatever*((x3,h)-z11); + penpos9(stem-2stem_corr,0); penpos12(stem-2stem_corr,0); + fill z10l{right}...{z8'l-z9l}z9l--diag_end(9l,8'l,.5,1,8'r,9r) + --z9r{z9r-z8'r}...{left}z10r--cycle; % right diagonal + fill z10r{left}...{z11'l-z12l}z12l--diag_end(12l,11'l,1,.5,11'r,12r) + --z12r{z12r-z11'r}...{right}z10l--cycle; % left diagonal +%% +if serifs: + numeric inner_jut; prime_points_inside(5,3); + if rt x5r+jut+.5u+1<=lft x8l-jut: inner_jut=jut; + else: rt x5r+jut+.5u+1=lft x8l-inner_jut; fi + slab:=vair; % lower.slab + dish_serif(11,12,a,1/3,right_jut,b,1/2,inner_jut)(dark); % lower diagonal serif + dish_serif(8,9,e,1/2,inner_jut,f,1/3,right_jut)(dark); % lower diagonal serif + dish_serif(5',3,c,1/3,.75jut,d,1/3,.75jut); fi % lower middle serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Lowercase Cyrillic letter izh - izhitsa (looks like V)"; +cyrchar(izh,if serifs: 9.5u# else:9u# fi,x_height#,0); +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit# if monospace:+.5u#fi, + if serifs: max(.75u#,.25u#+.5flare#) else:max(0,.5stem#-.5u#) fi); % lizh_adj +% lower_izh; +numeric left_stem,right_stem,outer_jut,alpha,bulb_diam; +left_stem=stem-stem_corr; bulb_diam=7/8[hair,flare]; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75jut; x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos4'(alpha*right_stem,0); penpos5(vair,90); +x5=if serifs: .5[x4',x6r] else:x6r fi; y5r=h+oo; +x6r=hround(r-.35u); +y6=max(vround(y5r-.25tiny-.5flare), + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); %zh bulb h +z4'=whatever[z3,z4]; y4'=min(y6-.5hair,.9x_height)-eps; +if serifs: penpos6(hair,0); penpos7(flare,0); + cyrbulb(5,6,7); fi % bulb +if y0>cap_notch_cut: y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z4'l...{right} + if serifs: z5r--z5l + else: + (.5[x4,x4r],y5r)--(fine.lft x5r,y5r)..(x5r,fine.bot y5r)-- + (x5l,fine.top y5l)..(fine.lft x5l,y5l) fi + {left}...z4'r{z3-z4} + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: fill z0--z4'l{z4-z3}...{right}z5r--z5l{left}...{z3-z4}z4'r + --diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); + if rt x1'r+jut+.5u+1<=lft x4l-jut+.5tiny: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4l-inner_jut+.5tiny; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); fi % upper left serif +%%%%% +penlabels(0,1,2,3,4,4',5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter g_up - ghe upturn"; +cyrchar(g_up,8u#-.5width_adj#,x_height#+sbeak#,0); +italcorr x_height#*slant-beak_jut#+.25u#; %Gamma->x_height+.5u# +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ 0); +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem); top y1=x_height; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup if serifs: crisp.nib; else: tiny.nib; fi +pos3(vair,90); pos4(hair,0); +top y3r=x_height; x3=x1; rt x4r=hround(w-.45u); +y4=vround(y3r+beak/1.4)+eps; +if serifs: +% armup(3,4,e,beak_darkness,2/3beak_jut);% upper arm and beak + _one:=7; _two:=8; _three:=9; + x[_one]=good.x(x4r-2/3beak_jut); y[_one]=y3l; y[_two]=y3r; + z[_two]=z4l-whatever*(z[_one]-z4r); z[_three]=.5[z3r,z[_two]]; + filldraw z4l{z[_two]-z4l}...beak_darkness[z[_two],.5[z[_three],z4l] ]...z[_three] + ---z3r--z3l--z[_one]--z4r--cycle; % arm and beak +%% + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,.5jut); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,1.25jut); % lower serif +else: + pickup tiny.nib; pos5(vair,90); + rt x5=crisp.rt x4r; y5=y3; + filldraw stroke z3e--z5e; % horisontal + pickup fine.nib; pos6(slab,0); pos6'(slab,0); + rt x6r=crisp.rt x4r; x6'=x6; y6'=y5l; y6=y5l+sbeak; + filldraw stroke z6e--z6'e; fi % vertical +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Lowercase Cyrillic letter ukr_i (latin i with umlaut)"; +cyrchar(ukr_i,5u#,lc_trema_height#,0); +italcorr h#*slant-serif_fit# + .5idot_diam# -2u#; +adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); +h:=x_height; pickup tiny.nib; pos1(stem',0); pos2(stem',0); +if odd(w-stem'): change_width; fi +lft x1l=hround(.5w-.5stem'); x1=x2; +top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); %lower.slab + sloped_serif.l(1,2,a,1/3,.95jut,serif_drop); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif +% the accent +lowercase_umlaut(0,0, 3,4,5,6); +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter ng - ligature enghe"; +cyrchar(ng,10u# if not serifs:+.5width_adj# fi,x_height#,0); +italcorr x_height#*slant-beak_jut#+.25u#; %Gamma->x_height+.5u# +adjust_fit(serif_fit#,2u#-.5width_adj#); % beak_adj +% lower_n; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +bar_stroke(x1,x3); % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + nodish_serif(3,4,e,1/3,inner_jut,f,1/3,.5jut); %!!! % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +%%%%% +% (old) lower right beak(4); +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos7(vair,90); top y7r=h; x7=x4; + pos8(vair,90); y8=y7; rt x8r=hround(r-.45u); + filldraw stroke z7e--z8e; % horisontal + pickup fine.nib; pos9(slab,0); pos10(slab,0); + rt x9r=rt x10r=tiny.rt x8r; y9=y8r; bot y10=y8l-.7sbeak; + filldraw stroke z9e--z10e; %vertical +else: + pickup crisp.nib; + pos7(vair,90); top y7r=h; x7=x4; rt x8r=hround(r-.45u); + pos8(hair,0); y8=good.y(y7l-beak/1.4)-eps; + arm(7,8,i,beak_darkness,.4beak_jut); % upper arm and beak +fi +penlabels(1,2,3,4,5,6, 7,8); endchar; + +lhchar "Lowercase Cyrillic letter otld - o tilded"; +cyrchar(otld,9u#,x_height#,0); +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +% lower_o;tld +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +%%% +% oltilde; +if (serifs=true) and (bar#<=.5curve#): + numeric bar[]; + set_bar_axis; + x5r=x2l; x6r=x4l; + y5r=y6r=y2.bh; y5l=y6l=y1.bh; x5r=x5l; x6l=x6r; + bar2=2/3[bar,fudged.stem]; + penpos7(bar2,45); z7=.5[z5l,z6l]; + fill stroke z6e{-2,-1}..{-2,1}z7e..{-2,-1}z5e; +else: + bar_stroke(x2,x4); +fi +%%%%% +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter u_shrt - short u"; +cyrchar(u_shrt,if serifs:9.5u# else:9u# fi, + x_height#+acc_height#,desc_depth#); % eng +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +full_h:=h; h:=x_height; +% lower_u; +numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut; +left_stem=fudged.stem-stem_corr; right_stem=fudged.hair if hefty:-2stem_corr fi; +bot_stem=fudged.hair if hefty:-8stem_corr fi; +bot_vair=Vround(if serifs: vair else:.5[vair,bot_stem] fi); outer_jut=.75jut; +x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4r=h; y2=y3=0; x2l=x3l; +numeric alpha,alpha[]; x9=3u; y9=bot_vair-d-oo; +alpha1=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-apex_corr); +alpha2=diag_ratio(1,bot_stem,y1-y9,x4r-x9); +if alpha1<alpha2: + x2l-x1l=x4r-x3r+apex_corr; alpha=alpha1; +else: + alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot_stem,0)]; fi +penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0); +alpha3=(y1++(x2l-x1l))/y1; +penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0); +z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r); +if y0>notch_cut: + y0:=notch_cut; + fill z0+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r) + --z3r--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: + fill z0--diag_end(0,4l,1,1,4r,3r)--z3r--z2l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(alpha*bot_stem,0); z5r=whatever[z3r,z4r]; y5-.5vair=-.5d; +if serifs: + numeric light_bulb; light_bulb=hround 7/8[hair,flare]; clearpen; + penpos6(vair,-90); penpos7(hair,-180); penpos8(light_bulb,-180); + x6=2u; y6r=-d-oo; y8-.5light_bulb=-.85d; x8r=hround .35u; + fill stroke z3e---z5e...{left}z6e; bulb(6,7,8); % arc and bulb + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif +else: + penpos6(bot_vair,-90); x6=2.5u; y6r=-d-oo; + fill stroke z3e---z5e...{left}z6e; % arc + pickup fine.nib; pos6'(bot_vair,-90); z6'=z6; + pos7(2/3[bot_vair,flare],-85); + lft x7l=hround u; bot y7r=vround-.96d-oo; y7l:=good.y y7l; + filldraw stroke term.e(6',7,left,1,4); fi % arc and terminal +%%%%% +% the accent +h:=full_h; cbreve(.5[x1,x4],0, 10,11,12,13,14,15,16); +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16); endchar; + +lhchar "Lowercase Cyrillic letter ukr_e - Ukrainian e (C with mid-line)"; +cyrchar(ukr_e,8u#,x_height#,0); % eng +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,.5u# else: -.1u#,0 fi); +% lower_ukre; +set_bar_axis; +pickup fine.nib; pos2(vair',90); pos3(curve,180); pos4(vair',270); +x2=x4=(.5(w+u)); top y2r=vround(h+1.5oo); bot y4r=-oo; +lft x3r=(hround max(.6u,1.35u-.5curve)); y3=.5h; +if serifs: + pos1(hair,0); pos5(hair,360); + y1=min(y2.bh+.75flare-.25vair+eps,.9[bar_height,h]-.75flare); + rt x1r=rt x5r=hround(w-.5u); + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke z1e{x2-x1,5(y2-y1)}...pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal + pos6(.3[fine.breadth,hair],0); x6r=x1r; top y6=h+oo; + x1r-x1'=1.5curve; y1'=y1; + path upper_arc; upper_arc=z1{x2-x1,5(y2-y1)}..z2{left}; + numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); + filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +else: + pos1(4/7[vair',flare],80); pos5(.6[vair',flare],275); + rt x1r=hround(w-.6u); + top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2,1,right,.8,4); % upper terminal + rt x5r=hround(w-.5u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e; + if angle direction 1 of p.e>75: + p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal +%%% +% lukre_bar; +if (serifs=true) and (bar#<=.5curve#): + x7r=x3l; x8r=min(lft x1l-.5hair,0.85[x3l,x1l]); + y7l=y8l=y1.bh; y7r=y8r=y2.bh; x7l=x7r; x8l=x8r; + numeric bar[]; + bar2=7/8[bar,fudged.stem-2stem_corr]; + penpos9(bar2,45); z9=.575[z7l,z8l]; + fill circ_stroke z8e{-2,-1}..{-2,1}z9e..{-2,-1}z7e; % curve /\/ +else: + bar_stroke(x3l,min(lft x1l-.5hair,0.85[x3l,x1l])); % bar -- +fi +%%%%% +penlabels(1,1',2,3,4,5,6,7,8,9); endchar; + +lhchar "Lowercase Cyrillic letter eps - epsilon"; +cyrchar(eps,if serifs:8u# else:7.5u# fi,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +% lower_eps; +numeric right_curve; right_curve=curve-stem_corr; pickup fine.nib; +penpos2(vair,90); penpos3(right_curve-stem_corr,180); +penpos7(right_curve,180); penpos8(vair',-90); +y2r=vround(h+1.5oo); x2=x6l=x6r=x8=.5[w-u,x7]; x7r=hround.6u; +x3r=max(lft x7r+1,hround .8u); y3=.5[y4l,y2l]-eps; y8r=-oo; +set_bar_axis; y4l=y5r=y6r=y2.bh; y6l=y5l=y4r=y1.bh; y5=y6=y0.bh; +pickup fine.nib; z2'=z2; pos2'(vair,90); pos8'(vair',-90); z8'=z8; +if serifs: + pos1(hair,0); pos9(hair,0); pos0(flare,0); + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + rt x1r=hround(w-.6u); bulb(2',1,0); % bulb + rt x9r=hround(w-.5u); y9=max(good.y(.5bar_height-.9),y8l+vair'); + filldraw stroke z8'e{right}..tension.9 and 1..{x9-x8,5(y9-y8)}z9e; % lower bowl +else: + pos1(4/7[vair',flare],80); pos9(.6[vair',flare],275); + rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2',1,right,.8,4); % upper terminal + rt x9r=hround(w-.5u); + y9r=good.y(y9r+1/3bar_height-y9); y9l:=good.y y9l; x9l:=good.x x9l; + forsuffixes e=l,r: path p.e; p.e=z8'e{right}..tension .9 and 1..z9e; + if angle direction 1 of p.e>75: + p.e:=z8'e{right}..tension atleast.9 and 1..{dir 75}z9e; fi endfor + filldraw stroke p.e; fi % arc and lower terminal +rt x5l=rt x5r=max(min(w-2.2u, + lft x1l- if serifs:flare else:.5vair fi)-eps,rt x6l+fine); +y7=.5[y6l,y8l]; x4l=x4r=1/3[x5l,x3l]; +(x,y8l)=whatever[z8r,z9l]; x8l:=min(x,x8l+.5u); +if not serifs: + x4r:=max(x5r,x4r-u); x6r:=max(x5r,x6r-.5u); fi +fill stroke + {{interim superness:=hein_super; super_arc.e(2,3)}} + & pulled_super_arc.e(3,4)(.7superpull); % upper bowl +{{interim superness:=more_super; + fill stroke z5e..super_arc.e(6,7) & super_arc.e(7,8)}}; % lower bowl +fill + z5l{right} + if bot y5r>top y5l:..(rt x5l,top y5l)---(rt x5r,bot y5r).. + else: ... fi + {left}z5r--cycle; % bar +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +% WNCYR shape without serifs +lhchar "Lowercase Cyrillic letter fita (looks like Theta)"; +cyrchar(fita,if serifs: 8u# else: 9u# fi,x_height#,0); +italcorr .7x_height#*slant-.5u#; +adjust_fit(0,0); +numeric light_curve; light_curve=hround(curve-2stem_corr); +penpos1(vair,90); penpos3(vround(vair+.5vair_corr),-90); +penpos2(light_curve,180); penpos4(light_curve,0); +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +% hstroke +bar_stroke(x2,x4); % bar +penlabels(1,2,3,4,5,6); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2comu.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2comu.mf new file mode 100644 index 00000000000..5b03fcbce65 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2comu.mf @@ -0,0 +1,875 @@ +% +% lgt2comu.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Uppercase Cyrillic letters common for couple of encodings +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 & Ko +% +% X2 T2A T2B T2C T2D X2S LH WNCYR +% +% TSHE "42 B "82 - - - - - "06 Tshe +% DJE "43 C "83 - - - - - "07 Dje +% LAT_I "49 I - - - "89 - "f6 "04 Latin letter I +% LAT_J "4a J - - - - - - "4a Je - Latin letter J +% LJE "4b K !"87 "88 - - - - "01 Lje +% NJE "4d M !"9b "99 - - - - "00 Nje +% LAT_S "53 S "8f - - "8f - - "16 Dze - Latin letter S; ZELO +% DZHE "55 U "96 - "96 - - - "02 Dzhe +% YAT "58 X - - - "93 - - "23 Yat +% B_YUS "59 Y - - - "97 - - - Big Yus +% IZH "5a Z - - - "8a - - "14 Izhitsa +% G_up "80 "80 - - - - "f2 - Ghe upturn +% UKR_I "88 "88 - - - - "f8 - Ukrainian i +% NG "8e "8e "8e - - "xx - - Ligature en-ghe; OLD SOFT N +% OTLD "90 "90 "90 "90 - "xx - - O tilded & Variant Old Cyrillic Fita +% U_shrt "92 "92 "92 - - - "fa - Short U +% UKR_E "99 "99 - - "99 "xx "f4 - Ukrainian e; EST +% EPS "9b - - "9b - "9b - - - Epsilon; Narrow E +% FITA - - - - - "90 - - "15 Old Slav Fita +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Uppercase Cyrillic letter TSHE (Soft T - like Th)"; +cyrchar(TSHE,13u#,cap_height#,0); +if is_small_cap: getcharcode(tshe); fi +italcorr cap_height#*slant-beak_jut#-u#; %Gamma-.75u# +adjust_fit(0,.75u#); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem-u)-eps; top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-1.65u); y4=good.y(y3l-.7beak)-eps; +arm(3,4,e,beak_darkness,.7beak_jut); % right arm and beak +pos5(hair,180); x5=w-x4-u; y5=good.y(y3l-beak)-eps; +arm(3,5,f,beak_darkness,-beak_jut); % left arm and beak +% h_part; +pickup tiny.nib; pos6(stem,0); x6=hround(w-2.5u+.5stem); +h_stroke(2,q,6,7); +dish_serif(7,6,g,1/3,.75cap_jut,h,1/3,.75cap_jut); +if serifs: + dish_serif(2,1,c,1/3,cap_jut,d,1/3,.75cap_jut); % lower serif + nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); fi % upper bracketing +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter DJE (Soft DJ - Th with a tail)"; +cyrchar(DJE,13u#-width_adj#,cap_height#,0); +if is_small_cap: getcharcode(dje); fi +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(0,2.5u#); +if odd(cap_stem-w): change_width; fi % symmetric +% upper_dje; +full_h:=h; h:=x_height; +% h_stroke_part+bulb +pickup tiny.nib; lft x1l=lft x2l=hround(.5w-.5cap_stem)-eps; +bot y2=0; pos2(cap_stem,0); +% upperh_stroke +penpos2''(min(rt x2r-lft x2l,thin_join)-fine,180); +pickup fine.nib; pos3(curve,0); pos4(vair,90); +y3=1/3[bar_height,x_height]; +if serifs: + x3=r-letter_fit-hround max(1.5u,2.5u-.5curve)+eps; %.5u right + else: rt x3r=r-letter_fit-hround.65u+eps; fi +rt x2''l=tiny.rt x2r; y2''=1/8[bar_height,x_height]; +x4=.5[rt x2''l,rt x3r]; top y4r=x_height+o; +(x,y4l)=whatever[z4r,z2''l]; x4l:=x; +filldraw stroke z2''e{up}...{right}z4e + & {{interim superness:=hein_super; super_arc.e(4,3)}}; % arch +%%%%% +% tail +pos5(curve,0); pos6(vair,-90); +x5=x3; y5=2/3[bot y6r,y3]; bot y6r=-o; +if serifs: + numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); + pos7(hair,-180); pos7'(bulb_diam,-180); + lft x7r=min(rt x2r+1.5u,lft x3r-bulb_diam-eps); + x6=max(lft x7r+.5bulb_diam,.4[lft x7r,rt x5r]); + y7=1/6cap_height-max(0,flare-stem-2vair_corr-.5); z7r=z7'r; + cyrbulb(6,7,7'); % bulb +else: + pos7(flare,-105); + x6=.4[lft x7r,rt x5r]; + lft x7r=rt x2r+1.25u+eps; bot y7r=0; + filldraw stroke term.e(6,7,left,.8,4); fi +filldraw stroke z3e--z5e{down}...pulled_arc.e(5,6); +% T part +h:=full_h; pickup tiny.nib; pos1(cap_stem,0); top y1=h; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos8(slab,90); pos9(hair,0); +top y8r=h; x8=x1; rt x9r=hround(w-.65u); y9=good.y(y8l-.7beak)-eps; +arm(8,9,e,beak_darkness,.7beak_jut); % right arm and beak +pos10(hair,180); x10=w-x9; y10=good.y(y8l-beak)-eps; +arm(8,10,f,beak_darkness,-beak_jut); % left arm and beak +if serifs: + dish_serif(2,1,c,1/3,1.414cap_jut,d,1/3,.5cap_jut); % lower serif + nodish_serif(1,2,aa,1/3,.5cap_jut,b,1/3,.5cap_jut); fi % upper bracketing +penlabels(1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter LAT_I - Latin I (as latin I)"; +cyrchar(LAT_I,max(6u#,4u#+cap_stem#),cap_height#,0); +if is_small_cap: getcharcode(lat_i); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_ukri; - borrowed from ec +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs or monospace: + dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif +if slitex: + pickup crisp.nib; % arms based on proportions of uppercase E + pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90); + x3=x4=x1; top y3r=h; bot y4r=0; + pos5(hair,0); pos6(hair,0); % top and bottom right arms + rt x5r=rt x6r=hround(w-u); + pos7(hair,180); pos8(hair,180); % top and bottom left arms + lft x7r=lft x8r=hround(u); + y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif! + y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy + arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms + arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right +fi +%%%%% +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter LAT_J (as Latin J)"; +cyrchar(LAT_J,9u#,cap_height#,0); +if is_small_cap: getcharcode(lat_j); fi +italcorr cap_height#*slant-cap_serif_fit# + +.75cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(0,cap_serif_fit#); +pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); +top y1=h; rt x1r=hround(w-2u); x2=x1; y2=.21h; +if serifs: pos3(vair,-90); pos4(cap_hair,-180); + pos5(flare+(cap_stem-stem),-180); + bot y3r=-o; x3=.5[x4,x2]; y5=1/6h; rt x5l=hround 2.75u; z5r=z4r; + filldraw stroke z1e--z2e & super_arc.e(2,3); % stem and arc + dish_serif(1,2,a,1/3,1.3cap_jut,b,1/3,.75cap_jut); % serif + bulb(3,4,5); % bulb +else: filldraw stroke z1e--z2e; % stem + pickup fine.nib; pos3(cap_stem',0); z3=z2; + pos4(flare,angle(6.5u,-h)); pos5(1.1flare,-100); + bot y4r=-o; x4r=.5[x5r,x3r]; lft x5r=hround.75u; bot y5r=vround.06h-o; + filldraw stroke z3e{down}....term.e(4,5,left,1,4); fi % arc and terminal +penlabels(1,2,3,4,5); endchar; + +lhchar "Uppercase Cyrillic letter UKR_I (latin I with umlaut)"; +cyrchar(UKR_I,max(6u#,4u#+cap_stem#),cap_height#+acc_height#,0); +if is_small_cap: getcharcode(ukr_i); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); h:=cap_height; +% upper_ukri; - borrowed from ec +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs or monospace: + dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif +if slitex: + pickup crisp.nib; % arms based on proportions of uppercase E + pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90); + x3=x4=x1; top y3r=h; bot y4r=0; + pos5(hair,0); pos6(hair,0); % top and bottom right arms + rt x5r=rt x6r=hround(w-u); + pos7(hair,180); pos8(hair,180); % top and bottom left arms + lft x7r=lft x8r=hround(u); + y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif! + y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy + arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms + arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right +fi +%%%%% +% the accent +uppercase_umlaut(0,0, 9,10,11,12); +penlabels(1,2,3,4,5,6,7,8, 9,10,11,12); endchar; + +lhchar "Uppercase Cyrillic letter LJE (Soft L)"; +cyrchar(LJE,13.5u#,cap_height#,0); % DL_width:N_width +if is_small_cap: getcharcode(lje); fi; +italcorr .52*.7cap_height#*slant-.5u#; % D*.52h +adjust_fit(cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi, %DL_adj + 5.75u#-.5width_adj#);% usftsn_adj;usftsnwd-.25u-.5width_adj +% upper_l; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); +numeric light_hair,bot_vair,left_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +left_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit-rt x2r-.65u) fi; +bot_vair=Vround(.5[vair,light_hair]); +x3=1/3[w-rt x1r-(1/6left_jut),rt x1r] if not serifs:-.5(cap_stem-u) fi+eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(cap_hair,-180); + top y3=h; y6=1/6h-max(0,flare-stem-2vair_corr-.5); z6r=z5r; + lft x6r=l+letter_fit+hround(.5u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); bot y4r=-o; + filldraw stroke z4e{right}.. + controls (min(15/16[x4,x3],max(x4,lft x6r+2flare))+(x3e-x3)+eps,y4e) + and (x3e,good.y(min(y6-.5,1/3h)+1/3(y4e-y4))-eps)..z3e; % left tail + {{less_tense; bulb(4,5,6)}}; +else: + pos3'(slab,90); pos1'(slab,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; + pickup fine.nib; pos3(max(fine.breadth,light_hair),0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=2/3[x3l,x5r]; lft x5=l+letter_fit+hround(.35u-.5); + bot y4r=bot y5r; y3=y3'; x4l:=.25[x4,x5]; + path p; + p=stroke z3{down} + ..controls (x3,y5+.35h-eps) and (min(7/8[x4,x3],x5+2.5light_hair+.5u),y4) + ..{left}z4--z5; + z6=point .35 of p; + pos6(max(fine.breadth,7/8[bot_vair,light_hair]),angle(direction .35 of p)+90); + filldraw stroke z3e{down}...z6e{direction .35 of p}...{left}z4e--z5e; fi % arc +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5cap_jut); + nodish_serif(2,1,a,1/3,cap_jut,b,1/3,.5cap_jut); %!!! % lower right serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); %upper right serif + nodish_serif(3,0,e,1/3,1.05cap_jut,f,1/3,inner_jut); %upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% now the b part +w:=w+5.75u-.5width_adj;%usftsnwd-.5u-.5width_adj +% usftsn_bowl(2); +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Uppercase Cyrillic letter NJE (Soft N - looks like Hb)"; +cyrchar(NJE,13.5u#,cap_height#,0); +if is_small_cap: getcharcode(nje); fi; +italcorr .52*.7cap_height#*slant-.5u#; % D*.52h +adjust_fit(cap_serif_fit#,5.75u#-.5width_adj#);% usftsn_adj;usftsnwd-.25u-.5width_adj +% upper_n; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(cap_bar,90); penpos6(cap_bar,90); +x5=x1; x6=x3; y5=y6=.52h; +fill stroke z5e--z6e; % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + nodish_serif(4,3,g,1/3,inner_jut,h,1/3,.5cap_jut); fi %!!!% lower right serif +%%%%% +% now the b part +w:=w+5.75u-.5width_adj;%usftsnwd-.25u-.5width_adj +% usftsn_bowl(4); +_zero:=4; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Uppercase Cyrillic letter LAT_S - DZE"; +cyrchar(LAT_S,10u#,cap_height#,0); +if is_small_cap: getcharcode(lat_s); fi +italcorr cap_height#*slant-u#; +adjust_fit(0,0); +numeric theta; theta=90-angle(50u,h); slope:=-h/50u; % angle at middle +numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; +numeric ess'; ess'=max(fine.breadth,cap_ess); +pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90); +pos0(ess',theta); pos7(s_slab,-90); +x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o; +y0=.52h; lft x3l=hround u; rt x6r=hround(w-u); +x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine; +ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; +ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; +filldraw stroke super_arc.e(2,3) & z3e{down} + ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke +if serifs: + pos1(hair,180); pos8(hair,180); + rt x1l=hround(w-1.5u); lft x8r=hround u; + bot y1=vround 2/3h+1; top y8=vround 1/3h-1; + %bot y1=good.y(vround 2/3h+1-eps); top y8=vround 1/3h-1; + filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e; % upper arc + filldraw stroke z7e{left}....{up}z8e; % lower arc + path upper_arc, lower_arc; + upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2; + lower_arc=z7{left}....{up}z8; + pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0); + x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; + x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8; + numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); + filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb + t:=xpart(lower_arc intersectiontimes(z9r--z8')); + filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb +else: + pos1(1.2flare,-100); pos8(1.2flare,-100); + x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u; + top y1l=vround .93h+o; bot y8r=vround .1h-o; + filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal + filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal +penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; + +lhchar "Uppercase Cyrillic letter DZHE (Hard DJ)"; +cyrchar(DZHE,13.5u#,cap_height#,cap_sbeak#); % N_width;TSE +if is_small_cap: getcharcode(dzhe); fi; +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_c;Tse_part; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric inner_jut,arm_thickness; +arm_thickness=vround(slab+vair_corr); +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,c,1/3,cap_jut,d,1/3,inner_jut); % upper left serif + dish_serif(3,4,g,1/3,inner_jut,h,1/3,cap_jut); % upper right serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + save slab; slab:=arm_thickness; % bottom.bar.slab + nodish_serif(2,1,a,1/3,cap_jut,b,1/3,inner_jut); % lower left serif + nodish_serif(4,3,e,1/3,inner_jut,f,1/3,cap_jut); % lower right serif + filldraw z.b0--z.b1--z.e1--z.e0--cycle; % lower inter_serif bar +else: + save slab; slab:=arm_thickness; % bottom.bar.slab + lft x1'= lft x1l; bot y1'l=0; pos1'(slab,90); + rt x3'=rt x3r; y3'=y1'; pos3'(slab,90); + filldraw stroke z1'e--z3'e; fi % lower bar +% uppercase middle descender +x5=.5[x2,x4]; bot y5=0; x6=x5; bot y6=-d; +if hefty: + pos5(max(tiny.breadth,fudged.cap_stem if hefty:-4stem_corr fi),0); + pos6(max(tiny.breadth,fudged.cap_stem if hefty:-4stem_corr fi),0); + filldraw stroke z5e--z6e; +else: + numeric light_hair; + light_hair=min(fudged.stem,fudged.hair if hefty:-4stem_corr fi); + pos5(light_hair+cap_jut,0); pos6(light_hair,0); + filldraw z5l{right}... 1/3[.5[z5l,z6l],(x6l,y5l)]{z6l-z5l}...{down}z6l + --z6r{up}...1/3[.5[z6r,z5r],(x6r,y5r)]{z5r-z6r}...{right}z5r + --cycle; % miggle stem +fi +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter YAT"; +cyrchar(YAT,12.5u#,body_height#,0); +if is_small_cap: getcharcode(yat); fi +italcorr .75cap_height#*slant-.5u#; +adjust_fit(2u#+cap_serif_fit#,0); +% upper_yat; +numeric left_stem,right_curve,middle_weight; +left_stem=cap_stem-hround 2stem_corr; middle_weight=.5[vair,cap_band]; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +full_h:=h; h:=cap_height; +% usftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +h:=full_h; +% yat beaks +pickup crisp.nib; pos8(slab,90); pos9(hair,0); +top y8r=vround .85h; x8=x1; rt x9r=hround(w-2.65u); y9=good.y(y8l-2/3beak)-eps; +arm(8,9,m,beak_darkness,2/3beak_jut); % right arm and beak +pos10(hair,180); x10=w-x9-4u; y10=y9; +arm(8,10,p,beak_darkness,-2/3beak_jut); % left arm and beak +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10); endchar; + +iff not specific:% +lhchar "Uppercase Cyrillic letter B_YUS - BIG YUS (`roman')"; +cyrchar(B_YUS,18u#,cap_height#,0); +if is_small_cap: getcharcode(b_yus); fi +adjust_fit(cap_serif_fit#,cap_serif_fit#); +if odd(fudged.cap_stem-w): change_width; fi % symmetric & all three equal +% upperr_yus; +% top_Yus; +numeric stem[]; +stem1=fudged.cap_stem if hefty:-3stem_corr fi; +stem2=min(stem1,cap_hair if hefty:-2stem_corr fi); +penpos1(stem1,0); penpos2(stem2,0); penpos3(stem1,0); penpos4(stem2,0); +x1l=w-x2r=.2w; y1=h; y2=y1; y3=y4=.52h; +x3l=hround(.5w-.5stem1); x3r=x4r; +z0'=whatever[z4l,z2l]=whatever[z1r,z3r]; +if hefty: + numeric lower_notch; lower_notch=y3+cap_notch_cut; + fill z3l--diag_end(3l,1l,1,1,1r,3r){z3r-z1r} + if y0'<=lower_notch: ..{z3r-z1r}z0'{z2l-z4l}.. + else: ...{down}(x0'+.5,lower_notch)--(x0'-.5,lower_notch){up}... fi + {z2l-z4l}diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; %v +else: + fill z3l--diag_end(3l,1l,1,1,1r,3r)--z0'-- + diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; fi %v +penpos5(stem1,0); x5=x3; y5=0; +fill z3l--diag_end(3l,5l,1,1,5r,3r)--z3r--cycle; %middle stem +z6=whatever[z4,z2]; z7=whatever[z1,z3]; y6=y7=good.y(y1-slab)-eps; +fill z1--z7--z6--z2--cycle; % upper bar +% Yus_rbowl; +pickup tiny.nib; numeric stem[],alpha[],right_jut,middle_weight; +right_jut=.6cap_jut; middle_weight=cap_bar; +penpos10(middle_weight,90); +y10r=y3+.5min(cap_bar,cap_notch_cut); x10=x3; y9=y12=.8y10; +rt x8r=w-lft x11l=hround(r-letter_fit-.3u-right_jut); bot y8=bot y11=y5; +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +alpha2=diag_ratio(1,.5(stem2-tiny),h-y8,x8r-x3); +penpos8(alpha2*(stem2-tiny),0); penpos11(alpha2*(stem2-tiny),0); +forsuffixes $=l,r: y8'$=0; y11'$=0; endfor +z8'r=z8r+penoffset (x3,h)-z8 of currentpen+whatever*((x3,h)-z8); +z8'l=z8l+penoffset z8-(x3,h) of currentpen+whatever*((x3,h)-z8); +z11'r=z11r+penoffset (x3,h)-z11 of currentpen+whatever*((x3,h)-z11); +z11'l=z11l+penoffset z11-(x3,h) of currentpen+whatever*((x3,h)-z11); +z8'=.5[z8'l,z8'r]; z11'=.5[z11'l,z11'r]; +z9=z8'+whatever*((x3,h)-z8); z12=z11'+whatever*((x3,h)-z11); +penpos9(cap_stem-2stem_corr,0); penpos12(cap_stem-2stem_corr,0); +fill z10l{right}...{z8'l-z9l}z9l--diag_end(9l,8'l,.5,1,8'r,9r) + --z9r{z9r-z8'r}...{left}z10r--cycle; % right diagonal + fill z10r{left}...{z11'l-z12l}z12l--diag_end(12l,11'l,1,.5,11'r,12r) + --z12r{z12r-z11'r}...{right}z10l--cycle; % left diagonal +if serifs: + numeric inner_jut; prime_points_inside(5,3); + if rt x5r+cap_jut+.5u+1<=lft x8l-cap_jut: inner_jut=cap_jut; + else: rt x5r+cap_jut+.5u+1=lft x8l-inner_jut; fi + dish_serif(11,12,a,1/3,right_jut,b,1/2,inner_jut)(dark); % lower diagonal serif + dish_serif(8,9,e,1/2,inner_jut,f,1/3,right_jut)(dark); % lower diagonal serif + dish_serif(5',3,c,1/3,.75jut,d,1/3,.75jut); fi % middle serif +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar; + +lhchar "Uppercase Cyrillic letter IZH - IZHITSA (looks like V)"; +cyrchar(IZH,13u#,cap_height#,0); +if is_small_cap: getcharcode(izh); fi +italcorr cap_height#*slant+.25u#; +adjust_fit(cap_serif_fit#, + if serifs: min(1.5u#,.5u#+(flare#+(cap_stem#-stem#))) %ccL_adj + else:.5u#fi); +% upper_izh; +numeric left_stem,right_stem,outer_jut,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +x6=if serifs:.5[x5,x7r] else: x7r fi; +penpos6(vair,90); y6r=h if serifs:+o fi; +penpos5(alpha*right_stem,0); +y5=min(.9cap_height,bot y6l-.5vair); z5=whatever[z3,z4]; +x7r=hround(r-.5u); penpos7(hair,0); +y7=h-vround max(.05fig_height+.5flare,.1fig_height-.5flare)+o; z8r=z7r; +penpos8(flare,0); if serifs: cyrbulb(6,7,8); fi +if y0>cap_notch_cut: + y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z5l...{right} + if serifs: z6r--z6l + else: + (.5[x4,x4r],y6r)--(fine.lft x6r,y6r)..(x6r,fine.bot y6r)-- + (x6l,fine.top y6l)..(fine.lft x6l,y6l) fi + {left} + ....z5r{z3-z4}--diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: + fill z0--z5l{z4-z3}...{right}z6r--z6l{left}...{z3-z4}z5r + --diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +if serifs: + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); + if rt x1'r+cap_jut+.5u+1<=x4l-cap_jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=x4l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); fi % left serif +%%%%% +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter G_up - GHE upturn"; +cyrchar(G_up,if monospace: 9 else: 11.25 fi u#-width_adj#, + cap_height#+cap_sbeak#,0); +if is_small_cap: getcharcode(g_up); fi +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(cap_serif_fit#,0); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=cap_height; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup if serifs: crisp.nib; else: tiny.nib; fi +pos3(slab,90); pos4(hair,0); +top y3r=cap_height; x3=x1; rt x4r=hround(w-.75u); +y4=good.y(y3r+cap_sbeak)+eps; +if serifs: +% armup(3,4,e,beak_darkness,beak_jut); % upper arm and beak + _one:=7; _two:=8; _three:=9; + x[_one]=good.x(x4r-beak_jut); y[_one]=y3l; y[_two]=y3r; + z[_two]=z4l-whatever*(z[_one]-z4r); z[_three]=.5[z3r,z[_two]]; + filldraw z4l{z[_two]-z4l}...beak_darkness[z[_two] + ,.5[z[_three],z4l] ]...z[_three] + ---z3r--z3l--z[_one]--z4r--cycle; % arm and beak +%% + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper bracketing + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); % lower serif +else: + rt x5=crisp.rt x4r; y5=y3; pos5(slab,90); + filldraw stroke z3e--z5e; + pickup fine.nib; rt x6r=crisp.rt x4r; x6'=x6; + y6'=y5l; y6=y5r+cap_sbeak; + numeric light_stem; + light_stem=max(fine.breadth,fudged.hair if hefty:-4stem_corr fi); + pos6(light_stem,0); pos6'(light_stem,0); + filldraw stroke z6e--z6'e; fi +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter NG - ligature ENGHE"; +cyrchar(NG,13.5u#,cap_height#,0); +if is_small_cap: getcharcode(ng); fi; +italcorr cap_height#*slant-beak_jut#; %Gamma+.25u +adjust_fit(cap_serif_fit#,min(4.5u#-.5stem#,3.5u#)-.5width_adj#); % Beak_adj +% upper_n; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(cap_bar,90); penpos6(cap_bar,90); +x5=x1; x6=x3; y5=y6=.52h; +fill stroke z5e--z6e; % bar +%%% +if serifs: numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + nodish_serif(3,4,e,1/3,inner_jut,f,1/3,.5cap_jut); %!!!% upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +% (old) upper right beak(4) +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos7(slab,90); top y7r=h; x7=x4; + pos8(slab,90); y8=y7; rt x8r=hround(r-.65u); + filldraw stroke z7e--z8e; % horisontal + pickup fine.nib; pos9(.3[slab,cap_stem],0); pos10(.3[slab,cap_stem],0); + rt x9r=rt x10r=tiny.rt x8r; y9=y8r; bot y10=y8l-sbeak; + filldraw stroke z9e--z10e; % vertical +else: + pickup crisp.nib; + pos7(slab,90); top y7r=h; x7=x4; rt x8r=hround(r-.65u); + pos8(hair,0); y8=good.y(y7l-beak)-eps; + arm(7,8,i,beak_darkness,.7beak_jut); % upper arm and beak +fi +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter OTLD - O tilded"; +cyrchar(OTLD,14u#-width_adj#,cap_height#,0); +if is_small_cap: getcharcode(otld); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +% upper_o;tld +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: + x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: + x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +%%%%% +% uotilde; +z5=z2l; z6=z4l; penpos5(cap_bar,90); penpos6(cap_bar,90); +if (serifs) and (bar#<=.5curve#): + numeric bar[]; + bar2=2/3[cap_bar,fudged.cap_stem]; penpos7(bar2,45); z7=.5[z5,z6]; + fill stroke z5e{2,1}..{2,-1}z7e..{2,1}z6e; +else: + fill stroke z5e--z6e; fi +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter U_shrt - SHORT U"; +cyrchar(U_shrt,13u#,cap_height#+acc_height#,0); +if is_small_cap: getcharcode(u_shrt); fi +italcorr x_height#*slant+.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); full_h:=h; h:=cap_height; +% upper_u; +numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +bot_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +bot_vair=Vround(if serifs:.5[vair',bot_stem] else:slab fi); +outer_jut=.7cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; % W jut +y1=y4r=h; x2l=x3l; +if monospace: y2=y3=.3h; else: y2=y3=max(if not serifs:1.095 fi stem,1/6h); fi +numeric alpha; x9=.5w-1/2(.5[bot_stem,right_stem]); y9=-o; +alpha=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-2apex_corr); +numeric u_ratio; u_ratio=(y3-y9)/(y1-y9); +x2l-x1l=x4r-x3r+ + if monospace: 2apex_corr else: if serifs: 2 fi (u_ratio*.5[x1l,x4r]) fi; +penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0); +numeric alpha[]; alpha3=(y1++(x2l-x1l))/y1; +penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0); +z0l=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r); penpos0(alpha*bot_stem,0); +z0'=whatever[rt z3r,rt z4r]; y0'=bot y6r=if serifs:-o else: 0 fi; +penpos6(bot_vair,-90); x6r=if serifs:.6 else:.5 fi[x3r,x1]; +numeric t; t=if monospace: 1.25right_stem else: (x3r-x0')++(y3r-y0') fi; +penpos5(bot_vair,.5[angle(z4r-z6r),angle(z4r-z3r)]-90); +path p; numeric tau; p=z0r{z3r-z4r}....{left}z6r; +z5r=p intersectionpoint ((0,y2l-.5bot_vair)--(w,y2l-.5bot_vair)); +tau=xpart(p intersectiontimes (z2l--z2r)); +if y0>notch_cut+y2: + y0l:=notch_cut+y2; % +y2 added for sanserif face + fill z0l+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r) + --subpath(0,tau) of p--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0l+.5left--cycle; % left and right diagonals +else: + fill z0l--diag_end(0,4l,1,1,4r,3r)--subpath(0,tau) of p + --z2l--diag_end(2l,1l,1,1,1r,0)--cycle; % left and right diagonals +fi +fill p--z6l{right}...{-direction tau of p} + if x5l>x2l: z2l else: z5l fi..{z4r-z3r}z0l--cycle; +pickup fine.nib; +if serifs: + numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); + pos6'(bot_vair,-90); z6'=z6; pos7(hair,-180); pos8(bulb_diam,-180); + y8=1/6h; z7r=z8r; lft x8r=x1; + cyrbulb(6',7,8); % arc and bulb + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % right serif +else: + top z6'l=z6l; bot z6'r=z6r; + pos7(bot_vair,-90); lft x7l=max(3.5u,rt x6r-t); bot y7r=bot y6'r; + filldraw stroke z6'e--z7e; fi % arc +%%%%% +% the accent +h:=full_h; +cbreve(.5[rt x1r,lft x4l],0, 10,11,12,13,14,15,16)(cyrcaph); %0,0 +penlabels(0,0',1,2,3,4,5,6,6',7,8,9, 10,11,12,13,14,15,16); endchar; + +iff serifs:% +lhchar "Uppercase Cyrillic letter UKR_E - Ukrainian E (C with mid-line)"; +cyrchar(UKR_E,13u#,cap_height#,0); +if is_small_cap: getcharcode(ukr_e); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% upper_ukre; +pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); +pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); +rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1]; +top y2r=h+o; bot y4r=-o; y3=.5h-vair_corr; y3l:=.52h; +bot y1=min(vround.675h,bot y2l-eps); +y5=max(good.y .95(h-y1),y4l+eps); +(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); +(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); +filldraw stroke z1e{x2-x1,10(y2-y1)}...pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull)...{up}z5e; % arc +pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; +x1r-x1'=2cap_curve-fine; y1'=y1; +path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; +numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); +filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +% upukre_bar; +numeric bar[]; y7=y8=y3; +x7=x3l; x8=(min(lft x1l-.5hair,0.85[x3l,x1l])); +if (serifs=true) and (bar#<=.5curve#): + penpos7(cap_bar,90); penpos8(cap_bar,90); + bar2=7/8[cap_bar,fudged.cap_stem-3stem_corr]; + penpos9(bar2,45); z9=.575[z7l,z8l]; + fill circ_stroke z8e{-2,-1}..{-2,1}z9e..{-2,-1}z7e; % curve /\/ +else: + pickup fine.nib; pos7(cap_bar,90); pos8(cap_bar,90); + filldraw stroke z7e--z8e; fi % bar -- +%%%%% +penlabels(1,1',2,3,4,5,6); endchar; + +iff not serifs:% +lhchar "Uppercase Cyrillic letter UKR_E - Ukrainian E (C with mid-line)"; +cyrchar(UKR_E,11.5u#,cap_height#,0); +if is_small_cap: getcharcode(ukr_e); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% uppers_ukre; +pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); +pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); +rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; +lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); +top y1r=vround.95h+o; top y2r=h+o; y3=.5h; +bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; +filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,.8,4); +% uukres_bar; +numeric bar[]; y6=y7=y3; x6=x3l; x7=(min(lft x1l-.5hair,0.85[x3l,x1l])); +pickup fine.nib; +bar1=if is_small_cap:max(fine.breadth+eps,.6[thin_join,vair]) else: cap_bar fi; +pos6(bar1,90); pos7(bar1,90); +filldraw stroke z6e--z7e; % bar -- +%%%%% +penlabels(1,1',2,3,4,5,6); endchar; + +%WNCYR shape +lhchar "Uppercase Cyrillic letter FITA (looks like Theta)"; +cyrchar(FITA,14u#,cap_height#,0); +if is_small_cap: getcharcode(fita); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +numeric light_curve; light_curve=hround(cap_curve-2stem_corr); +penpos1(vair,90); penpos3(vround(vair+.5vair_corr),-90); +penpos2(light_curve,180); penpos4(light_curve,0); +if monospace: x2r=hround min(3u,.5u+1.5hair+eps); + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: x2r=hround 2.5u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +% fita_bar; +pickup crisp.nib; pos5(cap_vstem,90); pos6(cap_vstem,90); +lft x5=w-rt x6=hround.5u; y5=y6=.5[y1l,y3l]; +filldraw stroke z5e--z6e; % bar +% bar serifs; +if serifs: pos7(hair,0); pos8(hair,0); pos9(hair,0); pos10(hair,0); + x7l=x8l=x5; x9r=x10r=x6; + y7=y5r; y9=y6r; y5l-y8=y6l-y10=vround .075h; + filldraw stroke z7e--z8e; % left serif + filldraw stroke z9e--z10e; fi % right serif +penlabels(1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter EPS - EPSILON"; +cyrchar(EPS,if serifs: 11u# else: 10u# fi,cap_height#,0); +if is_small_cap: getcharcode(eps); fi +italcorr .75cap_height#*slant-.5u#; %B +adjust_fit(if monospace:.35u#,.25u# else: 0,0 fi); +% upper_eps; +pickup fine.nib; pos2(slab,90); top y2r=h+o; +numeric right_curve,middle_weight; +right_curve=max(currentbreadth+eps,cap_curve-3stem_corr); +middle_weight=max(fine.breadth+eps,.6vair+.5); +pos4(middle_weight,-90); pos5(middle_weight,-90); +pos6(middle_weight,90); pos5'(middle_weight,90); +pos7(right_curve,180); +x2-.5u=x6=x8=.5[w-1.5u,x7]; lft x7r=hround.75u; +pos3(max(currentbreadth+eps,right_curve-stem_corr),180); lft x3r=hround 1.25u; +pos8(slab,270); bot y8r=-o; y7=.5[y6l,y8l]; +y3=.5[y4l,y2l]; x4=1/3[x5,x3l]; y4=y5; y5'=y6; +top y5l-bot y5'l=vair; .5[y5l,y5'l]=.52h; +rt x5=rt x5'=max(hround (w-3.5u),rt x6)+eps; +if serifs: + pos1(cap_hair,0); pos9(hair,360); + lft x1r=w-hround u; lft x9r=w-hround.9u; + y1=good.y(max(.52[y5l,y2l],top y5l+.5flare+.5)-eps); + y9=max(.52[top y8l,bot y5'l],y7+1); + pos0(flare,0); z0r=z1r; bulb(2,1,0); % bulb + filldraw stroke z8e{right}...{up}z9e; % arc +else: + pickup fine.nib; pos1(1.2flare,80); pos9(flare,275); + rt x1r=hround(w-1.1u); rt x9r=hround(w-.9u); + top y1r=vround .95h+o; bot y9r=vround .08h-o; y9l:=good.y y9l; x9l:=good.x x9l; + filldraw stroke rterm.e(2,1,right,.9,4); % upper arc + filldraw stroke term.e(8,9,right,.8,4); fi % arc and terminals +if not serifs: interim superness:=more_super; fi +filldraw stroke + z5e..super_arc.e(4,3) & + {{if not serifs:interim superness:=hein_super; fi + super_arc.e(3,2)}}; % upper bowl +filldraw stroke super_arc.e(8,7) & super_arc.e(7,6)..z5'e; % lower bowl +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2loi.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2loi.mf new file mode 100644 index 00000000000..6a3c662c4ca --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2loi.mf @@ -0,0 +1,932 @@ +% +% lgt2loi.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Italic Cyrillic letters 0--127 for T2 encoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 +% +% X2 T2A T2B T2C +% +% ae "61 a "ac - - Ligature AE +% tshe "62 b "a2 - - Tshe +% dje "63 c "a3 - - Dje +% abh_ch "64 d - - "b1 Abkhasian che (same as lower e with hook) +% abh_ch_dsc "65 e - - "b2 Abkhasian che descender +% k_vcrs "66 f "ab - - Ka vertically crossed +% k_hcrs "67 g - - "ab Ka horisontally crossed +% l_dsc "68 h - "aa "aa El with descender +% lat_i "69 i - - - Latin letter I (goes first for LH font) +% lat_j "6a j - - - Je - Latin letter J +% lje "6b k "a7 "a8 - Lje +% m_dsc "6c l - - "a8 Em with descender +% nje "6d m "bb "b9 - Nje +% abh_ha "6e n - - "b7 Abkhasian kha +% p_tl "6f o - - "a0 Pe with tail +% +% r_dsc "70 p - - "a5 Er with descender +% lat_q "71 q - - - Latin letter Q +% t_dsc "72 r - - "a2 Te with descender +% lat_s "73 s "af - - Dze - Latin letter S +% tetse "74 t - - "a1 Ligature Te-Tse +% dzhe "75 u "b6 - "b6 Dzhe +% ch_vcrs "76 v "b7 - - Che vertically crossed +% lat_w "77 w - - - Latin letter W +% yat "78 x - - - Yat +% b_yus "79 y - - - Big Yus +% izh "7a z - - - Izhitsa +% +% n_ltl "1d - - "b9 En with left tail +% delta "1f - "a6 - Delta +% m_tl - - - "ae Em with tail +% r_gcrs - - - "a6 Er grave crossed +% s_acrs - - - "b1 Es acute crossed +% g_crsdsc - - "a0 - Ghe crossed with descender +% h_hcrs - - "b4 - Kha horisontally crossed +% +% semisn - - - "b3 Semi Soft Sign +% i_shdsc - - - "b4 I Short with descender +% r_tl - - - "bb Er with tail +% + +LHver_check(3,4); % like |version_check| in ec + +iff knuthian_ae:% +lhchar "Italic Cyrillic letter ae - ligature ae"; +cyrchar(ae,13u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); +adjust_fit(if monospace:-u#,-u# else: 0,0 fi); pickup fine.nib; +forsuffixes $=hair,stem: shaved$:=mfudged$; save $; $=shaved$; endfor +%numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo +numeric light_stem; light_stem=hround .75[hair,stem]; +pos0(vair,-90); pos1(heavy_hair,0); pos2(vair,90); +pos3(light_stem,180); pos4(vair,270); pos5(hair,320); +x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+6u); +lft x3r=hround(.5w-.5light_stem); x5r=good.x(w-.5u); x6=x5; +y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; +top y5l=vround(.5bar_height+.5); path p; p=z4{right}..z5..z6; +filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc of e +pos7(light_stem,0); pos8(light_stem,0); +x7=x8=x3; y7+.5light_stem=h+oo; y8-.5light_stem=-oo; +pos7'(vair,-225); pos11(curve,-180); z7'=z7; +pos12(vair,-90); pos3'(hair,0); z3'=z3; +lft x11r=hround(1.5u-.5curve); x12=.5[x11,x3]; +y11=.3[y12,y7]; bot y12r=-oo; +filldraw stroke z7'e{3(x11-x7),y11-y7}...pulled_arc.e(11,12) + & pulled_arc.e(12,3'); % bowl of a +filldraw z7l---z8l..z8r---z7r..cycle; % stem +penlabels(0,1,2,3,4,5,6,7,8,11,12); endchar; + +iff not knuthian_ae: % borrowed from ec +lhchar "Italic Cyrillic letter ae - ligature ae"; +cyrchar(ae,13u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); +adjust_fit(if monospace:-u#,-u# else: 0,0 fi); pickup fine.nib; +forsuffixes $=hair,stem: shaved$:=mfudged$; save $; $=shaved$; endfor +numeric light_stem; light_stem=hround .75[hair,stem]; +pos0(vair,-90); pos1(heavy_hair,0); pos2(vair,90); +pos3(light_stem,180); pos4(vair,270); pos5(hair,320); +x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+6u); +lft x3r=hround(.5w-.5light_stem); x5r=good.x(w-.5u); x6=x5; +y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; +top y5l=vround(.5bar_height+.5); path p; p=z4{right}..z5..z6; +filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc of e +pos7(light_stem,0); +x7=x3; y7+.5light_stem=h+oo; +pos7'(vair,-225); pos10(vair,-270); +pos11(curve,-180); z7'=z7; +pos12(vair,-90); pos3'(hair,0); z3'=z3; +lft x11r=hround(1.5u-.5curve); x10=x12=.5[x11,x3]; +top y10r=h+oo; y11=.52h; bot y12r=-oo; +filldraw stroke pulled_arc.e(3',10) & pulled_arc.e(10,11) + & pulled_arc.e(11,12) & pulled_arc.e(12,3'); % bowl of a +filldraw z7l---z3r..z3l---z7r..cycle; % stem +penlabels(0,1,2,3,4,5,6,7,10,11,12); endchar; + +lhchar "Italic Cyrillic letter abh_ch - lower e hook"; +cyrchar(abh_ch,8u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); +adjust_fit(max(2u#,1.5u#+.5flare#),0); +% ital_e; +pickup fine.nib; %numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo +pos0(vair,-90); pos1(heavy_hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+u); +lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; +y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; +top y5l=vround .5bar_height; path p; p=z4{right}..z5..z6; +filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +% bulb +y7=y3; x7=x3r; pos7(vair,-90); y9=.5[y3,y2]; +lft x9r=l+letter_fit+hround (.5u-.5); %l+.5u; +pos9(flare,-180); z8r=z9r; pos8(hair,-180); +cyrbulb(7,8,9); +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Cyrillic letter abh_ch_dsc - lower e hook ogonek"; +cyrchar(abh_ch_dsc,8u#,x_height#,desc_depth#); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); +adjust_fit(max(2u#,1.5u#+.5flare#),0); +% ital_e; +pickup fine.nib; +%numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo +pos0(vair,-90); pos1(heavy_hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+u); +lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; +y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; +top y5l=vround .5bar_height; path p; p=z4{right}..z5..z6; +filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +% bulb +y7=y3; x7=x3r; pos7(vair,-90); y9=.5[y3,y2]; +lft x9r=l+letter_fit+hround (.5u-.5); %l+.5u; +pos9(flare,-180); z8r=z9r; pos8(hair,-180); +cyrbulb(7,8,9); +% descender-ogonek + path p.r; p.r=pulled_arc.r(3,4)...{direction 1 of p}z5r; + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + ogonek_breadth:=xvair; + numeric tt; % the time... + tt=if hefty: 2.8 else: 2.6 fi+eps; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_pos=point tt of p.r+.5(the_pen-fine)* + unitvector((direction tt of p.r) rotated 90)-(ogonek_breadth-the_pen,0); +easy_ogonek(the_pen,10,11,12); % ogonek +penlabels(1,2,3,4,5,6,7,8,9, 10,11,12); endchar; + +lhchar "Italic Cyrillic letter k_vcrs - ka vcrossed"; +cyrchar(k_vcrs,10u#,x_height#,0); %k+2u +italcorr x_height#*slant; +adjust_fit(if monospace:-1.5u# else: 0 fi,0); +pickup fine.nib; x2-.5stem=hround(2.5u-.5stem); +%ihalfstem; +if monospace: + pos2(stem,0); top y2=h; +else: + x0=0; hook_in(0,1,2); fi % opening hook +z2'=z2; pos2'(stem,0); x11=x2'; y11-.5stem=-oo; pos11(stem,0); +filldraw circ_stroke z11e--z2'e; % left stem +pos3(vair,90); pos3'(vair,90); x3=x11; y3=y3'=bar_height; x3'=.5[x11,x7]; +pos4(vair,90); x4=w-2u; top y4r=x_height+oo; +pos5(hair,0); pos6(flare,0); +rt x5r=hround(w-.5u); y5+.5flare=vround(bot y4l-.03x_height); +pos7(stem,0); pos8(vair,90); pos9(hair,180); +x9+.5hair=hround(w+.5hair-eps); y9=1/3x_height; +lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; +filldraw stroke z3e{right}--z3'e{right}..{right}z4e; % upper diagonal +bulb(4,5,6); % bulb +filldraw stroke z3e{right}--z3'e{right}...z7e{down} + ...z8e{right}...{up}z9e; % lower diagonal +% vcross +pickup fine.nib; numeric middle_weight; +middle_weight=max(fine.breadth,.6[thin_join,vair]); +pos10(middle_weight,0); pos12(middle_weight,0); +lft x10l=lft x12l=hround(max(x3',.5[x3,x3'])-.5middle_weight+eps); +top y12-bot y10=.5x_height; .52[y10,y12]=y3; +filldraw stroke z10e--z12e; +penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Cyrillic letter k_hcrs - ka hcrossed"; +cyrchar(k_hcrs,8u#,asc_height#,0); +italcorr x_height#*slant; +adjust_fit(0,0); +% ital_k;long stem +pickup tiny.nib; pos1(stem,0); pos2(stem,0); x1=x2; +lft x1l=hround(1.5u-.5stem); top y1=h; y2-.5stem=-oo; +filldraw circ_stroke z2e--z1e; % left stem +sloped_serif.l(1,2,a,1/3,jut,serif_drop); % serif +pickup fine.nib; pos3(vair,90); x3=x1; y3=bar_height; +pos4(vair,90); x4=w-2u; top y4r=x_height+oo; +filldraw stroke z3e{right}..{right}z4e; % upper diagonal +pos5(hair,0); pos6(flare,0); +rt x5r=hround(w-.5u); y5+.5flare=vround(bot y4l-.03x_height); +bulb(4,5,6); % bulb +pos7(stem,0); pos8(vair,90); pos9(hair,180); +x9+.5hair=hround(w+.5hair-eps); y9=1/3x_height; +lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; +filldraw stroke z3e{right}...z7e{down} + ...z8e{right}...{up}z9e; % lower diagonal +% hcross +pickup crisp.nib; numeric outer_jut; +outer_jut=max(limit_dist,1.1jut); +pos10(bar,90); pos11(bar,90); +top y11r=top y10r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +x11=x1r+1.15outer_jut; lft x10=hround-.75u; +filldraw stroke z10e--z11e; % cross bar +penlabels(1,2,3,4,5,6,7,8,9, 10,11); endchar; + +lhchar "Italic Cyrillic letter l_dsc - el descender"; +cyrchar(l_dsc,9u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(.5u#,.1u#); %iserif_adj +% ital_l;dsc +pickup fine.nib; +pos1(vair,-90); pos2(stem,180); pos3(hair,0); pos10(stem,0); +pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); +top y1l=h+oo; x1=.5[x3,x2]; +x3=3u; y3=.35h; +y6-.5flare=.1h; lft x6r=-.25u; z5r=z6r; +bot y4r=-oo; x4=max(.4[lft x6r,rt x3r],lft x6r+.5flare-eps); +y10=.8h; lft x10l=lft x7l=hround(w-2.5u-.5stem); z10=z2; +bulb(4,5,6); % bulb +filldraw stroke pulled_arc.e(4,3) + & super_arc.e(3,1) & super_arc.e(1,2); % left stem +pos8(vair,90); pos9(vair,180); pos7(stem,0); +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; %closing hook +filldraw stroke z10e--z7e; % stem tail +%%% +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.l; + p.l=z7l{-.5u,-x_height}...z8l{right}...{up}z9l; + ogonek_breadth:=xvair; + ogonek_pos=point .9 of p.l; + easy_ogonek(the_pen,11,12,13); % ogonek +else: + i_serif(9,x); +fi +penlabels(1,1',2,3,4,5,6,7,8,9,10, 11,12,13); endchar; + +lhchar "Italic Cyrillic letter m_dsc - m descender"; +cyrchar(m_dsc,13u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(if monospace:-.5u# else:.5u# fi, %wbulb_adj + .1u#); %iserif_adj +%ital_m;dsc +pickup fine.nib; +pos1(hair,0); pos6(stem,0); +pos2(hair,0); pos3(vair,-90); pos4(hair,-180); pos5(flare,-180); +x1=x2=3u; y2=.35h; top y1=h; bot y3r=-oo; lft x5r=-.25u; z4r=z5r; +x3=min(lft x5r+flare,lft x2l-eps); y5-.5flare=.1h; +bulb(3,4,5); % bulb +filldraw stroke pulled_arc.e(3,2) & z2e--z1e; % left stem +rt x7r=hround(w-2.5u+.5stem); %!!! x9=w; hook_out(7,8,9); % closing hook +pos7(stem,0); pos8(vair,90); pos9(vair,180); %!!! +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; % closing hook +x6=x7; top y6=h; +filldraw stroke z6e--z7e; % right stem +% diagonals;m +numeric stem[]; % thicknesses of the strokes +stem1=hround(fudged.stem-stem_corr); +stem2=min(stem1,hround(fudged.hair-stem_corr)); +penpos10(stem1,0); penpos11(stem1,0); penpos12(stem2,0); penpos13(stem2,0); +x10l=lft x1l; x11l=x12l; x13l=lft x7l; x11-x10=x13-x12; +y10=y13=top y6; y11=y12; +if hefty: + y11=if monospace: vround 1/3h-.5stem1 else: oo fi; + numeric upper_notch,lower_notch; + upper_notch=h-notch_cut; lower_notch=y11+notch_cut; + x1'=rt x1r; z1'=whatever[z10l,z11l]; + x6'=lft x6l; z6'=whatever[z12r,z13r]; + z0=whatever[z10r,z11r]=whatever[z12l,z13l]; + fill z10l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z11-z10}diag_in(10l,11l,1,11r)..diag_out(12l,1,12r,13r){z13-z12} + if y6'<upper_notch: ...{up}(x6'-1,upper_notch){right} fi + ..z13r--diag_out(13r,1,13l,12l){z12-z13} + if y0<=lower_notch: ..{z12-z13}z0{z10-z11}.. + else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi + {z10-z11}diag_in(11r,10r,1,10l)--cycle; % diagonals +else: + y11=0; z0=whatever[z10r,z11r]=whatever[z12l,z13l]; + fill z10l..{z11-z10}diag_in(10l,11l,1,11r)..diag_out(12l,1,12r,13r){z13-z12} + ..z13r--diag_out(13r,1,13l,12l){z12-z13}..{z12-z13}z0{z10-z11} + ..{z10-z11}diag_in(11r,10r,1,10l)--cycle; fi % diagonals +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.l; + p.l=z7l{-.5u,-x_height}...z8l{right}...{up}z9l; + ogonek_breadth:=xvair; + ogonek_pos=point .9 of p.l; + easy_ogonek(the_pen,14,15,16); % ogonek +else: + i_serif(9,x); +fi +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13, 14,15,16); +endchar; + +lhchar "Italic Cyrillic letter abh_ha - Abkhasian ha"; +cyrchar(abh_ha,9.25u#+width_adj#,x_height#,desc_depth#); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; +adjust_fit(if monospace:0,0 else: -.35u#,-.35u# fi); %o +pickup fine.nib; +numeric right_curve,mid_curve; +right_curve=.7[.7[thin_join,vair],curve] if hefty:-stem_corr fi; +mid_curve=.5[.7[thin_join,vair],curve] if hefty:-2stem_corr fi; +penpos1(vair,90); penpos3(vair',-90); +penpos2(curve,180); penpos4(right_curve,0); +interim superness:=more_super; x2r=hround u; +x4r=w-x2r; x1=x3=x6=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=.52h; +y7=-1/3d; rt x7=hround(w-.5u); penpos7(.7[thin_join,vair],270); +y6=.5y5r; penpos6(mid_curve,180); +x5=if serifs:.5[x6,x4]else:.5[x6,x4]fi; +y5r=.5[y4,y1]; penpos5(.7[thin_join,vair],90); +fill stroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) % 3/4 bowl + & pulled_super_arc.e(4,5)(.25superpull) + & pulled_super_arc.e(5,6)(.75superpull) + & pulled_super_arc.e(6,7)(.5superpull); % 6/4 bowl +fill z7l--z7r{right}..{up} + if fine.top y7r>fine.bot y7l: + (fine.rt x7,y7) + else: + (fine.rt x7,fine.top y7r)--(fine.rt x7,fine.bot y7l) + fi + {up}..{left} cycle; +z1'=z1; z4'=z4; pos1'(vair,90); pos4'(.75[.7[thin_join,vair],curve],0); +forsuffixes e=l,r: path quarta.e; +quarta.e=pulled_super_arc.e(1',4')(.5superpull); endfor +numeric quart; +quart=min( + ypart(quarta.r intersectiontimes ((0,top y5r+vair)--(w,top y5r+vair))), + ypart(quarta.r intersectiontimes ((rt x5,0)--(rt x5,h)))); +filldraw stroke subpath (0,.67) of quarta.e; %quart +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Italic Cyrillic letter p_tl - pe tail"; +cyrchar(p_tl,13u#,x_height#,desc_depth#); %13.5 +italcorr (-.3x_height#+bar_height#)*slant; %o:.7h-(h-bar_height) +adjust_fit(if monospace:-1.5u#,-1.5u# else: 0,0 fi); +pickup fine.nib; +numeric shaved_stem; shaved_stem=mfudged.stem; save stem; stem=shaved_stem; +pos2(stem,0); x1=x2; +if monospace: + pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h; +else: + x0=0; lft x2l=hround(2.5u-.5stem); + hook_in(0,a,1); fi % opening hook +y2-.5stem=-oo; filldraw circ_stroke z2e--z1e; % left stem +x4+.5stem=hround(7u+.5stem); ital_arch(2,3,4); % left arch +pos5(stem,0); y5=y2; x5=x4; +filldraw circ_stroke z5e--z4e; % middle stem +% hook(4); +pos3'(vair,90); x3'=x4; y3'=bar_height; +lft x7l=hround(w-1.5u-.5stem); y7=.45y3'; pos7(stem,0); +pos9(vair,-90); pos10(hair,-180); pos11(flare,-180); pos8(stem,0); x8=x7; +bot y8=-1/3d; bot y9r=-d-oo; y11-.5flare=-vround.9d; +x9=w-11/3u; lft x10r=min(x7-4u,lft x10r+x9-x10l+4u-eps); +filldraw stroke z3'e{right}...z7e{down}---z8e...{left}z9e; +bulb(9,10,11); % bulb +penlabels(0,a,1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Italic Cyrillic letter r_dsc (looks like p)"; +cyrchar(r_dsc,if monospace: 9u# else: 9.25u# fi,x_height#, % rusw + max(1.6desc_depth#,paren_depth#));%r_ddepth +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %p +adjust_fit(0,if monospace:0 else:-.35u# fi); +full_d:=d; d:=vround min(desc_depth,max(vair+slab+oo+1+eps,full_d-max(.4desc_depth,.55beak)-slab));%r_dscs +% ital_r; +pickup fine.nib; +x0=0; x2-.5stem=hround(2.5u-.5stem); hook_in(0,1,2); % opening hook +pos4(hair,-180); pos5(vair,-90); pos6(curve,0); pos7(vair,90); +x4=x2; rt x6r=hround(w-1.5u+.5curve); x5=x7=.5[x4,x6]; +bot y5r=-oo; top y7r=h+oo; y4=y6=.5[y5,y7]; +filldraw stroke super_arc.e(4,5) & pulled_arc.e(5,6) + & pulled_arc.e(6,7) & super_arc.e(7,4); % bowl +pickup tiny.nib; pos2'(stem,0); pos3(stem,0); +z2=z2'; x3=x2; bot y3=-d; filldraw stroke z2'e--z3e; % stem +%%% +if is_ogonek: + dish_serif(3,2',a,1/3,.75jut,b,1/3,jut); % serif +fi +%%% +% r_descender/ogonek +if is_ogonek: + d:=d+desc_depth; + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + ogonek_breadth:=xvair; + ogonek_pos=(x3,y3+.5the_pen) if not is_egyptian: +(.5xvair,0) fi; + ogonek_move=bot y3; + easy_ogonek(the_pen,8,9,10); % ogonek + chardp:=d/hppp; +else: + d:=full_d; + numeric right_jut; right_jut=1.414jut; + r_serif(3,2',o,1/3,.75jut,p,1/3,beak_darkness,right_jut,.35beak_jut); % lower left serif +fi +penlabels(0,1,2,3,4,5,6,7, 8,9,10); endchar; + +lhchar "Italic Cyrillic letter lat_q"; +cyrchar(lat_q,8u#,x_height#,desc_depth#); +italcorr x_height#*slant+.5stem#-u#; +adjust_fit(0,0); pickup fine.nib; +pos0(hair,0); pos1(vair,90); pos2(curve,180); pos3(vair,270); +x0=x4; x1=x3=.5[x0,x2]; lft x2r=hround(1.5u-.5curve); +x4+.5stem=hround(w-1.5u+.5stem)+eps; +top y1r=h+oo; bot y3r=-oo; y0=y2=.5[y1,y3]; +filldraw stroke super_arc.e(0,1) & pulled_arc.e(1,2) + & pulled_arc.e(2,3) & super_arc.e(3,0); % bowl +pickup tiny.nib; pos4(stem,0); pos5(stem,0); +x4=x5; x6=x5r; top y6=h+oo; bot y4=-d; +y5=ypart(((x4l,0)--(x4l,y6))intersectionpoint super_arc.r(0,1)); +filldraw z6{2(x5l-x6),y5-y6}...z5l---z4l--z4r--cycle; % stem +dish_serif(4,5,a,1/3,jut,b,1/3,jut); % serif +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +lhchar "Italic Cyrillic letter t_dsc - te descender"; +cyrchar(t_dsc,15u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(if monospace:-1.5u# else: 0 fi,.1u#); %lstem_adj&iserif_adj +% ital_t; +begingroup +pickup fine.nib; numeric shaved_stem; shaved_stem=mfudged.stem; +save stem; stem=shaved_stem; pos2(stem,0); x1=x2; +% left stem_hook; +if monospace: + pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h; +else: + x0=0; lft x2l=hround(2.5u-.5stem); + hook_in(0,a,1); fi % opening hook +y2-.5stem=-oo; filldraw circ_stroke z2e--z1e; % left stem +x4+.5stem=hround(.5w+.5stem); ital_arch(2,3,4); % left arch +pos5(stem,0); y5=y2; x5=x4; +filldraw circ_stroke z5e--z4e; % middle stem +x7+.5stem=hround(w-2.5u+.5stem); ital_arch(5,6,7); % right arch +x8=x7-.25u; x9=w; y8=1/4x_height; y9=.4bar_height; +x8'=.5[x8,x9]-.25u; bot y8'l=-oo; +pos8(stem,0); pos8'(vair,90); pos9(vair,180); +filldraw stroke z7e{down}..{-u,-x_height}z8e...z8'e{right}...{up}z9e; % hook (7,8,9)(skewed) +endgroup; +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.l; + p.l=z8l{-u,-x_height}...z8'l{right}...{up}z9l; + ogonek_breadth:=xvair; + ogonek_pos=point .9 of p.l; + easy_ogonek(the_pen,10,11,12); % ogonek +else: + z10=z9; pos10(hair,180); + i_serif(10,x); +fi +penlabels(0,a,1,2,3,4,5,6,7,8,9, 10,11,12); endchar; + +lhchar "Italic Cyrillic letter tetse - ligature tetse"; +cyrchar(tetse,10.75u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(max(2u#,u#+stem#),.1u#); %iserif_adj +pickup fine.nib; interim superness:=more_super; +x0=0; x2=x3; top y2=h; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +filldraw stroke + z2'e--super_arc.e(3,4)...{up}z5e; % left stem and arc +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +pos8(vair,90); pos9(vair,180); pos7(stem,0); +filldraw circ_stroke z6e--z7e; % right stem +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; % hook(7,8,9) +% italic descender +i_serif(9,x); +% italic beak +pickup fine.nib; +pos10(stem,180); pos11(stem,180); pos12(vair,90); pos13(vair,90); +lft x10r=l+letter_fit if monospace:-.5stem else:+.25u fi; +y10-.5stem=2/3x_height-.5fine; +x13=0.6[x3,x7]; top y13r=top y12r=x_height; x11=x10; y11=bot y12l-.25flare; +x12-.25flare=rt x10l; x12r:=lft x10r+(top y12r-y11); +filldraw circ_stroke z10e{up}--z11e{up}...z12e{right}--z13e; % ital_beak; +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Italic Cyrillic letter ch_vcrs - che vcrossed"; +cyrchar(ch_vcrs,9.5u#,x_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(0,0); +% ital_ch; +pickup fine.nib; interim superness:=more_super; +x2=x3; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); + filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; x9=w; hook_out(7,8,9); % closing hook +bot y4r=.75bar_height; y5=.75h; y3=min(y2-eps,.7[y4,y5]); y6+.5stem=h; +filldraw stroke z2'e...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +%%% +% vcross +pickup fine.nib; numeric middle_weight; +middle_weight=max(fine.breadth,.6[thin_join,vair]); +pos10(middle_weight,0); pos11(middle_weight,0); +lft x10l=lft x11l=hround (x4-.5middle_weight); +top y11-bot y10=.5x_height; .5[y10,y11]=y4; +filldraw stroke z10e--z11e; +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11); endchar; + +lhchar "Italic Cyrillic letter lat_w"; +cyrchar(lat_w,12u#,x_height#,0); +italcorr x_height#*slant; +adjust_fit(if monospace:-1.5u#,-u# else: 0,0 fi); +pickup fine.nib; interim superness:=more_super; begingroup +forsuffixes $=hair,stem: shaved$:=mfudged$; save $; $=shaved$; endfor +x0=0; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +if monospace: + pos1(vair,90); x1=good.x .5[x0,x2]; top y1r=h; y2=2/3h; pos2(stem,0); + filldraw stroke z1e{right}...{-u,-x_height}z2e; +else: + hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); +x4=.6[x2,x5]; x5=x6=x7; pos6(stem,-180); pos7(stem,-180); +y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; +rt x6l=hround(rt x6l+.5w+.75u-x6); y6+.5stem=h; y7=y3; +pos8(vair,-90); pos9(hair,0); +x8=w-2.75u; rt x9r=hround(w-.5u); bot y8r=-oo; y9=y5; +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e..super_arc.e(7,8)...{up}z9e; % middle stem and arc +v_bulb(9,10); % closing bulb +endgroup; +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Cyrillic letter n_ltl - en with left tail"; +cyrchar(n_ltl,10u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(0,0); +pickup fine.nib; x2=x3; pos3(stem,0); lft x3l=hround(2.5u-.5stem); +%ihalfstemx; +if monospace: + pos2(stem,0); top y2=h; +else: + x0=0; hook_in(0,1,2); fi % opening hook +y3-.5stem=-oo; +filldraw stroke z3e--z2e; % left stem +x10=x3l; y10=y11=bar_height; pos10(vair,90); pos11(vair,90); +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); y6+.5stem=h; +x7=x6; x9=w; hook_out(7,8,9); % closing hook +z7'=z7; pos7'(stem,0); x11=x6l; +filldraw circ_stroke z6e--z7'e; % right stem +filldraw stroke z10e--z11e; % bar +%%% +pos12(vair,-90); pos13(hair,-180); pos14(flare,-180); pos5(stem,0); +x5=x3; bot y5=-1/3d; bot y12r=-d-oo; y14-.5flare=-vround.9d; +%x6=w-11/3u; lft x7r=min(x4-4u,lft x7r+x6-x7l+5u-eps); +%x12=(x3+2.5u-.5stem)-10/3u; lft x13r=min(x3-10/3u,lft x13r+x12-x13l+13/3u-eps);%!!! +x12=(x3+2.5u-.5stem)-9/3u; lft x14r=min(x3-8/3u,lft x13r+x12-x13l+11/3u-eps);%!!! +%filldraw circ_stroke z3e--z5e{down}...{left}z12e; % right stem and hook + forsuffixes e=l,r: + z12'e=((0,y14)--(w,y14)) intersectionpoint + (z5e{down}...{left}z12e); endfor + if lft x12'l>rt x14l+max(1,hround(1/3vair+.5)): + filldraw stroke z3e--z5e{down}...{left}z12e; % right stem and hook + else: + x12'l:=min(rt x14l+max(1,1/3vair+.5),rt x12'r-vair)+.5fine-eps; + filldraw z3r--z5r{down}...{left}z12r--z12l{right} + ..z12'l{up}..{up}z3l--cycle; + fi +bulb(12,13,14); % bulb +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +iff serifs: +lhchar "Lowercase Cyrillic letter delta - Lowercase Greek delta"; +cyrchar(delta,8u#,asc_height#,0); +italcorr .9asc_height#*slant+.5hair#-1.5u#; +adjust_fit(0,0); pickup fine.nib; +x0=-u; y0=1.1h; +numeric light_flare; light_flare=2/3[vair,flare]; +x1=w-2u-.5light_flare; y1=h-.5light_flare; +numeric theta; theta=angle (z1-z0); +pos1(light_flare,theta-90); pos2(.2[vair,light_flare],-90); pos3(vair,theta); +x2=x3+u; y2=h; +x4=x6=.5w+.5u; top y8r=x_height+oo; z4=z8; +pos6(vair,-90); pos7(stem,-180); pos8(vair,-270); +pos4(stem,angle(z4-z0)+90); pos5(stem,30); +z3=.5[.5[z1,z4],z0]; +y5+.1x_height=y7=.5[y6,y8]; bot y6=-oo; +lft x7r=hround(1.4u-.5stem); rt x5r=hround(w-u); +filldraw stroke z1e{z0-z1e}....z2e....z3e{(z0-z1)rotated 90} + ...z4e{z4e-.8[z4,z0]} + ....z5e{down}...pulled_arc.e(6,7) & pulled_arc.e(7,8); % hook and bowl +filldraw z1r{z1r-z0}...z1l{z0-z1l}--cycle; % bulb +math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#); +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +lhchar "Italic Cyrillic letter m_tl - m tail"; +cyrchar(m_tl,12u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(if monospace:-.5u#,-u# else:.5u#,0 fi); %wbulb_adj +%ital_m;tl +pickup fine.nib; +pos1(hair,0); pos2(hair,0); pos3(vair,-90); pos4(hair,-180); +pos5(flare,-180); pos6(stem,0); +x1=x2=3u; top y1=h; y2=.35h; bot y3r=-oo; lft x5r=-.25u; z4r=z5r; +x3=min(lft x5r+flare,lft x2l-eps); y5-.5flare=.1h; +bulb(3,4,5); % bulb +filldraw stroke pulled_arc.e(3,2) & z2e--z1e; % left stem +pos7(stem,0); lft x7l=hround(w-1.5u-.5stem); %!!! % x9=w; hook_out(7,8,9); %!!! % closing hook +x6=x7; top y6=h; +%filldraw stroke z6e--z7e; %!!! % right stem +% diagonals;m +numeric stem[]; % thicknesses of the strokes +stem1=hround(fudged.stem-stem_corr); +stem2=min(stem1,hround(fudged.hair-stem_corr)); +penpos10(stem1,0); penpos11(stem1,0); penpos12(stem2,0); penpos13(stem2,0); +x10l=lft x1l; x11l=x12l; x13l=lft x7l; x11-x10=x13-x12; +y10=y13=top y6; y11=y12; +if hefty: y11=if monospace: vround 1/3h-.5stem1 else: oo fi; + numeric upper_notch,lower_notch; + upper_notch=h-notch_cut; lower_notch=y11+notch_cut; + x1'=rt x1r; z1'=whatever[z10l,z11l]; + x6'=lft x6l; z6'=whatever[z12r,z13r]; + z0=whatever[z10r,z11r]=whatever[z12l,z13l]; + fill z10l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z11-z10}diag_in(10l,11l,1,11r)..diag_out(12l,1,12r,13r){z13-z12} + if y6'<upper_notch: ...{up}(x6'-1,upper_notch){right} fi + ..z13r--diag_out(13r,1,13l,12l){z12-z13} + if y0<=lower_notch: ..{z12-z13}z0{z10-z11}.. + else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi + {z10-z11}diag_in(11r,10r,1,10l)--cycle; % diagonals +else: y11=0; z0=whatever[z10r,z11r]=whatever[z12l,z13l]; + fill z10l..{z11-z10}diag_in(10l,11l,1,11r)..diag_out(12l,1,12r,13r){z13-z12} + ..z13r--diag_out(13r,1,13l,12l){z12-z13}..{z12-z13}z0{z10-z11} + ..{z10-z11}diag_in(11r,10r,1,10l)--cycle; fi % diagonals +% hook; +pos8(vair,-90); pos9(hair,-180); pos9'(flare,-180); +bot y7=-1/3d; bot y8r=-d-oo; y9'-.5flare=-vround.9d; +x8=w-11/3u; lft x9r=min(x7-4u,lft x9r+x8-x9l+5u-eps); +filldraw stroke z6e--z7e{down}...{left}z8e; +bulb(8,9,9'); % bulb +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Italic Cyrillic letter r_gcrs - r grave crossed"; +cyrchar(r_gcrs,if monospace:9u#else:9.25u#fi,x_height#,desc_depth#); % the Russian width +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %p +adjust_fit(0,if monospace:0 else:-.35u#fi); +% ital_r; +pickup fine.nib; +x0=0; x2-.5stem=hround(2.5u-.5stem); hook_in(0,1,2); % opening hook +pos4(hair,-180); pos5(vair,-90); pos6(curve,0); pos7(vair,90); +x4=x2; rt x6r=hround(w-1.5u+.5curve); x5=x7=.5[x4,x6]; +bot y5r=-oo; top y7r=h+oo; y4=y6=.5[y5,y7]; +filldraw stroke super_arc.e(4,5) & pulled_arc.e(5,6) + & pulled_arc.e(6,7) & super_arc.e(7,4); % bowl +pickup tiny.nib; pos2'(stem,0); pos3(stem,0); +z2=z2'; x3=x2; bot y3=-d; filldraw stroke z2'e--z3e; % stem +dish_serif(3,2',a,1/3,.75jut,b,1/3,jut); % serif +%%%%% +path p; numeric unbalance,outer_jut; +p=z5{(x6,y5)-z5}...superness[(x5,y6),(x6,y5)]{z6-z5}...{z6-(x6,y5)}z6; +z8=point1.25 of p; +numeric unbalance,outer_jut; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5stem+if serifs: max(limit_dist,if hefty: .8 fi\\ jut) else: 1.7u fi; +put_cyrcross(x8,(y8-bar_height),-outer_jut,-unbalance*outer_jut); +%%% +penlabels(0,1,2,3,4,5,6,7, 8); endchar; + +lhchar "Italic Cyrillic letter s_acrs - s acute crossed"; +cyrchar(s_acrs,8u#,x_height#,0); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %c +adjust_fit(if monospace:0 else:-.35u#fi,0); +% ital_s; +pickup fine.nib; pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x2=x4=.5(w+u); rt x1r=max(rt x2,hround(w-u))+eps; +lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; +y1=.5[bar_height,h]; top y2r=h+oo; bulb(2,1,0); % bulb +bot y4r=-oo; y3=.5[y2,y4]; top y5l=vround .5bar_height; y6=bar_height; +path p; p=z4{right}..z5..z6; +filldraw stroke pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +%%%%% +pair outer_point; path p; numeric unbalance,outer_jut; +outer_point=superness[(x4r,y3r),(x3r,y4r)]; +p=z3{(x3,y4)-z3} + ...superpull[superness[(x4,y3),(x3,y4)],outer_point]{z4-z3}...{z4-(x3,y4)}z4; +z7=point.75 of p; +unbalance=.95; %if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5stem+if serifs: max(limit_dist,if hefty: .8 fi\\ jut) else: 1.7u fi; +put_cyrcross(x7,(y7-bar_height),unbalance*outer_jut,outer_jut); +%%% +penlabels(0,1,2,3,4,5,6, 7); endchar; + +lhchar "Italic Cyrillic letter g_crsdsc - ghe hcrossed descender"; +cyrchar(g_crsdsc,6.25u#,x_height#,desc_depth#); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e +adjust_fit(if monospace:u#,u# else: 0.5u#,0.5u# fi); +% ital_g; +pickup fine.nib; x0l=hround eps; x0'=x0; x5r=good.x(w-eps); x6=x5; +x2=.5w+2u; x3=.5w-2u; x1=x4=x7=.5[x3l,x2r]; y7=.5[y2,y3]; +h-y0=y5; top y5l=vround .5bar_height; y6=bar_height; y0'=h-bar_height; +h-y2=y3=1/4x_height; h-y1=y4; bot y4r=-oo; +pos0(hair,320); pos1(vair,270); pos2(stem,180); +pos3(stem,180); pos4(vair,270); pos5(hair,320); pos7(stem,135); +path p,p_; p=z0'..z0..z1{right}; p_=z4{right}..z5..z6; +filldraw stroke z0e{direction 1 of p} + ...z1e{right}...{down}z2e...z7e...z3e{down}...z4e{right} + ...{direction 1 of p_}z5e; % main stroke +%%% +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + p_.r=z3r{down}...z4r{right}...{direction 1 of p_}z5e; + ogonek_breadth:=xvair; + numeric tt; % the time... + tt=if hefty: 2.8 else: 2.6 fi; + join_angle=angle((direction tt of p_.r) rotated 180); + ogonek_pos=point tt of p_.r+.5(the_pen-fine)* + unitvector((direction tt of p_.r) rotated 90); + easy_ogonek(the_pen,10,11,12); % ogonek +else: + z10=z5; pos10(hair,180); i_serif(10,x); +fi +% hstroke +bar_stroke(x0l+.05u,w-(x0l+.05u)); +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12); endchar; + +lhchar "Italic Cyrillic letter h_hcrs - kha (looks like x)"; +cyrchar(h_hcrs,if monospace:6.5u# else:7.5u# fi+max(1.5u#,flare#), % !rusw + x_height#,0); +italcorr max(1/3x_height#*slant+.5hair#+.5u#,x_height#*slant+.25u#); %x +adjust_fit(if monospace: 0,0 else:0.25u#,0.25u#fi); +% ital_h; +pickup fine.nib; pos0(hair,180); pos1(vair,90); pos2(stem,0); +pos3(stem,-180); pos4(vair,-90); pos5(hair,0); +y0=y2=2/3h; y3=y5=1/3h; top y1r=h+oo; bot y4r=-oo; +rt x2r=hround(.5w+.5stem-eps); x2=x3; +x0-.5hair=hround-.5hair; x5+.5hair=hround(w+.5hair-eps); +x1=.5[x0,x2]; x4=.5[x3,x5]; +filldraw stroke z0e{up}...pulled_arc.e(1,2); % opening hook +filldraw z2l--z3r--z3l--z2r--cycle; % stem +filldraw stroke pulled_arc.e(3,4)...{up}z5e; % closing hook +pos3'(hair,180); pos6(hair,180); pos7(vair,90); pos8(hair,0); pos9(flare,0); +x3'l=x6l=x3l; y3'=y3; y6=3/4h; x7=.5[x8,x2]; top y7r=h+oo; +rt x8r=hround(w-.25u); y8+.5flare=vround(bot y7l-.03x_height); +filldraw stroke z3'e---z6e...{right}z7e; bulb(7,8,9); % upper link and bulb +pos2'(hair,0); pos16(hair,0); pos17(vair,-90); +pos18(hair,-180); pos19(flare,-180); +x2'l=x16l=x2l; y2'=y2; y16=1/4h; x17=.5[x18,x3]; bot y17r=-oo; +lft x18r=hround.25u; y18-.5flare=vround(top y17l+.03x_height); +filldraw stroke z2'e---z16e...{left}z17e; bulb(17,18,19); % lower link and bulb +%%% +% hstroke +bar_stroke(u,w-u); % bar +penlabels(0,1,2,3,4,5,6,7,8,9,16,17,18,19, 10,11); endchar; + +lhchar "Italic Cyrillic letter semisn - semi soft sign"; +cyrchar(semisn,if monospace: 9u# else: 9u# fi,x_height#+acc_height#,0); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; +adjust_fit(if monospace:.5u#,.5u# else:0,0 fi); pickup tiny.nib; +pos1(stem,0); pos2(stem,0); x1=x2; +lft x1l=hround(2.5u-.5stem); top y1=h; y2=.6bar_height; +filldraw stroke z1e--z2e; % stem +sloped_serif.l(1,2,a,1/3,jut,serif_drop); % serif +pickup fine.nib; pos2'(stem,-180); pos3(vair,-90); +pos4(curve,0); pos5(vair,90); pos0(hair,180); +z0=z2=z2'; x3=x5=.5[x2,x4]; rt x4r=hround(w-u+.5curve); +bot y3r=-oo; top y5r=1.2bar_height+oo; y4=y2; +filldraw stroke pulled_arc.e(2',3) & pulled_arc.e(3,4) + & pulled_arc.e(4,5) & super_arc.e(5,0); % bowl +pos31(bar,90); pos32(bar,90); +lft x31=hround 1/3u if serifs:-serif_fit fi; x32=w-2.5u; +y31=y32=vround x_height+eps; +filldraw stroke z31e--z32e; +penlabels(0,1,2,3,4,5,31,32); endchar; + +lhchar "Italic Cyrillic letter i_shdsc - short i with descender"; +cyrchar(i_shdsc,10u#,x_height#+acc_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; %u +adjust_fit(0,.1u#); %iserif_adj +full_h:=h; h:=x_height; +% ital_c; +pickup fine.nib; interim superness:=more_super; +x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; + pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h; +filldraw stroke z2'e{-u,-x_height} + ...super_arc.e(3,4)...{up}z5e; % left stem and arc +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +pos8(vair,90); pos9(vair,180); pos7(stem,0); +filldraw circ_stroke z6e--z7e; % right stem +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; % closing hook +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.l; + p.l=z7l{-.5u,-x_height}...z8l{right}...{up}z9l; + ogonek_breadth:=xvair; + ogonek_pos=point .9 of p.l; + easy_ogonek(the_pen,17,18,19); % ogonek +else: + i_serif(9,x); +fi +% the accent +h:=full_h; cbreve(.5w,0, 10,11,12,13,14,15,16); +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16); endchar; + +lhchar "Italic Cyrillic letter r_tl (looks like p)"; +cyrchar(r_tl,if monospace: 9u# else: 9.25u# fi,x_height#, % rusw + max(1.6desc_depth#,paren_depth#));%r_ddepth +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %p +adjust_fit(0,if monospace:0 else:-.35u# fi); +full_d:=d; d:=vround min(desc_depth,max(vair+slab+oo+1+eps,full_d-max(.4desc_depth,.55beak)-slab));%r_dscs +% ital_r; +pickup fine.nib; +x0=0; x2-.5stem=hround(2.5u-.5stem); hook_in(0,1,2); % opening hook +pos4(hair,-180); pos5(vair,-90); pos6(curve,0); pos7(vair,90); +x4=x2; rt x6r=hround(w-1.5u+.5curve); x5=x7=.5[x4,x6]; +bot y5r=-oo; top y7r=h+oo; y4=y6=.5[y5,y7]; +filldraw stroke super_arc.e(4,5) & pulled_arc.e(5,6) + & pulled_arc.e(6,7) & super_arc.e(7,4); % bowl +pickup tiny.nib; pos2'(stem,0); pos3(stem,0); +z2=z2'; x3=x2; bot y3=-d; filldraw stroke z2'e--z3e; % stem +%%% +dish_serif(3,2',a,1/3,.75jut,b,1/3,jut); % serif +%%% +% tail_part(2);%!!! +_zero:=2; +_one:=8; _two:=9; _three:=10; _four:=11; _five:=12; +_six:=13; _seven:=14; _eight:=15; _nine:=16; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps, + min(full_d-d-.18desc_depth-1-eps,hround 7/8[hair,flare]));%!!! +y[_one]l=y[_two]l=vround min(if serifs:-.5d else: -d+vair fi,-oo-.6[thin_join,vair]-eps);%!!! +y[_one]r-y[_one]l=y[_two]r-y[_two]l=.6[thin_join,vair];%!!! +penpos[_three](max(currentbreadth+eps,curve if hefty:-3stem_corr fi),0); +y[_three]=.5[y[_one]r,-full_d];%!!! +x[_two]l=x[_two]r=w-4.75u; x[_one]l=x[_one]r=x[_zero]; +x[_three]r=hround(w-1.5u); x[_two]l:=x[_four]l:=x[_two]r-.25curve;%!!! +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_five]=z[_three]; pos[_five](curve if hefty:-3stem_corr fi,0); + pos[_six](vair,-90); bot y[_six]r=-full_d-oo; %!!! + y[_seven]-.5flare=-full_d+.15desc_depth;%!!! + pos[_seven](hair,-180); pos[_eight](bulb_diam,-180); + rt x[_eight]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-2.5u if monospace: / expansion_factor fi);%!!! + z[_seven]r=z[_eight]r; + x[_six]=max(rt x[_eight]l,.6[x[_five],x[_seven]r]); + (x,y[_six]r)=whatever[z[_six]l,z[_five]l]; + x[_six]r:=max(x,.5[x[_seven]r,x[_six]]); + filldraw stroke super_arc.e([_five],[_six]); + bulb([_six],[_seven],[_eight]); % bulb +else: + pickup fine.nib; z[_five]=z[_three]; + pos[_five](max(fine.breadth,curve if hefty:-3stem_corr fi),0); + pos[_nine](vair',-90); pos[_six](.6[vair',flare],-105); + rt x[_six]r=x[_three]-3.5u; bot y[_six]r=-full_d;%!!! + bot y[_nine]r=-full_d-oo; x[_nine]=.35[x[_six]r,x[_three]r];%!!! + filldraw stroke super_arc.e([_five],[_nine]) + & term.e([_nine],[_six],left,.75,4); fi +%%% +penlabels(0,1,2,3,4,5,6,7, 8,9,10,11,12,13,14,15,16); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2lol.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2lol.mf new file mode 100644 index 00000000000..640e6f715f8 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2lol.mf @@ -0,0 +1,1449 @@ +% +% lgt2lol.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lowercase Cyrillic letters 0--127 for T2 encoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 +% +% X2 T2A T2B T2C +% +% ae "61 a "ac - - Ligature AE +% abh_ch "64 d - - "b1 Abkhasian che (same as lower e with hook) +% abh_ch_dsc "65 e - - "b2 Abkhasian che descender +% k_vcrs "66 f "ab - - Ka vertically crossed +% k_hcrs "67 g - - "ab Ka horisontally crossed +% l_dsc "68 h - "aa "aa El with descender +% m_dsc "6c l - - "a8 Em with descender +% abh_ha "6e n - - "b7 Abkhasian kha +% p_tl "6f o - - "a0 Pe with tail +% +% r_dsc "70 p - - "a5 Er with descender +% lat_q "71 q - - - Latin letter Q +% t_dsc "72 r - - "a2 Te with descender +% tetse "74 t - - "a1 Ligature Te-Tse +% ch_vcrs "76 v "b7 - - Che vertically crossed +% lat_w "77 w - - - Latin letter W +% +% n_ltl "1d - - "b9 En with left tail +% delta "1f - "a6 - Delta +% m_tl - - - "ae Em with tail +% r_gcrs - - - "a6 Er grave crossed +% s_acrs - - - "b1 Es acute crossed +% g_crsdsc - - "a0 - Ghe crossed with descender +% h_hcrs - - "b4 - Kha horisontally crossed +% +% semisn - - - "b3 Semi Soft Sign +% i_shdsc - - - "b4 I Short with descender +% r_tl - - - "bb Er with tail +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Lowercase Cyrillic letter ae - ligature ae"; +cyrchar(ae,13u#,x_height#,0); +italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); +adjust_fit(0,0); numeric left_curve,right_curve; +if monospace: right_curve=left_curve=fudged.stem; +else: left_curve=max(tiny.breadth,hround(curve-2stem_corr)); +right_curve= + max(tiny.breadth,hround(curve-if serifs: 6 else: 8 fi\\stem_corr));fi +pickup tiny.nib; pos11(right_curve,0); +pos12(vair,90); pos13(mfudged.stem,180); +y11=good.y bar_height; top y12r=h+vround 1.5oo; y10l=bot y11; +rt x11r=hround min(w-.5u,w-u+.5right_curve); +lft x13r=hround (.5w-.5mfudged.stem); x12=.55[x13,x11]; +{{interim superness:=more_super; + filldraw stroke super_arc.e(11,12)}}; % right bowl of e +y13=.5[y12,y14]; bot y14r=-oo; x14=x12+.25u; +if serifs: + pos14(vair',270); pos15(mfudged.hair,360); + y15=max(good.y(.5bar_height-.9),y14l+vair); x15r=x11r; + (x,y14l)=whatever[z14r,z15]; x14l:=min(x,x14l+.5u); + filldraw stroke pulled_arc.e(12,13) + & pulled_super_arc.e(13,14)(.8superpull) + ...{x15-x14,5(y15-y14)}z15e; % left bowl, arc, and terminal of e +else: + pos14(vair,270); + filldraw stroke super_arc.e(12,13) + & super_arc.e(13,14); % left bowl and arc of e + pickup fine.nib; pos14'(vair,270); z14=z14'; + pos15(.5[vair,flare],275); rt x15r=hround(w-.6u); + y15r=good.y(y15r+1/3bar_height-y15); y15l:=good.y + y15l; x15l:=good.x x15l; + filldraw stroke term.e(14',15,right,1,4); fi % right terminal +y11'r=y10r=y10l+.6[thin_join,vair]; y11'l=y10l; +x11'l=x11'r=x11; x10l=x10r=x13; +fill stroke z10e--z11'e; % crossbar +pickup fine.nib; top y3r=h+vround 1.5oo; +if serifs: + pos1(flare,180); pos2(mfudged.hair,180); + pos3(vair,90); lft x1r=hround max(u,2.1u-.5flare); x3=4u; + y1=min(bar_height+.5flare+2vair+2,.9[bar_height,h]-.5flare); + bulb(3,2,1); % bulb +else: + pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r; + pos3(1/8[vair,thin_join],90); + x3=4.3u; top y1r=vround .82[bar_height,top y3r]; + filldraw stroke term.e(3,1,left,.9,4); fi % left terminal +pos4(mfudged.stem,0); x4=x13; y4=1/3[bar_height,h]; +pos5(mfudged.stem,0); x5=x4; y5=min(y4,y13); +filldraw stroke super_arc.e(3,4)&z4e--z5e; % arc and stem +pos6(.6[thin_join,vair],90); x6=x4; bot y6=y10l; +pos7(left_curve,180); lft x7r=hround max(.5u,1.5u-.5left_curve); +y7=1/3[top y8l,top y6r]; +pos8(vair,270); x8l=3.75u; bot y8r=-oo; +pos9(.5[vair,fudged.stem],360); x9=x5; y9=.55bar_height; +(x',y8r)=whatever[z8l,z9l]; x8r:=max(x',x8-u); +{{interim superness:=more_super; + filldraw stroke z9e{down}...z8e{left}...{up}z7e&super_arc.e(7,6)}}; % bowl +if y9<y5: + filldraw stroke z5e{down}..{down}z9e; fi % link (usually hidden) +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); +endchar; + +lhchar "Lowercase Cyrillic letter abh_ch - lower e hook"; +cyrchar(abh_ch,7.25u#+max(.75u#,.5curve#),x_height#,0); +italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); +adjust_fit(1.25dot_size# if monospace:+\\.25u#,.5u#+ else:,fi\\ 0); +% lower_e; +numeric left_curve,right_curve; +left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; pos1(right_curve,0); +pos2(vair,90); pos3(left_curve,180); +y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1; +rt x1r=hround min(w-.5u,w-u+.5right_curve); +lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u; +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; +if serifs: + pos4(vair',270); pos5(hair,360); + y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; + (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal +else: + pos4(vair,270); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,270); z4=z4'; + pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke term.e(4',5,right,1,4); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: + x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +%%%%% +% bulb +if serifs: pickup crisp.nib; fi +pos6(max(currentbreadth+eps,.6[thin_join,vair]),-90); +x6=x3; bot y6r=y0l; +lft x7r=min(l+letter_fit+hround(.5u-.5),lft x0l-flare-1); y7=.5[y1,y2]; +if serifs: + pos7(hair,-180); pos8(hround 7/8[hair,flare],-180); z8r=z7r; + {{less_tense; cyrbulb(6,7,8)}}; +else: + pos7(vair,-150); + filldraw stroke z6e{left}...{dir60}z7e; fi +%%% +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter abh_ch_dsc - lower e hook ogonek"; +cyrchar(abh_ch_dsc,7.25u#+max(.75u#,.5curve#),x_height#,desc_depth#); +italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); +adjust_fit(1.25dot_size# if monospace:+\\.25u#,.5u#+ else:,fi\\ 0); +% lower_e; +numeric left_curve,right_curve; +left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; pos1(right_curve,0); +pos2(vair,90); pos3(left_curve,180); +y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1; +rt x1r=hround min(w-.5u,w-u+.5right_curve); +lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u; +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; +if serifs: + pos4(vair',270); pos5(hair,360); + y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; + (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal +else: + pos4(vair,270); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,270); z4=z4'; + pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke term.e(4',5,right,1,4); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: + x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +%%% +% bulb +if serifs: pickup crisp.nib; fi +pos6(max(currentbreadth+eps,.6[thin_join,vair]),-90); +x6=x3; bot y6r=y0l; +lft x7r=min(l+letter_fit+hround(.5u-.5),lft x0l-flare-1); y7=.5[y1,y2]; +if serifs: + pos7(hair,-180); pos8(hround 7/8[hair,flare],-180); z8r=z7r; + {{less_tense; cyrbulb(6,7,8)}}; +else: + pos7(vair,-150); + filldraw stroke z6e{left}...{dir60}z7e; fi +%%%%% +% descender-ogonek + path p.r; + p.r=if serifs: pulled_arc.r(3,4)...{x5-x4,5(y5-y4)}z5r + else: term.r(4',5,right,1,4) fi; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + numeric tt; % the time... + tt=if serifs: if hefty: 2.6 else: 2.5 fi else: % sansserif + if is_bold: .6 else: .8 fi\\ fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_pos=(point tt of p.r)+.5(the_pen-if serifs: tiny else: fine fi)* + unitvector((direction tt of p.r) rotated 90)-(ogonek_breadth-the_pen,0); +easy_ogonek(the_pen,9,10,11); % ogonek +%%% +penlabels(0,1,2,3,4,5,6,7,8, 9,10,11); endchar; + +iff not specific:% +lhchar "Lowercase Cyrillic letter k_vcrs - ka vcrossed (`roman')"; +cyrchar(k_vcrs,11.5u# if not serifs:+.5width_adj# fi, + % n_width+if serifs:1.5u else:+2u+.5tiny fi + x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(serif_fit#,serif_fit#); + numeric stem[]; stem1=max(tiny.breadth,hround(fudged.stem-stem_corr)); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + pickup tiny.nib; + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi % lower stem serif +% kv_rbowl; + pos10(stem1,0); x10=hround(w-7u); y10=y1; + numeric right_jut,stem[],alpha[]; + right_jut=if serifs:.6jut else:.4tiny fi; pickup tiny.nib; +% + stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); + stem2=max(tiny.breadth,fudged.stem-3stem_corr); + x3r=(hround(r-letter_fit-.7u-right_jut)-.5tiny+eps); + x6r=(hround(r-letter_fit-.3u-right_jut)-.5tiny+eps); + y4=.7bar_height; top y3=h; bot y6=0; x4=x10; + penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); + alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); + penpos6(alpha2*(stem2-tiny),0); + alpha2=diag_ratio(1,.5(stem2-tiny),y10-y6,x6r-x10); + forsuffixes $=l,r: y3'$=h; y6'$=0; z4$=z3'$+whatever*(z3-z4); + z5$=z6'$+whatever*(z10-z6)=z3'$+whatever*(z4-z3); endfor + z5=.5[z5l,z5r]; + z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); + % we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] + z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); + z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); + fill z5r--diag_end(5r,3'r,1,.5,3'l,5l)--z5l--cycle; % upper diagonal + fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal + if (2(y5l-y5r)>(.6[thin_join, vair]-eps)) or (y5l<y5r): + y7r=vround (y5l+.5(.6[thin_join, vair])-eps); + else:y7r=vround (y5r+.5(.6[thin_join, vair])-eps); fi + y7r=y8r; y7r-y7l=y8r-y8l=(.6[thin_join, vair]); x7l=x7r=x1; x8l=x8r=x5r; + fill stroke z7e--z8e; % middle cross +%%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + slab:=vair; % lower.slab + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +% vcross +pickup if serifs: crisp.nib else: fine.nib fi; +numeric middle_weight; +middle_weight=max(currentbreadth+eps,.6[thin_join,vair]); +pos9(middle_weight,0); pos11(middle_weight,0); +lft x9l=lft x11l= + hround max(tiny.rt x1r+1,max(x5l-middle_weight,.5[tiny.rt x1r,x5l])); +top y11-bot y9=.5x_height; .52[y9,y11]=.5[y7l,y7r]; +filldraw stroke z9e--z11e; % cross bar +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +iff not specific:% +lhchar "Lowercase Cyrillic letter k_hcrs - ka hcrossed (`roman')"; +cyrchar(k_hcrs,10u#,asc_height#,0); % n_width +italcorr x_height#*slant-.2u#; +adjust_fit(serif_fit#,serif_fit#); full_h:=h; h:=x_height; +% lower_hk; +% long k_stem; +numeric stem[]; stem1=max(tiny.breadth,hround(fudged.stem-stem_corr)); +stem2=max(tiny.breadth,hround(fudged.stem-2stem_corr)); +pickup tiny.nib; pos1(stem1,0); pos2(stem2,0); +lft x1l=lft x2l=hround (2.5u-.5stem1); top y1=h; bot y2=0; +x11'=x1; top y11'=asc_height; pos11'(stem1,0); +filldraw stroke z11'e--z2e; % stem +pos0(stem1,0); pos0'(stem2,0); y0=y0'; x0=x11'; x0'=x2; +rt z0r=whatever[((w-.7u-jut-hair),x_height),(x1,.7bar_height)]; +filldraw stroke z11'e..z0e--z0'e..z2e; % stem +if serifs: + sloped_serif.l(11',0,a,1/3,jut,serif_drop); % upper stem serif + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi % lower stem serif +% k_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); +stem2=max(tiny.breadth,fudged.stem-3stem_corr); +rt x3r=hround(r-letter_fit-.7u-right_jut)+eps; +rt x6r=hround(r-letter_fit-.3u-right_jut)+eps; +y4=.7bar_height; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + slab:=vair; % lower.slab + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +%%%%% +% hcross +h:=full_h; +pickup crisp.nib; +pos7(bar,90); pos8(bar,90); +top y7r=top y8r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +rt x8=x1r+if serifs: max(limit_dist,1.1jut) else: 1.7u fi; +lft x7=hround 1/3u-serif_fit; +filldraw stroke z7e--z8e; % cross bar +penlabels(1,2,3,4,5,6, 7,8); endchar; + +lhchar "Lowercase Cyrillic letter l_dsc - el descender"; +cyrchar(l_dsc,10u# % if not serifs:+.5width_adj# fi % dl_width;n_width + ,x_height#,if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit# + if not serifs:+\\.5(stem#-u#),.5(stem#-u#)+ else:,fi\\ serif_fit#); %dl_adj +begingroup +% lower_l; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric light_hair,bot_vair,bulb_diam,left_jut; +light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi; +bot_vair=Vround(.5[vair,light_hair]); +bulb_diam=hround 7/8[hair,flare]; +left_jut= + if serifs: max(limit_dist,1.1jut) else: hround (w+serif_fit-rt x2r-.5u) fi; +x3=1/3[w-rt x1r-(1/8left_jut),rt x1r] if not serifs: -.5(stem-u) fi +eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(hair,-180); + top y3=h; y6-.5bulb_diam=.12desc_depth-eps; z6r=z5r; + lft x6r=l+letter_fit+hround(.35u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); + bot y4r=-1.5oo-eps; {{less_tense; bulb(4,5,6)}}; %bulb + filldraw stroke z4e{right} + ..controls (min(15/16[x4,x3],max(x4,lft x6r+1.75bulb_diam))+(x3e-x3),y4e) + and (x3e,max(y4l,min(y6-.5,1/3h+eps))+1/3(y4e-y4))..{up}z3e; % left tail +else: + pos3'(vair,90); pos1'(vair,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; % upper bar + pickup fine.nib; pos3(light_hair,0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=.67[x3l,x5]; + lft x5=l+letter_fit+hround(.35u-.5); bot y4r=bot y5r; y3=y3'; + filldraw stroke z3e{down}..controls (x3e,y5e+.35h) + and (min(7/8[x4e,x3e],x4e+2light_hair)+eps,y4e-eps)..{left}z4e--z5e; fi % left stem +%%% +save slab; % lower.slab +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5jut); + if is_ogonek: + slab:=vair; % lower.slab + dish_serif(2,1,a,1/3,jut,b,1/3,jut); %!!! % lower right serif + fi + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut); % upper right serif + nodish_serif(3,0,e,1/3,1.05jut,f,1/3,inner_jut); % upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + slab:=vair; % lower.slab + numeric right_jut; + right_jut=if serifs: max(limit_dist,1.1jut) else: hround (r-rt x2r-.5u) fi; + r_serif(2,1,o,1/3,jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(1,2,3,4,5,6, 7,8,9);endchar; + +lhchar "Lowercase Cyrillic letter m_dsc - m descender"; +cyrchar(m_dsc,12u# if not serifs:+width_adj# fi,x_height#, + if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0 else:serif_fit# fi, %wlett_adj + if monospace: 0 else: serif_fit# if not serifs:+.5(stem#-u#) fi fi); %dl_adj&wlett_adj +begingroup +% lower_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.stem-3stem_corr); +stem3=min(stem2,hround (fudged.hair-2stem_corr)); +stem4=max(stem1,hround(fudged.stem-3stem_corr)); +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround (w-2.5u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: + y6=if monospace: vround 1/3h else: oo fi; + numeric upper_notch,lower_notch; + upper_notch=h-notch_cut+eps; lower_notch=y5+notch_cut-eps; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5+eps,lower_notch)--(x0-.5-eps,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: + y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +save slab; % lower.slab +if serifs: + numeric inner_jut; + if rt x2r+jut+.5u+1+eps+.5stem3<=lft x4l-.5stem3-jut: inner_jut=jut; + else: rt x2r+inner_jut+.5u+1+eps+.5stem3=lft x4l-.5stem3-inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + serif(1,2,a,1/3,-jut); % upper left serif + serif(3,4,d,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,b,1/2,jut,c,1/2,jut)(dark); % lower left serif + if is_ogonek: + dish_serif(4,3,e,1/3,jut,f,1/3,jut); %!!! % lower right serif + fi +fi +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,9,10,11); % ogonek +else: + slab:=vair; % lower.slab + numeric right_jut; + right_jut=if serifs: max(limit_dist,1.1jut) else: hround (r-rt x4r-.5u) fi; + r_serif(4,3,o,1/3,jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(0,1,1',2,3,3',4,5,6,7,8, 9,10,11); endchar; + +lhchar "Lowercase Cyrillic letter abh_ha - Abkhazian ha"; +cyrchar(abh_ha,9u#,x_height#,desc_depth#); %o +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); pickup fine.nib; +numeric right_curve,mid_curve; +right_curve=.7[.7[thin_join,vair],curve] if hefty:-stem_corr fi; +mid_curve=.5[.7[thin_join,vair],curve] if hefty:-2stem_corr fi; +penpos1(vair,90); penpos3(vair',-90); +penpos2(curve,180); penpos4(right_curve,0); +interim superness:=hein_super; +x2r=hround max(.5u,1.25u-.5curve); %o +x4r=w-x2r; x1=x3=x6=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=.52h; +y7=-1/3d; rt x7=hround(w-.5u); penpos7(.7[thin_join,vair],270); +y6=.5y5r; penpos6(mid_curve,180); +x5=if serifs:.5[x6,x4]else:.5[x6,x4]fi; +y5r=.5[y4,y1]; penpos5(.7[thin_join,vair],90); +fill stroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) % 3/4 bowl + & pulled_super_arc.e(4,5)(.25superpull) + & pulled_super_arc.e(5,6)(.75superpull) + & pulled_super_arc.e(6,7)(.5superpull); %6/4 bowl +fill z7l--z7r{right}..{up} + if fine.top y7r>fine.bot y7l: (fine.rt x7,y7) + else: (fine.rt x7,fine.top y7r)--(fine.rt x7,fine.bot y7l) fi + {up}..{left} cycle; +z1'=z1; z4'=z4; pos1'(vair,90); pos4'(.75[.7[thin_join,vair],curve],0); +forsuffixes e=l,r: path p.e; +p.e=pulled_super_arc.e(1',4')(.5superpull); endfor +filldraw stroke subpath (0,.67) of p.e; %quart +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter p_tl - pe tail"; +cyrchar(p_tl,10u# if not serifs:+.5width_adj# fi, % n_width + x_height#,desc_depth#); % n_width +italcorr (.7x_height#-bar_height#)*slant; %o.7h-bar_height +adjust_fit(if monospace:-.15u# else:serif_fit# fi, + if serifs:if monospace: 2.6u# else: 4u# fi else: 3u#+.5curve# fi); %tail_adj +% lower_p; +pickup tiny.nib; +pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +%%% +if serifs: + numeric inner_jut[]; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut1=jut; % stay for tail serif + else: rt x1r+inner_jut1+.5u+1=lft x3l-inner_jut1; fi + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut1); % lower left serif + %dish_serif(4,3,g,1/3,inner_jut1,h,1/3,jut); %!!! % lower right serif + inner_jut2=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,inner_jut2); % upper left serif + nodish_serif(3,4,e,1/3,inner_jut2,f,1/3,jut); % upper right serif + filldraw z.b0--z.b1--z.e1--z.e0--cycle; % upper inter_serif bar +else: + lft x1'= lft x1l; top y1'r=h; pos1'(vair,90); + rt x3'=rt x3r; y3'=y1'; pos3'(vair,90); + filldraw stroke z1'e--z3'e; fi % upper bar +%%%%% +w:=w+if (not serifs) or monospace: 3u+.5curve else: 4u fi; +% tail_part(4); +_zero:=4; +_one:=5; _two:=6; _three:=7; _four:=8; _five:=9; +_six:=10; _seven:=11; _eight:=12; _nine:=13; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); +set_bar_axis; y[_one]r=y[_two]r=y2.bh; y[_one]l=y[_two]l=y1.bh; +penpos[_three](max(currentbreadth+eps,curve if hefty:-3stem_corr fi),0); +y[_three]=.5[y[_one]r,-d]; +x[_two]l=x[_two]r=w-4.75u; x[_one]l=x[_one]r=x[_zero]; +x[_three]r=hround(w-u); x[_two]l:=x[_four]l:=x[_two]r-.25curve; +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_five]=z[_three]; pos[_five](curve if hefty:-3stem_corr fi,0); + pos[_six](vair,-90); bot y[_six]r=-d-oo; y[_seven]-.5flare=-.85d; + pos[_seven](hair,-180); pos[_eight](bulb_diam,-180); + rt x[_eight]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-3.5u if monospace: / expansion_factor fi); + z[_seven]r=z[_eight]r; + x[_six]=max(rt x[_eight]l,.6[x[_five],x[_seven]r]); + (x,y[_six]r)=whatever[z[_six]l,z[_five]l]; + x[_six]r:=max(x,.5[x[_seven]r,x[_six]]); + filldraw stroke super_arc.e([_five],[_six]); + bulb([_six],[_seven],[_eight]); % bulb +else: + pickup fine.nib; z[_five]=z[_three]; + pos[_five](max(fine.breadth,curve if hefty:-3stem_corr fi),0); + pos[_nine](vair',-90); pos[_six](.6[vair',flare],-105); + rt x[_six]r=x[_three]-4.5u; bot y[_six]r=-d; + bot y[_nine]r=-d-oo; x[_nine]=.35[x[_six]r,x[_three]r]; + filldraw stroke super_arc.e([_five],[_nine]) + & term.e([_nine],[_six],left,.75,4); fi +%%% +if serifs: + if rt x2r+jut+.5u+1<=x[_three]r: inner_jut3=jut; + else: rt x2r+inner_jut3+.5u=x[_three]r; fi + slab:=vair; % lower.slab + dish_serif(4,3,g,1/3,inner_jut1,h,1/3,inner_jut3); fi % lower right serif +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Lowercase Cyrillic letter r_dsc (looks like p)"; +cyrchar(r_dsc,10u#+serif_fit#,x_height#, + max(1.6desc_depth#,paren_depth#));%r_ddepth +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit#,0); full_d:=d; +d:=vround min(desc_depth,max(vair+slab+oo+1+eps,full_d-max(.4desc_depth,.55beak)-slab));%r_dscs +% lower_r; +pickup tiny.nib; pos1(stem',0); pos2(stem,0); +pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; +lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi; +numeric edge; edge=rt x2r; +pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180); +pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180); +rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]); +y3=1/8[bar_height,x_height]; +x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo; +rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height; +x6l=x4l-.2u; bot y6r=-oo; +x7=x3; y7=min(y3,y6+y4-y3+.6vair); +(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); +(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]); +filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5) + &super_arc.e(5,6)&z6e{left}...{up}z7e; % bowl +y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); +pickup tiny.nib; bot y2=-d; +filldraw stroke z1e--z0'e--z0e--z2e; % stem +pickup crisp.nib; pos8(hair,0); pos7'(stem,0); +z7'=z2; x8l=x7'l; bot y8=0; +filldraw stroke z7'e--z8e; % point +if serifs: + sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif + if is_ogonek: + dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi %!!! % lower serif +fi +%%%%% +% r_descender/ogonek +if is_ogonek: + d:=d+desc_depth; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l fi,tiny.bot y2+.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + ogonek_move=bot y2; + easy_ogonek(the_pen,9,10,11); % ogonek + chardp:=d/hppp; +else: + d:=full_d; + numeric right_jut; + right_jut=if serifs: 1.414jut else: .5stem+.5u fi; + r_serif(2,0,o,1/3,jut,p,1/3,beak_darkness,right_jut,.5beak_jut); % lower left serif +fi +penlabels(0,1,2,3,4,5,6,7,8, 9,10,11); endchar; + +lhchar "Lowercase Cyrillic letter lat_q"; +cyrchar(lat_q,10u#+serif_fit#,x_height#,desc_depth#); +italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi; +adjust_fit(0,serif_fit# if serifs: -.5u# fi); +pickup tiny.nib; pos1(stem',0); pos2(stem,0); +pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2; +rt x1r=hround(w-2.5u+.5stem'); +numeric edge; edge=lft x2l; +pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0); +pos4(vair',90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360); +lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height; +x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo; +lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height; +x6l=x4l-.2u; bot y6r=-oo; y7=min(y3,y6+y4-y3+.6vair); +lft x7l=min(lft x7l-(rt x7r-tiny.rt x2r),1/3[lft x2,edge]); +(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]); +(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]); +filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5) + &super_arc.e(5,6)&z6e{right}...{up}z7e; % bowl +y1=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l)); +y0=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{right}...{up}z7l)); +pickup tiny.nib; bot y2=-d; +filldraw stroke z1e--z0'e--z0e--z2e; % stem +pickup crisp.nib; +pos8(hround(hair-stem_corr),0); pos7'(stem',0); +z7'=z1; x8r=x7'r; top y8=h+oo; +filldraw stroke z7'e--z8e; % point +if serifs: + dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +lhchar "Lowercase Cyrillic letter t_dsc - te descender"; +cyrchar(t_dsc,9u#-width_adj#,x_height#, + if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-beak_jut#+.35u#; %Gamma->x_height+.65u# +adjust_fit(0,0); +begingroup +% lower_t; +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround(.5w-.5stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(vair,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.45u); y4=good.y(y3l-beak/1.4)-eps; +arm(3,4,e,beak_darkness,.4beak_jut); % right arm and beak +pos5(hair,180); x5=w-x4; y5=y4; +arm(3,5,f,beak_darkness,-.4beak_jut); % left arm and beak +%%% +save slab; % lower.slab +if serifs: + if is_ogonek: slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,1.414jut,d,1/3,1.414jut); %!!! % lower serif + fi + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,.5jut,b,1/3,.5jut); fi % upper bracketing +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,6,7,8); % ogonek +else: + slab:=vair; % lower.slab + numeric right_jut; + right_jut=if serifs: 1.414jut else: .5stem+.5u fi; + r_serif(2,1,g,1/3,1.414jut,h,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(1,2,3,4,5, 6,7,8); endchar; + +lhchar "Lowercase Cyrillic letter tetse - ligature tetse"; +cyrchar(tetse,10.5u# if not serifs:+.5width_adj# fi, % n_width+.5 + x_height#,sbeak#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(1.8u#-.5width_adj#, + serif_fit# if not serifs:+.5(stem#-u#) fi) %dl_adj +% lower_c;tetse +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround (2u-.5fudged.stem-eps) if monospace:-.35u fi; +rt x3r=rt x4r=w-hround (2.5u-.5fudged.stem-eps); %x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric inner_jut,right_jut; +save slab; % lower.slab +if serifs: + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif +else: + lft x2'= lft x2l; bot y2'l=0; pos2'(vair',90); + rt x4'= rt x4r; y4'=y2'; pos4'(vair',90); + filldraw stroke z2'e--z4'e; fi % lower_bar +% lowercase descender +slab:=vair; % lower.slab +inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); +right_jut=if serifs: max(limit_dist,1.1jut) else: hround (r-rt x4r-.5u) fi; +r_serif(4,3,g,1/3,inner_jut,h,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender +if serifs: + filldraw z.d0--z.d1--z.g1--z.g0--cycle; fi % lower inter_serif bar +% T part +pickup crisp.nib; pos5(vair,90); pos6(hair,180); pos7(hair,0); +x5=x1; x5-x6=x7-x5; +lft x6r=l+letter_fit+hround if monospace:.1u else:.45u fi; +top y5r=h; y6=good.y(y5l-beak/1.4)-eps; y7=y6; +arm(5,6,q,beak_darkness,-.35beak_jut); arm(5,7,r,beak_darkness,.35beak_jut); +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter ch_vcrs - che vcrossed"; +cyrchar(ch_vcrs,10u# if not serifs:+.5width_adj# fi,x_height#,0); % n_width +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_ch; +pickup tiny.nib; +numeric middle_weight; middle_weight=.6[thin_join,vair]; +pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +penpos2'(fudged.stem,0); z2'=z2; +penpos5(middle_weight,90); penpos6(middle_weight,90); +penpos6'(middle_weight,90); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; x5l=1/3[x1,x3]; +y6l=vround(.48h-.5middle_weight if serifs:-.15(.5[hair,.7stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +y5l=y6l; x6=x6'=x3; +if serifs: y6'l=min(3/5h,y6l-hair+1.05stem); fi +if serifs: + if ((y6'l-y6l)>=middle_weight+1+eps): + fill stroke z2'e{down}..z5e{right}...{.75(z5-z6)+z6'}z6'e; % arc + else: + fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); % lower right serif +else: + fill stroke pulled_arc.e(2',5) & z5e{right}...{right}z6e; fi % arc +%%%%% +% vcross +pickup if serifs: crisp.nib else: fine.nib fi; +numeric middle_weight; +middle_weight=max(currentbreadth+eps,.6[thin_join,vair]); +pos7(middle_weight,0); pos8(middle_weight,0); +lft x7l=lft x8l=hround (.5[x1,x3]-.5middle_weight); +top y8-bot y7=.5x_height; .5[y7,y8]=y6; +filldraw stroke z7e--z8e; % cross bar +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Lowercase Cyrillic letter lat_w"; +cyrchar(lat_w,13u#,x_height#,0); +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit#,serif_fit#); +numeric stem[],outer_jut,upper_notch,alpha,mid_corr; +outer_jut=.7jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u; +stem1=fudged.stem-stem_corr; +stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1); +stem2=if hefty:.1[vair,stem4] else: stem4 fi; +stem3=max(stem2,stem1-3stem_corr); +x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex_corr=x3l; x6l+apex_corr=x7l; +y1=y8=h; y2=y3=y6=y7=-apex_oo; +y4=y5=if monospace: vround .6 fi\\ h; upper_notch=y4-notch_cut; +mid_corr=if monospace or hefty:-.3apex_corr else: .5jut fi; +alpha=diag_ratio(4,stem2-stem3+stem4,y1-y2,x8r-x1l+mid_corr-2apex_corr); +penpos1(alpha*stem1,0); penpos2(alpha*stem1,0); +penpos3(alpha*stem2,0); penpos4(alpha*stem2,0); +penpos5(alpha*stem3,0); penpos6(alpha*stem3,0); +penpos7(alpha*stem4,0); penpos8(alpha*stem4,0); +x4l-x1l=floor(x4l-x1l+.5(x5r+mid_corr-x4r)); % |x5r| $\approx$ |x4r+mid_corr| +z23=whatever[z1r,z2r]=whatever[z3l,z4l]; +z45=whatever[z3r,z4r]=whatever[z5l,z6l]; +z67=whatever[z5r,z6r]=whatever[z7l,z8l]; +fill diag_end(1l,2l,1,1,3r,4r){z4-z3} + ...if y45<upper_notch:(x45,upper_notch)+.5left{up} + --(x45,upper_notch)+.5right{down} else: z45&z45 fi + ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8} + ...if y67>notch_cut:(x67,notch_cut)+.5right{down} + --(x67,notch_cut)+.5left{up} else: z67&z67 fi + ...{z5-z6}special_diag_end(6,5,4,3){z3-z4} + ...if y23>notch_cut:(x23,notch_cut)+.5right{down} + --(x23,notch_cut)+.5left{up} else: z23&z23 fi + ...{z1-z2}diag_end(2r,1r,1,1,1l,2l)--cycle; % diagonals +if serifs: + numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(5,6); prime_points_inside(8,7); + if monospace: inner_jut1=inner_jut4=1.5jut; + elseif hefty: inner_jut1=inner_jut4=jut; + else: fill diag_end(6r,5r,1,1,5l,6l)--.9[z5l,z6l] + ..{z5-z6}.1[z5r,z6r]--cycle; % middle stem + inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3; + if rt x1'r+jut+.5u+1<=lft x5'l-.7jut: inner_jut1=jut; + else: rt x1'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi + if rt x5'r+jut+.5u+1<=lft x8'l-1.1jut: inner_jut3=jut; + else: rt x5'r+inner_jut3+.5u+1=lft x8'l-inner_jut4; fi +% cyrillic lowercase thickness + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(5',6,e,1/3,inner_jut2,f,1/2,inner_jut3); fi % upper middle serif + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut1); % upper left serif + dish_serif(8',7,c,.6,inner_jut4,d,1/2,outer_jut)(dark); fi % upper right serif +penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar; + +lhchar "Lowercase Cyrillic letter n_ltl - en with left tail"; +cyrchar(n_ltl,10u# if not serifs:+.5width_adj# fi,x_height#,desc_depth#); % n_width +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit#,serif_fit#); +% lower_n; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +bar_stroke(x1,x3); % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + %dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +%%%%% +% l_tail(2)x; +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+vair'+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + %rt x[_four]l=floor x[_zero]-1.5u if monospace: / expansion_factor fi); %2.5u + lft x[_four]r=-1/6u if monospace: / expansion_factor fi; %2.5u + (x,y[_two]r)=whatever[z[_two]l,z[_one]l]; + x[_two]r:=max(x,.5[x[_three]r,x[_two]]); + forsuffixes e=l,r: + z[_one]'e=((0,y[_four])--(w,y[_four])) intersectionpoint + (pulled_arc.e([_one],[_two])); endfor + if lft x[_one]'l>rt x[_four]l+max(1,1/3vair+.5): + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + else: + x[_one]'l:=min(rt x[_four]l+max(1,hround(1/3vair+.5)),rt x[_one]'r-vair)+.5fine-eps; + filldraw z[_five]r--pulled_arc.r([_one],[_two])--z[_two]l{right} + ..z[_one]'l{up}..{up}z[_five]l--cycle; + fi + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](vair',-90); pos[_three](.6[vair',flare],-105); + rt x[_three]r=x[_zero]-2u; bot y[_three]r=-d;%3u + bot y[_two]r=-d-oo; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(1,2,3,4,5,6, 7,8,9,10,11,[_one]'); endchar; + +iff serifs: +lhchar "Lowercase Cyrillic letter delta - Lowercase Greek delta"; +cyrchar(delta,8u#,asc_height#,0); +italcorr .9asc_height#*slant+.5hair#-1.5u#; +adjust_fit(0,0); pickup fine.nib; +x0=-u; y0=1.1h; +numeric light_flare; light_flare=2/3[vair,flare]; +x1=w-2u-.5light_flare; y1=h-.5light_flare; +numeric theta; theta=angle (z1-z0); +pos1(light_flare,theta-90); pos2(.2[vair,light_flare],-90); pos3(vair,theta); +x2=x3+u; y2=h; +x4=.5w+.5u; x6=.55[x7,x5]; top y8r=x_height+oo; z4=z8; +pos6(vair,-90); pos7(stem,-180); pos8(vair,-270); +pos4(stem,angle(z4-z0)+90); pos5(stem,30); +z3=.5[.5[z1,z4],z0]; +y5+.1x_height=y7=.5[y6,y8]; bot y6=-oo; +lft x7r=hround(1.4u-.5stem); rt x5r=hround(w-u); +filldraw stroke z1e{z0-z1e}....z2e....z3e{(z0-z1)rotated 90} + ...z4e{z4e-.8[z4,z0]} + ....z5e{down}...pulled_arc.e(6,7) & pulled_arc.e(7,8); % hook and bowl +filldraw z1r{z1r-z0}...z1l{z0-z1l}--cycle; % bulb +math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#); +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +iff not serifs: +lhchar "Lowercase Cyrillic letter delta - Lowercase Greek delta"; +cyrchar(delta,8u#,asc_height#,0); +italcorr .9asc_height#*slant+.5hair#-1.5u#; +adjust_fit(0,0); pickup fine.nib; +x0=-u; y0=1.1h; +numeric light_flare; light_flare=2/3[vair,flare]; +x1=w-2u-.5light_flare; y1=h-.5light_flare; +numeric theta; theta=angle (z1-z0); +pos1(light_flare,theta-90); pos2(.2[vair,light_flare],-90); +x2=x3+u; y2=h; +x4=.5w+.5u; x6=.5[x7,x5]; top y8r=x_height+oo; z4=z8; +pos6(vair,-90); pos7(stem,-180); pos8(vair,-270); +pos4(.5[vair,stem],angle(z4-z0)+90); pos5(fudged.stem,0); pos3(vair,angle(z4-z0)+90);%theta +z3=.4[z4,(x0,.5[y0,h])]; +y5=y7=.5[y6,y8]; bot y6=-oo; +lft x7r=hround(1.4u-.5stem); rt x5r=hround(w-1.4u+.5stem); +z35=point 1.5 of (z1{z0-z1}...z2....z3{z4-z0}); +pos35(vair,angle(.5[z4,z1]-z0)); +filldraw stroke z1e{z0-z1e}...z2e....z3e{z4e-z0} + ...z4e{z4-.8[z4,(x0,h)]} + ...%z5e{down}... +{{interim superness:=more_super; +pulled_arc.e(5,6) & pulled_arc.e(6,7) & pulled_arc.e(7,8)}}; % hook and bowl +math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#); +penlabels(0,1,2,3,35,4,5,6,7,8); endchar; + +lhchar "Lowercase Cyrillic letter m_tl - m tail"; +cyrchar(m_tl,12u# if not serifs:+width_adj# fi,x_height#,desc_depth#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0,0 else:serif_fit#,serif_fit# fi); %wlett_adj +% lower_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.stem-3stem_corr); +stem3=min(stem2,hround (fudged.hair-2stem_corr)); +stem4=max(stem1,hround(fudged.stem-3stem_corr)); +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround (w-2.5u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: y6=if monospace: vround 1/3h else: oo fi; + numeric upper_notch,lower_notch; + upper_notch=h-notch_cut+eps; lower_notch=y5+notch_cut-eps; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5+eps,lower_notch)--(x0-.5-eps,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +if serifs: numeric inner_jut; + if rt x2r+jut+.5u+1+eps+.5stem3<=lft x4l-.5stem3-jut: inner_jut=jut; + else: rt x2r+inner_jut+.5u+1+eps+.5stem3=lft x4l-.5stem3-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + serif(1,2,a,1/3,-jut); % upper left serif + serif(3,4,d,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,b,1/2,jut,c,1/2,jut)(dark); fi % lower left serif + %dish_serif(4,3,e,1/3,jut,f,1/3,jut); fi %!!! % lower right serif +%%%%% +% l_tail(4); +_zero:=4; +_one:=9; _two:=11; _three:=12; _four:=13; _five:=14; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+vair'+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=max(x[_zero]l-bulb_diam, + floor x[_zero]-2.5u if monospace: / expansion_factor fi); + (x,y[_two]r)=whatever[z[_two]l,z[_one]l]; + x[_two]r:=max(x,.5[x[_three]r,x[_two]]); + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](vair',-90); pos[_three](.6[vair',flare],-105); + rt x[_three]r=x[_zero]-3u; bot y[_three]r=-d; + bot y[_two]r=-d-oo; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(0,1,1',2,3,3',4,5,6,7,8,10, 9,11,12,13,14); endchar; + +lhchar "Lowercase Cyrillic letter r_gcrs - r grave crossed"; +cyrchar(r_gcrs,10u#+serif_fit#,x_height#,desc_depth#); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); +adjust_fit(serif_fit#,0); +% lower_r; +pickup tiny.nib; pos1(stem',0); pos2(stem,0); +pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; +lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi; +numeric edge; edge=rt x2r; +pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180); +pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180); +rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]); +y3=1/8[bar_height,x_height]; +x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo; +rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height; +x6l=x4l-.2u; bot y6r=-oo; +x7=x3; y7=min(y3,y6+y4-y3+.6vair); +(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); +(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]); +filldraw stroke z3e{up}...{right}z4e & super_arc.e(4,5) + & super_arc.e(5,6) & z6e{left}...{up}z7e; % bowl +y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); +pickup tiny.nib; bot y2=-d; +filldraw stroke z1e--z0'e--z0e--z2e; % stem +pickup crisp.nib; pos8(hair,0); pos7'(stem,0); +z7'=z2; x8l=x7'l; bot y8=0; +filldraw stroke z7'e--z8e; % point +if serifs: + sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif + dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif +%%%%% +path p; numeric unbalance,outer_jut; +p=z5{(x5,y6)-z5}...superness[(x6,y5),(x5,y6)]{z6-z5}...{z6-(x5,y6)}z6; +z9=point.75 of p; +numeric unbalance,outer_jut; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5stem+if serifs: max(limit_dist,if hefty: .8 fi\\ jut) else: 1.7u fi; +put_cyrcross(x9,(y9-bar_height),-outer_jut,-unbalance*outer_jut); +%%% +penlabels(0,1,2,3,4,5,6,7,8, 9); endchar; + +lhchar "Lowercase Cyrillic letter s_acrs - s acute crossed"; +cyrchar(s_acrs,8u#,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +% lower_s; +pickup fine.nib; pos2(vair',90); pos4(vair',270); +x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo; +pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h; % eng +if serifs: + pos1(hair,0); pos0(flare,0); + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + rt x1r=hround(w-.7u); bulb(2,1,0); % bulb + pos5(hair,0); rt x5r=hround(w-.5u); + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: + pos1(4/7[vair',flare],80); + rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2,1,right,.8,4); % upper terminal + pos5(.6[vair',flare],275); rt x5r=hround(w-.5u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e; + if angle direction 1 of p.e>75: + p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & p.e; % arc and lower terminal +fi +%%%%% +pair outer_point; path p; numeric unbalance,outer_jut; +outer_point=superness[(x4r,y3r),(x3r,y4r)]; +p=z3{(x3,y4)-z3} + ... (.5superpull)[superness[(x4,y3),(x3,y4)],outer_point]{z4-z3}...{z4-(x3,y4)}z4; +z6=point.75 of p; +unbalance=.95; %if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5stem+if serifs: max(limit_dist,if hefty: .8 fi\\ jut) else: 1.7u fi; +put_cyrcross(x6,(y6-bar_height),unbalance*outer_jut,outer_jut); +%%% +penlabels(0,1,2,3,4,5, 6); endchar; + +lhchar "Lowercase Cyrillic letter g_crsdsc - ghe hcrossed descender"; +cyrchar(g_crsdsc,8u#-.5width_adj#,x_height#, + if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-beak_jut#+.25u#; %Gamma->x_height+.5u# +adjust_fit(serif_fit#,-.25u#); +begingroup +% lower_g; +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(Vround(vair-vair_corr),90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.45u); y4=good.y(y3l-beak/1.4)-eps; +arm(3,4,e,beak_darkness,.4beak_jut); % upper arm and beak +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,.5jut); % upper serif + if is_ogonek: + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,1.25jut); fi %!!! % lower serif +fi +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + slab:=vair; % lower.slab + numeric right_jut; + right_jut=if serifs: 1.414jut else: 1.7u fi; + r_serif(2,1,o,1/3,jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +% hstroke +bar_stroke(hround 1/3u-serif_fit,x1r+1.7u); % bar +penlabels(1,2,3,4, 5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter h_hcrs - kha (looks like X)"; +cyrchar(h_hcrs,if serifs:9.5u# else:9u# fi,x_height#,0); +italcorr x_height#*slant-.05u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +% lower_h; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=fudged.stem-4stem_corr; stem2=min(fudged.hair,stem1); +outer_jut=.75jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.1u+outer_jut; x2r=r-letter_fit-.3u-outer_jut-xjut; +x3l=l+letter_fit+outer_jut+xjut; x4r=r-letter_fit-outer_jut; y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +if hefty: + z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.2[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' + --diag_end(34',4l,.5,1,4r,24')--z24' + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: + fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +if serifs: + numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,4); prime_points_inside(2,3); + prime_points_inside(3,2); prime_points_inside(4,1); + if rt x1'r+jut+.5u+1<=lft x2'l-jut-xjut: inner_jut1=jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + if rt x3'r+jut+.5u+1<=lft x4'l-jut-xjut: inner_jut2=jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + slab:=vair; % lower.slab + dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +% hstroke +bar_stroke(hround 1/3u-serif_fit,w-hround 1/3u+serif_fit); +penlabels(0,1,2,3,4,12,13,24,34, 5,6); endchar; + +lhchar "Lowercase Cyrillic letter semi soft sign"; +cyrchar(semisn,9u#,x_height#+acc_height#,0); +italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#); +adjust_fit(if serifs: serif_fit# else: 0 fi,if monospace:.5u# else:0 fi); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + sloped_serif.l(1,2,a,1/3,outer_jut,serif_drop); % upper serif + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,.5jut); fi % lower serif +%%% +% lsftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% hcross +pickup crisp.nib; pos8(bar,90); pos9(bar,90); +lft x8=hround 1/3u if serifs:-serif_fit fi; x9=w-2.5u; +top y8r=top y9r=vround x_height+eps; +filldraw stroke z8e--z9e; % cross bar +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Lowercase Russian letter i_shdsc - short i with descender"; +cyrchar(i_shdsc,10u# if not serifs:+.5width_adj# fi, % n_width + x_height#+acc_height#,if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); full_h:=h; h:=x_height; +begingroup +% lower_i; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-2stem_corr; + upper_notch=y6-cap_notch_cut-eps; lower_notch=y5+cap_notch_cut+eps; + if monospace: + x5r =rt x1r; x6l =lft x3l; y5=vround(vair'+eps); y6=vround(h-vair-eps); + alpha1=diag_ratio(1,stem1,y6-y5,x5r-x6l); + penpos5(min(2fudged.stem,alpha1*stem1),0); + penpos6(min(2fudged.stem,alpha1*stem1),0); + x5'=lft x1l; z5'=whatever[z5l,z6l]; x6'=rt x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; + else: + y5l=0; y6r=h; x5=x1r; x6=x3l; penpos5(stem1,0); penpos6(stem1,0); + fi + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5l.. + if y2'>lower_notch: {right}(x2'+1,lower_notch){up}... fi + {z6-z5}diag_in(5l,6l,1,6r)--z6r.. + if y3'<upper_notch: {left}(x3'-1,upper_notch){down}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + y5l=vround(y2+bracket+eps); y6r=vround(y3-bracket-eps); + stem1=max(tiny.breadth,fudged.hair-2stem_corr); + alpha1=diag_ratio(1,stem1,x6-x5,top y6r-bot y5l); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +%%% +numeric inner_jut; +if serifs: + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + if is_ogonek: + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +fi +% lowercase descender +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,14,15,16); % ogonek +else: + if not serifs: inner_jut:=0; fi + slab:=vair; % lower.slab + right_jut:=if serifs: max(limit_dist,1.1jut) else: hround (r-rt x4r-.5u) fi; + r_serif(4,3,g,1/3,inner_jut,h,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +%%%%% +% the accent +h:=full_h; cbreve(.5w,0, 7,8,9,10,11,12,13); +penlabels(1,2,3,4,5,6, 7,8,9,10,11,12,13); endchar; + +lhchar "Lowercase Cyrillic letter r_tl (looks like p)"; +cyrchar(r_tl,10u#+serif_fit#,x_height#, + max(1.6desc_depth#,paren_depth#));%r_ddepth +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit#,0); full_d:=d; +d:=vround min(desc_depth,max(vair+slab+oo+1+eps,full_d-max(.4desc_depth,.55beak)-slab));%r_dscs +% lower_r; +pickup tiny.nib; pos1(stem',0); pos2(stem,0); +pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; +lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi; +numeric edge; edge=rt x2r; +pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180); +pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180); +rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]); +y3=1/8[bar_height,x_height]; +x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo; +rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height; +x6l=x4l-.2u; bot y6r=-oo; +x7=x3; y7=min(y3,y6+y4-y3+.6vair); +(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); +(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]); +filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5) + &super_arc.e(5,6)&z6e{left}...{up}z7e; % bowl +y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); +pickup tiny.nib; bot y2=-d; +filldraw stroke z1e--z0'e--z0e--z2e; % stem +pickup crisp.nib; pos8(hair,0); pos7'(stem,0); +z7'=z2; x8l=x7'l; bot y8=0; +filldraw stroke z7'e--z8e; % point +if serifs: + sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif + dish_serif(2,0,b,1/3,jut,c,1/3,jut); %!!! % lower serif +fi +%%%%% +% tail_part(2);%!!! +_zero:=2; +_one:=9; _two:=10; _three:=11; _four:=12; _five:=13; +_six:=14; _seven:=15; _eight:=16; _nine:=17; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps, + min(full_d-d-.18desc_depth-1-eps,hround 7/8[hair,flare]));%!!! +y[_one]l=y[_two]l=vround min(if serifs:-.5d else: -d+vair fi,-oo-.6[thin_join,vair]-eps);%!!! +y[_one]r-y[_one]l=y[_two]r-y[_two]l=.6[thin_join,vair];%!!! +penpos[_three](max(currentbreadth+eps,curve if hefty:-3stem_corr fi),0); +y[_three]=.5[y[_one]r,-full_d];%!!! +x[_two]l=x[_two]r=w-4.75u; x[_one]l=x[_one]r=x[_zero]; +x[_three]r=hround(w-2u); x[_two]l:=x[_four]l:=x[_two]r-.25curve;%!!! +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_five]=z[_three]; pos[_five](curve if hefty:-3stem_corr fi,0); + pos[_six](vair,-90); bot y[_six]r=-full_d-oo; %!!! + y[_seven]-.5flare=-full_d+.15desc_depth;%!!! + pos[_seven](hair,-180); pos[_eight](bulb_diam,-180); + rt x[_eight]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-2.5u if monospace: / expansion_factor fi);%!!! + z[_seven]r=z[_eight]r; + x[_six]=max(rt x[_eight]l,.6[x[_five],x[_seven]r]); + (xx,y[_six]r)=whatever[z[_six]l,z[_five]l];%!!! + x[_six]r:=max(xx,.5[x[_seven]r,x[_six]]);%!!! + filldraw stroke super_arc.e([_five],[_six]); + bulb([_six],[_seven],[_eight]); % bulb +else: + pickup fine.nib; z[_five]=z[_three]; + pos[_five](max(fine.breadth,curve if hefty:-3stem_corr fi),0); + pos[_nine](vair',-90); pos[_six](.6[vair',flare],-105); + rt x[_six]r=x[_three]-3.5u; bot y[_six]r=-full_d;%!!! + bot y[_nine]r=-full_d-oo; x[_nine]=.35[x[_six]r,x[_three]r];%!!! + filldraw stroke super_arc.e([_five],[_nine]) + & term.e([_nine],[_six],left,.75,4); fi +%%% +penlabels(0,1,2,3,4,5,6,7,8, 9,10,11,12,13,14,15,16,17); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2lou.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2lou.mf new file mode 100644 index 00000000000..2b4dfdf2490 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2lou.mf @@ -0,0 +1,1385 @@ +% +% lgt2lou.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Uppercase Cyrillic letters 0--127 for T2 encoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 +% +% X2 T2A T2B T2C +% +% AE "41 A "8c - - Ligature AE +% ABH_CH "44 D - - "91 Abkhasian che (same as lower e with hook) +% ABH_CH_dsc "45 E - - "92 Abkhasian che descender +% K_vcrs "46 F "8b - - Ka vertically crossed +% K_hcrs "47 G - - "8b Ka horisontally crossed +% L_dsc "48 H - "8a "8a El with descender +% M_dsc "4c L - - "88 Em with descender +% ABH_HA "4e N - - "97 Abkhasian kha +% P_tl "4f O - - "80 Pe with tail +% R_dsc "50 P - - "85 Er with descender +% LAT_Q "51 Q - - - Latin letter Q +% T_dsc "52 R - - "82 Te with descender +% TETSE "54 T - - "81 Ligature Te-Tse +% CH_vcrs "56 V "97 - - Che vertically crossed +% LAT_W "57 W - - - Latin letter W +% N_ltl "1c - - "99 En with left tail +% DELTA "1e - "86 - Delta +% M_tl - - - "8e Em with tail +% R_gcrs - - - "86 Er grave crossed +% S_acrs - - - "91 Es acute crossed +% G_crsdsc - - "80 - Ghe crossed with descender +% H_hcrs - - "94 - Kha horisontally crossed +% SEMISN - - - "93 Semi Soft Sign +% I_shdsc - - - "94 I Short with descender +% R_tl - - - "9b Er with tail +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Uppercase Cyrillic letter AE - ligature AE"; +cyrchar(AE,16u#,cap_height#,0); +if is_small_cap: getcharcode(ae); fi +italcorr cap_height#*slant-beak_jut#-.5u#; +adjust_fit(cap_serif_fit#,0); +numeric left_stem,amid_stem,outer_jut,alpha; +amid_stem=max(tiny.breadth,hround .9[mfudged.hair,mfudged.cap_stem]); +pickup tiny.nib; pos1(amid_stem,0); pos2(amid_stem,0); +lft x1l=lft x2l=hround(if monospace or hefty:.55 else:.5 fi\\w-.75u); +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(mfudged.hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(mfudged.hair,0); x5=x1; +top y5l=vround(if hefty:.52 else:.48 fi\\[y2,y1]+.5cap_bar); +pos0(cap_bar,90); pos7(mfudged.hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs and not(monospace and hefty): + rt x6r=hround(w-3.65u+.5mfudged.hair); + y6=good.y(y5l+.6beak)+eps; rt x9r=hround(w-.5u); +else: + rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +pos8(slab if not serifs:+2stem_corr fi,-90); +pos9(mfudged.hair,0); bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps; +arm(8,9,h,beak_darkness,1.5beak_jut); % lower arm and beak +left_stem=if monospace:fudged.hair else: cap_hair fi if hefty: -3stem_corr fi; +outer_jut=.8cap_jut; x11l=l+letter_fit+outer_jut+.5u; y11=0; +x12=x1l-apex_corr-if monospace:2 fi\\u; y12=h; +alpha=diag_ratio(1,.5left_stem,y12-y11,x12-x11l); +penpos11(alpha*left_stem,0); penpos12(alpha*left_stem,0); +fill diag_end(12l,11l,1,1,11r,12r) + --diag_end(11r,12r,1,1,12l,11l)--cycle; % diagonal +y10=h-slab; z10=whatever[z11,z12]; +fill z10--(x1,y10)--(x1,h)--z12--cycle; % link +penpos13(whatever,angle(z2-z1)); z13=whatever[z11,z12]; +penpos14(cap_band,90); x14=x0; y13l=y14l; y13r=y14r; +if hefty: y14r=.4h; else: y14=y0; fi +penstroke z13e--z14e; % bar line +if serifs: + numeric inner_jut; + pickup tiny.nib; + prime_points_inside(11,12); + if rt x11'r+cap_jut+.5u+1<=lft x2l-.75cap_jut: inner_jut=cap_jut; + else: rt x11'r+inner_jut+.5u+1=lft x2l-.75inner_jut; fi + dish_serif(11',12,i,1/2,outer_jut,j,.6,inner_jut)(dark); % lower left serif + nodish_serif(1,2,a,1/3,cap_jut+x1l-x12,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,.75inner_jut,d,1/3,.5cap_jut); fi % lower middle serif +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar; + +lhchar "Uppercase Cyrillic letter ABH_CH - lower e hook"; +cyrchar(ABH_CH,(11.25u#+max(.75u#,.5cap_curve#)), + cap_height#,0); +if is_small_cap: getcharcode(abh_ch); fi +italcorr .7cap_height#*slant-.4u#; %O+.1u +adjust_fit(1.5dot_size#-tiny# %if serifs:max(1.5u,u#+.5flare#) + if monospace: +\\1.25u#,-.25u#+ else:,fi\\ 0); +%large_e;`large e' shape (ecfonts) +numeric left_curve,right_curve; +left_curve=right_curve+3stem_corr=cap_curve if not serifs: -1.5stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; +pos1(right_curve,0); pos2(vair,90); pos3(left_curve,180); +y1=good.y .52h; top y2r=h+o; y0l=bot y1; x2=.5w+.25u; +rt x1r=hround min(w-.5u,w-u+.5right_curve); +lft x3r=hround max(.75u,1.5u-.5left_curve); %lower_e+.25u +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; bot y4r=-o; x4=x2+.25u; +if serifs: + pos4(vair',270); pos5(hair,360); + y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; + (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal +else: + pos4(vair,270); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,270); z4=z4'; + pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke term.e(4',5,right,1,4); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l+7/8[thin_join,vair']; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: + x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +% bulb +if serifs: pickup crisp.nib; fi +pos6(max(currentbreadth+eps,7/8[thin_join,vair']),-90); +x6=x3; bot y6r=y0l; +lft x7r=min(l+letter_fit+hround(.5u-.5),lft x0l-flare-1); y7=.5[y1,y2]; +if serifs: + pos7(hair,-180); pos8(flare+(cap_stem-stem),-180); z8r=z7r; + {{less_tense; cyrbulb(6,7,8)}}; +else: + pos7(hair,-150); + filldraw stroke z6e{left}...{dir60}z7e; fi +%%%%% +penlabels(0,1,2,3,4,5,6,7,8, 9,10,11,12,13); endchar; + +lhchar "Uppercase Cyrillic letter ABH_CH_dsc - lower e hook ogonek"; +cyrchar(ABH_CH_dsc,(11.25u#+max(.75u#,.5cap_curve#)), + cap_height#,desc_depth#); +if is_small_cap: getcharcode(abh_ch_dsc); fi +italcorr .7cap_height#*slant-.4u#; %O+.1u +adjust_fit(1.5dot_size#-tiny# %if serifs:max(1.5u,u#+.5flare#) + if monospace: +\\1.25u#,-.25u#+ else:,fi\\ 0); +%large_e;`large e' shape (ecfonts) +numeric left_curve,right_curve; +left_curve=right_curve+3stem_corr=cap_curve if not serifs: -1.5stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; +pos1(right_curve,0); pos2(vair,90); pos3(left_curve,180); +y1=good.y .52h; top y2r=h+o; y0l=bot y1; x2=.5w+.25u; +rt x1r=hround min(w-.5u,w-u+.5right_curve); +lft x3r=hround max(.75u,1.5u-.5left_curve); %lower_e+.25u +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; bot y4r=-o; x4=x2+.25u; +if serifs: + pos4(vair',270); pos5(hair,360); + y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; + (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal +else: + pos4(vair,270); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,270); z4=z4'; + pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke term.e(4',5,right,1,4); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l+7/8[thin_join,vair']; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: + x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +% bulb +if serifs: + pickup crisp.nib; fi +pos6(max(currentbreadth+eps,7/8[thin_join,vair']),-90); +x6=x3; bot y6r=y0l; +lft x7r=min(l+letter_fit+hround(.5u-.5),lft x0l-flare-1); y7=.5[y1,y2]; +if serifs: + pos7(hair,-180); pos8(flare+(cap_stem-stem),-180); z8r=z7r; + {{less_tense; cyrbulb(6,7,8)}}; +else: + pos7(hair,-150); + filldraw stroke z6e{left}...{dir60}z7e; fi +%%%%% +% descender-ogonek + path p.r; + p.r=if serifs: pulled_arc.r(3,4)...{x5-x4,5(y5-y4)}z5r + else: term.r(4',5,right,1,4) fi; + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + numeric tt; % the time... + tt=if serifs: if hefty: 2.3 else: 2.15 fi else: % sansserif + if is_bold: .3 else: .2 fi\\ fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_move=-o; + ogonek_pos=(point tt of p.r)+.5(the_pen-if serifs: tiny else: fine fi)* + unitvector((direction tt of p.r) rotated 90)-(ogonek_breadth-the_pen,0); +easy_ogonek(the_pen,9,10,11); % ogonek +penlabels(0,1,2,3,4,5,6,7,8, 9,10,11); endchar; + +iff not specific:% +lhchar "Uppercase Cyrillic letter K_vcrs - KA vcrossed (`roman')"; +cyrchar(K_vcrs,15u# if not serifs:+.5width_adj# fi, % N_width+1.5u + cap_height#,0); +if is_small_cap: getcharcode(k_vcrs); fi +italcorr cap_height#*slant-.5u#; %K +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi % lower stem serif +% Kv_rbowl; + pos10(fudged.cap_stem,0); + numeric right_jut,stem[],alpha[]; + right_jut=if serifs:.6cap_jut else:.4tiny fi; pickup tiny.nib; +% + stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); + stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); + top y3=h; rt x3r=hround(r-letter_fit-u-right_jut); + bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut); + x4=x10; y4=1/3h; y10=y1; x10=hround max(w-11.5u,w-10.5u-.5fudged.cap_stem); + penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); + alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); + penpos6(alpha2*(stem2-tiny),0); + alpha2=diag_ratio(1,.5(stem2-tiny),y10-y6,x6r-x10); + forsuffixes $=l,r: y3'$=h; y6'$=0; z4$=z3'$+whatever*(z3-z4); + z5$=z6'$+whatever*(z10-z6)=z3'$+whatever*(z3-z4); endfor + z5=.5[z5l,z5r]; + z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); + % we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] + z6'r=z6r+penoffset z10-z6 of currentpen+whatever*(z10-z6); + z6'l=z6l+penoffset z6-z10 of currentpen+whatever*(z10-z6); + fill z5r--diag_end(5r,3'r,1,.5,3'l,5l)--z5l-- + diag_end(5l,6'l,.5,1,6'r,5r)--cycle; % diagonals + pickup fine.nib; pos7(vair,90); pos8(vair,90); + y7=y8=y5l; x7=x1; rt x8=x5r; filldraw stroke z7e--z8e; % middle cross +%%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; + else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +% vcross +pickup crisp.nib; pos9(bar,0); pos11(bar,0); +lft x9l=lft x11l=hround max(rt x1r+1,max(x5l-bar+eps,.5[rt x1r,x5l])); +top y11-bot y9=.5cap_height; .52[y9,y11]=y7; +filldraw stroke z9e--z11e; % cross bar +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +iff not specific:% +lhchar "Uppercase Cyrillic letter K_hcrs - KA hcrossed (`roman')"; +cyrchar(K_hcrs,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(k_hcrs); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upperr_k; +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi % lower stem serif +% K_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +rt x3r=hround(r-letter_fit-u-right_jut); +rt x6r=hround(r-letter_fit-.75u-right_jut); +y4=1/3h; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +numeric inner_jut,up_inner_jut; +%% +if serifs: + if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; + else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +%%%%% +% hcross +pickup crisp.nib; numeric outer_jut; +outer_jut=if serifs: max(limit_dist,1.1cap_jut) else: 1.8u fi; +pos7(bar,90); pos8(bar,90); +top y7r=top y8r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +x7=x1r+1.15outer_jut; x8=hround 1/3u-cap_serif_fit; +filldraw stroke z7e--z8e; % cross bar +penlabels(1,2,3,4,5,6, 7,8); endchar; + +lhchar "Uppercase Cyrillic letter L_dsc - EL descender"; +cyrchar(L_dsc,13.5u#,cap_height#, % DL_width:N_width + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(l_dsc); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit# if not serifs: + +\\.5(cap_stem#-u#),.5(cap_stem#-u#)+ else:,fi\\ cap_serif_fit#); %D_adj +% upper_l; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); +numeric light_hair,bot_vair,left_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +left_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit-rt x2r-.65u) fi; +bot_vair=Vround(.5[vair,light_hair]); +x3=1/3[w-rt x1r-(1/6left_jut),rt x1r] if not serifs:-.5(cap_stem-u) fi+eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(cap_hair,-180); + top y3=h; y6=1/6h-max(0,flare-stem-2vair_corr-.5); z6r=z5r; + lft x6r=l+letter_fit+hround(.5u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); bot y4r=-o; + filldraw stroke z4e{right}.. + controls (min(15/16[x4,x3],max(x4,lft x6r+2flare))+(x3e-x3)+eps,y4e) + and (x3e,good.y(min(y6-.5,1/3h)+1/3(y4e-y4))-eps)..z3e; % left tail + {{less_tense; bulb(4,5,6)}}; +else: + pos3'(slab,90); pos1'(slab,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; + pickup fine.nib; pos3(max(fine.breadth,light_hair),0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=2/3[x3l,x5r]; lft x5=l+letter_fit+hround(.35u-.5); + bot y4r=bot y5r; y3=y3'; x4l:=.25[x4,x5]; + path p; + p=stroke z3{down} + ..controls (x3,y5+.35h-eps) and (min(7/8[x4,x3],x5+2.5light_hair+.5u),y4) + ..{left}z4--z5; + z6=point .35 of p; + pos6(max(fine.breadth,7/8[bot_vair,light_hair]),angle(direction .35 of p)+90); + filldraw stroke z3e{down}...z6e{direction .35 of p}...{left}z4e--z5e; fi % arc +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5cap_jut); + if is_ogonek: + dish_serif(2,1,a,1/3,cap_jut,b,1/3,cap_jut); %!!! % lower right serif + fi + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); % upper right serif + nodish_serif(3,0,e,1/3,1.05cap_jut,f,1/3,inner_jut); % upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + numeric right_jut; + right_jut= + if serifs: max(limit_dist,1.1cap_jut) else: hround (r-rt x2r-.65u) fi; + r_serif(2,1,x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(1,2,3,4,5,6, 7,8,9); endchar; + +lhchar "Uppercase Cyrillic letter M_dsc - M descender"; +cyrchar(M_dsc,16u#+width_adj#,cap_height#, + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(m_dsc); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#, + cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi); %DL_adj +% upper_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.cap_stem-4stem_corr); +stem3=hround(fudged.hair-stem_corr); +stem4=hround(fudged.cap_stem-3stem_corr); +if stem4<stem1: stem4:=stem1; fi +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: + y6=if monospace: vround 1/3h else: o fi; + numeric upper_notch,lower_notch; + upper_notch=h-cap_notch_cut; lower_notch=y6+cap_notch_cut; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: + y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +if serifs: + serif(1,2,a,1/3,-cap_jut); % upper left serif + dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif + serif(3,4,d,1/3,cap_jut); % upper right serif + if is_ogonek: + dish_serif(4,3,e,1/3,cap_jut,f,1/3,cap_jut); fi %!!! % lower right serif +fi +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l if is_bold: +.4tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,9,10,11); % ogonek +else: + numeric right_jut; + right_jut=if serifs: max(limit_dist,1.1cap_jut) else: hround (r-rt x4r-.65u) fi; + r_serif(4,3,x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(0,1,1',2,3,3',4,5,6,7,8, 9,10,11); endchar; + +lhchar "Uppercase Cyrillic letter ABH_HA - Abkhasian KHA"; +cyrchar(ABH_HA,14u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(abh_ha); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +pickup fine.nib; numeric right_curve,mid_curve; +right_curve=max(fine.breadth,.8[vair,curve] if hefty:-stem_corr fi); +mid_curve=max(fine.breadth,.65[vair,curve] if hefty:-2stem_corr fi); +pos1(vair',90); pos3(vround(vair+1.5vair_corr),-90); +pos2(cap_curve,180); pos4(right_curve,0); +if monospace: + lft x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: + interim superness:=hein_super; lft x2r=hround u; fi +x4r=w-x2r; x1=x3=x6=.5w; top y1r=h+o; bot y3r=-o; +y2=y4=.5h-vair_corr; y2l:=.52h; +y7=-1/3d; rt x7=hround(w-.5u); +pos7(vair,270); +y6=.5y5r; pos6(mid_curve,180); +forsuffixes e=l,r: path p.e; p.e=pulled_super_arc.e(1,4)(.5superpull); endfor +x5=if serifs:.5[x6,x4]else:.5[x6,x4]fi; top y5r=.5[y4,y1]; pos5(vair,90); +filldraw stroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) % 3/4 bowl + & pulled_super_arc.e(4,5)(.25superpull) + & pulled_super_arc.e(5,6)(.75superpull) + & pulled_super_arc.e(6,7)(.5superpull); %6/4 bowl +numeric t; +t=min(ypart(p.l intersectiontimes ((0,top y5r+vair)--(w,top y5r+vair))), + ypart(p.r intersectiontimes ((lft x5,0)--(lft x5,h)))); +filldraw stroke subpath (0,.75) of p.e; %quart +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter P_tl - PE tail"; +cyrchar(P_tl,13.5u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(p_tl); fi +italcorr .45cap_height#*slant-.35u#; %O*.52 +adjust_fit(if monospace:-.5u# else:cap_serif_fit# fi, + if monospace: 5.35u# else:5.75u# fi); +% upper_p; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +%%% +if serifs: + numeric inner_jut[]; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut1=cap_jut; + else: rt x1r+inner_jut1+.5u+1=lft x3l-inner_jut1; fi + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut1); % lower left serif + %dish_serif(4,3,g,1/3,inner_jut1,h,1/3,cap_jut); % lower right serif + inner_jut2=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut2); % upper left serif + nodish_serif(3,4,e,1/3,inner_jut2,f,1/3,cap_jut); % upper right serif + filldraw z.b0--z.b1--z.e1--z.e0--cycle; % upper inter_serif bar +else: + lft x1'= lft x1l; top y1'r=h; pos1'(slab,90); + rt x3'=rt x3r; y3'=y1'; pos3'(slab,90); + filldraw stroke z1'e--z3'e; fi % upper_bar +%%%%% +w:=w+6.25u; +% Tail_part(4); +_zero:=4; +_one:=5; _two:=6; _three:=7; +_four:=8; _five:=9; _six:=10; _seven:=11; _eight:=12; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); +penpos[_one](vair,90); penpos[_two](vair,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +y[_three]=.5[y[_one],-d]; x[_two]=max(.5w-.25u,w-7u); +x[_one]=x[_zero]; x[_three]r=hround(w-u); +x[_two]l:=x[_two]-.25cap_curve; y[_one]=y[_two]=.52h; +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_four]=z[_three]; + pos[_four](cap_curve if hefty:-3stem_corr fi,0); + pos[_five](vair',-90); bot y[_five]r=-d-oo; y[_six]-.5flare=-.85d; + pos[_six](cap_hair,-180); pos[_seven](bulb_diam,-180); + rt x[_seven]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-3.5u if monospace: / expansion_factor fi); + z[_six]r=z[_seven]r; + x[_five]=max(rt x[_seven]l,.6[x[_four],x[_seven]r]); + (x,y[_five]r)=whatever[z[_five]l,z[_four]l]; + x[_five]r:=max(x,.5[x[_six]r,x[_five]]); + filldraw stroke super_arc.e([_four],[_five]); + bulb([_five],[_six],[_seven]); % bulb +else: + pickup fine.nib; z[_four]=z[_three]; + pos[_four](max(fine.breadth,cap_curve if hefty:-3stem_corr fi),0); + pos[_eight](vair,-90); pos[_five](flare,-105); + rt x[_five]r=x[_three]-6u; bot y[_five]r=-d; + y[_five]l:=good.y y[_five]l; x[_five]l:=good.y x[_five]l; + bot y[_eight]r=-d-o; x[_eight]=.35[lft x[_five]r,x[_three]r]; + filldraw stroke super_arc.e([_four],[_eight]) + & term.e([_eight],[_five],left,.75,4); fi +%%% +if serifs: + if rt x2r+cap_jut+.5u+1<=x[_three]r: inner_jut3=cap_jut; + else: rt x2r+inner_jut3+.5u=x[_three]r; fi + dish_serif(4,3,g,1/3,inner_jut1,h,1/3,inner_jut3); fi % lower right serif +penlabels(1,2,3,4, 5,6,7,8,9,10,11,12); endchar; + +lhchar "Uppercase Cyrillic letter R_dsc (looks like P)"; +cyrchar(R_dsc,12u#,cap_height#, + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(r_dsc); fi +italcorr .75cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,0); +% upper_r; +pickup tiny.nib; penpos1(cap_stem'-tiny,0); penpos2(cap_stem-tiny,0); +pos0(cap_stem',0); pos0'(cap_stem,0); +lft x1l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0; +x1l=x2l=x0l=x0'l; y0=y0'=y7; +penpos3(cap_band,90); penpos4(cap_band,90); +penpos5(cap_curve if hefty:-3stem_corr fi,0); +penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90); +z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; +x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u); +x4l:=x6l:=x4-.25cap_curve; +filldraw stroke z1e--z0e--z0'e--z2e; % stem +fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe +%%% +if serifs: nodish_serif(1,0,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + if is_ogonek: + dish_serif(2,0',c,1/3,cap_jut,d,1/3,cap_jut); fi %!!! % lower serif +fi +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,8,9,10); % ogonek +else: + numeric right_jut; + right_jut=if serifs: 1.414cap_jut else: .5cap_stem+.5u fi; + r_serif(2,0',x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(0,1,2,3,4,5,6,7, 8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter LAT_Q"; +cyrchar(LAT_Q,14u#-width_adj#,cap_height#,comma_depth#); +if is_small_cap: getcharcode(lat_q); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +numeric light_curve; light_curve=cap_curve-hround stem_corr; +penpos1(vair',90); penpos3(vair',-90); +penpos2(light_curve,180); penpos4(light_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"Q"| like |"O"| +else: x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +pickup tiny.nib; +if hefty: + penpos5(1.2(.5[cap_bar,light_curve]),0); penpos6(1.2light_curve,0); + x5=.5w; x6r=hround(w-1.5u); + y5=vround .28h; y6=-d; + fill diag_end(6r,5r,.25,1,5l,6l)--diag_end(5l,6l,.5,1,6r,5r)--cycle; % tail +else: + pos3'(vair,270); pos5(vair,180); pos6(vair,90); + pos7(cap_curve,85); penpos8(eps,180); + z3'=z3; x6=x3; top y6r=vround(.2h+.5vair); + lft x5r=hround(.5w-1.25u-.5vair); y5=.5[y3,y6]; + bot y7l=-d; x7l=2/3[x6,x8]; y8=0; rt x8=hround(x4r+.1u); + filldraw stroke z3'e{left}...z5e{up}...z6e{right} + ..z7e{right}...z8e{up}; fi % tail +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter T_dsc - TE descender"; +cyrchar(T_dsc,13u#-width_adj#,cap_height#, + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(t_dsc); fi +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(0,0); +% upper_t; +if odd(cap_stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.65u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,.7beak_jut); % right arm and beak +pos5(hair,180); x5=w-x4; y5=y4; +arm(3,5,f,beak_darkness,-.7beak_jut); % left arm and beak +%%% +if serifs: + if is_ogonek: + dish_serif(2,1,c,1/3,1.414cap_jut,d,1/3,1.414cap_jut); %!!! % lower serif + fi + nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); fi % upper bracketing +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,6,7,8); % ogonek +else: + numeric right_jut; + right_jut=if serifs: 1.414cap_jut else: .5cap_stem+.5u fi; + r_serif(2,1,x,1/3,1.414cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(1,2,3,4,5, 6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter TETSE - ligature TETSE"; +cyrchar(TETSE,if serifs:14u#+width_adj#else:13.5u#fi,cap_height#,cap_sbeak#); +if is_small_cap: getcharcode(tetse); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(min(4.5u#-.5stem#,3.5u#)-.5width_adj#, % Beak_adj + cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi); %DL_adj +% upper_c;tetse +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(1u,2u-.5cap_stem) if monospace:-.5u fi; +rt x3r=rt x4r=w-hround max(2u,3u-.5cap_stem); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +% T part +pickup crisp.nib; pos5(slab,90); pos6(hair,180); pos7(hair,0); +x5=x1; x5-x6=x7-x5; +lft x6r=l+letter_fit+hround if monospace:.65u else: .1u fi; +top y5r=h; y6=good.y(y5l-beak)-eps; y7=y6; +arm(5,6,q,beak_darkness,-.5beak_jut); % arm and beak +arm(5,7,r,beak_darkness,.5beak_jut); % arm and beak +%%% +numeric inner_jut,arm_thickness; +arm_thickness=vround(slab+vair_corr); +if serifs: + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + save slab; slab:=arm_thickness; % bottom.bar.slab + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif +else: + save slab; slab:=arm_thickness; % bottom.bar.slab + pos2'(slab,90); lft x2'= lft x2l; bot y2'l=0; + rt x4'= rt x4r; y4'=y2'; pos4'(slab,90); + filldraw stroke z2'e--z4'e; fi % lower bar +% uppercase descender +inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); +numeric right_jut; +right_jut= + if serifs: max(limit_dist,1.1cap_jut) else: hround (r-rt x4r-.65u) fi; +r_serif(4,3,g,1/3,inner_jut,h,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +if serifs: + filldraw z.d0--z.d1--z.g1--z.g0--cycle; fi % lower inter_serif bar +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter CH_vcrs - CHE vcrossed"; +cyrchar(CH_vcrs,13.5u#,cap_height#,0); +if is_small_cap: getcharcode(ch_vcrs); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_ch; +pickup tiny.nib; +pos1(cap_stem,0); pos2(cap_stem,0); pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; +x5l=1/3[x1,x3]; y5=y6; if serifs: y6'=y6-cap_hair+1.05cap_stem; fi +x6=x6'=x3; y6=good.y (h-.52h if serifs: -.35(.5[cap_hair,.7cap_stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +clearpen; penpos2'(cap_stem,0); z2'=z2; +numeric middle_weight; middle_weight=.5[vair,cap_band]; +penpos5(middle_weight,90); penpos6(middle_weight,90); penpos6'(middle_weight,90); +if serifs: + if((y6'-y6)>=middle_weight+1+eps): + fill stroke pulled_arc.e(2',5) & z5e{right}...{.75(z5-z6)+z6'}z6'e; + else: fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif +else: filldraw stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc +%%%%% +% vcross +pickup crisp.nib; pos7(bar,0); pos8(bar,0); +lft x7l=lft x8l=hround(.5[x1r,x3l]-.5bar); +top y8-bot y7=.5cap_height; .5[y7,y8]=y6; +filldraw stroke z7e--z8e; +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter W"; +cyrchar(LAT_W,18u#,cap_height#,0); +if is_small_cap: getcharcode(lat_w); fi +italcorr cap_height#*slant+.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +numeric stem[],outer_jut,upper_notch,alpha,mid_corr; +outer_jut=.7cap_jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u; +stem1=fudged.cap_stem-stem_corr; +stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1); +stem2=stem4 if hefty:-2stem_corr fi; +stem3=stem1 if hefty:-2stem_corr fi; +x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex_corr=x3l; x6l+apex_corr=x7l; +y1=y8=h; y2=y3=y6=y7=-apex_o; y4=y5=if monospace: vround .6 fi\\ h; +mid_corr=if monospace or hefty:-apex_corr else: 1/3jut fi; +alpha=diag_ratio(4,stem2-stem3+stem4,y1-y2,x8r-x1l+mid_corr-2apex_corr); +penpos1(alpha*stem1,0); penpos2(alpha*stem1,0); +penpos3(alpha*stem2,0); penpos4(alpha*stem2,0); +penpos5(alpha*stem3,0); penpos6(alpha*stem3,0); +penpos7(alpha*stem4,0); penpos8(alpha*stem4,0); +x4l-x1l=floor(x4l-x1l+.5(x5r+mid_corr-x4r)); % |x5r+mid_corr| $\approx$ |x4r| +z23=whatever[z1r,z2r]=whatever[z3l,z4l]; +z45=whatever[z3r,z4r]=whatever[z5l,z6l]; +z67=whatever[z5r,z6r]=whatever[z7l,z8l]; upper_notch=y4-cap_notch_cut; +fill diag_end(1l,2l,1,1,3r,4r){z4-z3} + ...if y45<upper_notch:(x45,upper_notch)+.5left{up} + --(x45,upper_notch)+.5right{down} else: z45&z45 fi + ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8} + ...if y67>cap_notch_cut:(x67,cap_notch_cut)+.5right{down} + --(x67,cap_notch_cut)+.5left{up} else: z67&z67 fi + ...{z5-z6}special_diag_end(6,5,4,3){z3-z4} + ...if y23>cap_notch_cut:(x23,cap_notch_cut)+.5right{down} + --(x23,cap_notch_cut)+.5left{up} else: z23&z23 fi + ...{z1-z2}diag_end(2r,1r,1,1,1l,2l)--cycle; % diagonals +if serifs: + numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(5,6); prime_points_inside(8,7); + if monospace: + inner_jut1=inner_jut4=1.5cap_jut; + elseif hefty: + inner_jut1=inner_jut4=cap_jut; + else: + fill diag_end(6r,5r,1,1,5l,6l)--.9[z5l,z6l] + ..{z5-z6}.1[z5r,z6r]--cycle; % middle stem + inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3; + if rt x1'r+cap_jut+.5u+1<=lft x5'l-.7cap_jut: inner_jut1=cap_jut; + else: rt x1'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi + if rt x5'r+cap_jut+.5u+1<=lft x8'l-1.1cap_jut: inner_jut3=cap_jut; + else: rt x5'r+inner_jut3+.5u+1=lft x8'l-inner_jut4; fi + dish_serif(5',6,e,1/3,inner_jut2,f,1/2,inner_jut3); fi % middle serif + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut1); % left serif + dish_serif(8',7,c,.6,inner_jut4,d,1/2,outer_jut)(dark); fi % right serif +penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar; + +lhchar "Uppercase Cyrillic letter N_ltl - EN with left tail"; +cyrchar(N_ltl,13.5u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(n_ltl); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_n; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(cap_bar,90); penpos6(cap_bar,90); +x5=x1; x6=x3; y5=y6=.52h; +fill stroke z5e--z6e; % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif +%dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +% L_tail(2)x; +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+if serifs: vair' else: slab fi+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + %rt x[_four]l=floor x[_zero]-2u if monospace: / expansion_factor fi;%2.5u + lft x[_four]r=-1/3u if monospace: / expansion_factor fi;%2.5u + %filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + forsuffixes e=l,r: + z[_one]'e=((0,y[_four])--(w,y[_four])) intersectionpoint + (pulled_arc.e([_one],[_two])); endfor + if lft x[_one]'l>rt x[_four]l+max(1,.5vair+.5): + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + else: + x[_one]'l:=min(rt x[_four]l+max(1,hround(.5vair+.5)),rt x[_one]'r-vair)+.5fine-eps; + filldraw z[_five]r--pulled_arc.r([_one],[_two])--z[_two]l{right} + ..z[_one]'l{up}..{up}z[_five]l--cycle; + fi + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](slab,-90); pos[_three](flare,-105); + rt x[_three]r=x[_zero]-2.5u; bot y[_three]r=-d;%4u + bot y[_two]r=-d-o; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(1,2,3,4,5,6, 7,8,9,10,11); endchar; + +iff serifs: +lhchar "Uppercase Cyrillic letter DELTA - Lowercase Greek delta"; +cyrchar(DELTA,10u#-width_adj#,asc_height#,0); +if is_small_cap: getcharcode(delta); fi +italcorr .9asc_height#*slant+.5hair#-1.5u#; +adjust_fit(0,0); pickup fine.nib; +x0=-u; y0=1.1h; +numeric light_flare; light_flare=3/4[vair,flare]; +x1=w-2u-.5light_flare; y1=h-.5light_flare; +numeric theta; theta=angle (z1-z0); +pos1(light_flare,theta-90); pos2(.2[vair,light_flare],-90); +x2=x3+2u; y2=h; +x4=.5w+.5u; x6=.55[x7,x5]; top y8r=1/4[x_height,cap_height]+o; z4=z8; +pos6(vround(vair+1.5vair_corr),-90); pos7(cap_stem,-180); pos8(vair',-270); +pos3(1/3[hair,cap_stem],angle(z4-z0)+60); pos4(cap_stem,angle(z4-z0)+45); +pos5(cap_stem,15); +z3=1/3[z4,(x0,.5[y0,h])]; +y5+.05x_height=y7=.5[y6,y8]; bot y6=-o; +lft x7r=hround(1.4u-.5cap_stem); rt x5r=hround(w-u); +z35=point 1.5 of (z1{z0-z1}...z2....z3{z4-z0});%{(z0-z1)rotated 90}); +pos35(hair,angle(.5[z4,z1]-z0)); +filldraw stroke z1e{z0-z1e}....z2e...z35e..z3e{z4e-z0}%{(z0-z1)rotated 90} + ...z4e{z4e-.8[z4,z0]} + ....z5e{down}...pulled_arc.e(6,7) & pulled_arc.e(7,8); % hook and bowl +filldraw z1r{z1r-z0}...z1l{z0-z1l}--cycle; % bulb +math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#); +penlabels(0,1,2,3,35,4,5,6,7,8); endchar; + +iff not serifs: +lhchar "Uppercase Cyrillic letter delta - Lowercase Greek delta"; +cyrchar(DELTA,11u#-2width_adj#,asc_height#,0); +italcorr .9asc_height#*slant+.5hair#-1.5u#; +adjust_fit(0,0); pickup fine.nib; +x0=-u; y0=1.1h; +numeric light_flare; light_flare=3/4[vair,flare]; +x1=w-2u-.5light_flare; y1=h-.5light_flare; +numeric theta; theta=angle (z1-z0); +pos1(light_flare,theta-90); pos2(.2[vair,light_flare],-90); +x2=x3+2u; y2=h; +x4=.5w+.5u; x6=.5[x7,x5]; top y8r=1/4[x_height,cap_height]+o; z4=z8; +pos6(vround(vair+1.5vair_corr),-90); pos7(cap_stem,-180); pos8(vair',-270); +pos3(vair,angle(z4-z0)+90); pos4(.5[vair,cap_stem],angle(z4-z0)+90); +pos5(fudged.stem,0); +z3=1/3[z4,(x0,.5[y0,h])]; y5=y7=.5[y6,y8]; bot y6=-o; +lft x7r=hround(1.4u-.5stem); rt x5r=hround(w-1.4u+.5stem); +z35=point 1.5 of (z1{z0-z1}...z2....z3{z4-z0}); +pos35(vair,angle(.5[z4,z1]-z0)); +filldraw stroke z1e{z0-z1e}...z2e..z35e..z3e{z4e-z0} + ...z4e{z4-.8[z4,(x0,h)]} + ... +{{interim superness:=more_super; +pulled_arc.e(5,6) & +pulled_arc.e(6,7) & pulled_arc.e(7,8)}}; % hook and bowl +math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#); +penlabels(0,1,2,3,35,4,5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter M_tl - M tail"; +cyrchar(M_tl,16u#+width_adj#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(m_tl); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.cap_stem-4stem_corr); +stem3=hround(fudged.hair-stem_corr); +stem4=hround(fudged.cap_stem-3stem_corr); +if stem4<stem1: stem4:=stem1; fi +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: y6=if monospace: vround 1/3h else: o fi; + numeric upper_notch,lower_notch; + upper_notch=h-cap_notch_cut; lower_notch=y6+cap_notch_cut; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +if serifs: serif(1,2,a,1/3,-cap_jut); % upper left serif + dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif + serif(3,4,d,1/3,cap_jut); fi % upper right serif + %dish_serif(4,3,e,1/3,cap_jut,f,1/3,cap_jut); fi % lower right serif +%%%%% +% L_tail(4); +_zero:=4; +_one:=9; _two:=10; _three:=11; _four:=12; _five:=13; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+if serifs: vair' else: slab fi+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=floor x[_zero]-2.5u if monospace: / expansion_factor fi; + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](slab,-90); pos[_three](flare,-105); + rt x[_three]r=x[_zero]-4u; bot y[_three]r=-d; + bot y[_two]r=-d-o; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(0,1,1',2,3,3',4,5,6,7,8,9, 10,11,12,13,14); endchar; + +lhchar "Uppercase Cyrillic letter R_gcrs - R grave crossed"; +cyrchar(R_gcrs,12u#,cap_height#,0); +if is_small_cap: getcharcode(r_gcrs); fi +italcorr .75cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,0); full_h:=h; h:=cap_height; +% upper_r; +pickup tiny.nib; penpos1(cap_stem'-tiny,0); penpos2(cap_stem-tiny,0); +pos0(cap_stem',0); pos0'(cap_stem,0); +lft x1l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0; +x1l=x2l=x0l=x0'l; y0=y0'=y7; +penpos3(cap_band,90); penpos4(cap_band,90); +penpos5(cap_curve if hefty:-3stem_corr fi,0); +penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90); +z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; +x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u); +x4l:=x6l:=x4-.25cap_curve; +filldraw stroke z1e--z0e--z0'e--z2e; % stem +fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe +%%% +if serifs: nodish_serif(1,0,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,0',c,1/3,cap_jut,d,1/3,cap_jut); fi % lower serif +%%%%% +numeric unbalance,outer_jut; +unbalance=if monospace: 1 else: 1.1 fi; +z8=(.5[x5,x6],y6); +% some funny fonts have an extremally small |jut|: +outer_jut=.5cap_stem+if serifs: max(limit_dist,cap_jut) else: 1.8u fi; +put_cyrcross(x8,y8-.52cap_height,-outer_jut,-unbalance*outer_jut)(cyrcaph); +%%% +penlabels(0,1,2,3,4,5,6,7, 8); endchar; + +iff serifs:% +lhchar "Uppercase Cyrillic letter S_acrs - S acute crossed"; +cyrchar(S_acrs,13u#,cap_height#,0); +if is_small_cap: getcharcode(s_acrs); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% upper_s; +pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); +pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); +rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1]; +top y2r=h+o; bot y4r=-o; y3=.5[y2,y4]; +bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps); +y5=max(good.y .95(h-y1),y4l+eps); +(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); +(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); +filldraw stroke z1e{x2-x1,10(y2-y1)} + ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc +pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; +x1r-x1'=2cap_curve-fine; y1'=y1; +path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; +numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); +filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +%%%%% +pair outer_point; path p; numeric unbalance,outer_jut; +outer_point=superness[(x4r,y3r),(x3r,y4r)]; +p=z3{(x3,y4)-z3} + ...superpull[superness[(x4,y3),(x3,y4)],outer_point]{z4-z3}...{z4-(x3,y4)}z4; +z7=point.8 of p; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5cap_stem+if serifs: max(limit_dist,cap_jut) else: 1.8u fi; +put_cyrcross(x7,y7-.52cap_height,unbalance*outer_jut,outer_jut)(cyrcaph); +penlabels(1,1',2,3,4,5,6, 7); endchar; + +iff not serifs:% +lhchar "Uppercase Cyrillic letter S_acrs - es acute crossed"; +cyrchar(S_acrs,11.5u#,cap_height#,0); +if is_small_cap: getcharcode(s_acrs); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% uppers_s; +pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); +pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); +rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; +lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); +top y1r=vround .95h+o; top y2r=h+o; y3=.5h; +bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; +filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,.8,4); % arc and terminals +%%%%% +path p; numeric unbalance,outer_jut; +p=z3{(x3,y4)-z3}...superness[(x4,y3),(x3,y4)]{z4-z3}...{z4-(x3,y4)}z4; +z6=point.8 of p; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5cap_stem+if serifs: max(limit_dist,cap_jut) else: 1.8u fi; +put_cyrcross(x6,y6-.52cap_height,unbalance*outer_jut,outer_jut)(cyrcaph); +penlabels(1,2,3,4,5, 6); endchar; + +lhchar "Uppercase Cyrillic letter G_crsdsc - GHE hcrossed descender"; +cyrchar(G_crsdsc,if monospace: 9u# else: 11u# fi-width_adj#, %G_width + cap_height#,cap_sbeak#); +if is_small_cap: getcharcode(g_crsdsc); fi +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(cap_serif_fit#,0); +% upper_g; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u ,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +%%% +if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + if is_ogonek: + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi %!!! % lower serif +fi +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |stem| is drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,5,6,7); % ogonek +else: + numeric right_jut; + right_jut=if serifs: 1.414cap_jut else: .5cap_stem+.5u fi; + if not serifs: + numeric arm_thickness; arm_thickness=vround(slab-vair_corr); + save slab; slab:=arm_thickness; fi %bottom.desc.slab + r_serif(2,1,x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +% hcross +pickup crisp.nib; numeric outer_jut; +outer_jut=if serifs: max(limit_dist,1.1cap_jut) else: 1.8u fi; +pos5(bar,90); pos6(bar,90); +top y6r=top y5r=vround (.52h+.5bar)+eps; +x6=x1r+1.15outer_jut; x5=hround 1/3u-cap_serif_fit; +filldraw stroke z5e--z6e; +penlabels(1,2,3,4 ,5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter H_hcrs (looks like X)"; +cyrchar(H_hcrs,13u#,cap_height#,0); +if is_small_cap: getcharcode(h_hcrs); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_h; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1); +outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut; +x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-outer_jut; +y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); +alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +if hefty: z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.1[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' + --diag_end(34',4l,.5,1,4r,24')--z24' + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +if serifs: numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,4); prime_points_inside(2,3); + prime_points_inside(3,2); prime_points_inside(4,1); + if rt x1'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +% cross +pickup fine.nib; numeric middle_weight; +middle_weight=max(fine.breadth,.6[thin_join,vair]); +if hefty: y6=y5=y0; else: + z0'=whatever[z1,z4]=whatever[z2,z3]; y6r=y5r=y0'; fi +x6=w-u; x5=u; pos5(middle_weight,90); pos6(middle_weight,90); +filldraw stroke z5e--z6e; +penlabels(0,1,2,3,4,12,13,24,34, 5,6); endchar; + +lhchar "Uppercase Cyrillic letter SEMISN - SEMI SOFT SIGN"; +cyrchar(SEMISN,12.5u#,cap_height#,0); +if is_small_cap: getcharcode(semisn); fi +italcorr .75cap_height#*slant-.5u#; +adjust_fit(2u#+cap_serif_fit#,0); +numeric left_stem,right_curve,middle_weight; +left_stem=cap_stem-hround 2stem_corr; middle_weight=.5[vair,cap_band]; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +% usftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% hcross +pickup crisp.nib; pos8(bar,90); pos9(bar,90); +lft x8=w-x9-4u; %hround 1/3u if serifs:-serif_fit fi; +x9=hround(w-2.65u); %x4; %1r+2.5u; +top y8r=top y9r=vround .85h;%vround x_height+eps; +filldraw stroke z8e--z9e; % cross bar +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter I_shdsc - SHORT I WITH DESCENDER"; +cyrchar(I_shdsc,13.5u#,cap_height#+acc_height#, % N_width + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(i_shdsc); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); full_h:=h; h:=cap_height; +% upper_i; +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-stem_corr; + upper_notch=y6-cap_notch_cut-eps; lower_notch=y5+cap_notch_cut+eps; + if monospace: + x5r =rt x1r; x6l =lft x3l; y5=vround(slab+eps); y6=vround(h-slab-eps); + alpha1=diag_ratio(1,stem1,y6-y5,x5r-x6l); + penpos5(min(2fudged.cap_stem,alpha1*stem1),0); + penpos6(min(2fudged.cap_stem,alpha1*stem1),0); + x5'=lft x1l; z5'=whatever[z5l,z6l]; x6'=rt x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; + else: + y5l=0; y6r=h; x5=x1r; x6=x3l; penpos5(stem1,0); penpos6(stem1,0); + fi + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5l.. + if y2'>lower_notch: {right}(x2'+1,lower_notch){up}... fi + {z6-z5}diag_in(5l,6l,1,6r)--z6r.. + if y3'<upper_notch: {left}(x3'-1,upper_notch){down}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: y5l=y2+bracket+eps; y6r=y3-bracket-eps; + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + stem1=max(tiny.breadth,fudged.hair); + alpha1=diag_ratio(1,stem1,x6-x5,top y6r-bot y5l); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +%%% +numeric inner_jut; +if serifs: + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + if is_ogonek: + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +fi +%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,14,15,16); % ogonek +else: + if not serifs: inner_jut:=0; fi + numeric right_jut; + right_jut=if serifs: max(limit_dist,1.1cap_jut) else: hround (r-rt x4r-.65u) fi; + r_serif(4,3,g,1/3,inner_jut,h,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +%%%%% +% the accent +h:=cap_height+acc_height; +cbreve(.5w,0, 7,8,9,10,11,12,13)(cyrcaph); +penlabels(1,2,3,4,5,6, 7,8,9,10,11,12,13); endchar; + +lhchar "Uppercase Cyrillic letter R_tl (looks like P)"; +cyrchar(R_tl,12u#,cap_height#,desc_depth#); %udesc/og_depth +if is_small_cap: getcharcode(r_tl); fi +italcorr .75cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,0); +% upper_r; +pickup tiny.nib; penpos1(cap_stem'-tiny,0); penpos2(cap_stem-tiny,0); +pos0(cap_stem',0); pos0'(cap_stem,0); +lft x1l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0; +x1l=x2l=x0l=x0'l; y0=y0'=y7; +penpos3(cap_band,90); penpos4(cap_band,90); +penpos5(cap_curve if hefty:-3stem_corr fi,0); +penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90); +z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; +x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u); +x4l:=x6l:=x4-.25cap_curve; +filldraw stroke z1e--z0e--z0'e--z2e; % stem +fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe +%%% +if serifs: nodish_serif(1,0,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,0',c,1/3,cap_jut,d,1/3,cap_jut); fi %!!! % lower serif +%%%%% +% Tail_part(2);%!!! +_zero:=2; +_one:=8; _two:=9; _three:=10; +_four:=11; _five:=12; _six:=13; _seven:=14; _eight:=15; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); +penpos[_one](vair,90); penpos[_two](vair,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +y[_three]=.5[y[_one],-d]; x[_two]=max(.5w-.25u,w-7u); +x[_one]=x[_zero]; x[_three]r=hround(w-2u);%!!! +x[_two]l:=x[_two]-.25cap_curve; y[_one]=y[_two]=.5y7l;%!!! +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_four]=z[_three]; + pos[_four](cap_curve if hefty:-3stem_corr fi,0); + pos[_five](vair',-90); bot y[_five]r=-d-oo; y[_six]-.5flare=-.85d; + pos[_six](cap_hair,-180); pos[_seven](bulb_diam,-180); + rt x[_seven]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-3.5u if monospace: / expansion_factor fi);%!!! + z[_six]r=z[_seven]r; + x[_five]=max(rt x[_seven]l,.6[x[_four],x[_seven]r]); + (x,y[_five]r)=whatever[z[_five]l,z[_four]l]; + x[_five]r:=max(x,.5[x[_six]r,x[_five]]); + filldraw stroke super_arc.e([_four],[_five]); + bulb([_five],[_six],[_seven]); % bulb +else: + pickup fine.nib; z[_four]=z[_three]; + pos[_four](max(fine.breadth,cap_curve if hefty:-3stem_corr fi),0); + pos[_eight](vair,-90); pos[_five](flare,-105); + rt x[_five]r=x[_three]-6u; bot y[_five]r=-d; + y[_five]l:=good.y y[_five]l; x[_five]l:=good.y x[_five]l; + bot y[_eight]r=-d-o; x[_eight]=.35[lft x[_five]r,x[_three]r]; + filldraw stroke super_arc.e([_four],[_eight]) + & term.e([_eight],[_five],left,.75,4); fi +penlabels(0,1,2,3,4,5,6,7, 8,9,10); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2slvi.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2slvi.mf new file mode 100644 index 00000000000..47078c5937d --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2slvi.mf @@ -0,0 +1,192 @@ +% +% lgt2slvi.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Italic Old Slav letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames +% +% az +% i_az +% l_yus +% il_yus +% gerv +% nash +% zemla +% ksi +% vizhe used ukr_i +% izhe used lat_i +% izh in lgcomu +% omga +% omga_rnd +% ot +% omga_tlo +% Vzelo used lat_s +% fita in lgcomu +% koppa +% uk +% yat in lgcomu +% cherv +% shta +% psi +% b_yus in lgcomu +% ib_yus +% est used ukr_e +% i_est +% narrow_e used eps +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Italic Cyrillic letter ligature az - old a"; +cyrcharmoving(az); + +lhchar "Italic Cyrillic letter ligature i_az - iot az"; +cyrcharmoving(i_az); + +lhchar "Italic Cyrillic letter l_yus - little yus"; +cyrcharmoving(l_yus); + +lhchar "Italic Cyrillic letter il_yus - iotfied little yus"; +cyrcharmoving(il_yus); + +lhchar "Italic Cyrillic letter gerv - Glagolic letter"; +cyrcharmoving(gerv); + +lhchar "Italic Cyrillic letter nash - old en"; +cyrcharmoving(nash); + +lhchar "Italic Cyrillic letter zemla"; +cyrcharmoving(zemla); + +% like CYR_.z or numeral 3 +lhchar "Italic Cyrillic letter ksi"; +cyrchar(ksi,7.5u#,x_height#+1.75dot_size#,desc_depth#); +bh#:=min(bar_height#,1.14x_height#-bar_height#); define_pixels(bh); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %e +adjust_fit(0,.5serif_fit#); h:=x_height; pickup fine.nib; +pos0(flare,180); pos2(vair,90); top y2r=h+oo; +numeric right_curve; right_curve=max(fine.breadth,curve-stem_corr); +pos4(vair,-90); pos5(vair,-90); pos6(vair,90); pos5'(vair,90); +x2=x6=.5[u,x7']; pos7'(right_curve,0); rt x7'r=hround(w-.6u); +pos3(.5[hair,curve],0); rt x3r=min(rt x7'r-1,hround(w-u)); +y3=.5[y4l,y2l]; x4=1/3[x5,x3l]; y4=y5; y5'=y13; y5=y5'=bar_height; +lft x1r=hround .625u; y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare); +pos1(hair,180); bulb(2,1,0); % bulb +lft x5=lft x5'=min(rt x0l+.5vair,lft x6)+eps; +filldraw stroke super_arc.e(2,3) & super_arc.e(3,4)..z5e; % upper bowl +pos13(vair,90); x13=hround.5[.5u,w-.8u]; +rt x7r=hround(w-.6u); x7r-x7l=hround .5[vair,stem]-fine; % +x9=x10=2u; x11=.5w-.5u; y9=-.3d; pos11(vair,135); pos10(vair,90); +numeric theta; theta=-90+angle(28u,x_height); slope:=x_height/28u; +pos9(.5[stem,curve],theta); ellipse_set(13l,7l,8l,9l); ellipse_set(13r,7r,8r,9r); +bot y10l=-d-oo; y11=min(-3/4d-oo,y7l); +filldraw stroke z11e{x10-x11,2(y10-y11)}...z10e{left}...z9e + ---z8e...{up}z7e...{left}z13e...{left}z5'e; % main stroke +%"hachek" +pickup crisp.nib; +pos15(vair',90); x15=x13; y15=h; +x13-x14=x16-x13=good.x 2.25u; top y14=top y16=h+.75dot_size; +pos16(.25[vair,curve],angle(z16-z15)+90); pos14(whatever,0); +z14l=z15l+whatever*(z15-z14); (x14r,y)=z15r+whatever*(z15-z14); %y14l=y14r=y14; +filldraw stroke z14e--z15e{z16r-z15}..{.5right}z16e; % diagonals +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar; + +lhchar "Italic Cyrillic letter vizhe - variant izhe"; +cyrcharmoving(vizhe); + +lhchar "Italic Cyrillic letter izhe"; +cyrcharmoving(izhe); + +lhchar "Italic Cyrillic letter omga - omega"; +cyrcharmoving(omga); + +lhchar "Italic Cyrillic letter omga_rnd - omega round"; +cyrcharmoving(omga_rnd); + +lhchar "Italic Cyrillic letter ot - omega with te accent"; +cyrcharmoving(ot); + +lhchar "Italic Cyrillic letter omga_tlo"; +cyrcharmoving(omga_tlo); + +lhchar "Italic Cyrillic letter koppa (looks like c with tail)"; +cyrchar(koppa,8u#,x_height#,desc_depth#); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; +adjust_fit(if monospace:0 else:-.35u#fi,0); pickup fine.nib; +pickup fine.nib; pos2(vair,90); pos1(hair,0); pos0(flare,0); +x2=.5(w+u); top y2l=vround(h+1.5oo); y1=.5[bar_height,h]; +rt x1r=max(rt x2,hround(w-u))+eps; bulb(2,1,0); % bulb +numeric theta; theta=-90-angle(27u,x_height); slope:=x_height/-27u; +pos5(max(fine.breadth,fudged.stem-4stem_corr),theta); pos6(vair,135); +lft x3r=hround max(.6u,1.35u-.5curve); x3l-x3r=hround.8[vair,fudged.stem]-fine; +x5+u=x6=w-2u; y5=.1d; bot y6l=-d-oo; +ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r); +{{less_tense; + filldraw stroke z6e{right}...z5e---z4e...{up}z3e...{right}z2e}}; % main stroke +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Italic Cyrillic letter uk"; +cyrcharmoving(uk); + +lhchar "Italic Cyrillic letter cherv - old che"; +cyrcharmoving(cherv); + +lhchar "Italic Cyrillic letter psi"; +cyrchar(psi,11u#,asc_height#,desc_depth#); +italcorr x_height#*slant; +adjust_fit(0,0); pickup fine.nib; interim superness:=more_super; +x0=0; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +hook_in(0,1,2)(skewed); % opening hook +pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(hair,0); +x4=.5w+u; rt x5r=hround(w-.5u); +y3=.7[y4,y5]; bot y4r=-oo; y5=.57x_height; +filldraw stroke z2'e{-u,-x_height}...super_arc.e(3,4) + ..tension atleast 1.05..{up}z5e; % left stem and arc +v_bulb(5,6); % closing bulb +%%ef stem +pickup tiny.nib; pos9(stem',0); pos10(stem,0); +pos0'(stem',0); pos1'(stem,0); z1'l=z0'l; x0'=x9; x1'=x10; +lft x9l=hround(.5[x3,x5]-.5stem'); top y9=h; % if serifs: +min(oo,serif_drop) fi; +numeric edge; edge=rt x10r; +y1'=ypart(((edge,body_height+2dot_size)--(edge,-o)) + intersectionpoint(z3r{down}...{right}z4r...{up}z5r)); +pickup tiny.nib; bot y10=-d; +filldraw stroke z9e--z0'e--z1'e--z10e; % stem +pickup crisp.nib; pos12(hair,0); pos11'(stem,0); +z11'=z10; x12l=x11'l; bot y12=0; +filldraw stroke z11'e--z12e; % point +if serifs: numeric ef_jut; ef_jut=if monospace:1.4 fi jut; + sloped_serif.l(9,0',a,1/3,ef_jut,serif_drop); % upper serif + save slab; slab:=vair; % lower.slab + dish_serif(10,0',b,1/3,ef_jut,c,1/3,ef_jut); fi % lower serif +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +lhchar "Italic Cyrillic letter shta - old sh"; +cyrcharmoving(shta); + +lhchar "Italic Cyrillic letter ib_yus - iot big yus"; +cyrcharmoving(ib_yus); + +lhchar "Italic Cyrillic letter i_est - iot est (IC with mid-line)"; +cyrcharmoving(i_est); + +lhchar "Italic Cyrillic letter vnarrow_e"; +cyrcharmoving(vnarrow_e); + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2slvl.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2slvl.mf new file mode 100644 index 00000000000..0db9b511d50 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2slvl.mf @@ -0,0 +1,1053 @@ +% +% lgt2slvl.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lowercase Old Slav letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames +% +% az +% i_az +% l_yus +% il_yus +% gerv +% nash +% zemla +% ksi +% vizhe used ukr_i +% izhe used lat_i +% izh in lgcomu +% omga +% omga_rnd +% ot +% omga_tlo +% Vzelo used lat_s +% fita in lgcomu +% koppa +% uk +% yat in lgcomu +% b_yus in lgcomu +% ib_yus +% narrow_e +% cherv +% shta +% psi +% est used ukr_e +% i_est +% narrow_e used eps +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Lowercase Cyrillic letter az - old a"; +cyrchar(az,9u#,x_height#,0); +italcorr x_height#*slant-serif_fit#+.5stem#-2u#; %d->x_height +adjust_fit(0,serif_fit#); +pickup fine.nib; +forsuffixes $=hair,stem: shaved$:=mfudged$; save $; $=shaved$; endfor +% a_part of italic_ae; +pickup tiny.nib; +numeric light_stem; light_stem=fudged.stem; +numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi; +if light_vair<fine.breadth: light_vair:=fine.breadth; fi +pos1(light_stem,0); pos2(light_stem,0); +penpos6(max(eps,vair-fine),-225); penpos4(curve-fine,-180); +rt x1r=rt x2r=hround(w-2.5u+.5light_stem); +if serifs: top y1=h+min(oo,serif_drop); bot y2=-min(oo,serif_drop); + else: top y1=h; bot y2=0; fi +y3=2/3bar_height; x6=x1; +y6+vair=hround min(8x_height,h-max(bracket,.5slab))-eps; +penpos5(max(eps,light_vair-fine),-90); penpos3(thin_join-fine,0); +pickup fine.nib; lft x3l=tiny.lft x1l; +lft x4r=hround(1.5u-.5curve); x5=.5[x4,x3]; +y4=.3[y5,y1]; bot y5r=-oo; +filldraw stroke z6e{3(x4-x1),y4-y1}...pulled_arc.e(4,5) + & pulled_arc.e(5,3); % bowl of a +pickup tiny.nib; +filldraw stroke z1e--z2e; % stem +if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper serif + sloped_serif.r(2,1,c,1/3,jut,min(oo,serif_drop)); fi % lower serif +%%%%% +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter ligature i_az - iot az"; +cyrchar(i_az,9u#,x_height#,0); +italcorr x_height#*slant-serif_fit#+.5stem#-2u#; %d->x_height +adjust_fit(if monospace: 4u# else: 4.75u# fi +serif_fit#, + serif_fit#); +pickup fine.nib; begingroup +forsuffixes $=hair,stem: shaved$:=mfudged$; save $; $=shaved$; endfor +% a_part of italic_ae; +pickup tiny.nib; +numeric light_stem; light_stem=fudged.stem; +numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi; +if light_vair<fine.breadth: light_vair:=fine.breadth; fi +pos1(light_stem,0); pos2(light_stem,0); +penpos6(max(eps,vair-fine),-225); penpos4(curve-fine,-180); +rt x1r=rt x2r=hround(w-2.5u+.5light_stem); +if serifs: top y1=h+min(oo,serif_drop); bot y2=-min(oo,serif_drop); + else: top y1=h; bot y2=0; fi +y3=2/3bar_height; x6=x1; +y6+vair=hround min(8x_height,h-max(bracket,.5slab))-eps; +penpos5(max(eps,light_vair-fine),-90); penpos3(thin_join-fine,0); +pickup fine.nib; lft x3l=tiny.lft x1l; +lft x4r=hround(1.5u-.5curve); x5=.5[x4,x3]; +y4=.3[y5,y1]; bot y5r=-oo; +filldraw stroke z6e{3(x4-x1),y4-y1}...pulled_arc.e(4,5) + & pulled_arc.e(5,3); % bowl of a +pickup tiny.nib; +filldraw stroke z1e--z2e; % stem +if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper serif + sloped_serif.r(2,1,c,1/3,jut,min(oo,serif_drop)); fi % lower serif +% i_part(6); +_zero:=6; +_one:=7; _two:=8; _three:=9; _four:=10; +% +pickup tiny.nib; pos[_one](stem,0); pos[_two](stem,0); +lft x[_one]l=lft x[_two]l= + l+letter_fit+if not monospace: serif_fit+ fi hround(2.5u-.5stem-eps); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); fi % lower stem serif +x[_three]=x[_zero]; x[_four]=x[_one]; +y[_three]=y[_four]=y[_zero]; pickup fine.nib; +penpos[_three](.6[thin_join,vair],90); +penpos[_four](.6[thin_join,vair],90); %fi +fill stroke z[_three]e--z[_four]e; % bar +endgroup; +%%% +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter l_yus - little yus (A with midstem)"; +cyrchar(l_yus,10u#+2stem#,x_height#,0); +adjust_fit(serif_fit#,serif_fit#); +% lower_amod; +numeric left_stem,right_stem,outer_jut,alpha; +right_stem=fudged.stem-stem_corr; +left_stem=min(fudged.hair if hefty:-2stem_corr fi,right_stem); +outer_jut=.8jut; pickup tiny.nib; y1=y4=0; +x1l=w-x4r=l+letter_fit+outer_jut+.25u+eps; +% +x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+.5[apex_oo,apex_o];%+apex_o+apex_oo +alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0<h-notch_cut: y0:=h-notch_cut; + fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{up}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2]; +penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5; +if hefty: y5r else: y5 fi =.5y0; +y5r-y5l=y6r-y6l=.6[thin_join,vair]; +penstroke z5e--z6e; % bar line +pickup tiny.nib; x7=.5[x5,x6]; top y7=y5; bot y8=0; +pos7(max(tiny.breadth+eps,.7[thin_join,stem]),0); +pos8(max(tiny.breadth+eps,.7[thin_join,stem]),0); +x7=x8; filldraw stroke z8e--z7e; % middle stem +if serifs: prime_points_inside(8,7); numeric inner_jut; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(1',2,a,1/2,outer_jut,b,.6,.6inner_jut)(dark); % lower left serif + dish_serif(4',3,c,1/2,.6inner_jut,d,1/3,outer_jut); % lower right serif + dish_serif(8,7,e,1/3,.6inner_jut,f,1/3,.6inner_jut); fi % lower middle serif +%%%%% +penlabels(1,1',2,3,4,4',5,6,7,8); endchar; + +lhchar "Lowercase Cyrillic letter il_yus - iot little yus"; +cyrchar(il_yus,10u#+2stem#,x_height#,0); +adjust_fit(if monospace:4u# else:4.75u# fi+serif_fit#,serif_fit#); +% lower_amod;iot +numeric left_stem,right_stem,outer_jut,alpha; +right_stem=fudged.stem-stem_corr; +left_stem=min(fudged.hair if hefty:-2stem_corr fi,right_stem); +outer_jut=.8jut; pickup tiny.nib; y1=y4=0; x1l=w-x4r=outer_jut+.25u+eps; +% +x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+.5[apex_oo,apex_o];%+apex_o+apex_oo +alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0<h-notch_cut: y0:=h-notch_cut; + fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{up}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2]; +penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5; +if hefty: y5r else: y5 fi =.5y0; +y5r-y5l=y6r-y6l=.6[thin_join,vair]; +penstroke z5e--z6e; % bar line +pickup tiny.nib; x7=.5[x5,x6]; top y7=y5; bot y8=0; +pos7(max(tiny.breadth+eps,.7[thin_join,stem]),0); +pos8(max(tiny.breadth+eps,.7[thin_join,stem]),0); +x7=x8; filldraw stroke z8e--z7e; % middle stem +if serifs: prime_points_inside(8,7); numeric inner_jut; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(1',2,a,1/2,outer_jut,b,.6,.6inner_jut)(dark); % lower left serif + dish_serif(4',3,c,1/2,.6inner_jut,d,1/3,outer_jut); % lower right serif + dish_serif(8,7,e,1/3,.6inner_jut,f,1/3,.6inner_jut); fi % lower middle serif +%%%%% +x9=x5; y9=.5[y5l,y5r]; save slab; +% i_part(9); +_zero:=9; +_one:=10; _two:=11; _three:=12; _four:=13; +% +pickup tiny.nib; pos[_one](stem,0); pos[_two](stem,0); +lft x[_one]l=lft x[_two]l= + l+letter_fit+if not monospace: serif_fit+ fi hround(2.5u-.5stem-eps); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper serif + slab:=vair; % lower.slab + dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); fi % lower serif +x[_three]=x[_zero]; x[_four]=x[_one]; +y[_three]=y[_four]=y[_zero]; pickup fine.nib; +penpos[_three](.6[thin_join,vair],90); +penpos[_four](.6[thin_join,vair],90); %fi +fill stroke z[_three]e--z[_four]e; % bar +%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Lowercase Cyrillic letter gerv - Glagolic letter"; +cyrchar(gerv,10u#,asc_height#,0); +italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#); +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +pos1'(stem',0); pos2'(stem',0); +lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; +top y1=h; bot y2=0; y1=y1'; y2=y2'; +filldraw stroke z1'e--z2'e; % left stem +penpos3(.6[thin_join,vair],90); penpos5'(stem,0); +pos5(stem,0); pos6(stem,0); +x5=x6=w-x1; y6=y2; x3=x1; y5=bar_height; z5'=z5; +penpos4(.6[thin_join,vair],90); +y3=y4=.52h; x4=.5[x1,w-rt x3r if not serifs:-u fi]; +fill stroke z3e..pulled_arc.e(4,5'); % arc +filldraw stroke z5e--z6e; % stem +if serifs: + sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif + numeric inner_jut; pickup tiny.nib; + if rt x2r+jut+.5u+1<=lft x6l-.5jut: inner_jut=.5jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,.5jut,d,1/3,inner_jut); % lower left serif + dish_serif(6,5,e,1/3,inner_jut,f,1/3,.5jut); fi % lower right serif +% hcross +pickup crisp.nib; pos7(bar,90); pos8(bar,90); +top y7r=top y8r=vround (min(.5[x_height,h]+.5bar,h-max(bracket,1.2slab))-eps); +x7=hround 1/3u-serif_fit; x8=x6; +filldraw stroke z7e--z8e; % cross bar +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter nash - old en"; +cyrchar(nash,10u# if not serifs:+.5width_adj# fi,x_height#,0); % n_width +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-2stem_corr; + upper_notch=y5-cap_notch_cut-eps; lower_notch=y6+cap_notch_cut+eps; + x5r =rt x1r; x6l =lft x3l; y6=vround(.7bar_height-eps); + if monospace: y5=vround(h-1.2vair'-eps); else: y5=h; fi + alpha1=diag_ratio(1,stem1,y5-y6,x5r-x6l); + penpos5(min(2fudged.stem,alpha1*stem1),0); + penpos6(min(2fudged.stem,alpha1*stem1),0); + x5'=x1l; z5'=whatever[z5l,z6l]; x6'=x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; x5:=max(x1l,x5); + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5--z5l.. + if y2'<upper_notch: {right}(x2'+1,upper_notch){down}... fi + {z6-z5} diag_in(5l,6l,1,6)--z6--z6r .. + if y3'>lower_notch: {left}(x3'-1.5,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5) --cycle; % diagonal +else: + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + y5r=vround(y3-1.2bracket-eps); y6l=vround(.7bar_height-eps); + stem1=max(tiny.breadth,fudged.hair-2stem_corr); + alpha1=diag_ratio(1,stem1,x6-x5,top y6l-bot y5r); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter zemla"; +cyrchar(zemla,8u#,x_height#,sbeak#); +italcorr x_height#*slant-.5serif_fit#-.3u#; +adjust_fit(0,.5serif_fit#); +numeric arm_thickness[],z_stem; +if hefty: arm_thickness1=Vround(vair-vair_corr); arm_thickness2=vair; + z_stem=.6[vair,stem]; +else: arm_thickness1=vair; arm_thickness2=vair'; z_stem=.9[vair,stem]; fi +pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u); lft x3l=lft x4l=hround .5u; +top y1=h; y2=min(y1,h-2/3arm_thickness1); +bot y4=0; y3=max(y4,2/3arm_thickness2); +numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3)); +penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0); +penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0); +pair delta; delta=penoffset z3-z2 of currentpen; +fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps; +arm(5,6,a,beak_darkness,-.4beak_jut); % upper arm and beak +% the beak is turning down +pos7(arm_thickness2,90); pos8(hair,0); %!!! +bot y7l=0; x7=x4; rt x8r=hround(w-.75u); +y8=good.y(y7l-beak/1.2)-eps; %!!! +arm(7,8,b,beak_darkness,.6beak_jut); % lower arm and beak +penlabels(1,2,3,4,5,6,7,8); endchar; + +% like CYR_.z or numeral 3 +lhchar "Lowercase Cyrillic letter ksi"; +cyrchar(ksi,if serifs:7.5u#else:8u#fi,x_height#+.5acc_height#,desc_depth#); +bh#:=min(bar_height#,1.14x_height#-bar_height#); define_pixels(bh); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(0 if monospace:+\\.5u#,.5u#+else:,fi\\.5serif_fit#); h:=x_height; +set_bar_axis; y4l=y5l=y6r=y2.bh; y4r=y5r=y6l=y1.bh; y4=y5=y6=y0.bh; +pickup fine.nib; numeric right_curve,low_curve; +right_curve=if serifs: curve-stem_corr else: curve-3stem_corr fi; +low_curve=max(fine.breadth,if serifs: stem-stem_corr else:.5[vair,stem]-3stem_corr fi); +penpos2(vair,90); penpos3(.5[hair,curve],0); +y2r=h+oo; x2=x8=.5[u,w-.6u-.5stem]; x1r=hround.625u; +x7r=hround(w-.6u); x3r=min(x7r-1,hround(w-u)); +x5r=x5l=min(x1r+flare+if not serifs:.5 fi hair-fine,x2)+eps; +y3=.5[y4l,y2l]; x4l=x4r=1/3[x5l,x3l]; x6l=x6r=hround.5[.5u,w-.8u]; +{{interim superness:=if serifs:more_super else:hein_super fi; + fill stroke super_arc.e(2,3)}}; +fill stroke super_arc.e(3,4)..z5e; % upper bowl +numeric theta; theta=-90+angle(28u,x_height); slope:=x_height/28u; +penpos9(low_curve,theta); pos9'(low_curve,theta); z9=z9'; +x7r-x7l=hround.5[vair,stem]; +x9=x10=2.2u; x11=.5w-.5u; bot y9=-.15d; z9'=z9; bot y10l=-d-oo; +ellipse_set(6l,7l,8l,9l); ellipse_set(6r,7r,8r,9r); +{{less_tense; fill stroke z9e---z8e...{up}z7e...{left}z6e}}; % main stroke +if serifs: pos1(hair,180); pos0(flare,180); pos2'(vair,90); z2'=z2; + y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare); + cyrbulb(2',1,0); % bulb + pos10(vair,90); pos11(vair,135); y11=min(-3/4d-oo,y7l); + filldraw stroke z11e{x10-x11,2(y10-y11)} + ...z10e{left}...z9'e{z8e-z9e}; % tail + % "hachek" + penpos14(vair',90); penpos15(whatever,0); + x14=x6l; y14=h+oo-eps; + x6l-x15=x16-x6l=good.x 2.25u; y15=y16=h+.5acc_height+oo; + penpos16(.25[vair,curve],angle(z16-z14)+90); + z15l=z14l+whatever*(z14-z15); (x15r,y)=z14r+whatever*(z14-z15); + fill stroke z15e--z14e{z16r-z14}..{.5right}z16e; % diagonals +else: pos1(min(right_curve,1.2flare)-.2tiny,175); pos2'(vair,90); + z2'=z2; y1l=max(.76h,top y5r+eps); + filldraw stroke z1e{x2-x1,5(y2-y1)}...{right}z2'e; + pos10(vair,45); + filldraw stroke z10e{left}...z9'e{z8e-z9e}; % tail + % "hachek" + pickup pencircle scaled min(.5fine,.15vair); + pos14(vair,0); pos16(vair,0); pos15(stem,0); + x8-x14=x16-x8+eps; bot y15=h+oo-eps; x15=x6l; + top y14=top y16=h+.5acc_height+oo; lft x14l=hround(rt x15r-3.25u-.5vair); + z0=whatever[z14r,z15r]=whatever[z15l,z16l]; + filldraw z15l--z14l--z14r--z0--z16l--z16r--z15r--cycle; fi % diagonals +pickup fine.nib; +fill z5l{left}..if bot y5l>top y5r:(lft x5l,bot y5l)---(lft x5r,top y5r) + else: (lft x5l,y5){down} fi ..{right}z5r--cycle; % bar +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar; + +lhchar "Lowercase Cyrillic vizhe - variant izhe - like latin i with umlaut"; +cyrchar(vizhe,5u#,lc_trema_height#,0); +italcorr h#*slant-serif_fit# + .5idot_diam# -2u#; +adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); +h:=x_height; pickup tiny.nib; pos1(stem',0); pos2(stem',0); +if odd(w-stem'): change_width; fi +lft x1l=hround(.5w-.5stem'); x1=x2; +top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); %lower.slab + sloped_serif.l(1,2,a,1/3,.95jut,serif_drop); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif +% the accent +lowercase_umlaut(0,0, 3,4,5,6); +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter izhe - like small uppercase Latin I"; +cyrchar(izhe,5u#,min(asc_height#,10/7x_height#+.5idot_diam#),0);%!!!from ec +italcorr h#*slant-serif_fit# + .5idot_diam# -2u#;%!!!from ec +adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); +pickup tiny.nib; pos1(stem',0); pos2(stem',0); +if odd(w-stem'): change_width; fi +lft x1l=hround(.5w-.5stem'); x1=x2; +top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; +filldraw stroke z1e--z2e; % stem +pos3(idot_diam,0); pos4(idot_diam,90);%!!!from ec +if serifs: + x3r=max(x1r,x1+.5(idot_diam-tiny)-.2jut) +else: x3=x1-.5 fi; +top y4r=h+1; +if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi +x3=x4; y3=.5[y4l,y4r]; dot(3,4); % dot +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,.9jut); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,.9jut); fi % lower serif +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter omga - omega"; +cyrchar(omga,14u#+width_adj#,x_height#,0);%omga width +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: -.5u#,-.5u# else: 0,0 fi); %o +% lower_omega; +if odd((r-l)-stem'): change_width; fi % symmetric & all three equal +if not serifs: interim superness:=more_super; fi +set_bar_axis; if serifs: pickup tiny.nib; else: pickup fine.nib; fi +pos6(stem',0); top y6=y2.bh; +lft x6l=hround (.5w-.5stem'); % middle stem point +% Omega_bowl +pos2(vair,90); pos3(curve,180); pos4(vair',270); +if serifs: numeric light_bulb; light_bulb=hround 7/8[hair,flare]; + pos1(hair,0); pos0(light_bulb,0); pos5(fudged.hair,0); + top y2r=vround(h+1.5oo); bot y4r=-oo; + lft x3r=hround max(.6u,1.35u-.5curve)-eps; y3=.5h; + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + x5=(.5w+eps); y5=max(good.y(.5bar_height-.9),y4l+vair'); + rt x1r=hround min(.5w-max(.67u,.55stem)+eps,lft x5l-1); + x2=x4+if monospace:-fi.25u=hround (.67[lft x3r,rt x1r]); + {{less_tense; bulb(2,1,0)}}; % bulb + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: pos5(flare,275); + x2=x4=(.25w+1.25u); lft x3r=hround max(u,2u-.5cap_curve); + x5r=(.5w+eps); top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4) & + term.e(4,5,right,.8,4); % arc and terminals +fi +%%% +% mirror + middle stem +forsuffixes $ = if serifs: 1l,1r,0l, fi 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r: + x.m$-x6r=x6l-x$; y.m$=y$; endfor; +if serifs: + {{less_tense; bulb(m2,m1,m0)}}; % bulb + filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull) + & pulled_super_arc.e(.m3,.m4)(.5superpull) + ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y4)}z.m5e; % arc and lower terminal +else: + filldraw stroke super_arc.e(.m2,.m3) & super_arc.e(.m3,.m4) & + term.e(.m4,.m5,left,.8,4); % arc and terminals +fi +if serifs: + path p.l,p.r; numeric t; + p.l=z4r{right}..tension .9 and 1..{x5-x4,5(y5-y4)}z5r; + p.r=z.m4r{left}..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r; + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); if t<0: t:=1; fi + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem + z5'l=(x6l,y5); z5'r=(x6r,y5); z5'=.5[z5'l,z5'r]; z6=.5[z6l,z6r]; + dish_serif(6,5',a,1/3,.5cap_jut,b,1/3,.5cap_jut); +else: + path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4); + p.r=term.r(.m4,.m5,left,.8,4); + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem +fi +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter omga_rnd - omega round"; +cyrchar(omga_rnd,11u#,x_height#,0); %f width - eps +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +if serifs: interim superness:=1.05 superness; + else: interim superness:=1.075 superness; fi +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) + & pulled_arc.e(2,3) & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +% dots +if serifs: pickup crisp.nib; else: pickup fine.nib; fi +numeric bulb_diam; bulb_diam=hround 7/8[hair,flare]; +z5=z1r; z6=z3r; x5'=x6'=x1; pos5(bulb_diam,0); pos6(bulb_diam,0); +bot y5'=max(.5h+1,bot y1l-.7bulb_diam); +top y6'=min(.5h-1,top y3l+.7bulb_diam); +pos6'(min(bulb_diam,vstem),0); +pos5'(min(bulb_diam,vstem),0); +filldraw circ_stroke z5e--z5'e; filldraw circ_stroke z6e--z6'e; %dots +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter ot - omega with te accent"; +cyrchar(ot,14u#+width_adj#,x_height#+acc_height#,0);%omga width +italcorr .7x_height#*slant; +adjust_fit(if monospace: -.5u#,-.5u# else: 0,0 fi); %o +full_h:=h; h:=x_height; +% lower_omega; +if odd((r-l)-stem'): change_width; fi % symmetric & all three equal +if not serifs: interim superness:=more_super; fi +set_bar_axis; if serifs: pickup tiny.nib; else: pickup fine.nib; fi +pos6(stem',0); top y6=y2.bh; +lft x6l=hround (.5w-.5stem'); % middle stem point +% Omega_bowl +pos2(vair,90); pos3(curve,180); pos4(vair',270); +if serifs: numeric light_bulb; light_bulb=hround 7/8[hair,flare]; + pos1(hair,0); pos0(light_bulb,0); pos5(fudged.hair,0); + top y2r=vround(h+1.5oo); bot y4r=-oo; + lft x3r=hround max(.6u,1.35u-.5curve)-eps; y3=.5h; + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + x5=(.5w+eps); y5=max(good.y(.5bar_height-.9),y4l+vair'); + rt x1r=hround min(.5w-max(.67u,.55stem)+eps,lft x5l-1); + x2=x4+if monospace:-fi.25u=hround (.67[lft x3r,rt x1r]); + {{less_tense; bulb(2,1,0)}}; % bulb + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: pos5(flare,275); + x2=x4=(.25w+1.25u); lft x3r=hround max(u,2u-.5cap_curve); + x5r=(.5w+eps); top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4) & + term.e(4,5,right,.8,4); % arc and terminals +fi +%%% +% mirror + middle stem +forsuffixes $ = if serifs: 1l,1r,0l, fi 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r: + x.m$-x6r=x6l-x$; y.m$=y$; endfor; +if serifs: + {{less_tense; bulb(m2,m1,m0)}}; % bulb + filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull) + & pulled_super_arc.e(.m3,.m4)(.5superpull) + ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y4)}z.m5e; % arc and lower terminal +else: + filldraw stroke super_arc.e(.m2,.m3) & super_arc.e(.m3,.m4) & + term.e(.m4,.m5,left,.8,4); % arc and terminals +fi +if serifs: + path p.l,p.r; numeric t; + p.l=z4r{right}..tension .9 and 1..{x5-x4,5(y5-y4)}z5r; + p.r=z.m4r{left}..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r; + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); if t<0: t:=1; fi + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem + z5'l=(x6l,y5); z5'r=(x6r,y5); z5'=.5[z5'l,z5'r]; z6=.5[z6l,z6r]; + dish_serif(6,5',a,1/3,.5cap_jut,b,1/3,.5cap_jut); +else: + path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4); + p.r=term.r(.m4,.m5,left,.8,4); + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem +fi +%%%%% +% the accent +% low_te(6); +_zero:=7; x7=.5[x6l,x6r]; +_one:=8; _two:=9; _three:=10; _four:=11; _five:=12; +% +if serifs: pickup crisp.nib; + else: pickup pencircle scaled min(.5fine,.15vair); fi +numeric stem[]; stem1=if hefty: fudged.hair-2stem_corr else: .7[vair,stem] fi; +stem2=if serifs: vair else: max(currentbreadth+eps,.6[thin_join,vair]) fi; +stem3=if serifs: hair else: max(currentbreadth+eps,.6[thin_join,vair]) fi; +pos[_one](stem1,0); pos[_two](stem1,0); +lft x[_one]l=lft x[_two]l=hround(x[_zero]-.5stem1); +numeric mid_thickness; +mid_thickness=vround if serifs:1/4 else: 1/3 fi[vair,stem]; +bot y[_two]=bot y[_four]=bot y[_five]= + vround max(h+o+max(tiny,.5mid_thickness),1/3[h,h+acc_height]+o-.5mid_thickness); +top y[_one]=top y[_three]r=max(h+acc_height,bot y[_two]+1.5vair); +filldraw stroke z[_one]e--z[_two]e; % stem +pos[_three](stem2,90); pos[_four](stem3,0); pos[_five](stem3,180); +x[_three]=x[_one]; +rt x[_four]r=hround(x[_zero]+2.5u if monospace:/expansion_factor fi+.5vair); +x[_four]-x[_three]=x[_three]-x[_five]; +z[_four]'=beak_darkness[(x[_four]l,y[_three]l), + .5[(x[_one]r,y[_three]l),z[_four]l] ]; +z[_five]'=beak_darkness[(x[_five]l,y[_three]l), + .5[(x[_one]l,y[_three]l),z[_five]l] ]; +filldraw z[_four]r--z[_four]l{up}...z[_four]' + ...{left}(x[_one]r,y[_three]l)--(x[_one]r,y[_three]l){left}...z[_five]' + ...{down}z[_five]l--z[_five]r--- + (x[_five]r,y[_three]r)---(x[_four]r,y[_three]r)---cycle; +%%% +penlabels(1,2,3,4,5,6, 8,9,10,11,12); endchar; + +lhchar "Lowercase Cyrillic letter omga_tlo - omega titlo"; +cyrchar(omga_tlo,14u#+width_adj#,x_height#+acc_height#,0); %omga width +italcorr .7x_height#*slant; +adjust_fit(if monospace: -.5u#,-.5u# else: 0,0 fi); %o +full_h:=h; h:=x_height; +% lower_omega; +if odd((r-l)-stem'): change_width; fi % symmetric & all three equal +if not serifs: interim superness:=more_super; fi +set_bar_axis; if serifs: pickup tiny.nib; else: pickup fine.nib; fi +pos6(stem',0); top y6=y2.bh; +lft x6l=hround (.5w-.5stem'); % middle stem point +% Omega_bowl +pos2(vair,90); pos3(curve,180); pos4(vair',270); +if serifs: numeric light_bulb; light_bulb=hround 7/8[hair,flare]; + pos1(hair,0); pos0(light_bulb,0); pos5(fudged.hair,0); + top y2r=vround(h+1.5oo); bot y4r=-oo; + lft x3r=hround max(.6u,1.35u-.5curve)-eps; y3=.5h; + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + x5=(.5w+eps); y5=max(good.y(.5bar_height-.9),y4l+vair'); + rt x1r=hround min(.5w-max(.67u,.55stem)+eps,lft x5l-1); + x2=x4+if monospace:-fi.25u=hround (.67[lft x3r,rt x1r]); + {{less_tense; bulb(2,1,0)}}; % bulb + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: pos5(flare,275); + x2=x4=(.25w+1.25u); lft x3r=hround max(u,2u-.5cap_curve); + x5r=(.5w+eps); top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4) & + term.e(4,5,right,.8,4); % arc and terminals +fi +%%% +% mirror + middle stem +forsuffixes $ = if serifs: 1l,1r,0l, fi 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r: + x.m$-x6r=x6l-x$; y.m$=y$; endfor; +if serifs: {{less_tense; bulb(m2,m1,m0)}}; % bulb + filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull) + & pulled_super_arc.e(.m3,.m4)(.5superpull) + ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y4)}z.m5e; % arc and lower terminal +else: + filldraw stroke super_arc.e(.m2,.m3) & super_arc.e(.m3,.m4) & + term.e(.m4,.m5,left,.8,4); % arc and terminals +fi +if serifs: path p.l,p.r; numeric t; + p.l=z4r{right}..tension .9 and 1..{x5-x4,5(y5-y4)}z5r; + p.r=z.m4r{left}..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r; + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); if t<0: t:=1; fi + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem + z5'l=(x6l,y5); z5'r=(x6r,y5); z5'=.5[z5'l,z5'r]; z6=.5[z6l,z6r]; + dish_serif(6,5',a,1/3,.5cap_jut,b,1/3,.5cap_jut); +else: path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4); + p.r=term.r(.m4,.m5,left,.8,4); + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem +fi +%%%%% +% the accents +h:=full_h; +% palatal(expr .5w+u,0,-o); +x_center:=.5w-.25u; x_move:=0; y_move:=-o; +_one:=8; _two:=9; _three:=10; _four:=11; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o; x[_two]=x_center; +rt x[_one]l =hround(x[_two]-3.5u if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+3.5u if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair)-.5crisp + else: vround 2/3[x_height+acc_height,x_height] fi; +bot y[_four]l=max(x_height+o,.5[x_height,y[_one]]); x[_four]=x_center+5u+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}... + z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +% zvat!!!moved down; +x_center:=.5w-.25u; y_move:=-max(1/3acc_height,.5[vair,curve])-oo-eps; +_one:=12; _two:=13; _three:=14; +% +numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs:vround (1/3[vair,stem]) else: vair fi; +theta:=45; y:=min(asc_height,2x_height); +z[_one]=(x_center-u,.55[y[_three],y]+y_move);%!!! +z[_two]=(x_center+u,4/5[y[_three],y]+y_move);%!!! +bot z[_three]r=(x_center+.5u, + if serifs: max(2/3[x_height+acc_height,x_height],x_height+o+hair) + -.5 if serifs: crisp else: fine fi + else: vround 2/3[x_height+acc_height,x_height] fi+y_move);%!!! +pos[_one](stem1,theta+90); pos[_two](stem2,theta); +pos[_three](stem1,theta-90); +filldraw stroke z[_one]e{dir(theta+45)} + ..{dir(theta-90)}z[_two]e..{dir(theta+180)}z[_three]e; % stroke +% +penlabels(1,2,3,4,5,6, 8,9,10,11, 12,13,14); endchar; + +lhchar "Lowercase Cyrillic letter koppa (looks like c with tail)"; +cyrchar(koppa,8u#,x_height#,desc_depth#); +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,.5u# else: -.1u#,0 fi); +pickup fine.nib; pos2(vair,90); +x2=.5(w+u); top y2l=vround(h+1.5oo); +if serifs: pos1(hair,0); pos0(flare,0); + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + rt x1r=hround(w-.7u); bulb(2,1,0); % bulb +else: pos1(4/7[vair',flare],80); + rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2,1,right,.8,4); fi % upper terminal +numeric theta; theta=-90-angle(27u,x_height); slope:=x_height/-27u; +pos5(max(fine.breadth,fudged.stem-4stem_corr),theta); +pos6(max(fine.breadth,.6[thin_join,vair]),135); +lft x3r=hround max(.6u,1.35u-.5curve); x3l-x3r=hround.8[vair,fudged.stem]-fine; +x5+u=x6=w-2u; y5=.1d; bot y6l=-d-oo; +ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r); +{{less_tense; + filldraw stroke z6e{right}...z5e---z4e...{up}z3e...{right}z2e}}; % main stroke +penlabels(0,1,2,3,4,5,6); endchar; + +% modified numeral 8 +lhchar "Lowercase Cyrillic letter uk"; +cyrchar(uk,if serifs: 9.75u# else:10.5u# fi,asc_height#,0); +italcorr asc_height#*slant-.5u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +% lower_uk; +numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta; +top_thickness=max(fine.breadth,vround(slab-2vair_corr)); +if serifs: + bot_thickness=max(fine.breadth,vround(slab-vair_corr)); + upper_side=max(fine.breadth,hround(.5[hair,stem]-stem_corr)); + lower_side=hround(.5[hair,stem]+stem_corr); +else: + bot_thickness=vair'; + upper_side=max(fine.breadth,hround(.3[vair',stem]-stem_corr)); + lower_side=hround(.3[vair',stem]+stem_corr); fi + x0=.5w; y0=if serifs:.7x_height else:bar_height fi; %h;%%%%%%%%%%%%%% +pickup fine.nib; theta=90-angle(20u,h); slope:=-h/20u; +if lower_side>1.2upper_side: upper_side:=lower_side; fi +pos1(top_thickness,-90); pos6(bot_thickness,-90); +x1=x6=.5w; top y1l=h+o; bot y6r=-o; +pos0(max(fine.breadth,fudged.stem-2stem_corr),theta); +lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround 1.75u if not serifs:+.5u fi; +x2r-x2l=if serifs:fudged.stem else:upper_side fi-fine; +x5r-x5l=lower_side-fine; +ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r); +ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r); +numeric tau; tau=max(.8,.20710678/(superness-.5)); +y2r:=vround(y2l+serif_drop+eps); +filldraw stroke z2e{down} + ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left}; % S stroke +pos7(lower_side,180); pos8(upper_side,180); +y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=(x0,min(y0,y8-eps)); +filldraw stroke z8e{down} + ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke +filldraw stroke z6e{left}..tension atleast tau..z7e{up} + ..tension atleast tau and atleast 1..{18u,.5h}z9e;% lower left stroke +if serifs: +% italic bulb + z8'=z8; pos8'(upper_side,0); + y1'+.5curve=h+oo; x1'=x8-max(u,.5u+.5curve); + numeric theta; theta=angle(4(x8'-x1'),y8'-y1'); pos1'(curve,theta+90); + filldraw z1'l{dir theta}..tension atleast 1 and 1..{down}z8'l + --z8'r{up}...{-dir theta}z1'r..cycle; % bulb +% from sloped serif + pos12(slab,90); lft x12=hround(x2l-.5jut-.5-eps); + y12r=vround(y2r-serif_drop-eps); z14=(x2l,min(y2l-.5,y12)-eps); + filldraw z2r--z12r--z12l{right} + ...1/3[(x14,y12l),.5[z12l,z14] ]{z14-z12l} + ...{down}z14--(x2r,y14)--cycle; % sloped serif +else: pos10(flare,225); x10r=x1; y10l=h+oo; + filldraw stroke z8e{up}...z10e; fi +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,9',10,11,12); endchar; + +lhchar "Lowercase Cyrillic letter cherv - old che"; +cyrchar(cherv,10u# if not serifs:+.5width_adj# fi,x_height#,0); % n_width +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +pickup tiny.nib; penpos1(fudged.stem,0); penpos2(fudged.stem,0); +penpos3(fudged.stem,0); penpos4(fudged.stem,0); +penpos5(.6[thin_join,vair],90); penpos6(.6[thin_join,vair],-90); +x1l=x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +y1=y3=h; y2=y4=.3[y6,h]; x5=x6=x7=.5[x1,x3]; z5=z6; +y6=good.y (h-.52h if serifs: -.15(.5[hair,.7stem]) fi); +fill z2l--diag_end(2l,1l,1,1,1r,2r)--z2r & pulled_arc.r(2,5) & z5r--z5l + & pulled_arc.l(5,2) & cycle; +fill z4l--diag_end(4l,3l,1,1,3r,4r)--z4r & pulled_arc.r(4,6) & z6r--z6l + & pulled_arc.l(6,4) & cycle; %U +pos6'(stem,0); pos7(stem,0); top z6'=z6; bot y7=0; +filldraw stroke z6'e--z7e; % stem +if serifs: pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(3,4); + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3r-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3r-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3',4,e,1/3,inner_jut,f,1/3,jut); % upper left serif + slab:=vair; % lower.slab + dish_serif(7,6,g,1/3,inner_jut,h,1/3,jut); fi % lower left serif +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter psi"; +cyrchar(psi,11.5u#,asc_height#,desc_depth#); +italcorr x_height#*slant; +if odd(stem'-w): change_width; fi % symmetric & all three equal +% psi bowl; +adjust_fit(0 if monospace:-\\.5u#,-.5u#+ else:,fi\\ 0); +if odd(w-stem'): change_width; fi +pickup fine.nib; interim superness:=more_super; +lft x0=w-rt x8=hround .5u; x2=w-x6=x3+.25u; +pos3(curve,-180); pos5(curve,0); lft x3r=hround(2u-.5curve); x5=w-x3; +pos0(vair,90); pos1(vair,90); pos2(stem,0); +pos8(vair,90); pos7(vair,90); pos6(stem,180); +top y0r=top y1r=x_height+oo; y2=y6=3/4x_height; y7=y8=y0; +x1=w-x7=x2-1.25u; +filldraw stroke z0e{right}...z1e{right}...{-u,-x_height}z2e; % right hook +filldraw stroke z8e{left}...z7e{left}...{u,-x_height}z6e; % left hook +pos2'(stem,-180); z2'=z2; pos6'(stem,0); z6'=z6; +pos4(vair,-90); x4=.5w; y3=y5=.7[y4,.57x_height]; bot y4r=-oo; +filldraw stroke z2'e{-u,-x_height}...super_arc.e(3,4)&super_arc.e(4,5) +...{-u,x_height}z6'e; +%%%%% +% f stem +pickup tiny.nib; pos9(stem',0); pos10(stem,0); +pos0'(stem',0); pos1'(stem,0); z1'l=z0'l; x0'=x9; x1'=x10; +lft x9l=hround(.5w-.5stem'); top y9=h; % if serifs: +min(oo,serif_drop) fi; +numeric edge; edge=rt x10r; +y1'=ypart(((edge,body_height+2dot_size)--(edge,-o)) + intersectionpoint(z3r{down}...{right}z4r...{up}z5r)); +pickup tiny.nib; bot y10=-d; +filldraw stroke z9e--z0'e--z1'e--z10e; % stem +pickup crisp.nib; pos12(hair,0); pos11'(stem,0); +z11'=z10; x12l=x11'l; bot y12=0; +filldraw stroke z11'e--z12e; % point +if serifs: numeric outer_jut; outer_jut=if monospace:1.414 fi jut; + sloped_serif.l(9,0',a,1/3,outer_jut,serif_drop); % upper serif + dish_serif(10,1',b,1/3,outer_jut,c,1/3,outer_jut); fi % lower serif +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Lowercase Cyrillic letter shta - old sh"; +cyrchar(shta,14u#+.5width_adj#,x_height#,sbeak#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_sh;old +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; +pos1(fudged.stem,0); pos2(fudged.stem,0); pos3(fudged.stem,0); +pos4(fudged.stem,0); pos5(fudged.stem,0); pos6(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; z5=.5[z1,z3]; z6=.5[z2,z4]; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +if serifs: numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x5l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif + nodish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); % lower right serif + filldraw z.d0--z.d1--z.g1--z.g0--cycle; % lower inter_serif bar +else: lft x2'= lft x2l; bot y2'l=0; pos2'(vair',90); + rt x4'=rt x4r; y4'=y2'; pos4'(vair',90); + filldraw stroke z2'e--z4'e; fi +pickup tiny.nib; x7=x6; bot y7=-d; +% middle_serif; +if serifs: numeric light_hair; + light_hair=min(fudged.stem,fudged.hair if hefty:-4stem_corr fi); + pos7(light_hair,0); + filldraw stroke z6e....{down}z7e; +else: pos7(fudged.stem,0); filldraw stroke z6e--z7e; fi +penlabels(1,2,3,4,5,6,7); endchar; + +iff not specific:% +lhchar "Lowercase Cyrillic letter ib_yus - iot big yus (`roman')"; +cyrchar(ib_yus,15u#,x_height#,0); +adjust_fit(.75u#+ + if monospace: 4u# else: 4.5u# fi +serif_fit#, %li_part_adj+.75u + serif_fit#); +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal +% lowerr_yus; +% ltop_yus; +set_bar_axis; numeric stem[]; +stem1=fudged.stem-3stem_corr; stem2=min(stem1,fudged.hair); +penpos1(stem1,0); penpos2(stem2,0); penpos3(stem1,0); penpos4(stem2,0); +x1l=w-x2r=hround(.2w-.5tiny-.5)-eps; y1=y2=h; y3=y4=3/5[y1.bh,y2.bh]; +x3l=hround(.5w-.5stem1); x3r=x4r; +z0=whatever[z4l,z2l]=whatever[z1r,z3r]; +if hefty: y0:=y2.bh; + fill z3l--diag_end(3l,1l,1,1,1r,3r){z3r-z1r} + ...{down}(x0-.5,y0)..(x0+.5,y0){up}... + {z2l-z4l}diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; % diagonals +else: fill z3l--diag_end(3l,1l,1,1,1r,3r)--z0-- + diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; fi % diagonals +penpos5(stem1,0); x5=x3; y5=0; +fill z3l--diag_end(3l,5l,1,1,5r,3r)--z3r--cycle; %middle stem +z6=whatever[z4,z2]; z7=whatever[z1,z3]; y6=y7=good.y(y1-vair)-eps; +fill z1--z7--z6--z2--cycle; % upper bar +% lyus_rbowl; + numeric stem[],alpha[],right_jut; + right_jut=if serifs:.6jut else:.4tiny fi; + y10l=y1.bh; y10r=y2.bh; x10l=x10r=x3; y9=y12=min(bot y10l-.5,.85y10l); + rt x8r=w-lft x11l=hround(r-letter_fit-.3u-right_jut); bot y8=bot y11=y5; + stem2=max(tiny.breadth,fudged.stem-3stem_corr); + alpha2=diag_ratio(1,.5(stem2-tiny),h-y8,x8r-x3); + penpos8(alpha2*(stem2-tiny),0); penpos11(alpha2*(stem2-tiny),0); + forsuffixes $=l,r: y8'$=0; y11'$=0; endfor + z8'r=z8r+penoffset (x3,h)-z8 of currentpen+whatever*((x3,h)-z8); + z8'l=z8l+penoffset z8-(x3,h) of currentpen+whatever*((x3,h)-z8); + z11'r=z11r+penoffset (x3,h)-z11 of currentpen+whatever*((x3,h)-z11); + z11'l=z11l+penoffset z11-(x3,h) of currentpen+whatever*((x3,h)-z11); + z8'=.5[z8'l,z8'r]; z11'=.5[z11'l,z11'r]; + z9=z8'+whatever*((x3,h)-z8); z12=z11'+whatever*((x3,h)-z11); + penpos9(stem-2stem_corr,0); penpos12(stem-2stem_corr,0); + fill z10l{right}...{z8'l-z9l}z9l--diag_end(9l,8'l,.5,1,8'r,9r) + --z9r{z9r-z8'r}...{left}z10r--cycle; % right diagonal + fill z10r{left}...{z11'l-z12l}z12l--diag_end(12l,11'l,1,.5,11'r,12r) + --z12r{z12r-z11'r}...{right}z10l--cycle; % left diagonal +%% +save slab; % lower.slab +if serifs: numeric inner_jut; prime_points_inside(5,3); + if rt x5r+jut+.5u+1<=lft x8l-jut: inner_jut=jut; + else: rt x5r+jut+.5u+1=lft x8l-inner_jut; fi + slab:=vair; % lower.slab + dish_serif(11,12,a,1/3,right_jut,b,1/2,inner_jut)(dark); % lower diagonal serif + dish_serif(8,9,e,1/2,inner_jut,f,1/3,right_jut)(dark); % lower diagonal serif + dish_serif(5',3,c,1/3,.75jut,d,1/3,.75jut); fi % lower middle serif +%%%%% +% barh_i_part(3); +_zero:=3; +_one:=13; _two:=14; +% +pickup tiny.nib; +pos[_one](stem,0); pos[_two](stem,0); +lft x[_one]l=lft x[_two]l= + l+letter_fit+if not monospace: serif_fit+ fi hround (2.5u-.5stem-eps); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +bar_stroke(x[_one],x[_zero]); % bar +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper serif + slab:=vair; % lower.slab + dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); % lower serif +fi +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar; + +lhchar "Lowercase Cyrillic letter i_est - iot est (IC with mid-line)"; +cyrchar(i_est,8u#,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: 4u# else: 4.5u# fi +serif_fit#, %li_part_adj + if monospace:.5u# else:.1u# fi); +% lower_ukre; +set_bar_axis; +pickup fine.nib; pos2(vair',90); pos3(curve,180); pos4(vair',270); +x2=x4=(.5(w+u)); top y2r=vround(h+1.5oo); bot y4r=-oo; +lft x3r=(hround max(.6u,1.35u-.5curve)); y3=.5h; +if serifs: + pos1(hair,0); pos5(hair,360); + y1=min(y2.bh+.75flare-.25vair+eps,.9[bar_height,h]-.75flare); + rt x1r=rt x5r=hround(w-.5u); + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke z1e{x2-x1,5(y2-y1)}...pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal + pos6(.3[fine.breadth,hair],0); x6r=x1r; top y6=h+oo; + x1r-x1'=1.5curve; y1'=y1; + path upper_arc; upper_arc=z1{x2-x1,5(y2-y1)}..z2{left}; + numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); + filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +else: + pos1(4/7[vair',flare],80); pos5(.6[vair',flare],275); + rt x1r=hround(w-.6u); + top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2,1,right,.8,4); % upper terminal + rt x5r=hround(w-.5u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e; + if angle direction 1 of p.e>75: + p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal +%%% +% lukre_bar; +if (serifs=true) and (bar#<=.5curve#): + x7r=x3l; x8r=min(lft x1l-.5hair,0.85[x3l,x1l]); + y7l=y8l=y1.bh; y7r=y8r=y2.bh; x7l=x7r; x8l=x8r; + numeric bar[]; + bar2=7/8[bar,fudged.stem-2stem_corr]; + penpos9(bar2,45); z9=.575[z7l,z8l]; + fill circ_stroke z8e{-2,-1}..{-2,1}z9e..{-2,-1}z7e; % curve /\/ +else: + bar_stroke(x3l,min(lft x1l-.5hair,0.85[x3l,x1l])); % bar -- +fi +%%%%% +save slab; % lower.slab +% barh_i_part(3); +_zero:=3; +_one:=10; _two:=11; +% +pickup tiny.nib; +pos[_one](stem,0); pos[_two](stem,0); +lft x[_one]l=lft x[_two]l= + l+letter_fit+if not monospace: serif_fit+ fi hround (2.5u-.5stem-eps); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +bar_stroke(x[_one],x[_zero]); % bar +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper serif + slab:=vair; % lower.slab + dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); % lower serif +fi +%%%%% +penlabels(1,1',2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2slvu.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2slvu.mf new file mode 100644 index 00000000000..167cc669c6c --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2slvu.mf @@ -0,0 +1,1091 @@ +% +% lgt2slvu.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Uppercase Old Slav letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames +% +% AZ +% I_AZ i-alpha +% L_YUS +% IL_YUS +% GERV +% NASH +% ZEMLA +% VIZHE +% IZHE used LAT_I +% IZH in lgcomu +% OMGA +% OMGA_rnd +% OT +% OMGA_tlo +% VZELO used LAT_S +% FITA in lgcomu +% KOPPA +% UK +% YAT in lgcomu +% CHERV +% PSI +% SHTA +% B_YUS in lgcomu +% IB_YUS +% KSI +% EST used UKR_E (lgcomu) +% I_EST +% NARROW_E used EPS +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Uppercase Cyrillic letter ligature AZ - OLD A"; +cyrchar(AZ,12u#,cap_height#,0); +if is_small_cap: getcharcode(az); fi +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); +adjust_fit(0,cap_serif_fit#); +pickup fine.nib; +forsuffixes $=hair,stem: shaved$:=mfudged$; save $; $=shaved$; endfor +pickup tiny.nib; numeric light_stem; light_stem=fudged.cap_stem; +% a_part of lowercase ae +pos1(light_stem,0); pos2(light_stem,0); +penpos6(vair-fine,-225); penpos4(cap_curve-fine,-180); +rt x1r=rt x2r=hround(w-max(2u,3u-.5light_stem)); +if serifs: top y1=h+min(o,serif_drop); else: top y1=h; fi +bot y2=0; y3=.52h; x6=x1; y6+bar+eps=min(8h,h-max(bracket,.5slab)); +penpos5(vair'-fine,-90); penpos3(thin_join-fine,0); +pickup fine.nib; lft x3l=tiny.lft x1l; +lft x4r=hround(1.5u-.5cap_curve); x5=.5[x4,x3]; +y4=.3[y5,y1]; bot y5r=-o; +filldraw stroke z6e{3(x4-x1),y4-y1}...pulled_arc.e(4,5) + & pulled_arc.e(5,3); % bowl of a +pickup tiny.nib; +filldraw stroke z1e--z2e; % stem +if serifs: sloped_serif.l(1,2,a,1/3,cap_jut,serif_drop); % upper serif + serif(2,1,d,1/3,cap_jut); fi % lower serif +%%%%% +penlabels(0,1,2,3,4,5,6, 7,8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter ligature I_AZ - IOT AZ"; +cyrchar(I_AZ,12u#,cap_height#,0); +if is_small_cap: getcharcode(i_az); fi +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); +adjust_fit(if monospace: 6.5u# else: + max(5u#+.5cap_stem#,6u#)+cap_serif_fit# fi, %Ipart_adj + cap_serif_fit#); pickup fine.nib; +forsuffixes $=hair,stem: shaved$:=mfudged$; save $; $=shaved$; endfor +pickup tiny.nib; numeric light_stem; light_stem=fudged.cap_stem; +% a_part of lowercase ae +pos1(light_stem,0); pos2(light_stem,0); +penpos6(vair-fine,-225); penpos4(cap_curve-fine,-180); +rt x1r=rt x2r=hround(w-max(2u,3u-.5light_stem)); +if serifs: top y1=h+min(o,serif_drop); else: top y1=h; fi +bot y2=0; y3=.52h; x6=x1; y6+bar+eps=min(8h,h-max(bracket,.5slab)); +penpos5(vair'-fine,-90); penpos3(thin_join-fine,0); +pickup fine.nib; lft x3l=tiny.lft x1l; +lft x4r=hround(1.5u-.5cap_curve); x5=.5[x4,x3]; +y4=.3[y5,y1]; bot y5r=-o; +filldraw stroke z6e{3(x4-x1),y4-y1}...pulled_arc.e(4,5) + & pulled_arc.e(5,3); % bowl of a +pickup tiny.nib; +filldraw stroke z1e--z2e; % stem +if serifs: sloped_serif.l(1,2,a,1/3,cap_jut,serif_drop); % upper serif + serif(2,1,d,1/3,cap_jut); fi % lower serif +%I_part(6); +_zero:=6; +_one:=7; _two:=8; _three:=9; _four:=10; +% +pickup tiny.nib; pos[_one](cap_stem,0); pos[_two](cap_stem,0);%pos +lft x[_one]l=lft x[_two]l= + l+letter_fit+if monospace:-.35u else: cap_serif_fit fi + +hround max(2u,3u-.5cap_stem); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +x[_three]=x[_one]; y[_three]=y[_zero]; +x[_four]=x[_zero]; y[_four]=y[_three]; +pos[_three](cap_bar,90); pos[_four](cap_bar,90); +filldraw stroke z[_three]e--z[_four]e; % bar +if serifs: dish_serif([_one],[_two],s,1/3,cap_jut,t,1/3,cap_jut); + dish_serif([_two],[_one],u,1/3,cap_jut,v,1/3,cap_jut); fi +%%%%% +penlabels(0,1,2,3,4,5,6, 7,8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter L_YUS - LITTLE YUS"; +cyrchar(L_YUS,13u#+2cap_stem#,cap_height#,0); +if is_small_cap: getcharcode(l_yus); fi +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_amod; +numeric left_stem,right_stem,outer_jut,alpha; outer_jut=.8cap_jut; +x1l=w-x4r=l+letter_fit+outer_jut+.5u; +% +right_stem=cap_stem-stem_corr; +left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); pickup tiny.nib; +y1=y4=0; x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo; +alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0<h-cap_notch_cut: y0:=h-cap_notch_cut; + fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{up}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(whatever,angle(z2-z1)); z5=whatever[z1r,z2r]; +penpos6(whatever,angle(z3-z4)); z6=whatever[z3l,z4l]; y6=y5; +if hefty: y5r else: y5 fi =.5y0; +y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line +pickup tiny.nib; +x7=.5[x5,x6]; top y7=y5; x8=x7; bot y8=0; +pos7(max(currentbreadth+eps,.5[cap_band,cap_stem]),0); +pos8(max(currentbreadth+eps,.5[cap_band,cap_stem]),0); +filldraw stroke z8e--z7e; +if serifs: pickup tiny.nib; numeric inner_jut; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+.7cap_jut+.5u+1<=lft x8l-.7cap_jut: inner_jut=.7cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x8l-inner_jut; fi + dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark); % left serif + dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); % right serif + dish_serif(8,7,e,1/3,inner_jut,f,1/3,inner_jut); fi % middle serif +%%%%% +penlabels(1,1',2,3,4,4',5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter IL_YUS - IOT LITTLE YUS"; +cyrchar(IL_YUS,13u#+2cap_stem#,cap_height#,0); +if is_small_cap: getcharcode(il_yus); fi +adjust_fit(if monospace: 6.5u# else: + max(5u#+.5cap_stem#,6u#)+cap_serif_fit# fi, %Ipart_adj + cap_serif_fit#); +% upper_amod;iot +numeric left_stem,right_stem,outer_jut,alpha; outer_jut=.8cap_jut; +x1l=w-x4r=outer_jut+.5u; %!!! +% +right_stem=cap_stem-stem_corr; +left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); pickup tiny.nib; +y1=y4=0; x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo; +alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0<h-cap_notch_cut: y0:=h-cap_notch_cut; + fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{up}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(whatever,angle(z2-z1)); z5=whatever[z1r,z2r]; +penpos6(whatever,angle(z3-z4)); z6=whatever[z3l,z4l]; y6=y5; +if hefty: y5r else: y5 fi =.5y0; +y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line +pickup tiny.nib; +x7=.5[x5,x6]; top y7=y5; x8=x7; bot y8=0; +pos7(max(currentbreadth+eps,.5[cap_band,cap_stem]),0); +pos8(max(currentbreadth+eps,.5[cap_band,cap_stem]),0); +filldraw stroke z8e--z7e; +if serifs: pickup tiny.nib; numeric inner_jut; + prime_points_inside(1,2); prime_points_inside(4,3); + if rt x1'r+.7cap_jut+.5u+1<=lft x8l-.7cap_jut: inner_jut=.7cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x8l-inner_jut; fi + dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark); % left serif + dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); % right serif + dish_serif(8,7,e,1/3,inner_jut,f,1/3,inner_jut); fi % middle serif +%%%%% +%I_part(3); +_zero:=6; +_one:=9; _two:=10; _three:=11; _four:=12; +% +pickup tiny.nib; pos[_one](cap_stem,0); pos[_two](cap_stem,0);%pos +lft x[_one]l=lft x[_two]l= + l+letter_fit+if monospace:-.35u else: cap_serif_fit fi + +hround max(2u,3u-.5cap_stem); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +x[_three]=x[_one]; y[_three]=y[_zero]; +x[_four]=x[_zero]; y[_four]=y[_three]; +pos[_three](cap_bar,90); pos[_four](cap_bar,90); +filldraw stroke z[_three]e--z[_four]e; % bar +if serifs: dish_serif([_one],[_two],s,1/3,cap_jut,t,1/3,cap_jut); + dish_serif([_two],[_one],u,1/3,cap_jut,v,1/3,cap_jut); fi +%%%%% +penlabels(0,1,2,3,4,5,6,7,8, 9,10,11,12); endchar; + +lhchar "Uppercase Cyrillic (Glagolic) letter GERV"; +cyrchar(GERV,12.5u#,cap_height#,0); %CH width +if is_small_cap: getcharcode(gerv); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +penpos3(cap_bar,90); penpos5'(cap_stem,0); +pos5(cap_stem,0); pos6(cap_stem,0); +x5=x6=w-x1; y6=y2; x3=x1r; y5=1/8[bar_height,x_height]; z5'=z5; +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos4(cap_bar,90); + top y3r=top y4r=x_height+oo; x4=.5[x1,w-rt x3r if not serifs:-u fi]; +else: + penpos4(1/18[cap_bar,cap_curve],90); + y3r+.35cap_bar=y4r=x_height+oo; + x4=.5[x1,w-1.5u]-.5u; +fi +fill stroke z3e..pulled_arc.e(4,5'); % arc +filldraw stroke z5e--z6e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper right serif + numeric inner_jut; pickup tiny.nib; + if rt x2r+.5jut+.5u+1<=lft x6l-.5cap_jut: inner_jut=.5cap_jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + dish_serif(2,1,c,1/3,.5cap_jut,d,1/3,inner_jut); % lower right serif + dish_serif(6,5,e,1/3,inner_jut,f,1/3,.5cap_jut); fi % lower left serif +% hcross +pickup crisp.nib; pos8(bar,90); pos9(bar,90); +lft x8=w-x9-4u; %hround 1/3u if serifs:-serif_fit fi; +x9=hround(w-2.65u); %x4; %1r+2.5u; +top y8r=top y9r=vround .85h;%vround x_height+eps; +filldraw stroke z8e--z9e; % cross bar +%%%%% +penlabels(1,2,3,4); endchar; + +lhchar "Uppercase Cyrillic letter NASH -- OLD N (like Latin N)"; +cyrchar(NASH,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(nash); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +if hefty: numeric upper_notch,lower_notch; + stem1=fudged.hair-stem_corr; + upper_notch=y5-cap_notch_cut-eps; lower_notch=y6+cap_notch_cut+eps; + x5r =rt x1r; x6l =lft x3l; y6=bar_height; + if monospace: y5=vround(h-1.2slab-eps); else: y5=h; fi + alpha1=diag_ratio(1,stem1,y5-y6,x5r-x6l); + penpos5(min(2fudged.cap_stem,alpha1*stem1),0); + penpos6(min(2fudged.cap_stem,alpha1*stem1),0); + x5'=x1l; z5'=whatever[z5l,z6l]; x6'=x4r; z6'=whatever[z5r,z6r]; + x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; x5:=max(x1l,x5); + x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; + fill z5--z5l.. + if y2'<upper_notch: {right}(x2'+1,upper_notch){down}... fi + {z6-z5} diag_in(5l,6l,1,6)--z6--z6r .. + if y3'>lower_notch: {left}(x3'-1,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5) --cycle; % diagonal +else: y5r=vround(y3-1.2bracket-(slab-vair)-eps); y6l=bar_height; + x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; + stem1=max(tiny.breadth,fudged.hair); + alpha1=diag_ratio(1,stem1,x6-x5,top y6l-bot y5r); + penpos5(alpha1*stem1,90); penpos6(alpha1*stem1,90); + fill stroke z5e--z6e; fi % diagonal +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter ZEMLA"; +cyrchar(ZEMLA,11u#,cap_height#,cap_sbeak#); +if is_small_cap: getcharcode(zemla); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +numeric arm_thickness[],z_stem; +if hefty: arm_thickness1=Vround(slab-vair_corr); arm_thickness2=slab; + z_stem=.8[vair,cap_stem]; +else: arm_thickness1=slab; arm_thickness2=vround(slab+vair_corr); + z_stem=.9[vair,cap_stem]; fi +pickup tiny.nib; x3l=x4l=w-x1r=w-x2r; lft x3l=hround u; +top y1=h; y2=min(y1,h-2/3arm_thickness1); +bot y4=0; y3=max(y4,2/3arm_thickness2); +numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l); +penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0); +penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0); +pair delta; delta=penoffset z3-z2 of currentpen; +fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround 1.25u; y6=good.y(y5l-beak)-eps; +arm(5,6,a,beak_darkness**.8,-.4beak_jut); % upper arm and beak +% the beak is turning down +pos7(arm_thickness2,90); pos8(hair,0);%!!! +bot y7l=0; x7=x4; rt x8r=hround(w-.9u);%!!! +y8=good.y(y7l-1.2beak)-eps;%!!! +arm(7,8,b,beak_darkness**.9,.6beak_jut); % lower arm and beak +math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8); endchar; + +% like CYR_.Z or numeral 3 +lhchar "Uppercase Cyrillic letter KSI"; +cyrchar(KSI,10u#,cap_height#+1.75dot_size#,desc_depth#); +if is_small_cap: getcharcode(ksi); fi +italcorr .75cap_height#*slant-.5u#; %B +adjust_fit(0,.5serif_fit#); h:=cap_height; +pickup fine.nib; numeric right_curve,middle_weight,low_curve; +middle_weight=max(fine.breadth,.6vair+.5); +if serifs: right_curve=cap_curve-stem_corr; + else: right_curve=cap_curve-3stem_corr; fi +pos2(cap_band,90); pos3(.6[hair,cap_curve],0); +pos4(middle_weight,-90); pos5(middle_weight,-90); +pos5'(middle_weight,90); pos6(middle_weight,90); +top y2r=h+o; x2=x6=x8=.5[1.5u,w-.75u-.5stem]; lft x1r=hround 1.1u; +rt x3r=hround(w-1.25u); rt x7r=hround(w-.75u); +lft x5=lft x5'=min(hround 3.5u,lft x2)+eps; +y3=.5[y4l,y2l]; x4=1/3[x5,x3l]; y4=y5; y5'=y6; +top y5l-bot y5'l=vair; .5[y5l,y5'l]=.52h; +{{interim superness:=if serifs:more_super else:hein_super fi; + filldraw stroke super_arc.e(2,3)}}; +filldraw stroke super_arc.e(3,4)..z5e; % upper bowl +numeric theta; theta=-90+angle(22u,x_height); slope:=x_height/22u; +pos9(max(currentbreadth+eps,cap_curve-5stem_corr),theta); +x7r-x7l=hround.5[vair,cap_stem]-fine; +x9=x10=2u; x11=.5w-.5u; y9=-.3d; bot y10l=-d-oo; +ellipse_set(6l,7l,8l,9l); ellipse_set(6r,7r,8r,9r); +if serifs: pos0(flare+(cap_stem-stem),180); pos1(cap_hair,180); + y1=.4[y5l,y2l]+.5flare; bulb(2,1,0); % bulb + pos10(vair,90); +%"hachek" + penpos14(vair',90); pos15(whatever,0); x14=x6; y14=h+o-eps; + x6-x15=x16-x6=good.x 2.25u; top y15=top y16=h+.65acc_height+o; + pos16(.25[vair,curve],angle(z16-z14)+90); + z15l=z14l+whatever*(z14-z15); z15r=z14r+whatever*(z14-z15); + filldraw stroke z15e--z14e{z16r-z14}..{.5right}z16e; % hachek +else: y1=.8h; pos1(min(cap_hair,1.2flare)-.2tiny,170); + filldraw stroke z1e{x2-x1,10(y2-y1)}...{right}z2e; % upper bowl + pos10(middle_weight,45); + filldraw stroke z10e{left}...z9e{z8e-z9e}; % tail +%"hachek" + pickup pencircle scaled min(.5fine,.15vair); + pos14(vair,0); pos16(vair,0); pos15(stem,0); + x8-x14=x16-x8; bot y15=h; x15=x8; + top y14=top y16=h+.65acc_height+o; lft x14l=hround(rt x15r-3.25u-.5vair); + z0=whatever[z14r,z15r]=whatever[z15l,z16l]; + filldraw z15l--z14l--z14r--z0--z16l--z16r--z15r--cycle; fi % hachek +pickup fine.nib; +{{less_tense; + filldraw stroke z10e{left}...z9e---z8e + ...{up}z7e...{left}z6e...{left}z5'e}}; % main stroke +penlabels(1,2,3,4,5,6,7,8,9,9',10,11,12,13,14,15,16); endchar; + +lhchar "Uppercase Cyrillic letter VIZHE - Variant IZHE"; +cyrchar(VIZHE,max(6u#,4u#+cap_stem#),cap_height#,0); +if is_small_cap: getcharcode(vizhe); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); h:=cap_height; +% upper_ukri; - borrowed from ec +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs or monospace: + dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif +if slitex: + pickup crisp.nib; % arms based on proportions of uppercase E + pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90); + x3=x4=x1; top y3r=h; bot y4r=0; + pos5(hair,0); pos6(hair,0); % top and bottom right arms + rt x5r=rt x6r=hround(w-u); + pos7(hair,180); pos8(hair,180); % top and bottom left arms + lft x7r=lft x8r=hround(u); + y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif! + y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy + arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms + arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right +fi +%%%%% +% the dot +numeric stem[]; stem1=if serifs: stem+2cap_jut else: w-2(u-oo) fi; +pos9(stem1,0); pos10(stem1,90); x9=x1; y9=.5h; z10=z9; +{{square_dots:=false; dot(9,10)}}; % dot +penlabels(1,2,3,4,5,6,7,8, 9,10); endchar; + +lhchar "Uppercase Cyrillic letter IZHE - like Latin I (as latin I)"; +cyrchar(IZHE,max(6u#,4u#+cap_stem#),cap_height#,0); +if is_small_cap: getcharcode(izhe); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_ukri; - borrowed from ec +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs or monospace: + dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif +if slitex: + pickup crisp.nib; % arms based on proportions of uppercase E + pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90); + x3=x4=x1; top y3r=h; bot y4r=0; + pos5(hair,0); pos6(hair,0); % top and bottom right arms + rt x5r=rt x6r=hround(w-u); + pos7(hair,180); pos8(hair,180); % top and bottom left arms + lft x7r=lft x8r=hround(u); + y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif! + y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy + arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms + arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right +fi +%%%%% +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter OMGA - OMEGA"; +cyrchar(OMGA,if serifs: 18u#+width_adj# + else: 16.5u# fi,cap_height#,0);%CYR_.SH width +if is_small_cap: getcharcode(omga); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0,0); +% upper_omega; +numeric shaved_stem; shaved_stem=cap_stem-hround 2stem_corr; +if odd(shaved_stem-w): change_width; fi % symmetric & all three equal +if not serifs: interim superness:=more_super; fi +if serifs: pickup tiny.nib; else: pickup fine.nib; fi +pos6(shaved_stem,0); top y6=.52h; +lft x6l=hround (.5w-.5shaved_stem); % middle stem point +% Omega_bowl +pos2(vair',90); pos3(cap_curve,180); pos4(vround(vair+1.5vair_corr),270); +if serifs: + pos1(cap_hair,0); pos0(flare,0); pos5(fudged.hair,0); + top y2r=h+o; bot y4r=-o; lft x3r=hround u; y3=.5[y2,y4]; + y1=h-vround max(.1fig_height+.5flare,.15fig_height-.5flare)+o; + x5=(.5w+eps); + rt x1r=hround min(.5w-max( + if monospace:.67u,.55stem else:u,.7stem fi)+eps,lft x5l-1); + x2=x4+if monospace:-fi.25u=hround (.67[lft x3r,rt x1r]); + {{less_tense; bulb(2,1,0)}}; % bulb + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: + pos5(flare,275); + x2=x4=(.25w+1.25u); lft x3r=hround max(u,2u-.5cap_curve); + x5r=(.5w+eps); top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4) & + term.e(4,5,right,.8,4); % arc and terminals +fi +%%% +% mirror + middle stem +forsuffixes $ = if serifs: 1l,1r,0l, fi 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r: + x.m$-x6r=x6l-x$; y.m$=y$; endfor; +if serifs: + {{less_tense; bulb(m2,m1,m0)}}; % bulb + filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull) + & pulled_super_arc.e(.m3,.m4)(.5superpull) + ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y4)}z.m5e; % arc and lower terminal +else: + filldraw stroke super_arc.e(.m2,.m3) & super_arc.e(.m3,.m4) & + term.e(.m4,.m5,left,.8,4); % arc and terminals +fi +if serifs: + path p.l,p.r; numeric t; + p.l=z4r{right}..tension .9 and 1..{x5-x4,5(y5-y4)}z5r; + p.r=z.m4r{left}..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r; + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); if t<0: t:=1; fi + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem + z5'l=(x6l,y5); z5'r=(x6r,y5); z5'=.5[z5'l,z5'r]; z6=.5[z6l,z6r]; + dish_serif(6,5',a,1/3,.5cap_jut,b,1/3,.5cap_jut); +else: + path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4); + p.r=term.r(.m4,.m5,left,.8,4); + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem +fi +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter OMGA_rnd - OMEGA round"; +cyrchar(OMGA_rnd,17u#,cap_height#,0); %F width+u +if is_small_cap: getcharcode(omga_rnd); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: if serifs: interim superness:=1.05 superness; + else: interim superness:=1.075 superness; fi x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +% dots +if serifs: pickup crisp.nib; else: pickup fine.nib; fi +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem);%1.1flare; +z5=z1r; z6=z3r; pos5(bulb_diam,0); pos6(bulb_diam,0); +x5'=x6'=x1; y5'=max(.5h+1,bot y1l-.7bulb_diam); +y6'=min(.5h-1,top y3l+.7bulb_diam); +pos6'(min(bulb_diam,cap_vstem),0); +pos5'(min(bulb_diam,cap_vstem),0); +filldraw circ_stroke z5e--z5'e; filldraw circ_stroke z6e--z6'e; %dots +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter OT - OMEGA with te accent"; +cyrchar(OT,if serifs: 18u#+width_adj# + else: 16.5u# fi,cap_height#+acc_height#,0);%CYR_.SH width +if is_small_cap: getcharcode(ot); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0,0); +full_h:=h; h:=cap_height; +% upper_omega; +numeric shaved_stem; shaved_stem=cap_stem-hround 2stem_corr; +if odd(shaved_stem-w): change_width; fi % symmetric & all three equal +if not serifs: interim superness:=more_super; fi +if serifs: pickup tiny.nib; else: pickup fine.nib; fi +pos6(shaved_stem,0); top y6=.52h; +lft x6l=hround (.5w-.5shaved_stem); % middle stem point +% Omega_bowl +pos2(vair',90); pos3(cap_curve,180); pos4(vround(vair+1.5vair_corr),270); +if serifs: + pos1(cap_hair,0); pos0(flare,0); pos5(fudged.hair,0); + top y2r=h+o; bot y4r=-o; lft x3r=hround u; y3=.5[y2,y4]; + y1=h-vround max(.1fig_height+.5flare,.15fig_height-.5flare)+o; + x5=(.5w+eps); + rt x1r=hround min(.5w-max( + if monospace:.67u,.55stem else:u,.7stem fi)+eps,lft x5l-1); + x2=x4+if monospace:-fi.25u=hround (.67[lft x3r,rt x1r]); + {{less_tense; bulb(2,1,0)}}; % bulb + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: + pos5(flare,275); + x2=x4=(.25w+1.25u); lft x3r=hround max(u,2u-.5cap_curve); + x5r=(.5w+eps); top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4) & + term.e(4,5,right,.8,4); % arc and terminals +fi +%%% +% mirror + middle stem +forsuffixes $ = if serifs: 1l,1r,0l, fi 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r: + x.m$-x6r=x6l-x$; y.m$=y$; endfor; +if serifs: + {{less_tense; bulb(m2,m1,m0)}}; % bulb + filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull) + & pulled_super_arc.e(.m3,.m4)(.5superpull) + ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y4)}z.m5e; % arc and lower terminal +else: + filldraw stroke super_arc.e(.m2,.m3) & super_arc.e(.m3,.m4) & + term.e(.m4,.m5,left,.8,4); % arc and terminals +fi +if serifs: + path p.l,p.r; numeric t; + p.l=z4r{right}..tension .9 and 1..{x5-x4,5(y5-y4)}z5r; + p.r=z.m4r{left}..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r; + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); if t<0: t:=1; fi + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem + z5'l=(x6l,y5); z5'r=(x6r,y5); z5'=.5[z5'l,z5'r]; z6=.5[z6l,z6r]; + dish_serif(6,5',a,1/3,.5cap_jut,b,1/3,.5cap_jut); +else: + path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4); + p.r=term.r(.m4,.m5,left,.8,4); + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem +fi +%%%%% +% the accent +% up_te(7); +_zero:=7; x7=.5[x6l,x6r]; +_one:=8; _two:=9; _three:=10; _four:=11; _five:=12; +% +if serifs: pickup crisp.nib; + else: pickup pencircle scaled min(.5fine,.15vair); fi +numeric stem[]; stem1=if hefty: fudged.hair-2stem_corr else: .7[vair,stem] fi; +stem2=if serifs: vair else: max(currentbreadth+eps,.6[thin_join,vair]) fi; +stem3=if serifs: hair else: max(currentbreadth+eps,.6[thin_join,vair]) fi; +pos[_one](stem1,0); pos[_two](stem1,0); +lft x[_one]l=lft x[_two]l=hround(x[_zero]-.5stem1); +numeric mid_thickness; +mid_thickness=vround if serifs:1/4 else: 1/3 fi[vair,stem]; +bot y[_two]=bot y[_four]=bot y[_five]= + vround max(h+o+max(tiny,.5mid_thickness),1/3[h,h+acc_height]+o-.5mid_thickness); +top y[_one]=top y[_three]r=max(h+acc_height,bot y[_two]+1.5vair); +filldraw stroke z[_one]e--z[_two]e; % stem +pos[_three](stem2,90); pos[_four](stem3,0); pos[_five](stem3,180); +x[_three]=x[_one]; +rt x[_four]r=hround(x[_zero]+2.5u if monospace:/expansion_factor fi+.5vair); +x[_four]-x[_three]=x[_three]-x[_five]; +z[_four]'=beak_darkness[(x[_four]l,y[_three]l), + .5[(x[_one]r,y[_three]l),z[_four]l] ]; +z[_five]'=beak_darkness[(x[_five]l,y[_three]l), + .5[(x[_one]l,y[_three]l),z[_five]l] ]; +filldraw z[_four]r--z[_four]l{up}...z[_four]' + ...{left}(x[_one]r,y[_three]l)--(x[_one]r,y[_three]l){left}...z[_five]' + ...{down}z[_five]l--z[_five]r--- + (x[_five]r,y[_three]r)---(x[_four]r,y[_three]r)---cycle; +%%% +penlabels(1,2,3,4,5,6, 7,8,9,10,11,12); endchar; + +lhchar "Uppercase Cyrillic letter OMGA_tlo - OMEGA titlo"; +cyrchar(OMGA_tlo,if serifs: 18u#+width_adj# + else: 16.5u# fi,cap_height#+acc_height#,0);%CYR_.SH width +if is_small_cap: getcharcode(omga_tlo); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0,0); +full_h:=h; h:=cap_height; +% upper_omega; +numeric shaved_stem; shaved_stem=cap_stem-hround 2stem_corr; +if odd(shaved_stem-w): change_width; fi % symmetric & all three equal +if not serifs: interim superness:=more_super; fi +if serifs: pickup tiny.nib; else: pickup fine.nib; fi +pos6(shaved_stem,0); top y6=.52h; +lft x6l=hround (.5w-.5shaved_stem); % middle stem point +% Omega_bowl +pos2(vair',90); pos3(cap_curve,180); pos4(vround(vair+1.5vair_corr),270); +if serifs: + pos1(cap_hair,0); pos0(flare,0); pos5(fudged.hair,0); + top y2r=h+o; bot y4r=-o; lft x3r=hround u; y3=.5[y2,y4]; + y1=h-vround max(.1fig_height+.5flare,.15fig_height-.5flare)+o; x5=(.5w+eps); + rt x1r=hround min(.5w-max( + if monospace:.67u,.55stem else:u,.7stem fi)+eps,lft x5l-1); + x2=x4+if monospace:-fi.25u=hround (.67[lft x3r,rt x1r]); + {{less_tense; bulb(2,1,0)}}; % bulb + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: pos5(flare,275); + x2=x4=(.25w+1.25u); lft x3r=hround max(u,2u-.5cap_curve); + x5r=(.5w+eps); top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4) & + term.e(4,5,right,.8,4); % arc and terminals +fi +%%% +% mirror + middle stem +forsuffixes $ = if serifs: 1l,1r,0l, fi 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r: + x.m$-x6r=x6l-x$; y.m$=y$; endfor; +if serifs: {{less_tense; bulb(m2,m1,m0)}}; % bulb + filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull) + & pulled_super_arc.e(.m3,.m4)(.5superpull) + ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y4)}z.m5e; % arc and lower terminal +else: + filldraw stroke super_arc.e(.m2,.m3) & super_arc.e(.m3,.m4) & + term.e(.m4,.m5,left,.8,4); % arc and terminals +fi +if serifs: + path p.l,p.r; numeric t; + p.l=z4r{right}..tension .9 and 1..{x5-x4,5(y5-y4)}z5r; + p.r=z.m4r{left}..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r; + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); if t<0: t:=1; fi + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem + z5'l=(x6l,y5); z5'r=(x6r,y5); z5'=.5[z5'l,z5'r]; z6=.5[z6l,z6r]; + dish_serif(6,5',a,1/3,.5cap_jut,b,1/3,.5cap_jut); +else: path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4); + p.r=term.r(.m4,.m5,left,.8,4); + t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l); + filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem +fi +%%%%% +% the accents +h:=full_h; +% up_palatal(expr .5w+u,0,-o); +x_center:=.5w-.25u; x_move:=0; y_move:=-o; +_one:=8; _two:=9; _three:=10; _four:=11; +% +pickup fine.nib; numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs: .8[hair,stem] else: 1/3[vair,hair] fi; +pos[_one](stem2,180); pos[_three](1/5[stem2,stem1],0); +pos[_two](stem1,90); pos[_four](stem1,90); +top y[_two]r=h+o; x[_two]=x_center; +x:=if serifs: 4u else: 3.5u fi; +rt x[_one]l =hround(x[_two]-x if monospace: /expansion_factor fi +.5stem2); +lft x[_three]l=hround(x[_two]+x if monospace: /expansion_factor fi -.5stem2); +bot y[_one]=bot y[_three]= + if serifs: max(2/3[cap_height+acc_height,cap_height],x_height+o+hair)-.5crisp + else: vround 2/3[cap_height+acc_height,cap_height] fi; +bot y[_four]l=max(cap_height+o,.5[cap_height,y[_one]]); +x[_four]=x_center+if serifs: 5.75u else: 5.25u fi+eps; +forsuffixes e=l,r: + path p; p=z[_two]e{right}...{(x[_three]-x[_one]),-7acc_height}z[_three]e; + z[_three]'e=point .8 of p; endfor +filldraw stroke z[_one]e{(x[_three]-x[_one]),7acc_height}...z[_two]e{right}... + {direction .8 of p}z[_three]'e...{right}z[_four]e; % stroke +%%% +% cap_zvat!!!moved down; +x_center:=.5w-.25u; y_move:=-max(1/3acc_height,.5[vair,curve])-oo-eps; +_one:=12; _two:=13; _three:=14; +% +numeric stem[]; +stem1=if serifs: vair else: max(currentbreadth+eps,1/3[thin_join,vair]) fi; +stem2=if serifs:vround (1/3[vair,stem]) else: vair fi; +theta:=45; y:=min(asc_height,2x_height)+cap_height-x_height; +z[_one]=(x_center-u,.55[y[_three],y]+y_move);%!!! +z[_two]=(x_center+u,4/5[y[_three],y]+y_move);%!!! +bot z[_three]r=(x_center+.5u, + if serifs: max(2/3[cap_height+acc_height,cap_height],x_height+o+hair)%!!! + -.5 if serifs: crisp else: fine fi + else: vround 2/3[cap_height+acc_height,cap_height] fi+y_move);%!!! +pos[_one](stem1,theta+90); pos[_two](stem2,theta); +pos[_three](stem1,theta-90); +filldraw stroke z[_one]e{dir(theta+45)} + ..{dir(theta-90)}z[_two]e..{dir(theta+180)}z[_three]e; % stroke +% +penlabels(1,2,3,4,5,6, 7,8,9,10,11, 12,13,14); endchar; + +lhchar "Uppercase Cyrillic letter KOPPA (C with tail)"; +cyrchar(KOPPA,if serifs:13u# else:11.5u# fi,cap_height#,desc_depth#); +if is_small_cap: getcharcode(koppa); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +pickup fine.nib; +if serifs: pos1(cap_hair,0); pos2(cap_band,90); + x2=.55[u+.5curve,x1]; top y2r=h+o; + rt x1r=hround(w-u); bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps); + filldraw stroke z1e{x2-x1,10(y2-y1)}...{left}z2e; + pos6'(.3[fine.breadth,cap_hair],0); x6'r=x1r; top y6'=h+o; + x1r-x1'=2cap_curve-fine; y1'=y1; lft x3r=hround u; + path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; + numeric t; t=xpart(upper_arc intersectiontimes (z6'l--z1')); + filldraw z1r--z6'r--z6'l--subpath(t,0) of upper_arc--cycle; % barb +else: pos1(1.2flare,80); pos2(slab,90); + rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; + top y1r=vround.95h+o; top y2r=h+o; lft x3r=hround max(u,2u-.5cap_curve); + filldraw stroke rterm.e(2,1,right,.9,4); fi +numeric theta; theta=-90-angle(40u,x_height); slope:=x_height/-40u; +pos5(max(fine.breadth,fudged.cap_stem-3stem_corr),theta); +pos6(max(fine.breadth,.6[thin_join,vair]),150); +x3l-x3r=hround.8[vair,fudged.cap_stem]-fine; +x5=w-4u; x6l=x1r; y5=-.1d; bot y6l=-d-o; +ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r); +{{less_tense; + filldraw stroke z6e {dir (theta+135)} ... + z5e---z4e...{up}z3e...{right}z2e}}; % main stroke +penlabels(1,1',2,3,4,5,6); endchar; + +% Y-o combination +lhchar "Uppercase Cyrillic letter UK"; +cyrchar(UK,13u#,cap_height#,0); +if is_small_cap: getcharcode(uk); fi +italcorr cap_height#*slant+.45u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_uk; +numeric left_stem,right_stem,outer_jut,dy,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.05u; +x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; y2=y3=y5=.5h; %.4h; +dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=.45y5; +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0>y2+cap_notch_cut: y0:=y2+cap_notch_cut; + fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % diagonals and stem +else: fill z0--diag_end(0,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % diagonals and stem +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5); + if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif + serif(6',5,e,1/3,if serifs:-jut else:.5stem fi); fi % lower serif +% o +penpos7(vair,90); penpos9(vair',-90); +penpos8(curve,180); penpos10(curve,0); +x8r=hround(l+.5u); +x10r=w-x8r; x7=x9=.5w; y7r=y5 if not hefty:-vair fi; y9r=-o; +y8=y10=.5y7-vair_corr; y8l:=y10l:=.52y7; +penstroke pulled_super_arc.e(7,8)(.5superpull) + & pulled_super_arc.e(8,9)(.5superpull) + & pulled_super_arc.e(9,10)(.5superpull) + & pulled_super_arc.e(10,7)(.5superpull) & cycle; % bowl +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter CHERV - Old CHE"; +cyrchar(CHERV,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(cherv); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +numeric middle_weight; middle_weight=.5[vair,cap_band]; +pos5(middle_weight,90); pos6(middle_weight,-90); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=.3[y6,h]; x5l=x6=x7=.5[x1,x3]; z5=z6; +y6=good.y (h-.52h if serifs: -.35(.5[cap_hair,.7cap_stem]) fi); +filldraw stroke z1e--z2e & pulled_arc.e(2,5); +filldraw stroke pulled_arc.e(6,4) & z4e--z3e; % U +pos6'(cap_stem,0); pos7(cap_stem,0); top z6'=z6; bot y7=0; +filldraw stroke z6'e--z7e; % stem +if serifs: pickup tiny.nib; numeric inner_jut,fit; fit=.5u+1; + if rt x1r+cap_jut+fit<=lft x3r-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+fit=lft x3r-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif + dish_serif(7,6,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower left serif +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter PSI"; +cyrchar(PSI,14u#,cap_height#,0); +if is_small_cap: getcharcode(psi); fi +italcorr .8cap_height#*slant-.5u#; +adjust_fit(0,0); +numeric shaved_stem; shaved_stem=cap_stem-hround 2stem_corr; +pickup tiny.nib; pos1(shaved_stem,0); pos2(shaved_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pos3(shaved_stem,-180); pos4(shaved_stem,-180); +pos5(vair,-90); x5=x1; bot y5r=vround(.15h if serifs:+slab fi); +pos6(shaved_stem,0); pos7(shaved_stem,0); +lft x3r=hround u; x7=w-x3; lft x4r=hround(3u-.5shaved_stem); x6=w-x4; +pos3'(vair,90); pos7'(vair,90); z3'r=z3r; z7'r=z7r; +y3=y7; y4=y6=.6h; y3=good.y(y3+.84h if serifs:-slab fi-y3'); +interim superness:=more_super; +filldraw z3'l{right}...z4r{down} & super_arc.r(4,5) + & super_arc.r(5,6) & z6r{up}...z7'l{right} + --z7r---z7l...z6l{down} & super_arc.l(6,5) + & super_arc.l(5,4) & z4l{up}...z3l---z3r--cycle; % stroke +if serifs: dish_serif(1,2,a,1/3,1.25cap_jut,b,1/3,1.25cap_jut); % upper serif + dish_serif(2,1,c,1/3,1.25cap_jut,d,1/3,1.25cap_jut); fi % lower serif +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter SHTA - Old SH"; +cyrchar(SHTA,19.7u#+width_adj#,cap_height#,cap_sbeak#); +if is_small_cap: getcharcode(shta); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,if serifs: cap_serif_fit# else: -.3u#+.1tiny# fi); +if odd(fudged.cap_stem-w): change_width; fi % symmetric & all three equal +% upper_sh; +pickup tiny.nib; +pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +pos5(fudged.cap_stem,0); pos6(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; z5=.5[z1,z3]; z6=.5[z2,z4]; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +numeric inner_jut,arm_thickness; +arm_thickness=vround(slab+vair_corr); +if serifs: numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x5l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + save slab; slab:=arm_thickness; % bottom.bar.slab + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + nodish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif + nodish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif + filldraw z.d0--z.d1--z.g1--z.g0--cycle; % lower inter_serif bar +else: + save slab; slab:=arm_thickness; % bottom.bar.slab + lft x2'= lft x2l; bot y2'l=0; pos2'(slab,90); + rt x4'=rt x4r; y4'=y2'; pos4'(slab,90); filldraw stroke z2'e--z4'e; fi +% middle serif +pickup tiny.nib; x7=x6; bot y7=-d; +if serifs: numeric light_hair; + light_hair=min(fudged.stem,fudged.hair if hefty:-4stem_corr fi); + pos7(light_hair,0); + filldraw stroke z6e....{down}z7e; +else: pos7(fudged.cap_stem,0); + filldraw stroke z6e--z7e; fi % middle serif +penlabels(1,2,3,4,5,6); endchar; + +iff not specific:% +lhchar "Uppercase Cyrillic letter IB_YUS - IOT BIG YUS (`roman')"; +cyrchar(IB_YUS,18u#,cap_height#,0); +if is_small_cap: getcharcode(ib_yus); fi +adjust_fit(if monospace: 6.5u# else: + max(5u#+.5cap_stem#,6u#)+cap_serif_fit# fi, %Ipart_adj + cap_serif_fit#); +if odd(fudged.cap_stem-w): change_width; fi % symmetric & all three equal +% upperr_yus; +% top_Yus; +numeric stem[]; +stem1=fudged.cap_stem if hefty:-3stem_corr fi; +stem2=min(stem1,cap_hair if hefty:-2stem_corr fi); +penpos1(stem1,0); penpos2(stem2,0); penpos3(stem1,0); penpos4(stem2,0); +x1l=w-x2r=.2w; y1=h; y2=y1; y3=y4=.52h; +x3l=hround(.5w-.5stem1); x3r=x4r; +z0'=whatever[z4l,z2l]=whatever[z1r,z3r]; +if hefty: + numeric lower_notch; lower_notch=y3+cap_notch_cut; + fill z3l--diag_end(3l,1l,1,1,1r,3r){z3r-z1r} + if y0'<=lower_notch: ..{z3r-z1r}z0'{z2l-z4l}.. + else: ...{down}(x0'+.5,lower_notch)--(x0'-.5,lower_notch){up}... fi + {z2l-z4l}diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; %v +else: + fill z3l--diag_end(3l,1l,1,1,1r,3r)--z0'-- + diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; fi %v +penpos5(stem1,0); x5=x3; y5=0; +fill z3l--diag_end(3l,5l,1,1,5r,3r)--z3r--cycle; %middle stem +z6=whatever[z4,z2]; z7=whatever[z1,z3]; y6=y7=good.y(y1-slab)-eps; +fill z1--z7--z6--z2--cycle; % upper bar +% Yus_rbowl; +pickup tiny.nib; numeric stem[],alpha[],right_jut,middle_weight; +right_jut=.6cap_jut; middle_weight=cap_bar; +penpos10(middle_weight,90); +y10r=y3+.5min(cap_bar,cap_notch_cut); x10=x3; y9=y12=.8y10; +rt x8r=w-lft x11l=hround(r-letter_fit-.3u-right_jut); bot y8=bot y11=y5; +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +alpha2=diag_ratio(1,.5(stem2-tiny),h-y8,x8r-x3); +penpos8(alpha2*(stem2-tiny),0); penpos11(alpha2*(stem2-tiny),0); +forsuffixes $=l,r: y8'$=0; y11'$=0; endfor +z8'r=z8r+penoffset (x3,h)-z8 of currentpen+whatever*((x3,h)-z8); +z8'l=z8l+penoffset z8-(x3,h) of currentpen+whatever*((x3,h)-z8); +z11'r=z11r+penoffset (x3,h)-z11 of currentpen+whatever*((x3,h)-z11); +z11'l=z11l+penoffset z11-(x3,h) of currentpen+whatever*((x3,h)-z11); +z8'=.5[z8'l,z8'r]; z11'=.5[z11'l,z11'r]; +z9=z8'+whatever*((x3,h)-z8); z12=z11'+whatever*((x3,h)-z11); +penpos9(cap_stem-2stem_corr,0); penpos12(cap_stem-2stem_corr,0); +fill z10l{right}...{z8'l-z9l}z9l--diag_end(9l,8'l,.5,1,8'r,9r) + --z9r{z9r-z8'r}...{left}z10r--cycle; % right diagonal + fill z10r{left}...{z11'l-z12l}z12l--diag_end(12l,11'l,1,.5,11'r,12r) + --z12r{z12r-z11'r}...{right}z10l--cycle; % left diagonal +if serifs: numeric inner_jut; prime_points_inside(5,3); + if rt x5r+cap_jut+.5u+1<=lft x8l-cap_jut: inner_jut=cap_jut; + else: rt x5r+cap_jut+.5u+1=lft x8l-inner_jut; fi + dish_serif(11,12,a,1/3,right_jut,b,1/2,inner_jut)(dark); % lower diagonal serif + dish_serif(8,9,e,1/2,inner_jut,f,1/3,right_jut)(dark); % lower diagonal serif + dish_serif(5',3,c,1/3,.75jut,d,1/3,.75jut); fi % middle serif +%%%%% +%I_part(13); +_zero:=10; +_one:=13; _two:=14; _three:=15; _four:=16; +% +pickup tiny.nib; pos[_one](cap_stem,0); pos[_two](cap_stem,0);%pos +lft x[_one]l=lft x[_two]l= + l+letter_fit+if monospace:-.35u else: cap_serif_fit fi + +hround max(2u,3u-.5cap_stem); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +x[_three]=x[_one]; y[_three]=y[_zero]; +x[_four]=x[_zero]; y[_four]=y[_three]; +pos[_three](cap_bar,90); pos[_four](cap_bar,90); +filldraw stroke z[_three]e--z[_four]e; % bar +if serifs: dish_serif([_one],[_two],s,1/3,cap_jut,t,1/3,cap_jut); + dish_serif([_two],[_one],u,1/3,cap_jut,v,1/3,cap_jut); fi +%%%%% +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, 16,17,18,19); endchar; + +iff serifs:% +lhchar "Uppercase Cyrillic letter I_EST - IOT EST (IC with mid-line)"; +cyrchar(I_EST,13u#,cap_height#,0); +if is_small_cap: getcharcode(i_est); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(if monospace: 6.5u# else: + max(5u#+.5cap_stem#,6u#)+cap_serif_fit# fi, %Ipart_adj + 0); +% upper_ukre; +pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); +pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); +rt x1r=rt x5r=hround(w-u); lft x3r=(hround u); x2=x4=.55[x3,x1]; +top y2r=h+o; bot y4r=-o; y3=.5h-vair_corr; y3l:=.52h; +bot y1=min(vround .675h,bot y2l-eps); y5=max(good.y .95(h-y1),y4l+eps); +(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); +(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); +filldraw stroke z1e{x2-x1,10(y2-y1)}...pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull)...{up}z5e; % arc +pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; +x1r-x1'=2cap_curve-fine; y1'=y1; +path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; +numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); +filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +% upukre_bar; +numeric bar[]; y7=y8=y3; +x7=x3l; x8=(min(lft x1l-.5hair,0.85[x3l,x1l])); +if (serifs=true) and (bar#<=.5curve#): + penpos7(cap_bar,90); penpos8(cap_bar,90); + bar2=7/8[cap_bar,fudged.cap_stem-3stem_corr]; penpos9(bar2,45); z9=.575[z7l,z8l]; + fill circ_stroke z8e{-2,-1}..{-2,1}z9e..{-2,-1}z7e; % curve /\/ +else: pickup fine.nib; pos7(cap_bar,90); pos8(cap_bar,90); + filldraw stroke z7e--z8e; fi % bar -- +%%%%% +%I_part(3); +_zero:=3; +_one:=10; _two:=11; _three:=12; _four:=13; +% +pickup tiny.nib; pos[_one](cap_stem,0); pos[_two](cap_stem,0);%pos +lft x[_one]l=lft x[_two]l= + l+letter_fit+if monospace:-.35u else: cap_serif_fit fi + +hround max(2u,3u-.5cap_stem); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +x[_three]=x[_one]; y[_three]=y[_zero]; +x[_four]=x[_zero]; y[_four]=y[_three]; +pos[_three](cap_bar,90); pos[_four](cap_bar,90); +filldraw stroke z[_three]e--z[_four]e; % bar +if serifs: dish_serif([_one],[_two],s,1/3,cap_jut,t,1/3,cap_jut); + dish_serif([_two],[_one],u,1/3,cap_jut,v,1/3,cap_jut); fi +%%%%% +penlabels(1,1',2,3,4,5,6,7,8,9, 10,11,12,13); endchar; + +iff not serifs:% +lhchar "Uppercase Cyrillic letter I_EST - IOT EST (HC with mid-line)"; +cyrchar(I_EST,11.5u#,cap_height#,0); +if is_small_cap: getcharcode(i_est); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(if monospace: 6.5u# else: + max(5u#+.5cap_stem#,6u#)+cap_serif_fit# fi, %Ipart_adj + 0); +% uppers_ukre; +pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); +pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); +rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; +lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); +top y1r=vround.95h+o; top y2r=h+o; y3=.5h; +bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; +filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,.8,4); +% uukres_bar; +numeric bar[]; y6=y7=y3; x6=x3l; x7=(min(lft x1l-.5hair,0.85[x3l,x1l])); +pickup fine.nib; +bar1=if is_small_cap:max(fine.breadth+eps,.6[thin_join,vair]) else:cap_bar fi; +pos6(bar1,90); pos7(bar1,90); +filldraw stroke z6e--z7e; % bar -- +%%%%% +%I_part(3); +_zero:=3; +_one:=9; _two:=10; _three:=11; _four:=12; +% +pickup tiny.nib; pos[_one](cap_stem,0); pos[_two](cap_stem,0);%pos +lft x[_one]l=lft x[_two]l= + l+letter_fit+if monospace:-.35u else: cap_serif_fit fi + +hround max(2u,3u-.5cap_stem); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +x[_three]=x[_one]; y[_three]=y[_zero]; +x[_four]=x[_zero]; y[_four]=y[_three]; +pos[_three](cap_bar,90); pos[_four](cap_bar,90); +filldraw stroke z[_three]e--z[_four]e; % bar +if serifs: dish_serif([_one],[_two],s,1/3,cap_jut,t,1/3,cap_jut); + dish_serif([_two],[_one],u,1/3,cap_jut,v,1/3,cap_jut); fi +%%%%% +penlabels(1,1',2,3,4,5,6,7,8, 9,10,11,12); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2slxi.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2slxi.mf new file mode 100644 index 00000000000..63940e75808 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2slxi.mf @@ -0,0 +1,189 @@ +% +% lgt2slxi.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Italic Old Slav letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames +% +% vnarrow_e +% zelo +% vuk +% vi_a +% izh_dgr +% Vl_yus +% izh_uml +% olg +% oery +% ohrdsgn +% oo_cdot +% oo_cddot +% Vizh +% t_peter +% zelo_m +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Italic Cyrillic letter vnarrow_e"; +cyrcharmoving(vnarrow_e); + +lhchar "Italic Cyrillic letter zelo"; +cyrcharmoving(zelo); + +lhchar "Italic Cyrillic letter vuk - variant uk"; +cyrcharmoving(vuk); + +lhchar "Italic Cyrillic letter vi_a - variant iot a"; +cyrcharmoving(vi_a); + +lhchar "Italic Cyrillic letter izh_dgr - izhitsa double grave"; +cyrchar_twice(izh_dgr,9.5u#,x_height#+acc_height#,0); +italcorr x_height#*slant+.25u#; +adjust_fit(.25u#,max(u#,.5u#+.5flare#)); %izhy_adj +full_h:=h; h:=x_height; +% ital_izh; +numeric left_stem,right_stem,outer_jut,alpha,bulb_diam; +left_stem=stem-stem_corr; bulb_diam=7/8[hair,flare]; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75jut; x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos4''(alpha*right_stem,0); +penpos5(vair,90); penpos6(hair,0); penpos7(flare,0); +x5=if serifs:.5[x4'',rt x6r] else: rt x6r fi; top y5r=h+oo; +y4''=min(.9x_height,y5l-vair); z4''=whatever[z3,z4]; +rt x6r=hround(r-.5u-.5); +y6=max(vround(top y5r-.5hair)-1-.5flare, + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); +cyrbulb(5,6,7); % bulb +penpos1'(alpha*left_stem,0); y1'=3/4x_height; z1'=whatever[z1,z2]; +x10=l+letter_fit; x10:=hround(x10-.5hair)+.5hair; y10=2/3x_height; +penpos9(vair,90); y9r=x_height+oo; x9=min(x1l-.5,x10+u); +if y0>cap_notch_cut: + y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z4''l...{right}z5r--z5l{left} + ...z4''r{z3-z4}--diag_end(4r,3r,1,1,2l,1l)-- + z1'l{z1-z2}...{left}z9l--z9r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + ...{down}z0+.5left--cycle; % left and right diagonals +else: + pickup pencircle scaled1; + fill z0--z4''l{z4-z3}...{right}z5r--z5l{left}...{z3-z4}z4''r + --diag_end(4r,3r,1,1,2l,1l)-- + z1'l{z1-z2}...{left}z9l--z9r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + --cycle; fi % left and right diagonals +pickup fine.nib; +pos9'(vair,90); z9'=z9; pos10(hair,180); +filldraw stroke z10e{up}...z9'e{right}; +%%% +% the accent +if monospace: hpos_corr=-2u; put_gravis; hpos_corr=2u; put_gravis; +else: hpos_corr=-1.5u; put_gravis; hpos_corr=1.5u; put_gravis; fi +repeat_once; +penlabels(0,1,2,3,4); endchar; + +lhchar "Italic Cyrillic letter Vl_yus - like crossed Delta"; +cyrcharmoving(Vl_yus); + +lhchar "Italic Cyrillic letter izh_uml - izhitsa umlaut"; +cyrchar(izh_uml,9.5u#,lc_trema_height#,0); +italcorr x_height#*slant+.25u#; +adjust_fit(.25u#,max(u#,.5u#+.5flare#)); %izhy_adj +h:=x_height; +% ital_izh; +numeric left_stem,right_stem,outer_jut,alpha,bulb_diam; +left_stem=stem-stem_corr; bulb_diam=7/8[hair,flare]; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75jut; x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos4''(alpha*right_stem,0); +penpos5(vair,90); penpos6(hair,0); penpos7(flare,0); +x5=if serifs:.5[x4'',rt x6r] else: rt x6r fi; top y5r=h+oo; +y4''=min(.9x_height,y5l-vair); z4''=whatever[z3,z4]; +rt x6r=hround(r-.5u-.5); +y6=max(vround(top y5r-.5hair)-1-.5flare, + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); +cyrbulb(5,6,7); % bulb +penpos1'(alpha*left_stem,0); y1'=3/4x_height; z1'=whatever[z1,z2]; +x10=l+letter_fit; x10:=hround(x10-.5hair)+.5hair; y10=2/3x_height; +penpos9(vair,90); y9r=x_height+oo; x9=min(x1l-.5,x10+u); +if y0>cap_notch_cut: + y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z4''l...{right}z5r--z5l{left} + ...z4''r{z3-z4}--diag_end(4r,3r,1,1,2l,1l)-- + z1'l{z1-z2}...{left}z9l--z9r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + ...{down}z0+.5left--cycle; % left and right diagonals +else: + pickup pencircle scaled1; + fill z0--z4''l{z4-z3}...{right}z5r--z5l{left}...{z3-z4}z4''r + --diag_end(4r,3r,1,1,2l,1l)-- + z1'l{z1-z2}...{left}z9l--z9r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + --cycle; fi % left and right diagonals +pickup fine.nib; +pos9'(vair,90); z9'=z9; pos10(hair,180); +filldraw stroke z10e{up}...z9'e{right}; +%%% +% the accent +lowercase_umlaut(.5[x1,x4]-.5w,0, 11,12,13,14); +penlabels(0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14); endchar; + +lhchar "Italic Cyrillic letter olg - old soft el (elghe)"; +cyrcharmoving(olg); + +lhchar "Italic Cyrillic letter oery - old ery"; +cyrcharmoving(oery); + +lhchar "Italic Cyrillic letter ohrdsn - old hard sign"; +cyrcharmoving(ohrdsn); + +lhchar "Italic Cyrillic letter oo_cdot - old o cdot"; +cyrcharmoving(oo_cdot); + +lhchar "Italic Cyrillic letter oo_cddot - old o double cdot"; +cyrcharmoving(oo_cddot); + +lhchar "Italic Cyrillic letter vizh - Variant izhitsa"; +cyrcharmoving(vizh); + +lhchar "Italic Cyrillic letter t_peter -- looks like m"; +cyrcharmoving(t_peter); + +lhchar "Italic Cyrillic letter zelo_m -- variant zelo mirror"; +cyrcharmoving(zelo_m); + +lhchar "Italic Cyrillic letter izhei"; +cyrcharmoving(izhei); + +lhchar "Italic Cyrillic letter lo"; +cyrcharmoving(lo); + +lhchar "Italic Cyrillic letter mo"; +cyrcharmoving(mo); + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2slxl.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2slxl.mf new file mode 100644 index 00000000000..9960031cc3f --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2slxl.mf @@ -0,0 +1,843 @@ +% +% lgt2slxl.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lowercase Old Slav letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames +% +% vnarrow_e +% zelo +% vuk +% vi_a +% izh_dgr +% Vl_yus +% izh_uml +% olg +% oery +% ohrdsgn +% oo_cdot +% oo_cddot +% vizh +% t_peter +% zelo_m +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Lowercase Cyrillic letter variant narrow_e"; +cyrchar(vnarrow_e,7u#,x_height#,0); % eng +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,-1.5u# else: 0,-u# fi); +pickup fine.nib; pos2(vair',90); pos4(vair',270); +x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo; +pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h; % eng +if serifs: pos1(hair,0); pos0(flare,0); + y1=min(bar_height+2vair'+2,.9[bar_height,h]-flare); + pos5(hair,0); rt x1r=rt x5r=hround(w-.5u); + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + x6r=x6l+(x1r-x1l)=.5[x2r,x1r]+eps; x7r=x7l+(x5r-x5l)=.5[x4r,x5r]+eps; + forsuffixes e=l,r: path pt.e,pb.e; numeric tt.e,tb.e; + pt.e=z1e{x2-x1,5(y2-y1)}...{left}z2e; + pb.e=z4e{right}..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; + tt.e=ypart(((x6e,0)--(x6e,h)) intersectiontimes pt.e); + tb.e=ypart(((x7e,0)--(x7e,h)) intersectiontimes pb.e); endfor + filldraw stroke subpath(tt.e,1) of pt.e & + pulled_super_arc.e(2,3)(.7superpull) & pulled_super_arc.e(3,4)(.5superpull) + & subpath(0,tb.e) of pb.e; % arc and lower terminal +else: pos1(4/7[vair',flare],80); + rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r]; + pos5(.6[vair',flare],275); rt x5r=hround(w-.5u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + x6r=x6l+.7(x1r-x1l)=.5[x2r,x1r]+eps; x7r=x7l+.7(x5r-x5l)=.5[x4r,x5r]+eps; + forsuffixes e=l,r: path p.e,pt.e; numeric tt.e,tb.e; + p.e=z4e{right}..tension .9 and 1..z5e; + if angle direction 1 of p.e>75: + p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi + pt.e=term.e(2,1,right,.8,4); % upper terminal + tt.e=ypart(((x6e,0)--(x6e,h+o+eps)) intersectiontimes pt.e); + tb.e=ypart(((x7e,0)--(x7e,h+o+eps)) intersectiontimes p.e); endfor + filldraw stroke subpath(0,tt.e) of pt.e; % upper terminal + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & subpath(0,tb.e) of p.e; fi % arc and lower terminal +% hstroke +bar_stroke(x3l,0.85[x3l,x7l]-eps); %bar +penlabels(1,1',2,3,4,5,6,7,8,9); endchar; + +lhchar "Lowercase Cyrillic letter zelo"; +cyrchar(zelo,8u#,x_height#,sbeak#); +italcorr x_height#*slant-.5serif_fit#-.3u#; +adjust_fit(0,.5serif_fit#); +numeric arm_thickness[],z_stem; +if hefty: arm_thickness1=Vround(vair-vair_corr); arm_thickness2=vair; + z_stem=.6[vair,stem]; +else: arm_thickness1=vair; arm_thickness2=vair'; z_stem=.9[vair,stem]; fi +pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u); lft x3l=lft x4l=hround 1.25u; +top y1=h; y2=min(y1,h-2/3arm_thickness1); +bot y4=1/6h; y3=max(y4,2/3arm_thickness2); +numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3)); +penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0); +penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0); +pair delta; delta=penoffset z3-z2 of currentpen; +fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps; +arm(5,6,a,beak_darkness,-.4beak_jut); % upper arm and beak +if not serifs: pickup fine.nib; fi +pos7(arm_thickness2,-90); pos8(max(currentbreadth+eps,.6[thin_join,vair]),180); +bot y7r=tiny.bot y4; x7=x4r; x0=w+.75u; y0=y7l; +z8l=z0+whatever*(z2-z3); bot y8=-d-o; +path p; p=(z7l{right}.. .45[z0,.5[z7,z8]] ..{z3-z2}z8l); +z9=point 1 of p; pos9(curve,angle(direction 1 of p)-90); +filldraw stroke z7e{right}...z9e{z8-z7}...{z3-z2}z8e; % tail +penlabels(1,2,3,4,5,6,7,8); endchar; + +lhchar "Lowercase Cyrillic letter Vuk -- variant uk"; +cyrchar(vuk,9u#,x_height#+acc_height#,0); +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); %o +h:=.8x_height; +% lower_o; +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +%%%%% +% "hachek" +if serifs: + penpos14(1.2vair',90); penpos15(whatever,0); + x14=x1; y14=h+oo-eps; + x1-x15=x16-x1=good.x 3.25u; y15=y16=x_height+.5acc_height+oo; + penpos16(.25[vair,curve],angle(z16-z14)+90); + z15l=z14l+whatever*(z14-z15); (x15r,y)=z14r+whatever*(z14-z15); + fill stroke z15e--z14e{z16r-z14}..{.5right}z16e; % diagonals +else: + pickup fine.nib; + pos14(3/4[vair,hair],0); pos16(3/4[vair,hair],0); + pos15(7/8[vair,fudged.stem],0); + x1-x14=x16-x1+eps; y15=h+oo-eps; x15=x1; + y14=y16=x_height+.35acc_height+oo; x14l=hround(rt x15r-3.5u-.5vair); + z0=whatever[z14r,z15r]=whatever[z15l,z16l]; y0'=max(y1r,y1l+notch_cut); + pair delta[]; + delta1=penoffset z15-z14 of currentpen; + delta2=penoffset z16-z15 of currentpen; + fill z15l---z14l+delta1..top z14l---top z14r..z14r-delta1 + if y0'<y0: {z0-z14r}...{down}(x0-1,y0')--(x0+1,y0'){up}...{z16l-z0} + else: ---z0--- fi + z16l-delta2..top z16l---top z16r..z16r+delta2---z15r--cycle; fi % diagonals +%%% +penlabels(1,2,3,4); endchar; + +% A from AE +lhchar "Lowercase Cyrillic letter ligature vi_a - iot a"; +cyrchar(vi_a,8.5u#,x_height#,0); +italcorr x_height#*slant-beak_jut#-.5u#; +adjust_fit(if monospace: 4u# else: 4.75u# fi +serif_fit#, + serif_fit#); +numeric left_stem,amid_stem,outer_jut,alpha; +amid_stem=max(tiny.breadth,hround .9[mfudged.hair,mfudged.stem]); +pickup tiny.nib; pos1(amid_stem,0); pos2(amid_stem,0); +rt x1r=rt x2r=hround(w-max(2u,3u-.5amid_stem)); +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pos5(bar,-90); z0=z5; +x5=x1; top y5l=vround(if hefty:.52 else:.48 fi\\[y2,y1]+.5bar); +left_stem=if monospace:fudged.hair else: hair fi if hefty: -2stem_corr fi; +outer_jut=.8jut; x11l=outer_jut+.35u-eps; y11=0; +x12=x1l-apex_corr-if monospace:2 fi\\u; y12=h; +alpha=diag_ratio(1,.5left_stem,y12-y11,x12-x11l); +penpos11(alpha*left_stem,0); penpos12(alpha*left_stem,0); +fill diag_end(12l,11l,1,1,11r,12r) + --diag_end(11r,12r,1,1,12l,11l)--cycle; % diagonal +y10=h-slab; z10=whatever[z11,z12]; +fill z10--(x1,y10)--(x1,h)--z12--cycle; % link +penpos13(whatever,angle(z2-z1)); z13=whatever[z11,z12]; +penpos14(.6[thin_join,vair],90); x14=x0; y13l=y14l; y13r=y14r; +if hefty: y14r=.4h; else: y14=y0; fi +penstroke z13e--z14e; % bar line +numeric t; t=slab; +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(11,12); + if rt x11'r+cap_jut+.5u+1<=lft x2l-.75cap_jut: inner_jut=cap_jut; + else: rt x11'r+inner_jut+.5u+1=lft x2l-.75inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(11',12,i,1/2,outer_jut,j,.6,inner_jut)(dark); % lower left serif + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut+x1l-x12,b,1/3,jut); % upper serif + nodish_serif(2,1,c,1/3,.75inner_jut,d,1/3,jut); % lower middle serif +fi +% +z15=whatever[z11,z12]; y15+.5bar+eps=min(8h,h-max(1.2slab,bracket))-eps;%t=slab +% i_part(15); +_zero:=15; +_one:=16; _two:=17; _three:=18; _four:=19; +% +pickup tiny.nib; pos[_one](stem,0); pos[_two](stem,0); +lft x[_one]l=lft x[_two]l= + l+letter_fit+if not monospace: serif_fit+ fi hround(2.5u-.5stem-eps); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); fi % lower stem serif +x[_three]=x[_zero]; x[_four]=x[_one]; +y[_three]=y[_four]=y[_zero]; pickup fine.nib; +penpos[_three](.6[thin_join,vair],90); +penpos[_four](.6[thin_join,vair],90); %fi +penstroke z[_three]e--z[_four]e; % bar +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19); endchar; + +% for shape, see Knizhnay Shrift p 58 Bodoni, Parma 1818 +lhchar "Lowercase Cyrillic letter izh_dgr - izhitsa double grave"; +cyrchar_twice(izh_dgr,if serifs: 9.5u# else:9u# fi,x_height#,0); +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit# if monospace:+.5u#fi, + if serifs: max(.75u#,.25u#+.5flare#) else:max(0,.5stem#-.5u#) fi); % lizh_adj +begingroup +% lower_izh; +numeric left_stem,right_stem,outer_jut,alpha,bulb_diam; +left_stem=stem-stem_corr; bulb_diam=7/8[hair,flare]; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75jut; x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos4'(alpha*right_stem,0); penpos5(vair,90); +x5=if serifs: .5[x4',x6r] else:x6r fi; y5r=h+oo; +x6r=hround(r-.35u); +y6=max(vround(y5r-.25tiny-.5flare), + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); %zh bulb h +z4'=whatever[z3,z4]; y4'=min(y6-.5hair,8/5bar_height)-eps; +if serifs: penpos6(hair,0); penpos7(flare,0); + cyrbulb(5,6,7); fi % bulb +if y0>cap_notch_cut: y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z4'l...{right} + if serifs: z5r--z5l + else: + (.5[x4,x4r],y5r)--(fine.lft x5r,y5r)..(x5r,fine.bot y5r)-- + (x5l,fine.top y5l)..(fine.lft x5l,y5l) fi + {left}...z4'r{z3-z4} + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: fill z0--z4'l{z4-z3}...{right}z5r--z5l{left}...{z3-z4}z4'r + --diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); + if rt x1'r+jut+.5u+1<=lft x4l-jut+.5tiny: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4l-inner_jut+.5tiny; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); fi % upper left serif +%%%%% +endgroup; +% the accent +if monospace: hpos_corr=-2u; put_gravis; hpos_corr=2u; put_gravis; +else: hpos_corr=-1.5u; put_gravis; hpos_corr=1.5u; put_gravis; fi +repeat_once; +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter Vl_yus - like crossed Delta"; +cyrchar(Vl_yus,10u#+2stem#,x_height#,0); +adjust_fit(serif_fit#,serif_fit#); +numeric left_stem,right_stem,outer_jut,alpha; +right_stem=fudged.stem-stem_corr; +left_stem=min(fudged.hair if hefty:-2stem_corr fi,right_stem); +outer_jut=.75jut; x1l=w-x4r=l+letter_fit+.25u; y1=y4=0; %+outer_jut +x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo; +alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0<h-notch_cut: y0:=h-notch_cut; + fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{up}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2]; +penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5; +if hefty: y5r else: y5 fi =.5y0; +y5r-y5l=y6r-y6l=.6[thin_join,vair]; +penstroke z5e--z6e; % middle bar line +penpos5'(whatever,angle(z2-z1)); z5'=whatever[z1,z2]; +penpos6'(whatever,angle(z3-z4)); z6'=whatever[z3,z4]; y6'=y5'; +bot y5'l=0; y5'r-y5'l=y6'r-y6'l=if hefty:max(.7slab,y5r-y5l) else: slab fi; +penstroke z5'e--z6'e; % bar line +penlabels(0,1,2,3,4,5,5',6,6'); endchar; + +% for shape, see Knizhnay Shrift p 58 Bodoni, Parma 1818 +lhchar "Lowercase Cyrillic letter izh_uml - izhitsa umlaut"; +cyrchar(izh_uml,if serifs: 9.5u# else:9u# fi,lc_trema_height#,0); +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit# if monospace:+.5u# fi, + if serifs: max(.75u#,.25u#+.5flare#) else:max(0,.5stem#-.5u#) fi); % lizh_adj +full_h:=h; h:=x_height; +% lower_izh; +numeric left_stem,right_stem,outer_jut,alpha,bulb_diam; +left_stem=stem-stem_corr; bulb_diam=7/8[hair,flare]; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75jut; x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos4'(alpha*right_stem,0); penpos5(vair,90); +x5=if serifs: .5[x4',x6r] else:x6r fi; y5r=h+oo; +x6r=hround(r-.35u); +y6=max(vround(y5r-.25tiny-.5flare), + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); %zh bulb h +z4'=whatever[z3,z4]; y4'=min(y6-.5hair,8/5bar_height)-eps; +if serifs: penpos6(hair,0); penpos7(flare,0); + cyrbulb(5,6,7); fi % bulb +if y0>cap_notch_cut: y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z4'l...{right} + if serifs: z5r--z5l + else: + (.5[x4,x4r],y5r)--(fine.lft x5r,y5r)..(x5r,fine.bot y5r)-- + (x5l,fine.top y5l)..(fine.lft x5l,y5l) fi + {left}...z4'r{z3-z4} + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: fill z0--z4'l{z4-z3}...{right}z5r--z5l{left}...{z3-z4}z4'r + --diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); + if rt x1'r+jut+.5u+1<=lft x4l-jut+.5tiny: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4l-inner_jut+.5tiny; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); fi % upper left serif +%%%%% +% the accent +lowercase_umlaut(.5[x1,x4]-.5w,0, 8,9,10,11); +penlabels(0,1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter ligature olg - old soft el (elghe)"; +cyrchar(olg,10u# % if not serifs:+.5width_adj# fi % dl_width;n_width + ,x_height#,0); +italcorr x_height#*slant-beak_jut#+.25u#; %Gamma->x_height+.5u# +adjust_fit(serif_fit# if not serifs:+.5(stem#-u#) fi, %dl_adj + if serifs: 2u# else: 3u# fi-.5width_adj#); % old_beak_adj +% lower_l; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric light_hair,bot_vair,bulb_diam,left_jut; +light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi; +bot_vair=Vround(.5[vair,light_hair]); +bulb_diam=hround 7/8[hair,flare]; +left_jut= + if serifs: max(limit_dist,1.1jut) else: hround (w+serif_fit-rt x2r-.5u) fi; +x3=1/3[w-rt x1r-(1/8left_jut),rt x1r] if not serifs: -.5(stem-u) fi +eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(hair,-180); + top y3=h; y6-.5bulb_diam=.12desc_depth-eps; z6r=z5r; + lft x6r=l+letter_fit+hround(.35u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); + bot y4r=-1.5oo-eps; {{less_tense; bulb(4,5,6)}}; %bulb + filldraw stroke z4e{right} + ..controls (min(15/16[x4,x3],max(x4,lft x6r+1.75bulb_diam))+(x3e-x3),y4e) + and (x3e,max(y4l,min(y6-.5,1/3h+eps))+1/3(y4e-y4))..{up}z3e; % left tail +else: + pos3'(vair,90); pos1'(vair,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; % upper bar + pickup fine.nib; pos3(light_hair,0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=.67[x3l,x5]; + lft x5=l+letter_fit+hround(.35u-.5); bot y4r=bot y5r; y3=y3'; + filldraw stroke z3e{down}..controls (x3e,y5e+.35h) + and (min(7/8[x4e,x3e],x4e+2light_hair)+eps,y4e-eps)..{left}z4e--z5e; fi % left stem +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5jut); + save slab; slab:=vair; % lower.slab + dish_serif(2,1,a,1/3,jut,b,1/3,jut); %lower right serif + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,.5jut); %!!! %upper right serif + nodish_serif(3,0,e,1/3,1.05jut,f,1/3,inner_jut); % upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% (old) lower right beak(2); +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos7(vair,90); top y7r=h; x7=x2; + pos8(vair,90); y8=y7; rt x8r=hround(r-.45u); + filldraw stroke z7e--z8e; % horisontal + pickup fine.nib; pos9(slab,0); pos10(slab,0); + rt x9r=rt x10r=tiny.rt x8r; y9=y8r; bot y10=y8l-.7sbeak; + filldraw stroke z9e--z10e; %vertical +else: + pickup crisp.nib; + pos7(vair,90); top y7r=h; x7=x2; rt x8r=hround(r-.45u); + pos8(hair,0); y8=good.y(y7l-beak/1.4)-eps; + arm(7,8,i,beak_darkness,.4beak_jut); % upper arm and beak +fi +%%% +penlabels(1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Lowercase Cyrillic letter oery - old ery"; +cyrchar(oery,9u#,x_height#,0); % v_witdh +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if serifs: 2u# else: 3u# fi-.5width_adj#, % old_beak_adj + serif_fit#+4u#); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,.5jut,b,1/3,.5jut); % upper serif + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,.5jut); fi % lower serif +% lsftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% (old) lower left beak(2); +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos8(vair,90); top y8r=h; x8=x2; + pos9(vair,90); y9=y8; lft x9r=l+letter_fit+hround.45u; + filldraw stroke z8e--z9e; % horisontal + pickup fine.nib; pos10(slab,0); pos11(slab,0); + lft x10l=lft x11l=tiny.lft x9l; y10=y9r; bot y11=y8l-.7sbeak; + filldraw stroke z10e--z11e; % vertical +else: + pickup crisp.nib; + pos8(vair,90); top y8r=h; x8=x2; lft x9r=l+letter_fit+hround.45u; + pos9(hair,180); y9=good.y(y8l-beak/1.4)-eps; + arm(8,9,i,beak_darkness,-.4beak_jut); % upper arm and beak +fi +% I +w:=w+4u; pickup tiny.nib; rt x12r=rt x13r=w-lft x1l; top y12=h; bot y13=0; +pos12(fudged.stem,0); pos13(fudged.stem,0); +filldraw stroke z12e--z13e; % stem +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(12,13,e,1/3,jut,f,1/3,jut); % upper serif + slab:=vair; % lower.slab + dish_serif(13,12,g,1/3,jut,h,1/3,jut); fi % lower serif +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Lowercase Cyrillic letter ohrdsn - old hard sign"; +cyrchar(ohrdsn,9u#,x_height#,0); % v_witdh +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(if serifs: 2u# else: 3u# fi-.5width_adj#, % old_beak_adj + if monospace:.5u# else:0 fi); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,.5jut,b,1/3,.5jut); % upper serif + slab:=vair; % lower.slab + nodish_serif(2,1,c,1/3,jut,d,1/3,.5jut); fi % lower serif +% lsftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +set_bar_axis; +penpos[_three](curve if hefty:-3stem_corr fi,0); +penpos[_four](vair',-90); penpos[_five](vair',-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_two]l,y[_four]l]; +y[_one]l=y[_two]l=y1.bh; y[_one]r=y[_two]r=y2.bh; +x[_two]l=x[_two]r=x[_four]=w-3.75u; %.5v_width+.75u; +x[_one]l=x[_one]r=x[_zero]; x[_three]r=hround(w-.6u); +x[_two]l:=x[_four]l:=x[_two]r-.25curve; +fill stroke + {{if not serifs: interim superness:=more_super; fi + z[_five]e..super_arc.e([_four],[_three])}} & + super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% old lower left beak(2); +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos8(vair,90); top y8r=h; x8=x2; + pos9(vair,90); y9=y8; lft x9r=l+letter_fit+hround.45u; + filldraw stroke z8e--z9e; % horisontal + pickup fine.nib; pos10(slab,0); pos11(slab,0); + lft x10l=lft x11l=tiny.lft x9l; y10=y9r; bot y11=y8l-.7sbeak; + filldraw stroke z10e--z11e; % vertical +else: + pickup crisp.nib; + pos8(vair,90); top y8r=h; x8=x2; lft x9r=l+letter_fit+hround.45u; + pos9(hair,180); y9=good.y(y8l-beak/1.4)-eps; + arm(8,9,i,beak_darkness,-.4beak_jut); % upper arm and beak +fi +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Lowercase Cyrillic letter oo_cdot - old o cdot"; +cyrchar(oo_cdot,10u#,x_height#,0); %f width-u +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +if serifs: interim superness:=1.05 superness; + else: interim superness:=1.075 superness; fi +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) + & pulled_arc.e(2,3) & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +% dot +pickup tiny.nib; +dot_diam:=min((lft x4l-rt x2l)-1, + max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr))); +pos5(dot_diam,0); pos5'(dot_diam,90); +z5=z5'; x5=x1; y5=.5[y1,y3]; dot(5,5'); % dot +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter oo_cddot - old o double cdot"; +cyrchar(oo_cddot,11u#,x_height#,0); %f width - eps +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); +if serifs: interim superness:=1.05 superness; + else: interim superness:=1.075 superness; fi +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) + & pulled_arc.e(2,3) & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +% dots +_one:=5; _two:=6; _three:=7; _four:=8; +dot_diam:=min(.5(lft x4l-rt x2l)-1, + max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr))); +pickup tiny.nib; +pos[_one](dot_diam,0); pos[_two](dot_diam,90); +x[_one]=x[_two]=.5w-1.375u; y[_one]=y[_two]=.5[y1,y3]; +dot([_one],[_two]); % left dot +pos[_three](dot_diam,0); +penpos[_four](y[_two]r-y[_two]l,90); +y[_three]=y[_four]=y[_one]; x[_three]=x[_four]=x[_one]+2.75u; +dot([_three],[_four]); % right dot +penlabels(1,2,3,4); endchar; + +lhchar "Lowercase Cyrillic letter vizh - variant izhitsa"; +cyrchar(vizh,if serifs:9.5u# else:9u# fi,x_height#,desc_depth#); +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +%letter_old_u; +numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut; +left_stem=fudged.stem-stem_corr; right_stem=fudged.hair if hefty:-2stem_corr fi; +bot_stem=fudged.hair if hefty:-8stem_corr fi; +bot_vair=Vround(if serifs: vair else:.5[vair,bot_stem] fi); outer_jut=.75jut; +x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4r=h; y2=y3=0; x2l=x3l; +numeric alpha,alpha[]; x9=3u; y9=bot_vair-d-oo; +alpha1=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-apex_corr); +alpha2=diag_ratio(1,bot_stem,y1-y9,x4r-x9); +if alpha1<alpha2: x2l-x1l=x4r-x3r+apex_corr; alpha=alpha1; +else: alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot_stem,0)]; fi +penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0); +alpha3=(y1++(x2l-x1l))/y1; +penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0); +z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r); +if y0>notch_cut: y0:=notch_cut; + fill z0+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r) + --z3r--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--z3r--z2l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(alpha*bot_stem,0); z5r=whatever[z3r,z4r]; bot y5=-d; +if serifs: fill stroke z3e---z5e; % straight arc + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(5,3); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif + slab:=vair; % lower.slab + dish_serif(5',3,e,1/2,jut/1.2,f,.6,jut)(dark); % lower serif +else: + fill z3r---diag_end(3r,5r,.75,.75,5l,3l)---z3l--cycle; fi % straight arc +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Lowercase Cyrillic letter t_peter - like flipped sh"; +cyrchar(t_peter,14.5u# if serifs:+.5width_adj# fi,x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0,0 else: serif_fit#,serif_fit# fi); %wlett_adj +% lower_sh;flip +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; +pos1(fudged.stem,0); pos2(fudged.stem,0); pos3(fudged.stem,0); +pos4(fudged.stem,0); pos5(fudged.stem,0); pos6(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=top y5=h; bot y2=bot y4=bot y6=0; +lft x5l=lft x6l=hround (.5[x1,x3]-.5fudged.stem); % middle stem point +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x5l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); % lower right serif + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5jut); + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + nodish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + nodish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + fill z.b0--z.b1--z.e1--z.e0--cycle; % upper inter_serif bar +else: + lft x2'= lft x2l; top y2'r=h; pos2'(vair,90); + rt x4'=rt x4r; y4'=y2'; pos4'(vair,90); + filldraw stroke z2'e--z4'e; fi +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter zelo_m - variant zelo mirror"; +cyrchar(zelo_m,7.1u#,x_height#,0); +italcorr .7x_height#*slant; +adjust_fit(if monospace: .4u#,.5u# else: if serifs:0 else:-.2u# fi,0 fi); +numeric theta; theta=90-angle(40u,h); slope:=-h/40u; % angle at middle +numeric s_slab; s_slab=if serifs: vair else: Vround .1[vair,stem] fi; +numeric ess'; ess'=max(fine.breadth,ess); +pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-100); +pos0(ess',theta); pos7(s_slab,-90); x2l=x0=x7=.5w; +top y2l=h+vround 1.5oo; bot y7r=-oo; +y0-.5ess'=y7l+if serifs:.54 else: .52 fi\\(y2r-y7l-ess'); +lft x3l=hround .6u; rt x6r=hround(w-.6u); +x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine; +ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; +ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; +interim superness:=more_super; +%mirror +forsuffixes $ = 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r,6l,6,6r,7l,7,7r: + x$:=l+(r-x$); endfor; +filldraw stroke super_arc.e(2,3) & z3e{down} + ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke +if serifs: + pos1(hair,180); pos8(hair,180); + rt x1l=hround(w-1.05u); lft x8r=hround .6u; + bot y1=min(bot y2r,vround 1/5[top y5r,h]); + top y8=max(top y7l,vround 5/6 bot y4l); + forsuffixes $ = 1l,1,1r,8l,8,8r: x$:=l+(r-x$); endfor; + filldraw stroke z1e{up}....{right}z2e; % upper arc + filldraw stroke z7e{right}....{x8-x7,5(y8-y7)}z8e; % lower arc + path upper_arc, lower_arc; + upper_arc=z1{up}....{right}z2; lower_arc=z7{right}....{x8-x7,5(y8-y7)}z8; + pos10(.3[fine.breadth,hair],180); pos9(.3[fine.breadth,hair],180); + x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; + x1'-x1l=x8r-x8'=1.6curve-fine; y1'=y1; y8'=y8; + numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); + filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb + t:=xpart(lower_arc intersectiontimes(z9r--z8')); + filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb +else: + pos1(4/7[s_slab,flare],-100); pos8(flare,-100); + x1l=good.x(x1l+w-u-rt x1); lft x8r=hround .5u; + top y1l=vround(.93h+1.5oo); bot y8r=vround .1h-oo; + forsuffixes $ = 1l,1,1r,8l,8,8r: x$:=l+(r-x$); endfor; + filldraw stroke term.e(2,1,left,.9,4); % upper arc and terminal + filldraw stroke term.e(7,8,right,1,4); fi % lower arc and terminal +penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; + +lhchar "Lowercase Cyrillic letter izhei"; +cyrchar(izhei,10u# if not serifs:+.5width_adj# fi,x_height#,0); % n_width +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; +y5=vround(.45h-eps); y6=vround(.65h-eps); +stem1=7/8[thin_join,vair]; +penpos5(stem1,90); penpos6(stem1,90); +fill stroke z5e--z6e; % diagonal +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter lo"; +cyrchar(lo,10u# % if not serifs:+.5width_adj# fi % dl_width;n_width + ,x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit# if not serifs:+.5(stem#-u#) fi, %dl_adj + if monospace: 9.5 else: 9 fi u#); % +% lower_l; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric light_hair,bot_vair,bulb_diam,left_jut; +light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi; +bot_vair=Vround(.5[vair,light_hair]); +bulb_diam=hround 7/8[hair,flare]; +left_jut= + if serifs: max(limit_dist,1.1jut) else: hround (w+serif_fit-rt x2r-.5u) fi; +x3=1/3[w-rt x1r-(1/8left_jut),rt x1r] if not serifs: -.5(stem-u) fi +eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(hair,-180); + top y3=h; y6-.5bulb_diam=.12desc_depth-eps; z6r=z5r; + lft x6r=l+letter_fit+hround(.35u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); + bot y4r=-1.5oo-eps; {{less_tense; bulb(4,5,6)}}; %bulb + filldraw stroke z4e{right} + ..controls (min(15/16[x4,x3],max(x4,lft x6r+1.75bulb_diam))+(x3e-x3),y4e) + and (x3e,max(y4l,min(y6-.5,1/3h+eps))+1/3(y4e-y4))..{up}z3e; % left tail +else: + pos3'(vair,90); pos1'(vair,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; % upper bar + pickup fine.nib; pos3(light_hair,0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=.67[x3l,x5]; + lft x5=l+letter_fit+hround(.35u-.5); bot y4r=bot y5r; y3=y3'; + filldraw stroke z3e{down}..controls (x3e,y5e+.35h) + and (min(7/8[x4e,x3e],x4e+2light_hair)+eps,y4e-eps)..{left}z4e--z5e; fi % left stem +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5jut); + save slab; slab:=vair; % lower.slab + dish_serif(2,1,a,1/3,jut,b,1/3,jut); % lower right serif + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut); % upper right serif + nodish_serif(3,0,e,1/3,1.05jut,f,1/3,inner_jut); % upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%% +%O_part +full_w:=9u; +_zero:=2; +_one:=9; _two:=10; _three:=11; _four:=12; _five:=13; _six:=14; +penpos[_one](vair,90); penpos[_three](vair',-90); +penpos[_two](curve,180); penpos[_four](curve,0); +x[_two]r=hround max(.5u,1.25u-.5curve); +x[_four]r=full_w-x[_two]r; x[_one]=x[_three]=.5full_w; +y[_one]r=h+vround 1.5oo; y[_three]r=-oo; +y[_two]=y[_four]=.5h-vair_corr; y[_two]l:=y[_four]l:=.52h; +%shift +forsuffixes $ = [_one]l,[_one],[_one]r,[_two]l,[_two],[_two]r, + [_three]l,[_three],[_three]r,[_four]l,[_four],[_four]r: x$:=x$+w; endfor; +penstroke pulled_arc.e([_one],[_two]) & pulled_arc.e([_two],[_three]) + & pulled_arc.e([_three],[_four]) & pulled_arc.e([_four],[_one]) & cycle; % bowl +%%% +bar_stroke(x[_zero],x[_two]); % bar +%%%%% +penlabels(0,1,1',2,3,3',4,5,6);endchar; + +lhchar "Lowercase Cyrillic letter mo"; +cyrchar(mo,12u# if not serifs:+width_adj# fi,x_height#,0); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(if monospace: 0,.5u# else: serif_fit#,9u# fi); %wlett_adj +% lower_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.stem-3stem_corr); +stem3=min(stem2,hround (fudged.hair-2stem_corr)); +stem4=max(stem1,hround(fudged.stem-3stem_corr)); +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround (w-2.5u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: + y6=if monospace: vround 1/3h else: oo fi; + numeric upper_notch,lower_notch; + upper_notch=h-notch_cut+eps; lower_notch=y5+notch_cut-eps; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5+eps,lower_notch)--(x0-.5-eps,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: + y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +if serifs: + numeric inner_jut; + if rt x2r+jut+.5u+1+eps+.5stem3<=lft x4l-.5stem3-jut: inner_jut=jut; + else: rt x2r+inner_jut+.5u+1+eps+.5stem3=lft x4l-.5stem3-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + serif(1,2,a,1/3,-jut); % upper left serif + serif(3,4,d,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,b,1/2,jut,c,1/2,jut)(dark); % lower left serif + dish_serif(4,3,e,1/3,jut,f,1/3,jut); fi % lower right serif +%%% +%O_part +full_w:=9u; +_zero:=4; +_one:=9; _two:=10; _three:=11; _four:=12; _five:=13; _six:=14; +penpos[_one](vair,90); penpos[_three](vair',-90); +penpos[_two](curve,180); penpos[_four](curve,0); +x[_two]r=hround max(.5u,1.25u-.5curve); +x[_four]r=full_w-x[_two]r; x[_one]=x[_three]=.5full_w; +y[_one]r=h+vround 1.5oo; y[_three]r=-oo; +y[_two]=y[_four]=.5h-vair_corr; y[_two]l:=y[_four]l:=.52h; +%shift +forsuffixes $ = [_one]l,[_one],[_one]r,[_two]l,[_two],[_two]r, + [_three]l,[_three],[_three]r,[_four]l,[_four],[_four]r: x$:=x$+w; endfor; +penstroke pulled_arc.e([_one],[_two]) & pulled_arc.e([_two],[_three]) + & pulled_arc.e([_three],[_four]) & pulled_arc.e([_four],[_one]) & cycle; % bowl +%%% +bar_stroke(x[_zero],x[_two]); % bar +%%%%% +penlabels(0,1,1',2,3,3',4,5,6,7,8); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2slxu.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2slxu.mf new file mode 100644 index 00000000000..bb3f5d3544f --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2slxu.mf @@ -0,0 +1,867 @@ +% +% lgt2slxu.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Uppercase Old Slav letters +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames +% +% VNARROW_E +% ZELO +% VUK +% VI_A upper +% IZH_dgr +% VL_YUS +% IZH_uml +% OLG +% OERY +% OHRDSN +% OO_cdot +% OO_cddot +% VIZH +% T_peter +% ZELO_m +% + +LHver_check(3,4); % like |version_check| in ec + +iff serifs:% +lhchar "Uppercase Cyrillic letter variant NARROW_E - like Ukrainian E"; +cyrchar(VNARROW_E,13u#,cap_height#,0); +if is_small_cap: getcharcode(vnarrow_e); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% upper_ukre; +pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); +pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); +rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1]; +top y2r=h+o; bot y4r=-o; y3=.5h-vair_corr; y3l:=.52h; +bot y1=min(vround.675h,bot y2l-eps); +y5=max(good.y .95(h-y1),y4l+eps); +(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); +(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); +filldraw stroke z1e{x2-x1,10(y2-y1)}...pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull)...{up}z5e; % arc +pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; +x1r-x1'=2cap_curve-fine; y1'=y1; +path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; +numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); +filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +% upukre_bar; +numeric bar[]; y7=y8=y3; +x7=x3l; x8=(min(lft x1l-.5hair,0.85[x3l,x1l])); +if (serifs=true) and (bar#<=.5curve#): + penpos7(cap_bar,90); penpos8(cap_bar,90); + bar2=7/8[cap_bar,fudged.cap_stem-3stem_corr]; + penpos9(bar2,45); z9=.575[z7l,z8l]; + fill circ_stroke z8e{-2,-1}..{-2,1}z9e..{-2,-1}z7e; % curve /\/ +else: + pickup fine.nib; pos7(cap_bar,90); pos8(cap_bar,90); + filldraw stroke z7e--z8e; fi % bar -- +%%%%% +penlabels(1,1',2,3,4,5,6); endchar; + +iff not serifs:% +lhchar "Uppercase Cyrillic letter variant NARROW_E - like Ukrainian E"; +cyrchar(VNARROW_E,11.5u#,cap_height#,0); +if is_small_cap: getcharcode(vnarrow_e); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% uppers_ukre; +pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); +pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); +rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; +lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); +top y1r=vround.95h+o; top y2r=h+o; y3=.5h; +bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; +filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,.8,4); +% uukres_bar; +numeric bar[]; y6=y7=y3; x6=x3l; x7=(min(lft x1l-.5hair,0.85[x3l,x1l])); +pickup fine.nib; +bar1=if is_small_cap:max(fine.breadth+eps,.6[thin_join,vair]) else: cap_bar fi; +pos6(bar1,90); pos7(bar1,90); +filldraw stroke z6e--z7e; % bar -- +%%%%% +penlabels(1,1',2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter ZELO"; +cyrchar(ZELO,11u#,cap_height#,cap_sbeak#); +if is_small_cap: getcharcode(zelo); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +numeric arm_thickness[],z_stem; +if hefty: arm_thickness1=Vround(slab-vair_corr); arm_thickness2=slab; + z_stem=.8[vair,cap_stem]; +else: arm_thickness1=slab; arm_thickness2=cap_band;%vround(slab+vair_corr); + z_stem=.9[vair,cap_stem]; fi +pickup tiny.nib; x3l-.75u=x4l-.75u=w-x1r=w-x2r; lft x3l=hround 1.75u; +top y1=h; y2=min(y1,h-2/3arm_thickness1); +bot y4=1/6h; y3=max(y4,2/3arm_thickness2); +numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l); +penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0); +penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0); +pair delta; delta=penoffset z3-z2 of currentpen; +fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround 1.25u; y6=good.y(y5l-beak)-eps; +arm(5,6,a,beak_darkness**.8,-.4beak_jut); % upper arm and beak +if not serifs: pickup fine.nib; fi +pos7(arm_thickness2,-90); pos8(max(currentbreadth+eps,.7[thin_join,vair]),180); +bot y7r=tiny.bot y4; x7=x4r; x0=w+1.5u; y0=y7l; +z8l=z0+whatever*(z2-z3); bot y8=-d-o; +path p; p=(z7l{right}.. .45[z0,.5[z7,z8]] ..{z3-z2}z8l); +z9=point 1 of p; pos9(cap_curve,angle(direction 1 of p)-90); +filldraw stroke z7e{right}...z9e{z8-z7}...{z3-z2}z8e; % tail +math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Uppercase Cyrillic letter VUK -- Variant UK"; +cyrchar(VUK,14u#-width_adj#,cap_height#+acc_height#,0); +if is_small_cap: getcharcode(vuk); fi +italcorr .7cap_height#*slant-.5u#; %O +h:=.8cap_height; +adjust_fit(0,0); +% upper_o; +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +%%%%% +%"hachek" +if serifs: + penpos14(1.414vair',90); pos15(whatever,0); x14=x1; y14=h+o-eps; + x1-x15=x16-x1=good.x 4.25u; top y15=top y16=cap_height+.35acc_height+o; + pos16(.25[vair,cap_curve],angle(z16-z14)+90); + z15l=z14l+whatever*(z14-z15); z15r=z14r+whatever*(z14-z15); + filldraw stroke z15e--z14e{z16r-z14}..{.5right}z16e; % hachek +else: + pickup fine.nib; + pos14(hair,0); pos16(hair,0); penpos15(fudged.stem,0); + x1-x14=x16-x1; y15=h; x15=x1; + top y14=top y16=cap_height+.5acc_height+o; + lft x14l=hround(rt x15r-5u-.5vair); + z0=whatever[z14r,z15r]=whatever[z15l,z16l]; + pair delta[]; + delta1=penoffset z15-z14 of currentpen; + delta2=penoffset z16-z15 of currentpen; + fill z15l---z14l+delta1..top z14l---top z14r..z14r-delta1 + ---z0--- + z16l-delta2..top z16l---top z16r..z16r+delta2---z15r--cycle; fi % hachek +%%% +penlabels(1,2,3,4,14,15,16); endchar; + +lhchar "Uppercase Cyrillic letter OT"; +% A from AE +lhchar "Uppercase Cyrillic letter ligature VI_A - IOT A"; +cyrchar(VI_A,11u#,cap_height#,0); +if is_small_cap: getcharcode(vi_a); fi +italcorr cap_height#*slant-beak_jut#-.5u#; +adjust_fit(.5u#+ + if monospace: 6.5u# else: + max(5u#+.5cap_stem#,6u#)+cap_serif_fit# fi, %Ipart_adj+.5u + cap_serif_fit#); +numeric left_stem,amid_stem,outer_jut,alpha; +amid_stem=max(tiny.breadth,hround .9[mfudged.hair,mfudged.cap_stem]); +pickup tiny.nib; pos1(amid_stem,0); pos2(amid_stem,0); +rt x1r=rt x2r=hround(w-max(2u,3u-.5amid_stem)); +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pos5(cap_bar,-90); z0=z5; +x5=x1; top y5l=vround(if hefty:.52 else:.48 fi\\[y2,y1]+.5cap_bar); +left_stem=if monospace:fudged.hair else: cap_hair fi if hefty: -3stem_corr fi; +outer_jut=.8cap_jut; x11l=outer_jut+.5u-eps; y11=0; +x12=x1l-apex_corr-if monospace:2 fi\\u; y12=h; +alpha=diag_ratio(1,.5left_stem,y12-y11,x12-x11l); +penpos11(alpha*left_stem,0); penpos12(alpha*left_stem,0); +fill diag_end(12l,11l,1,1,11r,12r) + --diag_end(11r,12r,1,1,12l,11l)--cycle; % diagonal +y10=h-slab; z10=whatever[z11,z12]; +fill z10--(x1,y10)--(x1,h)--z12--cycle; % link +penpos13(whatever,angle(z2-z1)); z13=whatever[z11,z12]; +penpos14(cap_band,90); x14=x0; y13l=y14l; y13r=y14r; +if hefty: y14r=.4h; else: y14=y0; fi +penstroke z13e--z14e; % bar line +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(11,12); + if rt x11'r+cap_jut+.5u+1<=lft x2l-.75cap_jut: inner_jut=cap_jut; + else: rt x11'r+inner_jut+.5u+1=lft x2l-.75inner_jut; fi + dish_serif(11',12,i,1/2,outer_jut,j,.6,inner_jut)(dark); % lower left serif + nodish_serif(1,2,a,1/3,cap_jut+x1l-x12,b,1/3,cap_jut); % upper serif + nodish_serif(2,1,c,1/3,.75inner_jut,d,1/3,cap_jut); fi % lower middle serif +% +z15=whatever[z11,z12]; y15+.5cap_bar+eps=min(8h,h-max(1.2slab,bracket))-1-eps; +%I_part(15); +_zero:=15; +_one:=16; _two:=17; _three:=18; _four:=19; +% +pickup tiny.nib; pos[_one](cap_stem,0); pos[_two](cap_stem,0);%pos +lft x[_one]l=lft x[_two]l= + l+letter_fit+if monospace:-.35u else: cap_serif_fit fi + +hround max(2u,3u-.5cap_stem); +top y[_one]=h; bot y[_two]=0; +filldraw stroke z[_one]e--z[_two]e; % stem +x[_three]=x[_one]; y[_three]=y[_zero]; +x[_four]=x[_zero]; y[_four]=y[_three]; +pos[_three](cap_bar,90); pos[_four](cap_bar,90); +filldraw stroke z[_three]e--z[_four]e; % bar +if serifs: dish_serif([_one],[_two],s,1/3,cap_jut,t,1/3,cap_jut); + dish_serif([_two],[_one],u,1/3,cap_jut,v,1/3,cap_jut); fi +%%%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19); endchar; + +% for shape, see Knizhnay Shrift p 58 Bodoni, Parma 1818 +lhchar "Uppercase Cyrillic letter IZH_dgr - IZHITSA double grave"; +cyrchar_twice(IZH_dgr,13u#,cap_height#+acc_height#,0); +if is_small_cap: getcharcode(izh_dgr); fi +italcorr cap_height#*slant+.25u#; +adjust_fit(cap_serif_fit#, + if serifs: min(1.5u#,.5u#+(flare#+(cap_stem#-stem#))) %ccL_adj + else:.5u#fi); +full_h:=h; h:=cap_height; +% upper_izh; +numeric left_stem,right_stem,outer_jut,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +x6=if serifs:.5[x5,x7r] else:x7r fi; +penpos6(vair,90); y6r=h if serifs:+o fi; +penpos5(alpha*right_stem,0); +y5=min(.9cap_height,bot y6l-.5vair); z5=whatever[z3,z4]; +x7r=hround(r-.5u); penpos7(hair,0); +y7=h-vround max(.05fig_height+.5flare,.1fig_height-.5flare)+o; z8r=z7r; +penpos8(flare,0); if serifs: cyrbulb(6,7,8); fi +if y0>cap_notch_cut: y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z5l...{right} + if serifs: z6r--z6l + else: + (.5[x4,x4r],y6r)--(fine.lft x6r,y6r)..(x6r,fine.bot y6r)-- + (x6l,fine.top y6l)..(fine.lft x6l,y6l) fi + {left} + ....z5r{z3-z4}--diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: fill z0--z5l{z4-z3}...{right}z6r--z6l{left}...{z3-z4}z5r + --diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); + if rt x1'r+cap_jut+.5u+1<=x4l-cap_jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=x4l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); fi % left serif +%%%%% +% the accent +if monospace: + hpos_corr=-2u; put_gravis(cyrcaph); + hpos_corr=2u; put_gravis(cyrcaph); +else: hpos_corr=-1.5u; put_gravis(cyrcaph); + hpos_corr=1.5u; put_gravis(cyrcaph); fi +repeat_once; +penlabels(0,1,2,3,4,5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter VL_YUS - like crossed Delta"; +cyrchar(VL_YUS,13u#+2cap_stem#,cap_height#,0); +if is_small_cap: getcharcode(Vl_yus); fi +adjust_fit(cap_serif_fit#,cap_serif_fit#); +numeric left_stem,right_stem,outer_jut,alpha; +right_stem=cap_stem-stem_corr; +left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); +outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+.5u; y1=y4=0; %+outer_jut +x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo; +alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0<h-cap_notch_cut: y0:=h-cap_notch_cut; + fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r) + --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{up}z0+.5left--cycle; % left and right diagonals +else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2]; +penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5; +if hefty: y5r else: y5 fi =.5y0; +y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % middle bar line +penpos5'(whatever,angle(z2-z1)); z5'=whatever[z1,z2]; +penpos6'(whatever,angle(z3-z4)); z6'=whatever[z3,z4]; y6'=y5'; +bot y5'l=0; y5'r-y5'l=y6'r-y6'l=slab; +penstroke z5'e--z6'e; % bar line +penlabels(0,1,2,3,4,5,5',6,6'); endchar; +% +% for shape, see Knizhnay Shrift p 58 Bodoni, Parma 1818 +lhchar "Uppercase Cyrillic letter IZH_uml - IZHITSA umlaut"; +cyrchar(IZH_uml,13u#,cap_height#+acc_height#,0); +if is_small_cap: getcharcode(izh_uml); fi +italcorr cap_height#*slant+.25u#; +adjust_fit(cap_serif_fit#, + if serifs: min(1.5u#,.5u#+(flare#+(cap_stem#-stem#))) %ccL_adj + else:.5u#fi); +full_h:=h; h:=cap_height; +% upper_izh; +numeric left_stem,right_stem,outer_jut,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4=h; +x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o; +alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +x6=if serifs:.5[x5,x7r] else:x7r fi; +penpos6(vair,90); y6r=h if serifs:+o fi; +penpos5(alpha*right_stem,0); +y5=min(.9cap_height,bot y6l-.5vair); z5=whatever[z3,z4]; +x7r=hround(r-.5u); penpos7(hair,0); +y7=h-vround max(.05fig_height+.5flare,.1fig_height-.5flare)+o; z8r=z7r; +penpos8(flare,0); if serifs: cyrbulb(6,7,8); fi +if y0>cap_notch_cut: y0:=cap_notch_cut; + fill z0+.5right{up}...{z4-z3}z5l...{right} + if serifs: z6r--z6l + else: + (.5[x4,x4r],y6r)--(fine.lft x6r,y6r)..(x6r,fine.bot y6r)-- + (x6l,fine.top y6l)..(fine.lft x6l,y6l) fi + {left} + ....z5r{z3-z4}--diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % left and right diagonals +else: fill z0--z5l{z4-z3}...{right}z6r--z6l{left}...{z3-z4}z5r + --diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); + if rt x1'r+cap_jut+.5u+1<=x4l-cap_jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=x4l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); fi % left serif +%%%%% +% the accent +h:=full_h; uppercase_umlaut(.5[x1,x4]-.5w,0, 9,10,11,12); +penlabels(0,1,2,3,4,5,6,7,8, 9,10,11,12); endchar; + +lhchar "Uppercase Cyrillic letter ligature OLG - Old soft EL (ELGHE)"; +cyrchar(OLG,13.5u#,cap_height#,0); % DL_width:N_width +if is_small_cap: getcharcode(olg); fi; +italcorr cap_height#*slant-beak_jut#; %Gamma+.25u +adjust_fit(cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi, %DL_adj + if not serifs:.5u#+ fi + min(4.5u#-.5stem#,3.5u#)-.5width_adj#); % Beak_adj+.5u +% upper_l; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); +numeric light_hair,bot_vair,left_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +left_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit-rt x2r-.65u) fi; +bot_vair=Vround(.5[vair,light_hair]); +x3=1/3[w-rt x1r-(1/6left_jut),rt x1r] if not serifs:-.5(cap_stem-u) fi+eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(cap_hair,-180); + top y3=h; y6=1/6h-max(0,flare-stem-2vair_corr-.5); z6r=z5r; + lft x6r=l+letter_fit+hround(.5u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); bot y4r=-o; + filldraw stroke z4e{right}.. + controls (min(15/16[x4,x3],max(x4,lft x6r+2flare))+(x3e-x3)+eps,y4e) + and (x3e,good.y(min(y6-.5,1/3h)+1/3(y4e-y4))-eps)..z3e; % left tail + {{less_tense; bulb(4,5,6)}}; +else: + pos3'(slab,90); pos1'(slab,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; + pickup fine.nib; pos3(max(fine.breadth,light_hair),0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=2/3[x3l,x5r]; lft x5=l+letter_fit+hround(.35u-.5); + bot y4r=bot y5r; y3=y3'; x4l:=.25[x4,x5]; + path p; + p=stroke z3{down} + ..controls (x3,y5+.35h-eps) and (min(7/8[x4,x3],x5+2.5light_hair+.5u),y4) + ..{left}z4--z5; + z6=point .35 of p; + pos6(max(fine.breadth,7/8[bot_vair,light_hair]),angle(direction .35 of p)+90); + filldraw stroke z3e{down}...z6e{direction .35 of p}...{left}z4e--z5e; fi % arc +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5cap_jut); + dish_serif(2,1,a,1/3,cap_jut,b,1/3,cap_jut); %lower right serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); %upper right serif + nodish_serif(3,0,e,1/3,1.05cap_jut,f,1/3,inner_jut); %upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% (old) upper right beak(2); +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos7(slab,90); top y7r=h; x7=x2; + pos8(slab,90); y8=y7; rt x8r=hround(r-.65u); + filldraw stroke z7e--z8e; % horisontal + pickup fine.nib; pos9(.3[slab,cap_stem],0); pos10(.3[slab,cap_stem],0); + rt x9r=rt x10r=tiny.rt x8r; y9=y8r; bot y10=y8l-sbeak; + filldraw stroke z9e--z10e; % vertical +else: + pickup crisp.nib; + pos7(slab,90); top y7r=h; x7=x2; rt x8r=hround(r-.65u); + pos8(hair,0); y8=good.y(y7l-beak)-eps; + arm(7,8,i,beak_darkness,.7beak_jut); % upper arm and beak +fi +penlabels(1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Uppercase Cyrillic letter OERY - Old ERY"; +cyrchar(OERY,12.5u#,cap_height#,0); %V_width#=12.5u# +if is_small_cap: getcharcode(oery); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(if not serifs:.5u#+ fi + min(4.5u#-.5stem#,3.5u#)-.5width_adj#, % Beak_adj+.5u + cap_serif_fit#+4.5u#); %ERYadj +numeric left_stem; left_stem=cap_stem-hround 2stem_corr; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +% usftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% (old) upper left beak(2); +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos8(slab,90); top y8r=h; x8=x2; + pos9(slab,90); y8=y9; lft x9r=l+letter_fit+hround.65u; + filldraw stroke z8e--z9e; % horisontal + pickup fine.nib; pos10(.3[slab,cap_stem],0); pos11(.3[slab,cap_stem],0); + lft x10l=lft x11l=tiny.lft x9; y10=y9r; bot y11=y9l-sbeak; + filldraw stroke z10e--z11e; % vertical +else: + pickup crisp.nib; + pos8(slab,90); top y8r=h; x8=x2; lft x9r=l+letter_fit+hround.65u; + pos9(hair,180); y9=good.y(y8l-beak)-eps; + arm(8,9,i,beak_darkness,-.7beak_jut); % upper arm and beak +fi +% I +w:=w+4.5u; pickup tiny.nib; +rt x13r=rt x14r=w-hround max(2u,3u-.5stem); +top y13=h; bot y14=0; pos13(cap_stem,0); pos14(cap_stem,0); +filldraw stroke z13e--z14e; +if serifs: dish_serif(13,14,e,1/3,cap_jut,f,1/3,cap_jut); + dish_serif(14,13,g,1/3,cap_jut,h,1/3,cap_jut); fi +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar; + +lhchar "Uppercase Cyrillic letter OHRDSN - Old HARD SIGN"; +cyrchar(OHRDSN,12.5u#,cap_height#,0); %V_width#=12.5u# +if is_small_cap: getcharcode(ohrdsn); fi +italcorr .52*.7cap_height#*slant-.5u#; % D*.52h +adjust_fit(if not serifs:.5u#+ fi + min(4.5u#-.5stem#,3.5u#)-.5width_adj#, % Beak_adj+.5u + 0); +numeric left_stem; left_stem=cap_stem-hround 2stem_corr; +pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); % upper serif + nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +% usftsn_bowl(2); +_zero:=2; +_one:=3; _two:=4; _three:=5; _four:=6; _five:=7; +% +pickup tiny.nib; +penpos[_one](cap_bar,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +penpos[_four](cap_band,-90); penpos[_five](cap_band,-90); +z[_five]r=bot z[_zero]; y[_four]=y[_five]; +y[_three]=.5[y[_four],y[_two]]; +x[_one]=x[_zero]r; x[_three]r=hround(w-u); +if (serifs=false) or (cap_bar#>.5cap_curve#) or (cap_bar<3): + penpos[_two](cap_bar,90); + x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; + y[_one]=y[_two]=.52h; x[_two]=x[_four]; +else: penpos[_two](1/18[cap_bar,cap_curve],90); + x[_four]=.5[x[_zero],w-1.5u]+.5u; + y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; + x[_two]=x[_four]-.35u; fi +x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; +fill stroke z[_five]e..super_arc.e([_four],[_three]) + & super_arc.e([_three],[_two])..z[_one]e; % lobe +%%% +% (old) upper left beak(2); +if (serifs=false) and (old_cyr=true): + pickup tiny.nib; + pos8(slab,90); top y8r=h; x8=x2; + pos9(slab,90); y8=y9; lft x9r=l+letter_fit+hround.65u; + filldraw stroke z8e--z9e; % horisontal + pickup fine.nib; pos10(.3[slab,cap_stem],0); pos11(.3[slab,cap_stem],0); + lft x10l=lft x11l=tiny.lft x9; y10=y9r; bot y11=y9l-sbeak; + filldraw stroke z10e--z11e; % vertical +else: + pickup crisp.nib; + pos8(slab,90); top y8r=h; x8=x2; lft x9r=l+letter_fit+hround.65u; + pos9(hair,180); y9=good.y(y8l-beak)-eps; + arm(8,9,i,beak_darkness,-.7beak_jut); % upper arm and beak +fi +penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Uppercase Cyrillic letter OO_cdot - Old O cdot"; +cyrchar(OO_cdot,15u#,cap_height#,0); %F width-u +if is_small_cap: getcharcode(oo_cdot); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: if serifs: interim superness:=1.05 superness; + else: interim superness:=1.075 superness; fi x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +% dot +pickup tiny.nib; +dot_diam:=min((lft x4l-rt x2l)-1, +max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr))); +pos5(dot_diam,0); pos5'(dot_diam,90); +z5=z5'; x5=x1; y5=.5[y1,y3]; dot(5,5'); % dot +penlabels(1,2,3,4, 5,5); endchar; + +lhchar "Uppercase Cyrillic letter OO_cddot - Old double cdot"; +cyrchar(OO_cddot,17u#,cap_height#,0); %F width+u +if is_small_cap: getcharcode(oo_cddot); fi +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: if serifs: interim superness:=1.05 superness; + else: interim superness:=1.075 superness; fi x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +% +_one:=5; _two:=6; _three:=7; _four:=8; +dot_diam:=min(.5(lft x4l-rt x2l)-1, +max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr))); +pickup tiny.nib; +pos[_one](dot_diam,0); pos[_two](dot_diam,90); +x[_one]=x[_two]=max(x2l+.5dot_diam+1+eps,.5w-2.25u); y[_one]=y[_two]=.5[y1,y3]; +dot([_one],[_two]); % left dot +pos[_three](dot_diam,0); penpos[_four](y[_two]r-y[_two]l,90); +y[_three]=y[_four]=y[_one]; +x[_three]=x[_four]=min(x4r-.5dot_diam-1-eps,x[_one]+4u); +dot([_three],[_four]); % right dot +penlabels(1,2,3,4, 5,6,7,8); endchar; + +lhchar "Uppercase Cyrillic letter VIZH - variant IZHITSA"; +cyrcharmoving(VIZH); if is_small_cap: cyrcharmoving(vizh); fi + +lhchar "Uppercase Cyrillic letter T_peter -- like flipped SH"; +cyrchar(T_peter,19.75u#+width_adj#,cap_height#,0); +if is_small_cap: getcharcode(t_peter); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(if monospace: 0,0 else:cap_serif_fit#,cap_serif_fit# fi); %uwlett_adj +% upper_sh;flip +if odd(fudged.cap_stem-w): change_width; fi % symmetric & all three equal +pickup tiny.nib; +pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +pos5(fudged.cap_stem,0); pos6(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=top y5=h; bot y2=bot y4=bot y6=0; +lft x5l=lft x6l=hround (.5[x1,x3]-.5cap_stem); % middle stem point +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +filldraw stroke z5e--z6e; % center stem +numeric inner_jut,arm_thickness; +arm_thickness=vround(slab+vair_corr); +if serifs: + begingroup + save slab; slab:=arm_thickness; % bottom.bar.slab + if rt x1r+cap_jut+.5u+1<=lft x5l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x5l-inner_jut; fi + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(6,5,k,1/3,inner_jut,m,1/3,inner_jut); % lower center serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif + endgroup; + inner_jut:=min(.5(lft x3l-rt x1r)-eps,.5cap_jut); + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + nodish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + nodish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif + fill z.b0--z.b1--z.e1--z.e0--cycle; % upper inter_serif bar +else: + save slab; slab:=arm_thickness; % upper.bar.slab + lft x2'= lft x2l; top y2'r=h; pos2'(slab,90); + rt x4'=rt x4r; y4'=y2'; pos4'(slab,90); + filldraw stroke z2'e--z4'e; fi % upper bar +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter ZELO_m - Variant ZELO mirror"; +cyrchar(ZELO_m,10u#,cap_height#,0); +if is_small_cap: getcharcode(zelo_m); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0,0); +numeric theta; theta=90-angle(50u,h); slope:=-h/50u; % angle at middle +numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; +numeric ess'; ess'=max(fine.breadth,cap_ess); +pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90); +pos0(ess',theta); pos7(s_slab,-90); +x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o; +y0=.52h; lft x3l=hround u; rt x6r=hround(w-u); +x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine; +ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; +ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; +%mirror +forsuffixes $ = 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r,6l,6,6r,7l,7,7r: + x$:=l+(r-x$); endfor; +filldraw stroke super_arc.e(2,3) & z3e{down} + ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke mirror +if serifs: + pos1(hair,180); pos8(hair,180); + rt x1l=hround(w-1.5u); lft x8r=hround u; + bot y1=vround 2/3h+1; top y8=vround 1/3h-1; + %mirror + forsuffixes $ = 1l,1,1r,8l,8,8r: x$:=l+(r-x$); y$:=y$; endfor; + filldraw stroke z1e{x2-x1,10(y2-y1)}....{right}z2e; % upper arc mirror + filldraw stroke z7e{right}....{up}z8e; % lower arc + path upper_arc, lower_arc; + upper_arc=z1{x2-x1,10(y2-y1)}....{right}z2; + lower_arc=z7{right}....{up}z8; + pos10(.3[fine.breadth,cap_hair],180); pos9(.3[fine.breadth,cap_hair],180); + x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; + x1'-x1l=x8r-x8'=1.6cap_curve-fine; y1'=y1; y8'=y8; + numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); + filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb + t:=xpart(lower_arc intersectiontimes(z9r--z8')); + filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb +else: + pos1(1.2flare,-100); pos8(1.2flare,-100); + x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u; + top y1l=vround .93h+o; bot y8r=vround .1h-o; + forsuffixes $ = 1l,1,1r,8l,8,8r: x$:=l+(r-x$); endfor; + filldraw stroke term.e(2,1,left,.9,4); % upper arc and terminal + filldraw stroke term.e(7,8,right,1,4); fi % lower arc and terminal +penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; + +lhchar "Uppercase Cyrillic letter IZHEI "; +cyrchar(IZHEI,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(izhei); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +numeric stem[],alpha[]; +y5=vround(.4h-eps); y6=vround(.6h-eps); +x5=hround (rt x1r-.5)-eps; x6=hround (lft x3l+.5)+eps; +stem1=max(tiny.breadth,fudged.hair); +penpos5(stem1,90); penpos6(stem1,90); +fill stroke z5e--z6e; % diagonal +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter LO"; +cyrchar(LO,13.5u#,cap_height#,0); % DL_width:N_width +if is_small_cap: getcharcode(lo); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi, %DL_adj + 13.5u#); % +% upper_l; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); +numeric light_hair,bot_vair,left_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +left_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit-rt x2r-.65u) fi; +bot_vair=Vround(.5[vair,light_hair]); +x3=1/3[w-rt x1r-(1/6left_jut),rt x1r] if not serifs:-.5(cap_stem-u) fi+eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(cap_hair,-180); + top y3=h; y6=1/6h-max(0,flare-stem-2vair_corr-.5); z6r=z5r; + lft x6r=l+letter_fit+hround(.5u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); bot y4r=-o; + filldraw stroke z4e{right}.. + controls (min(15/16[x4,x3],max(x4,lft x6r+2flare))+(x3e-x3)+eps,y4e) + and (x3e,good.y(min(y6-.5,1/3h)+1/3(y4e-y4))-eps)..z3e; % left tail + {{less_tense; bulb(4,5,6)}}; +else: + pos3'(slab,90); pos1'(slab,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; + pickup fine.nib; pos3(max(fine.breadth,light_hair),0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=2/3[x3l,x5r]; lft x5=l+letter_fit+hround(.35u-.5); + bot y4r=bot y5r; y3=y3'; x4l:=.25[x4,x5]; + path p; + p=stroke z3{down} + ..controls (x3,y5+.35h-eps) and (min(7/8[x4,x3],x5+2.5light_hair+.5u),y4) + ..{left}z4--z5; + z6=point .35 of p; + pos6(max(fine.breadth,7/8[bot_vair,light_hair]),angle(direction .35 of p)+90); + filldraw stroke z3e{down}...z6e{direction .35 of p}...{left}z4e--z5e; fi % arc +%%% +if serifs: x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5cap_jut); + dish_serif(2,1,a,1/3,cap_jut,b,1/3,cap_jut); %lower right serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); %upper right serif + nodish_serif(3,0,e,1/3,1.05cap_jut,f,1/3,inner_jut); %upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%% +%O_part +full_w:=13.5u; +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; _six:=12; +penpos[_one](vair',90); penpos[_three](vround(vair+1.5vair_corr),-90); +penpos[_two](cap_curve,180); penpos[_four](cap_curve,0); +x[_two]r=hround u; +x[_four]r=full_w-x[_two]r; x[_one]=x[_three]=.5full_w; y[_one]r=h+o; y[_three]r=-o; +y[_two]=y[_four]=.5h-vair_corr; y[_two]l:=y[_two]l:=.52h; +%shift +forsuffixes $ = [_one]l,[_one],[_one]r,[_two]l,[_two],[_two]r, + [_three]l,[_three],[_three]r,[_four]l,[_four],[_four]r: x$:=x$+w; endfor; +penstroke pulled_super_arc.e([_one],[_two])(.5superpull) + & pulled_super_arc.e([_two],[_three])(.5superpull) + & pulled_super_arc.e([_three],[_four])(.5superpull) + & pulled_super_arc.e([_four],[_one])(.5superpull) & cycle; % bowl +%%% +x[_five]=x[_zero]; y[_five]=y[_two]; +x[_six]=x[_two]; y[_six]=y[_five]; +pos[_five](cap_bar,90); pos[_six](cap_bar,90); +filldraw stroke z[_five]e--z[_six]e; % bar +%%%%% +penlabels(0,1,2,3,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter MO"; +cyrchar(MO,16u#+width_adj#,cap_height#,0); +if is_small_cap: getcharcode(mo); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,13.5u#); +% upper_m; +numeric stem[]; % thicknesses of the four strokes +stem1=hround(fudged.hair+stem_corr); +stem2=hround(fudged.cap_stem-4stem_corr); +stem3=hround(fudged.hair-stem_corr); +stem4=hround(fudged.cap_stem-3stem_corr); +if stem4<stem1: stem4:=stem1; fi +pickup tiny.nib; pos1(stem1,0); pos2(stem1,0); +pos3(stem4,0); pos4(stem4,0); +x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5stem4); +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0); +x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7; +if hefty: + y6=if monospace: vround 1/3h else: o fi; + numeric upper_notch,lower_notch; + upper_notch=h-cap_notch_cut; lower_notch=y6+cap_notch_cut; + x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r]; + z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l.. + if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi + {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi + ..z8r--diag_out(8r,1,8l,7l){z7-z8} + if y0<=lower_notch: ..{z7-z8}z0{z5-z6}.. + else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonals +else: + y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l]; + fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7} + ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6} + ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi % diagonals +%%% +if serifs: + serif(1,2,a,1/3,-cap_jut); % upper left serif + dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif + serif(3,4,d,1/3,cap_jut); % upper right serif + dish_serif(4,3,e,1/3,cap_jut,f,1/3,cap_jut); fi % lower right serif +%%% +%O_part +full_w:=13.5u; +_zero:=4; +_one:=9; _two:=10; _three:=11; _four:=12; _five:=13; _six:=14; +penpos[_one](vair',90); penpos[_three](vround(vair+1.5vair_corr),-90); +penpos[_two](cap_curve,180); penpos[_four](cap_curve,0); +x[_two]r=hround u; +x[_four]r=full_w-x[_two]r; x[_one]=x[_three]=.5full_w; y[_one]r=h+o; y[_three]r=-o; +y[_two]=y[_four]=.5h-vair_corr; y[_two]l:=y[_two]l:=.52h; +%shift +forsuffixes $ = [_one]l,[_one],[_one]r,[_two]l,[_two],[_two]r, + [_three]l,[_three],[_three]r,[_four]l,[_four],[_four]r: x$:=x$+w; endfor; +penstroke pulled_super_arc.e([_one],[_two])(.5superpull) + & pulled_super_arc.e([_two],[_three])(.5superpull) + & pulled_super_arc.e([_three],[_four])(.5superpull) + & pulled_super_arc.e([_four],[_one])(.5superpull) & cycle; % bowl +%%% +x[_five]=x[_zero]; y[_five]=y[_two]; +x[_six]=x[_two]; y[_six]=y[_five]; +pos[_five](cap_bar,90); pos[_six](cap_bar,90); +filldraw stroke z[_five]e--z[_six]e; % bar +%%%%% +penlabels(0,1,1',2,3,3',4,5,6,7,8); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2upi.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2upi.mf new file mode 100644 index 00000000000..dd84a7f08c0 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2upi.mf @@ -0,0 +1,765 @@ +% +% lgt2upi.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Italic Cyrillic letters 128--255 for T2 encoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 +% +% X2 T2A T2B T2C +% +% g_up "a0 "a0 - - Ghe upturn +% g_hcrs "a1 "a1 - - Ghe horisontally crossed +% g_dsc "a2 - "a2 - Ghe with descender +% g_tl "a3 - "a3 - Ghe tail +% shha "a4 "a4 "a4 "a4 Shha (same as lower h) +% zh_dsc "a5 "a5 "a5 - Zhe with descender +% z_dsc "a6 "a6 - - Ze with descender (cedilla) +% abh_dze "a7 - "a7 "a7 Abkhasian dze +% ukr_i "a8 "a8 - - Ukrainian i - latin i with umlaut (goes first for LH font) +% k_dsc "a9 "a9 "a9 "a9 Ka with descender +% k_beak "aa "aa - - Ka with reversed beak +% k_tl "ab - "ab - Ka with tail +% l_tl "ac - "ac - El with tail +% n_dsc "ad "ad "ad "ad En with descender +% ng "ae "ae "ae - Ligature en-ghe +% n_tl "af - "af "af En with tail +% +% s_dsc "b1 "b1 - - Es with descender (cedilla) +% u_shrt "b2 "b2 "b2 - Short U (goes first for LH fonts) +% y "b3 "b3 "b3 - Straingt u (as upper Y) +% y_hcrs "b4 "b4 - - Straingt u horisontally crossed +% h_dsc "b5 "b5 "b5 "b5 Kha with descender +% h_tl "b6 - "b6 - Kha with tail +% ch_ldsc "b7 - "b7 - Che with left descender +% ch_rdsc "b8 "b8 "b8 "b8 Che with right descender +% ukr_e "b9 "b9 - - Ukrainian e (goes first for wncoding and LH font) +% schwa "ba "ba "ba "ba Schwa +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Italic Cyrillic letter g_hcrs - ghe hcrossed"; % italic shape +cyrchar(g_hcrs,6.25u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e +adjust_fit(if monospace:u#,u# else: 0.5u#,0.5u# fi); +% ital_g; +pickup fine.nib; x0l=hround eps; x0'=x0; x5r=good.x(w-eps); x6=x5; +x2=.5w+2u; x3=.5w-2u; x1=x4=x7=.5[x3l,x2r]; y7=.5[y2,y3]; +h-y0=y5; top y5l=vround .5bar_height; y6=bar_height; y0'=h-bar_height; +h-y2=y3=1/4x_height; h-y1=y4; bot y4r=-oo; +pos0(hair,320); pos1(vair,270); pos2(stem,180); +pos3(stem,180); pos4(vair,270); pos5(hair,320); pos7(stem,135); +path p.l,p.r; p.l=z0'..z0..z1{right}; p.r=z4{right}..z5..z6; +filldraw stroke z0e{direction 1 of p.l} + ...z1e{right}...{down}z2e...z7e...z3e{down}...z4e{right} + ...{direction 1 of p.r}z5e; % main stroke +%%% +% hstroke +bar_stroke(x0l+.05u,w-(x0l+.05u)); +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Cyrillic letter g_dsc - ghe descender"; +cyrchar(g_dsc,6.25u#,x_height#,desc_depth#); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e +adjust_fit(if monospace:u#,u# else: 0.5u#,0.5u# fi); +% ital_g; +pickup fine.nib; x0l=hround eps; x0'=x0; x5r=good.x(w-eps); x6=x5; +x2=.5w+2u; x3=.5w-2u; x1=x4=x7=.5[x3l,x2r]; y7=.5[y2,y3]; +h-y0=y5; top y5l=vround .5bar_height; y6=bar_height; y0'=h-bar_height; +h-y2=y3=1/4x_height; h-y1=y4; bot y4r=-oo; +pos0(hair,320); pos1(vair,270); pos2(stem,180); +pos3(stem,180); pos4(vair,270); pos5(hair,320); pos7(stem,135); +path p,p_; p=z0'..z0..z1{right}; p_=z4{right}..z5..z6; +filldraw stroke z0e{direction 1 of p} + ...z1e{right}...{down}z2e...z7e...z3e{down}...z4e{right} + ...{direction 1 of p_}z5e; % main stroke +%%% +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.r; + p.r=z3r{down}...z4r{right}...{direction 1 of p_}z5r; + ogonek_breadth:=xvair; + numeric tt; % the time... + tt=if hefty: 1.8 else: 1.6 fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_pos=point tt of p.r+.5(the_pen-fine)* + unitvector((direction tt of p.r) rotated 90); + easy_ogonek(the_pen,10,11,12); % ogonek +else: + z10=z5; pos10(hair,140); i_serif(10,x); +fi +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12); endchar; + +lhchar "Italic Cyrillic letter g_tl - ghe tail"; +cyrchar(g_tl,9u#,x_height#,desc_depth#); +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %o +italcorr x_height#*slant-beak_jut#-.25u#; +adjust_fit(serif_fit#,-.25u#); +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem); top y1=h; y2-.5stem=0; +filldraw circ_stroke z2e--z1e; % stem +pos3(vair,90); pos4(vair,90); +top y3r=top y4r=h; x3=x1; rt x4r=hround(w-1.5u); +filldraw stroke z3e--z4e; +% hook(1); +pos3'(vair,90); x3'=x1; y3'=bar_height; +lft x5l=hround(w-1.5u-.5stem); y5=.45y3'; pos5(stem,0); +pos7(vair,-90); pos8(hair,-180); pos9(flare,-180); pos6(stem,0); x6=x5; +bot y6=-1/3d; bot y7r=-d-oo; y9-.5flare=-vround.9d; +x7=w-11/3u; lft x8r=min(x5-4u,lft x8r+x7-x8l+5u-eps); +filldraw stroke z3'e{right}...z5e{down}---z6e...{left}z7e; % tail +bulb(7,8,9); % bulb +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +lhchar "Italic Cyrillic letter shha (as lower h)"; +cyrchar(shha,9u#,asc_height#,0); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(0,0); pickup tiny.nib; +pos1(stem,0); pos2(stem,0); x1=x2; +lft x1l=hround(1.5u-.5stem); top y1=h; y2-.5stem=-oo; +filldraw circ_stroke z2e--z1e; % left stem +sloped_serif.l(1,2,a,1/3,jut,serif_drop); % serif +pickup fine.nib; x4+.5stem=hround(w-2.5u+.5stem); +x5=x4-.25u; ital_arch(2,3,4); % arch +x7=w; hook_out(5,6,7)(skewed); % closing hook +filldraw stroke z4e{down}..{-u,-x_height}z5e; % right stem +penlabels(1,2,3,4,5,6,7); endchar; + +lhchar "Italic Cyrillic letter zh_dsc - zhe descender"; +cyrchar(zh_dsc,20u#,x_height#,desc_depth#); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %c +adjust_fit(-.5u#,0 if monospace:-.4u# fi); %zh_adj&iserif_adj +% ital_zh; +if odd(fudged.stem-w): change_width; fi % symmetric & all three equal - AS +pickup fine.nib; pos1(flare,0); pos2(hair,0); pos3(vair,90); +pos4(curve,180); pos5(vair,270); pos6(hair,320); +if monospace: x3=x5=.5[lft x4r,rt x2r]-eps; rt x2r=good.x (w+eps); +else: x3=x5=good.x(w-3.5u); rt x2r=hround max(rt x3,w-u)+eps; fi +lft x4r=hround max(.5w+.5stem+.5,w-6.5u-.5curve+eps); x6r=good.x(w+eps); x0=x6; +y2=.5[bar_height,h]; top y3r=h+oo; bulb(3,2,1); % bulb +bot y5r=-oo; y4=.5[y3,y5]; top y6l=vround .5bar_height; y0=bar_height; +path p; p=z5{right}..z6..z0; +filldraw stroke pulled_arc.e(3,4) + & pulled_arc.e(4,5)...{direction 1 of p}z6e; % right arc +pos12(flare,180); pos11(hair,180); pos10(vair,270); +pos9(curve,360); pos8(vair,450); pos7(hair,500); +if monospace: lft x11r=good.x (-eps); x10=x8=.5[lft x11r,rt x9r]+eps; +else: x10=x8=3.5u; lft x11r=hround min(lft x10,u)-eps; fi +rt x9r=hround min(.5w-.5stem-.5,6.5u+.5curve-eps); +x7r=good.x (if not monospace:rt x11r-.67u fi-eps); x0'=x7; +y11=h-.5[bar_height,h]; bot y10r=-oo; bulb(10,11,12); % bulb +top y8r=h+oo; y9=.5[y10,y8]; bot y7l=vround (h-.65bar_height); y0'=bar_height; +path p_; p_=z8{left}..z7..z0; +filldraw stroke pulled_arc.e(10,9) + & pulled_arc.e(9,8)...{direction 1 of p_}z7e; % left arc +y13=bar_height; x13=x4; y14=y13; x14=w-x4; x15=x16=.5w; +y15+.5stem=h+oo; bot y16=0; +pos13(vair,90); pos14(vair,90); pos15(fudged.stem,0); pos16(fudged.stem,0); +filldraw stroke z13e--z14e; filldraw circ_stroke z15e--z16e; % stem & cross +%%% +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.r; + p.r=pulled_arc.r(4,5)...{direction 1 of p}z6r; + ogonek_breadth:=xvair; + numeric tt; % the time... + tt=if hefty: 2.8 else: 2.6 fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_pos=point tt of p.r+.5(the_pen-fine)* + unitvector((direction tt of p.r) rotated 90); + easy_ogonek(the_pen,17,18,19); % ogonek +else: + z17=z6; pos17(hair,140); i_serif(17,x); +fi +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, 17,18,19); endchar; + +lhchar "Italic Cyrillic letter z_dsc - ze descender (cedilla)"; +cyrchar(z_dsc,8u#,x_height#,desc_depth#); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %e +adjust_fit(0,0); +% ital_z; +pickup fine.nib; pos0(flare,180); pos1(hair,180); pos2(vair,-90); +pos7(curve,0); pos8(curve,0); pos4(vair,90); pos5(hair,160); +pos3(vair,90); pos3'(vair,-90); pos9(vair,90); pos9'(vair,-90); +x2=x4=.5(w-u); lft x1r=min(lft x2,hround(.25u))-eps; +lft x5r=good.x x1r+.15u+eps; x6=x5; +y1=.5bar_height; bot y2r=-oo; bulb(2,1,0); % bulb +rt x7r=w-hround(1.5u-.5curve); rt x8r=w-hround(2u-.5curve); +top y4r=h+oo; y7=.5[y2,y3]; y5r=y8=.5[y3,y4]; y6=bar_height; +x3=x2; lft x9=hround min(lft x2-1-eps,rt x0l+1+eps); +y3=y9=bar_height; z9'=z9; z3'=z3; +path p; p=z4{left}..(x5,h-.52bar_height)..z6; +filldraw stroke z9e{right}...pulled_arc.e(3,7) & pulled_arc.e(7,2); % lower arc +filldraw stroke z9'e{right}...pulled_arc.e(3',8) & pulled_arc.e(8,4) + ...{direction 1 of p}z5e; % upper arc +%%% +% italic cedilla/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.r; + p.r=z1r{down}...pulled_arc.r(2,7); + ogonek_breadth:=xvair; + numeric tt; % the time... + tt=if hefty: 1.2 else: 1.2 fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_move=-oo; + ogonek_pos=point tt of p.r+.5(the_pen-fine)* + unitvector((direction tt of p.r) rotated 90); + easy_ogonek(the_pen,10,11,12); % ogonek +else: + lowercase_cedilla(x2,-oo, 10,11,12,13,14); +fi +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14); endchar; + +lhchar "Italic Cyrillic letter abh_dze - Abkhasian dze"; +cyrchar(abh_dze,8u#,x_height#,desc_depth#); +italcorr x_height#*slant-.5serif_fit#-.3u#; +adjust_fit(0,.5serif_fit#); +numeric arm_thickness[],z_stem,stem[]; stem1=.75stem; +if hefty: + arm_thickness1=stem1; arm_thickness2=stem1; + z_stem=fudged.hair-2stem_corr; +else: + arm_thickness1=stem1; arm_thickness2=stem1; z_stem=fudged.hair; fi +if arm_thickness1<tiny.breadth: arm_thickness1:=tiny.breadth; fi +pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u); +lft x3l=lft x4l=hround .3[.5u, w-.8u]; +top y1=h; y2=min(y1,h-2/3arm_thickness1); +bot y4=.3[0,h]; y3=max(y4,2/3arm_thickness2); +numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l); +penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0); +penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0); +pair delta; delta=penoffset z3-z2 of currentpen; +fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround .75u; +bot y6=2/3x_height-.5fine;%max(good.y(top y5r-vair-beak/1.4)-eps,y3+1) +arm(5,6,a,beak_darkness,-.4beak_jut); % upper arm and beak +pickup fine.nib; pos11(vair,-90); +pos12(vair,180); x12r=x3l; +x8=x13=hround .5[.5u, w-.8u]; +pos7(curve,0); rt x7r=hround(w-.75u); +lft x11=lft x4; +pos8(vair,-90); bot y8r=-d-oo; pos13(vair, 90); y13=.1[y3,y5]; +y7=.5[bot y13l,top y8l]; top y11l=top y4l; +y3=y12; +filldraw stroke z12e{z2l-z3l}...{right}z13e; %link +filldraw stroke pulled_arc.e(13,7) & pulled_arc.e(7,8); % bowl + numeric bulb_diam[]; bulb_diam2=flare; + pos10(bulb_diam2,-180); pos9(cap_hair,-180); + lft x10r=hround .75u; y10=-.3d; + bulb(8,9,10); % lower bulb +penlabels(1,2,3,4,5,6,7,8,9,10,12,13); endchar; + +% Ukrainian i moved up for LH font + +lhchar "Italic Cyrillic letter k_dsc - ka descender"; +cyrchar(k_dsc,9u#,x_height#,desc_depth#); +italcorr x_height#*slant; +adjust_fit(0,.1u#); %iserif_adj +% ital_k;dsc +pickup fine.nib; x2-.5stem=hround(2.5u-.5stem); +%ihalfstem; +if monospace: + pos2(stem,0); top y2=h; +else: + x0=0; hook_in(0,1,2); fi % opening hook +pos2'(stem,0); pos1'(stem,0); z2'=z2; x1'=x2'; y1'-.5stem=-oo; +filldraw circ_stroke z1'e--z2'e; % left stem +pos3(vair,90); x3=x1'; y3=bar_height; +pos4(vair,90); x4=w-2u; top y4r=x_height+oo; +filldraw stroke z3e{right}..{right}z4e; % upper diagonal +pos5(hair,0); pos6(flare,0); +rt x5r=hround(w-.5u); y5+.5flare=vround(bot y4l-.03x_height); +bulb(4,5,6); % bulb +pos7(stem,0); pos8(vair,90); pos9(vair,180); +x9+.5hair=hround(w+.5hair-eps); y9=.4bar_height; %!!! +lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; +filldraw stroke z3e{right}...z7e{down} + ...z8e{right}...{up}z9e; % lower diagonal +%%% +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.l; + p.l=z7l{down}...z8l{right}...{up}z9l; + ogonek_breadth:=xvair; + ogonek_pos=point .9 of p.l; + easy_ogonek(the_pen,10,11,12); % ogonek +else: + i_serif(9,q); +fi +penlabels(1,2,3,4,5,6,7,8,9, 10,11,12); endchar; + +lhchar "Italic Cyrillic letter k_beak - ka beak"; +cyrchar(k_beak,9u#,x_height#,0); +italcorr x_height#*slant; +adjust_fit(max(2u#,u#+stem#) if monospace: -u# fi,0); +% ital_k;beak +pickup tiny.nib; pos1(stem,0); pos2(stem,0); x1=x2; +lft x1l=hround(2.5u-.5stem); top y1=h; y2-.5stem=-oo; +filldraw circ_stroke z2e--z1e; % left stem +pos3(vair,90); x3=x1; y3=bar_height; +pos4(vair,90); x4=w-2u; top y4r=x_height+oo; +filldraw stroke z3e{right}..{right}z4e; % upper diagonal +pos5(hair,0); pos6(flare,0); +rt x5r=hround(w-.5u); y5+.5flare=vround(bot y4l-.03x_height); +bulb(4,5,6); % bulb +pos7(stem,0); pos8(vair,90); pos9(hair,180); +x9+.5hair=hround(w+.5hair-eps); y9=1/3x_height; +lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; +filldraw stroke z3e{right}...z7e{down}...z8e{right}...{up}z9e; % lower diagonal +% italic beak +pickup fine.nib; +pos10(stem,180); pos11(stem,180); pos12(vair,90); pos13(vair,90); +lft x10r=l+letter_fit if monospace:-.5stem else:+.25u fi; +y10-.5stem=2/3x_height-.5fine; +x13=x2; top y13r=top y12r=x_height; x11=x10; y11=bot y12l-.25flare; +x12-.25flare=rt x10l; x12r:=lft x10r+(top y12r-y11); +filldraw circ_stroke z10e{up}--z11e{up}...z12e{right}--z13e; % ital_beak; +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Italic Cyrillic letter k_tl - ka tail"; +cyrchar(k_tl,9u#,x_height#,desc_depth#); +italcorr x_height#*slant; +adjust_fit(0,0); pickup fine.nib; +x2-.5stem=hround(2.5u-.5stem); +%ihalfstem; +if monospace: pos2(stem,0); top y2=h; +else: x0=0; hook_in(0,1,2); fi % opening hook +z2'=z2; pos2'(stem,0); x11=x2'; y11-.5stem=-oo; pos11(stem,0); +filldraw circ_stroke z11e--z2'e; % left stem +pos3(vair,90); x3=x11; y3=bar_height; +pos4(vair,90); x4=w-2u; top y4r=x_height+oo; +filldraw stroke z3e{right}..{right}z4e; % upper diagonal +pos5(hair,0); pos6(flare,0); +rt x5r=hround(w-.5u); y5+.5flare=vround(bot y4l-.03x_height); +bulb(4,5,6); % bulb +pos7(stem,0); lft x7l=hround(w-1.5u-.5stem); y7=1/2y3; +% hook;k +pos9(vair,-90); pos10(hair,-180); pos12(flare,-180); pos8(stem,0); x8=x7; +bot y8=-1/3d; bot y9r=-d-oo; y12-.5flare=-vround.9d; +x9=w-11/3u; lft x10r=min(x7-4u,lft x10r+x9-x10l+5u-eps); +filldraw stroke z3e{right}...{down}z7e--z8e{down}...{left}z9e; +bulb(9,10,12); % bulb +penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Italic Cyrillic letter l_tl - el tail"; +cyrchar(l_tl,8u#,x_height#,desc_depth#); %-u +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(.5u#,0); +% ital_l;tl +pickup fine.nib; +pos1(vair,-90); pos2(stem,180); pos3(hair,0); pos7(stem,0); %!!! +pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); +top y1l=h+oo; x1=.5[x3,x2]; +x3=3u; y3=.35h; +y6-.5flare=.1h; lft x6r=-.25u; z5r=z6r; +bot y4r=-oo; x4=max(.4[lft x6r,rt x3r],lft x6r+.5flare-eps); +y7=.8h; lft x7l=hround(w-1.5u-.5stem); z7=z2; %!!! +bulb(4,5,6); % bulb +filldraw stroke pulled_arc.e(4,3) + & super_arc.e(3,1) & super_arc.e(1,2); % left stem +% hook; +pos9(vair,-90); pos10(hair,-180); pos11(flare,-180); pos8(stem,0); x8=x7; +bot y8=-1/3d; bot y9r=-d-oo; y11-.5flare=-vround.9d; +x9=w-11/3u; lft x10r=min(x7-4u,lft x10r+x9-x10l+5u-eps); +filldraw stroke z7e--z8e{down}...{left}z9e; +bulb(9,10,11); % bulb +penlabels(1,2,3,4,5,6,7,8,9,11); endchar; + +lhchar "Italic Cyrillic letter n_dsc - en descender"; +cyrchar(n_dsc,10u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(0,.1u#); %iserif_adj +% ital_n;dsc +pickup fine.nib; x2=x3; pos3(stem,0); lft x3l=hround(2.5u-.5stem); +%ihalfstem; +if monospace: + pos2(stem,0); top y2=h; +else: + x0=0; hook_in(0,1,2); fi % opening hook +y3-.5stem=-oo; +filldraw circ_stroke z3e--z2e; +x10=x3l; y10=y11=bar_height; pos10(vair,90); pos11(vair,90); +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); y6+.5stem=h; +pos7(stem,0); pos8(vair,90); pos9(vair,180); x6=x7; +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; % closing hook +filldraw circ_stroke z6e--z7e; +x11=x6l; +filldraw stroke z10e--z11e; +%%% +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.l; + p.l=z7l{-.5u,-x_height}...z8l{right}...{up}z9l; + ogonek_breadth:=xvair; + ogonek_pos=point .9 of p.l; + easy_ogonek(the_pen,12,13,14); % ogonek +else: + i_serif(9,x); +fi +penlabels(0,1,2,3,4,5,6,7,8,9,10,11, 12,13,14); endchar; + +lhchar "Italic Cyrillic letter n_tl - en tail"; +cyrchar(n_tl,9u#,x_height#,desc_depth#); %-u +italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi; %o +adjust_fit(0,0); +pickup fine.nib; x2=x3; pos3(stem,0); lft x3l=hround(2.5u-.5stem); +%ihalfstem; +if monospace: + pos2(stem,0); top y2=h; +else: + x0=0; hook_in(0,1,2); fi % opening hook +y3-.5stem=-oo; +filldraw circ_stroke z3e--z2e; % left stem +% +pos4(stem,0); rt x4r=hround(w-1.5u+.5stem); y4+.5stem=h; x5=x4; +pos6(vair,-90); pos7(hair,-180); pos8(flare,-180); pos5(stem,0); +bot y5=-1/3d; bot y6r=-d-oo; y8-.5flare=-vround.9d; +x6=w-11/3u; lft x7r=min(x4-4u,lft x7r+x6-x7l+5u-eps); +filldraw circ_stroke z4e--z5e{down}...{left}z6e; % right stem and hook +bulb(6,7,8); % bulb +x9=x3r; y9=y10=bar_height; pos9(vair,90); pos10(vair,90); +x10=x4l; +filldraw stroke z9e--z10e; % bar +penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +lhchar "Italic Cyrillic letter s_dsc - es descender (cedilla)"; +cyrchar(s_dsc,8u#,x_height#,desc_depth#); +italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; +adjust_fit(if monospace:0 else:-.35u#fi,0); +% ital_s; +pickup fine.nib; pos0(flare,0); pos1(hair,0); pos2(vair,90); +pos3(curve,180); pos4(vair,270); pos5(hair,320); +x2=x4=.5(w+u); rt x1r=max(rt x2,hround(w-u))+eps; +lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; +y1=.5[bar_height,h]; top y2r=h+oo; bulb(2,1,0); % bulb +bot y4r=-oo; y3=.5[y2,y4]; top y5l=vround .5bar_height; y6=bar_height; +path p; p=z4{right}..z5..z6; +filldraw stroke pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +% italic cedilla/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.r; + p.r=pulled_arc.r(3,4)...{direction 1 of p}z5r; + ogonek_breadth:=xvair; + numeric tt; % the time... + tt=if hefty: 2.8 else: 2.6 fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_pos=point tt of p.r+.5(the_pen-fine)* + unitvector((direction tt of p.r) rotated 90)-(ogonek_breadth-the_pen,0); + easy_ogonek(the_pen,7,8,9); % ogonek +else: + lowercase_cedilla(x4,-oo, 7,8,9,10,11); +fi +penlabels(0,1,2,3,4,5,6, 7,8,9,10,11); endchar; + +% Short U moved up for LH fonts + +lhchar "Italic Cyrillic letter y - straight u (as upper Y)"; +cyrchar(y,9.5u#,x_height#,desc_depth#); +italcorr x_height#*slant+.25u#; +adjust_fit(.25u#,max(u#,.5u#+.5flare#)); %izhy_adj +% ital_y; +numeric left_stem,right_stem,outer_jut,dy,alpha; left_stem=stem-stem_corr; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); outer_jut=.75jut; +x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; +x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; +y2=y3=y5=0; dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); +penpos4(alpha*right_stem,0); penpos4'(alpha*right_stem,0); +penpos5(left_stem,0); penpos6(left_stem,0); +x5=x6; y6=-d; z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos7(vair,90); penpos8(hair,0); penpos9(flare,0); +x7=.5[x4',rt x8r]; y7r=h+oo; +y4'=min(.9x_height,y7l-vair); z4'=whatever[z3,z4]; +rt x8r=hround(r-.5u-.5); +y8=max(vround(y7r-.5hair)-.5flare-1, + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); +cyrbulb(7,8,9); % bulb +y1'=3/4x_height; z1'=whatever[z1,z2]; penpos1'(alpha*left_stem,0); +x10=l+letter_fit; x10:=hround(x10-.5hair)+.5hair; y10=2/3x_height; +penpos11(vair,90); top y11r=x_height+oo; x11=min(x1l-.5,x10+u); +if y0>y2+notch_cut: + y0:=y2+notch_cut; + fill z0+.5right{up}...{z4-z3}z4'l...{right}z7r--z7l{left} + ...{z5r-z4'r}z4'r--z5r--z6r--z6l--z5l-- + z1'l{z1-z2}...{left}z11l--z11r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + ...{down}z0+.5left--cycle; % diagonals and stem +else: fill z0--z4'l...{right}z7r--z7l{left} + ...z4'r--z5r--z6r--z6l--z5l-- + z1'l{z1-z2}...{left}z11l--z11r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + --cycle; fi % diagonals and stem +pickup fine.nib; +pos10(hair,180); pos11'(vair,90); z11'=z11; +filldraw stroke z10e{up}...z11'e{right}; % hook +pickup tiny.nib; prime_points_inside(6,5); +dish_serif(6',5,e,1/3,jut,f,1/3,jut); % lower serif +%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar; + +lhchar "Italic Cyrillic letter y_hcrs - straight u hcrossed"; +cyrchar(y_hcrs,9.5u#,x_height#,desc_depth#); +italcorr x_height#*slant+.25u#; +adjust_fit(.25u#,max(u#,.5u#+.5flare#)); %izhy_adj +% ital_y; +numeric left_stem,right_stem,outer_jut,dy,alpha; left_stem=stem-stem_corr; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); outer_jut=.75jut; +x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; +x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; +y2=y3=y5=0; dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); +penpos4(alpha*right_stem,0); penpos4'(alpha*right_stem,0); +penpos5(left_stem,0); penpos6(left_stem,0); +x5=x6; y6=-d; z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +penpos7(vair,90); penpos8(hair,0); penpos9(flare,0); +x7=.5[x4',rt x8r]; y7r=h+oo; +y4'=min(.9x_height,y7l-vair); z4'=whatever[z3,z4]; +rt x8r=hround(r-.5u-.5); +y8=max(vround(y7r-.5hair)-.5flare-1, + min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); +cyrbulb(7,8,9); % bulb +y1'=3/4x_height; z1'=whatever[z1,z2]; penpos1'(alpha*left_stem,0); +x10=l+letter_fit; x10:=hround(x10-.5hair)+.5hair; y10=2/3x_height; +penpos11(vair,90); top y11r=x_height+oo; x11=min(x1l-.5,x10+u); +if y0>y2+notch_cut: + y0:=y2+notch_cut; + fill z0+.5right{up}...{z4-z3}z4'l...{right}z7r--z7l{left} + ...{z5r-z4'r}z4'r--z5r--z6r--z6l--z5l-- + z1'l{z1-z2}...{left}z11l--z11r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + ...{down}z0+.5left--cycle; % diagonals and stem +else: fill z0--z4'l...{right}z7r--z7l{left} + ...z4'r--z5r--z6r--z6l--z5l-- + z1'l{z1-z2}...{left}z11l--z11r{right} + ..tension atleast .75 and 1..{z2-z1}z1'r + --cycle; fi % diagonals and stem +pickup fine.nib; +pos10(hair,180); pos11'(vair,90); z11'=z11; +filldraw stroke z10e{up}...z11'e{right}; % hook +pickup tiny.nib; prime_points_inside(6,5); +dish_serif(6',5,e,1/3,jut,f,1/3,jut); % lower serif +%%% +% cross +pickup fine.nib; +numeric middle_weight; +middle_weight=max(fine.breadth,.6[thin_join,vair]); +x13-x14=.5w; .5[x13,x14]=x5; y13=y14=y5-.5middle_weight; % =.375h; +pos13(middle_weight,90); pos14(middle_weight,90); +filldraw stroke z13e--z14e; +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Italic Cyrillic letter h_dsc - kha descender"; +cyrchar(h_dsc,if monospace:6.5u# else:7.5u# fi+max(1.5u#,flare#), % !rusw + x_height#,desc_depth#); +italcorr max(1/3x_height#*slant+.5hair#+.5u#,x_height#*slant+.25u#); +adjust_fit(0,.1u#); %iserif_adj +pickup fine.nib; +% ital_h; +pos0(hair,180); pos1(vair,90); pos2(stem,0); +pos3(stem,-180); pos4(vair,-90); pos5(hair,0); +y0=y2=2/3h; y3=y5=1/3h; top y1r=h+oo; bot y4r=-oo; +rt x2r=hround(.5w+.5stem-eps); x2=x3; +x0-.5hair=hround-.5hair; x5+.5hair=hround(w+.5hair-eps); +x1=.5[x0,x2]; x4=.5[x3,x5]; +filldraw stroke z0e{up}...pulled_arc.e(1,2); % opening hook +filldraw z2l--z3r--z3l--z2r--cycle; % stem +filldraw stroke pulled_arc.e(3,4)...{up}z5e; % closing hook +pos3'(hair,180); pos6(hair,180); pos7(vair,90); +pos8(hair,0); pos9(flare,0); +x3'l=x6l=x3l; y3'=y3; y6=3/4h; x7=.5[x8,x2]; top y7r=h+oo; +rt x8r=hround(w-.25u); y8+.5flare=vround(bot y7l-.03x_height); +filldraw stroke z3'e---z6e...{right}z7e; bulb(7,8,9); % upper link and bulb +pos2'(hair,0); pos16(hair,0); pos17(vair,-90); +pos18(hair,-180); pos19(flare,-180); +x2'l=x16l=x2l; y2'=y2; y16=1/4h; x17=.5[x18,x3]; bot y17r=-oo; +lft x18r=hround.25u; y18-.5flare=vround(top y17l+.03x_height); +filldraw stroke z2'e---z16e...{left}z17e; bulb(17,18,19); % lower link and bulb +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.r; + p.r=pulled_arc.r(3,4)...{up}z5r; + ogonek_breadth:=xvair; + numeric tt; % the time... + tt=if hefty: 2.4 else: 2.3 fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_pos=point tt of p.r+.5(the_pen-fine)* + unitvector((direction tt of p.r) rotated 90); + easy_ogonek(the_pen,10,11,12); % ogonek +else: + z20=z5; pos20(hair,180); i_serif(20,x); +fi +penlabels(0,1,2,3,4,5,6,7,8,9,16,17,18,19, 10,11,12); endchar; + +lhchar "Italic Cyrillic letter h_tl - kha tail"; +cyrchar(h_tl,if monospace:6.5u# else:7.5u# fi+max(1.5u#,flare#), % !rusw + x_height#,desc_depth#); +italcorr max(1/3x_height#*slant+.5hair#+.5u#,x_height#*slant+.25u#); %x +adjust_fit(if monospace: 0,.1u# else:0.25u#,0.15u#fi); %&iserif_adj +% ital_h; +pickup fine.nib; pos0(hair,180); pos1(vair,90); pos2(stem,0); +pos3(stem,-180); pos4(vair,-90); pos5(hair,0); +y0=y2=2/3h; y3=y5=1/3h; top y1r=h+oo; bot y4r=-oo; +rt x2r=hround(.5w+.5stem-eps); x2=x3; +x0-.5hair=hround-.5hair; x5+.5hair=hround(w+.5hair-eps); +x1=.5[x0,x2]; x4=.5[x3,x5]; +filldraw stroke z0e{up}...pulled_arc.e(1,2); % opening hook +filldraw z2l--z3r--z3l--z2r--cycle; % stem +filldraw stroke pulled_arc.e(3,4)...{up}z5e; % closing hook +pos3'(hair,180); pos6(hair,180); pos7(vair,90); pos8(hair,0); pos9(flare,0); +x3'l=x6l=x3l; y3'=y3; y6=3/4h; x7=.5[x8,x2]; top y7r=h+oo; +rt x8r=hround(w-.25u); y8+.5flare=vround(bot y7l-.03x_height); +filldraw stroke z3'e---z6e...{right}z7e; bulb(7,8,9); % upper link and bulb +pos2'(hair,0); pos16(hair,0); pos17(vair,-90); +pos18(hair,-180); pos19(flare,-180); +x2'l=x16l=x2l; y2'=y2; y16=1/4h; x17=.5[x18,x3]; bot y17r=-oo; +lft x18r=hround.25u; y18-.5flare=vround(top y17l+.03x_height); +filldraw stroke z2'e---z16e...{left}z17e; bulb(17,18,19); % lower link and bulb +% dzhe middle descender +path p.r; numeric t; t=if hefty: 2.4 else: 2.3 fi; +p.r=pulled_arc.r(3,4)...{up}z5r; +_zero:=10; _one:=11; _two:=12; _three:=13; +penpos[_zero](xvair,0); z[_zero]r=point t of p.r; +penpos[_one](xvair,0); x[_one]=x[_zero]+2/3u; y[_one]=-1/3d; +penpos[_two](2/3[bar,fudged.stem-2stem_corr],-90); +x[_two]=.5[x[_one],x[_three]]; y[_two]=-.8d; +penpos[_three](xvair,-180); +x[_three]=x[_one]-5u; y[_three]=y[_two]+ypart the_tip_pos; +pickup pencircle scaled 1; +fill circ_stroke z[_three]e{down} + ...{right}z[_two]e...z[_one]e..{dir (360-the_pre_angle)}z[_zero]e; % middle descender +penlabels(0,1,2,3,4,5,6,7,8,9,16,17,18,19, 10,11,12,13); endchar; + +lhchar "Italic Cyrillic letter ch_ldsc - che left descender"; +cyrchar(ch_ldsc,9.5u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(0,0); +% ital_ch; +pickup fine.nib; interim superness:=more_super; +x2=x3; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: + pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); + filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: + x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); +x5=x6=x7; x9=w; hook_out(7,8,9); % closing hook +bot y4r=.75bar_height; y5=.75h; y3=min(y2-eps,.7[y4,y5]); y6+.5stem=h; +filldraw stroke z2'e...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +%%% +% dzhe middle descender +path p.r; numeric t; t=if hefty: 1.3 else: 1.25 fi; +p.r=z7l{-.5u,-x_height}...z8l{right}...{up}z9l; +_zero:=10; _one:=11; _two:=12; _three:=13; +penpos[_zero](xvair,0); z[_zero]r=point t of p.r; +penpos[_one](xvair,0); x[_one]=x[_zero]+2/3u; y[_one]=-1/3d; +penpos[_two](2/3[bar,fudged.stem-2stem_corr],-90); +x[_two]=.5[x[_one],x[_three]]; y[_two]=-.8d; +penpos[_three](xvair,-180); +x[_three]=x[_one]-5u; y[_three]=y[_two]+ypart the_tip_pos; +pickup pencircle scaled 1; +fill circ_stroke z[_three]e{down} + ...{right}z[_two]e...z[_one]e..{dir (360-the_pre_angle)}z[_zero]e; % middle descender +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13); endchar; + +lhchar "Italic Cyrillic letter ch_rdsc - che right descender"; +cyrchar(ch_rdsc,9.5u#,x_height#,desc_depth#); +italcorr 1/3x_height#*slant+.5hair#+.5u#; +adjust_fit(0,.1u#); %iserif_adj +% ital_ch;dsc +pickup fine.nib; interim superness:=more_super; +x2=x3; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); +% left shstem; +if monospace: pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; + pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal +else: x0=0; hook_in(0,1,2)(skewed); fi % opening hook +pos2'(stem,-180); z2'=z2; +pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5]; +pos6(stem,0); rt x6r=hround(w-2.5u+.5stem); x5=x6=x7; +pos7(stem,0); pos8(vair,90); pos9(vair,180); +x9=w; y9=y7=.4bar_height; x8=.5[x7,x9]; bot y8l=-oo; +filldraw circ_stroke z7e{-.5u,-x_height}...z8e{right}...{up}z9e; % closing hook +bot y4r=.75bar_height; y5=.75h; y3=min(y2-eps,.7[y4,y5]); y6+.5stem=h; +filldraw stroke z2'e...super_arc.e(3,4)...{up}z5e; % left stem and arc +filldraw circ_stroke z6e--z7e; % right stem +%%% +% italic descender/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen else: fine fi + enddef; + path p.l; + p.l=z7l{-.5u,-x_height}...z8l{right}...{up}z9l; + ogonek_breadth:=xvair; + ogonek_pos=point .9 of p.l; + easy_ogonek(the_pen,10,11,12); % ogonek +else: + i_serif(9,x); +fi +penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12); endchar; + +lhchar "Italic Cyrillic letter schwa"; +cyrchar(schwa,8u#,x_height#,0); +italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); +adjust_fit(0,if monospace:0 else:-.35u#fi); +% ital_schwa; +pickup fine.nib; %numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo +pos0(vair,90); pos1(heavy_hair,180); pos2(vair,-90); +pos3(curve,0); pos4(vair,90); pos5(hair,140); +x0=lft x3l; lft x1r=hround(1u-.5heavy_hair); x2+.5u=x4=.5(w-u); +rt x3r=hround(w-1.5u+.5curve); +lft x5r=good.x (lft x1r+eps); x6=x5; +y0=y3=y6=bar_height; y1=.5[y0,y2]; bot y2r=-oo; top y4r=h+oo; +bot y5l=vround 1/3[bar_height,x_height]; path p; p=z4{left}..z5..z6;%%y5l=2/3x_height; +filldraw stroke z0e{left}...z1e{down}...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc +penlabels(1,2,3,4,5); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2upl.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2upl.mf new file mode 100644 index 00000000000..39e06c0fed2 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2upl.mf @@ -0,0 +1,1226 @@ +% +% lgt2upl.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lowercase Cyrillic letters 128--255 for T2 encoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 +% +% X2 T2A T2B T2C +% +% g_hcrs "a1 "a1 - - Ghe horisontally crossed +% g_dsc "a2 - "a2 - Ghe with descender +% g_tl "a3 - "a3 - Ghe tail +% shha "a4 "a4 "a4 "a4 Shha (same as lower h) +% zh_dsc "a5 "a5 "a5 - Zhe with descender +% z_dsc "a6 "a6 - - Ze with descender (cedilla) +% abh_dze "a7 - "a7 "a7 Abkhasian dze +% k_dsc "a9 "a9 "a9 "a9 Ka with descender +% k_beak "aa "aa - - Ka with reversed beak +% k_tl "ab - "ab - Ka with tail +% l_tl "ac - "ac - El with tail +% n_dsc "ad "ad "ad "ad En with descender +% n_tl "af - "af "af En with tail +% +% s_dsc "b1 "b1 - - Es with descender (cedilla) +% y "b3 "b3 "b3 - Straingt u (as upper Y) +% y_hcrs "b4 "b4 - - Straingt u horisontally crossed +% h_dsc "b5 "b5 "b5 "b5 Kha with descender +% h_tl "b6 - "b6 - Kha with tail +% ch_ldsc "b7 - "b7 - Che with left descender +% ch_rdsc "b8 "b8 "b8 "b8 Che with right descender +% schwa "ba "ba "ba "ba Schwa +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Lowercase Cyrillic letter g_hcrs - ghe hcrossed"; +cyrchar(g_hcrs,8u#-.5width_adj#,x_height#,0); +italcorr x_height#*slant-beak_jut#+.25u#; %Gamma->x_height+.5u# +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ 0); +% lower_g; +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(Vround(vair-vair_corr),90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.45u); y4=good.y(y3l-beak/1.4)-eps; +arm(3,4,e,beak_darkness,.4beak_jut); % upper arm and beak +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,.5jut); % upper serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,1.25jut); fi % lower serif +%%%%% +% hstroke +bar_stroke(hround 1/3u-serif_fit,tiny.rt x1r+1.8u); +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter g_dsc - ghe descender"; +cyrchar(g_dsc,8u#-.5width_adj#,x_height#, + if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-beak_jut#+.25u#; %Gamma->x_height+.5u# +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ 0); +begingroup +% lower_g; +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(Vround(vair-vair_corr),90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.45u); y4=good.y(y3l-beak/1.4)-eps; +arm(3,4,e,beak_darkness,.4beak_jut); % upper arm and beak +%%% +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,.5jut); % upper bracketing + if is_ogonek: + slab:=vair; % lower.slab %!!! + dish_serif(2,1,c,1/3,jut,d,1/3,1.25jut); fi %!!! % lower serif +fi +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,5,6,7); % ogonek +else: + slab:=vair; % lower.slab + numeric right_jut; + right_jut=if serifs: 1.414jut else: .5stem+.5u fi; + r_serif(2,1,o,1/3,jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(0,1,2,3,4, 5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter g_tl - ghe tail"; +cyrchar(g_tl,if monospace:8u#-.5width_adj# else:10u# fi,x_height#,desc_depth#); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ 0); +full_w:=w; w:=8u-.5width_adj; +% lower_g; +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +lft x1l=lft x2l=hround (2.5u-.5stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(Vround(vair-vair_corr),90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.45u); +y4=good.y(y3l-if monospace: beak/1.4 else:.5beak fi)-eps; %!!! +arm(3,4,e,beak_darkness,.35beak_jut); %!!! upper arm and beak +%%% +if serifs: + save slab; slab:=Vround(vair-vair_corr); % lower.slab + nodish_serif(1,2,a,1/3,jut,b,1/3,.5jut); fi % upper serif + %slab:=vair; % lower.slab + %dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); fi % lower serif +%%%%% +pickup tiny.nib; +w:=full_w if monospace:+u fi; +% tail_part(2); +_zero:=2; +_one:=5; _two:=6; _three:=7; _four:=8; _five:=9; +_six:=10; _seven:=11; _eight:=12; _nine:=13; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); +set_bar_axis; y[_one]r=y[_two]r=y2.bh; y[_one]l=y[_two]l=y1.bh; +penpos[_three](max(currentbreadth+eps,curve if hefty:-3stem_corr fi),0); +y[_three]=.5[y[_one]r,-d]; +x[_two]l=x[_two]r=w-4.75u; x[_one]l=x[_one]r=x[_zero]; +x[_three]r=hround(w-u); x[_two]l:=x[_four]l:=x[_two]r-.25curve; +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_five]=z[_three]; pos[_five](curve if hefty:-3stem_corr fi,0); + pos[_six](vair,-90); bot y[_six]r=-d-oo; y[_seven]-.5flare=-.85d; + pos[_seven](hair,-180); pos[_eight](bulb_diam,-180); + rt x[_eight]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-3.5u if monospace: / expansion_factor fi); + z[_seven]r=z[_eight]r; + x[_six]=max(rt x[_eight]l,.6[x[_five],x[_seven]r]); + (x,y[_six]r)=whatever[z[_six]l,z[_five]l]; + x[_six]r:=max(x,.5[x[_seven]r,x[_six]]); + filldraw stroke super_arc.e([_five],[_six]); + bulb([_six],[_seven],[_eight]); % bulb +else: + pickup fine.nib; z[_five]=z[_three]; + pos[_five](max(fine.breadth,curve if hefty:-3stem_corr fi),0); + pos[_nine](vair',-90); pos[_six](.6[vair',flare],-105); + rt x[_six]r=x[_three]-4.5u; bot y[_six]r=-d; + bot y[_nine]r=-d-oo; x[_nine]=.35[x[_six]r,x[_three]r]; + filldraw stroke super_arc.e([_five],[_nine]) + & term.e([_nine],[_six],left,.75,4); fi +%%% +if serifs: + numeric inner_jut; + if rt x2r+jut+.5u+1<=x[_three]r: inner_jut=jut; + else: rt x2r+inner_jut+.5u+1=x[_three]r; fi + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); fi % lower serif +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; + +lhchar "Lowercase Cyrillic letter shha (as lower h)"; +cyrchar(shha,10u#,asc_height#,0); +italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#); +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +pos1'(stem',0); pos2'(stem',0); pos3(stem,0); +lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1; +top y1=h; bot y2=0; y1=y1'; y2=y2'; +filldraw stroke z1'e--z2'e; % left stem +h_stroke(2,a,3,4); % arch and right stem +if serifs: + sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif + numeric inner_jut; pickup tiny.nib; + if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi + save slab; slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif + dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif +penlabels(1,2,3,4); endchar; + +iff not specific:% +lhchar "Lowercase Cyrillic letter zh_dsc - zhe descender (`roman')"; +cyrchar(zh_dsc,if serifs:10u# else:9.5u# fi % zhk_width: n_width;keng_width + ,x_height#,if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-.2u#; +adjust_fit(w#-5u#+ %zhr_adj + if monospace: 0 else: serif_fit# fi, %wlett_adj + if monospace: 0 else: serif_fit# fi); %wlett_adj +begingroup +% lowerr_zh; +pickup tiny.nib; numeric stem[]; +stem0=max(tiny.breadth,hround(fudged.stem-stem_corr)); +if odd((r-l)-stem0): change_width; fi % symmetric & all three equal +pos1(stem0,0); pos2(stem0,0); +lft x1l=lft x2l=hround (.5[l,r]-.5fudged.stem)-eps; % middle stem point +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr);% lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi% lower stem serif +% k_rbowl;zh%monospace:+.25u +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); +stem2=max(tiny.breadth,fudged.stem-3stem_corr); +rt x3r=hround(r-letter_fit-.7u-right_jut if monospace:+.25u fi)+eps; %!!! +rt x6r=hround(r-letter_fit-.3u-right_jut if monospace:+.25u fi)+eps; %!!! +y4=.7bar_height; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + if is_ogonek: + slab:=vair; % lower.slab + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +fi +%%% +% mirror +forsuffixes $ = 3'r,3,3'l,4r,4,4l,5l,5,5r,6'l,6,6'r: + x.m$=l+(r-x$); y.m$=y$; endfor; +fill z.m4r--diag_end(.m4r,.m3'r,1,.5,.m3'l,.m4l)--z.m4l--cycle; % upper diagonal +fill z.m5l--diag_end(.m5l,.m6'l,.5,1,.m6'r,.m5r)--z.m5r--cycle; % lower diagonal +%%% +if serifs: + penpos7(alpha1*(stem1-tiny),0); penpos8(whatever,-90); + penpos10(alpha2*(stem2-tiny),0); + z7=z.m3; z8=z.m4; z9l=z.m5r; z9=z.m5; z9r=z.m5l; z10=z.m6; + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(7,8,i,1/2,right_jut,j,2/3,up_inner_jut)(dark); % upper diagonal serif + slab:=vair; % lower.slab + dish_serif(10,9,k,1/3,right_jut,l,1/2,inner_jut)(dark); fi % lower diagonal serif +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x6 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,11,12,13); % ogonek +else: + slab:=vair; % lower.slab + r_serif(6,1,o,1/3,jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(1,2,3,4,5,6,7,8,9,10, 11,12,13); endchar; + +lhchar "Lowercase Cyrillic letter z_dsc - ze descender (cedilla)"; +cyrchar(z_dsc,8u#,x_height#,desc_depth#); +italcorr .5x_height#*slant+min(.5curve#-.65u#,+.1u#); %p+.2u# +adjust_fit(if monospace: .5u#,.5u# else:0,0 fi); +% lower_z; +set_bar_axis; y4l=y5r=y6r=y2.bh; y6l=y5l=y4r=y1.bh; y6=y0.bh; +pickup fine.nib; numeric right_curve; +if serifs: right_curve=curve-stem_corr; else: right_curve=curve-3stem_corr; fi +penpos2(vair,90); penpos3(max(vair+stem_corr,right_curve-stem_corr),0); +penpos7(max(vair'+stem_corr,right_curve),0); penpos8(vair',-90); +y2r=vround(h+1.5oo); x2=x6l=x6r=x8=.5(w-u); x7r=hround(w-.6u); +x3r=min(rt x7r-1,hround(w-.8u)); y3=.5[y4l,y2l]+eps; y8r=-oo; +y7=.5[y6l,y8l]; x4l=x4r=1/3[x5l,x3l]; +if serifs: + pos1(hair,180); pos9(hair,-180); + lft x1r=lft x9r+.1u=hround.5u; + y1=min(y2.bh+flare-.25vair+eps,.9[bar_height,h]-.75flare); + y9=max(good.y(.5bar_height-.9),y8l+vair'); +else: + pos1(4/7[vair,flare],115); pos9(.6[vair',flare],-115); + lft x1r=good.x .6u; lft x9r=good.x .5u; + top y1r=vround .82[bar_height,y2r]; + y9r=good.y(y9r+1/3bar_height-y9); y9l:=good.y y9l; x9l:=good.x x9l; +fi +lft x5l=lft x5r=hround (2.5u-.5)-eps; +x4r:=max(x5r,x4r-u); x6r:=max(x5r,x6r-u); +fill stroke + {{interim superness:=if serifs: more_super else: hein_super fi; + super_arc.e(2,3)}} & super_arc.e(3,4)..(x5e,y4e); % upper bowl +{{interim superness:=more_super; + fill stroke z5e..super_arc.e(6,7) & super_arc.e(7,8)}}; % lower bowl +fill + z5r{left} + if bot y5r>top y5l:..(lft x5r,bot y5r)---(lft x5l,top y5l).. + else: ... fi + {right}z5l--cycle; % bar point +pos2'(vair,90); z2'=z2; pos8'(vair',-90); z8'=z8; +if serifs: + filldraw stroke z1e{x2-x1,7(y2-y1)}....{right}z2'e; % upper arc + {{interim superness:=more_super; + filldraw stroke super_arc.e(8',9)}}; % lower arc +else: + filldraw stroke term.e(2',1,left,.8,4); % upper terminal + forsuffixes e=l,r: path p.e; p.e=z8'e{left}..tension .9 and 1..z9e; + if angle direction 1 of p.e<105: + p.e:=z8'e{left}..tension atleast.9 and 1..{dir 105}z9e; fi endfor + filldraw stroke p.e; % lower arc +fi +if serifs: + path upper_arc; upper_arc=z1{x2-x1,7(y2-y1)}....{right}z2; + pos10(.3[fine.breadth,hair],0); x10l=x1r; top y10=vround(h+1.5oo); + x1'-x1l=1.5curve; y1'=y1; + numeric t; t=xpart(upper_arc intersectiontimes (z10r--z1')); + filldraw z1r--z10l--z10r--subpath(t,0) of upper_arc--cycle; fi % upper serif +%%%%% +% lowercase cedilla/ogonek +if is_ogonek: + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + ogonek_pos=(x8r,0); + easy_ogonek(the_pen,11,12,13); % ogonek +else: + lowercase_cedilla(x8,0, 11,12,13,14,15); +fi +penlabels(0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15); endchar; + +lhchar "Lowercase Cyrillic letter abh_dze - Abkhazian dze"; +cyrchar(abh_dze,8u#,x_height#,desc_depth#); %+1.75dot_size# +italcorr x_height#*slant-.5serif_fit#-.3u#; +adjust_fit(0,.5serif_fit#); +pickup if serifs: tiny.nib else: fine.nib fi; +numeric arm_thickness,z_stem[]; +z_stem1=max(currentbreadth,hround(if hefty: vair else:fudged.hair fi)); +arm_thickness=if hefty: .5 else:2/3 fi[vair,stem]; +if z_stem1<currentbreadth+eps: z_stem1:=currentbreadth+eps; fi +rt x1r=rt x2r=hround(w-.8u)+eps; +lft x3l=lft x4l=good.x(.28[.5u,w-.8u])-eps; +top y1=h; bot y2=min(bot y1,good.y(h-arm_thickness)); +bot y4=good.y (.28h)-eps; +y3=max(y4,good.y(.28h+.6[thin_join,vair]-.5currentbreadth)-eps); +numeric alpha; alpha=diag_ratio(1,.5(z_stem1-currentbreadth),y2-y4,x2r-x3l); +z_stem2=alpha*(z_stem1-currentbreadth); +if z_stem2<eps: z_stem2:=eps; fi +penpos1(z_stem2,0); penpos2(z_stem2,0); +penpos3(z_stem2,0); penpos4(z_stem2,0); +pair delta; delta=penoffset z3-z2 of currentpen; +fill top z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pos7(curve,0); pos8(vair',-90); pos12(rt x4r-lft x4l,180); pos13(vair,90); +x12r=x4l; y12=y4; rt x7r=hround(w-.75u); y7=.5[bot y13l,top y8l]; +bot y8r=-d-oo; x8=hround.5[.5u,w-.8u]; x13=max(x8,rt x12l+eps); +y13=.1[y4,h]; y13l:=min(y13l,.5[y4,y13l]); +filldraw stroke z12e{z2l-z3l}...{right}z13e; %link +filldraw stroke pulled_arc.e(13,7) & pulled_arc.e(7,8); % bowl +if serifs: + numeric bulb_diam[]; bulb_diam2=hround 7/8[hair,flare]; + pos10(bulb_diam2,-180); pos9(cap_hair,-180); + lft x10r=hround .75u; y10=-.3d; + {{less_tense; bulb(8,9,10)}}; % lower bulb +else: + pos9(.6[vair',flare],angle(-2u,-h)); + lft x9r=hround .75u; top y9l=vround -.3d; + y9r:=good.y y9r-eps; x9l:=good.x x9l; + filldraw stroke term.e(8,9,left,1,4); fi % lower terminal +pickup crisp.nib; +pos5(max(h-bot y2l-.5crisp-vair_corr,crisp.breadth),90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround .75u; +y6=max(good.y(if serifs: h-Vround(vair-vair_corr)-beak/1.4 else: y5l-vair_corr fi)-eps,y3+1); +arm(5,6,a,beak_darkness,-.4beak_jut); % upper arm and beak +penlabels(1,2,3,4,5,6,7,8,9,10,12,13); endchar; + +% Ukrainian i moved up for LH font + +iff not specific:% +lhchar "Lowercase Cyrillic letter k_dsc - ka descender (`roman')"; +cyrchar(k_dsc,if serifs:10u# else:9.5u# fi % zhk_width: n_width;keng_width + ,x_height#,if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-.2u#; +adjust_fit(serif_fit#,serif_fit#); +begingroup +% lowerr_k; +pickup tiny.nib; numeric stem[]; +stem0=max(tiny.breadth,hround(fudged.stem-stem_corr)); +pos1(stem0,0); pos2(stem0,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi% lower stem serif +% k_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); +stem2=max(tiny.breadth,fudged.stem-3stem_corr); +rt x3r=hround(r-letter_fit-.7u-right_jut)+eps; +rt x6r=hround(r-letter_fit-.3u-right_jut)+eps; +y4=.7bar_height; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +%%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + if is_ogonek: + slab:=vair; % lower.slab + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +fi +%%% +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x6 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + slab:=vair; % lower.slab + r_serif(6,1,x,1/3,jut,y,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(1,2,3,4,5,6); endchar; + +iff not specific:% +lhchar "Lowercase Cyrillic letter k_beak - ka beak (`roman')"; +cyrchar(k_beak,if serifs:10u# else:9.5u# fi % zhk_width: n_width;keng_width + ,x_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(2u#-.5width_adj#, % beak_adj + serif_fit#); +% lowerr_k;beak +pickup tiny.nib; numeric stem[]; +stem0=max(tiny.breadth,hround(fudged.stem-stem_corr)); +pos1(stem0,0); pos2(stem0,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr);% lower.slab + nodish_serif(1,2,a,1/3,.5jut,b,1/3,jut); %!!! upper stem serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi % lower stem serif +% k_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); +stem2=max(tiny.breadth,fudged.stem-3stem_corr); +rt x3r=hround(r-letter_fit-.7u-right_jut)+eps; +rt x6r=hround(r-letter_fit-.3u-right_jut)+eps; +y4=.7bar_height; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + slab:=vair; % lower.slab + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +%%%%% +% lower left beak +pickup crisp.nib; pos7(vair,90); pos8(hair,180); +top y7r=h; x7=x1; lft x8r=l+letter_fit+hround.45u; y8=good.y(y7l-beak/1.4)-eps; +arm(7,8,q,beak_darkness,-.4beak_jut); +penlabels(1,2,3,4,5,6, 7,8); endchar; + +iff not specific:% +lhchar "Lowercase Cyrillic letter k_tl - ka tail (`roman')"; +cyrchar(k_tl,10u#,x_height#,desc_depth#); % n_width +italcorr x_height#*slant-.2u#; +adjust_fit(serif_fit#,serif_fit#); +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +lft x1l=lft x2l=hround (2.5u-.5fudged.stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +numeric right_jut,stem[],alpha[],tailstem,bulb_diam; +bulb_diam=hround 7/8[hair,flare]; +right_jut=if serifs:.6jut else:.4tiny fi; +% tail_part(2); +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +_six:=12; _seven:=13; _eight:=14; _nine:=15; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); +set_bar_axis; y[_one]r=y[_two]r=y2.bh; y[_one]l=y[_two]l=y1.bh; +penpos[_three](max(currentbreadth+eps,curve if hefty:-3stem_corr fi),0); +y[_three]=.5[y[_one]r,-d]; +x[_two]l=x[_two]r=w-4.75u; x[_one]l=x[_one]r=x[_zero]; +x[_three]r=hround(w-u); x[_two]l:=x[_four]l:=x[_two]r-.25curve; +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_five]=z[_three]; pos[_five](curve if hefty:-3stem_corr fi,0); + pos[_six](vair,-90); bot y[_six]r=-d-oo; y[_seven]-.5flare=-.85d; + pos[_seven](hair,-180); pos[_eight](bulb_diam,-180); + rt x[_eight]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-3.5u if monospace: / expansion_factor fi); + z[_seven]r=z[_eight]r; + x[_six]=max(rt x[_eight]l,.6[x[_five],x[_seven]r]); + (x,y[_six]r)=whatever[z[_six]l,z[_five]l]; + x[_six]r:=max(x,.5[x[_seven]r,x[_six]]); + filldraw stroke super_arc.e([_five],[_six]); + bulb([_six],[_seven],[_eight]); % bulb +else: + pickup fine.nib; z[_five]=z[_three]; + pos[_five](max(fine.breadth,curve if hefty:-3stem_corr fi),0); + pos[_nine](vair',-90); pos[_six](.6[vair',flare],-105); + rt x[_six]r=x[_three]-4.5u; bot y[_six]r=-d; + bot y[_nine]r=-d-oo; x[_nine]=.35[x[_six]r,x[_three]r]; + filldraw stroke super_arc.e([_five],[_nine]) + & term.e([_nine],[_six],left,.75,4); fi +%%% +% diagonal; +pickup tiny.nib; numeric right_jut,stem[],alpha[]; +right_jut=if serifs:.6jut else:.4tiny fi; +stem1=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi)); +top y3=h; rt x3r=hround(r-letter_fit-.7u-right_jut)+eps; +x4=x1; y4=.7bar_height; +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +forsuffixes $=l,r: y3'$=h; y4'$=y1.bh; + z4$=z3'$+whatever*(z3-z4); z4'$=z3'$+whatever*(z3-z4); endfor +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +fill z4'r--diag_end(4r,3'r,1,.5,3'l,4l)--z4'l--cycle; % upper diagonal +%% +if serifs: + numeric inner_jut,up_inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-1.2jut: up_inner_jut=1.2jut; + else: rt x1r+jut+.5u+1=lft x3l-up_inner_jut; fi + if rt x2r+jut+.5u+1<=x[_three]r: inner_jut=jut; + else: rt x2r+inner_jut+.5u+1=x[_three]r; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(1,2,a,1/3,jut,b,1/3,jut); % upper stem serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); fi % lower stem serif +penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar; + +lhchar "Lowercase Cyrillic letter l_tl - el tail"; +cyrchar(l_tl,10u# % if not serifs:+.5width_adj# fi % dl_width;n_width + ,x_height#,desc_depth#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit# if not serifs:+.5(stem#-u#) fi, %dl_adj + serif_fit#); % +% lower_l; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric light_hair,bot_vair,bulb_diam,left_jut; +light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi; +bot_vair=Vround(.5[vair,light_hair]); +bulb_diam=hround 7/8[hair,flare]; +left_jut= + if serifs: max(limit_dist,1.1jut) else: hround (w+serif_fit-rt x2r-.5u) fi; +x3=1/3[w-rt x1r-(1/8left_jut),rt x1r] if not serifs: -.5(stem-u) fi +eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(hair,-180); + top y3=h; y6-.5bulb_diam=.12desc_depth-eps; z6r=z5r; + lft x6r=l+letter_fit+hround(.35u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); + bot y4r=-1.5oo-eps; {{less_tense; bulb(4,5,6)}}; %bulb + filldraw stroke z4e{right} + ..controls (min(15/16[x4,x3],max(x4,lft x6r+1.75bulb_diam))+(x3e-x3),y4e) + and (x3e,max(y4l,min(y6-.5,1/3h+eps))+1/3(y4e-y4))..{up}z3e; % left tail +else: + pos3'(vair,90); pos1'(vair,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; % upper bar + pickup fine.nib; pos3(light_hair,0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=.67[x3l,x5]; + lft x5=l+letter_fit+hround(.35u-.5); bot y4r=bot y5r; y3=y3'; + filldraw stroke z3e{down}..controls (x3e,y5e+.35h) + and (min(7/8[x4e,x3e],x4e+2light_hair)+eps,y4e-eps)..{left}z4e--z5e; fi % left stem +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5jut); + %dish_serif(2,1,a,1/3,jut,b,1/3,jut); %!!! %lower right serif + save slab; slab:=Vround(vair-vair_corr); %lower.slab + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut); % upper right serif + nodish_serif(3,0,e,1/3,1.05jut,f,1/3,inner_jut); % upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% l_tail(2); +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+vair'+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=max(x[_zero]l-bulb_diam, + floor x[_zero]-2.5u if monospace: / expansion_factor fi); + (x,y[_two]r)=whatever[z[_two]l,z[_one]l]; + x[_two]r:=max(x,.5[x[_three]r,x[_two]]); + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](vair',-90); pos[_three](.6[vair',flare],-105); + rt x[_three]r=x[_zero]-3u; bot y[_three]r=-d; + bot y[_two]r=-d-oo; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(1,2,3,4,5,6, 7,8,9,10,11);endchar; + +lhchar "Lowercase Cyrillic letter n_dsc - en descender"; +cyrchar(n_dsc,10u# if not serifs:+.5width_adj# fi,x_height#, % n_width + if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#, + serif_fit# if not serifs:+.5(stem#-u#) fi) %dl_adj +begingroup +% lower_n; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +bar_stroke(x1,x3); % bar +%%% +numeric inner_jut,right_jut; % for cyr_serif +if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +save slab; % lower.slab +if serifs: + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); % lower left serif + if is_ogonek: + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi %!!! % lower right serif +fi +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + slab:=vair; % lower.slab + right_jut=if serifs: max(limit_dist,1.1jut) else: hround (r-rt x4r-.5u) fi; + r_serif(4,3,o,1/3,inner_jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(1,2,3,4,5,6, 7,8,9); endchar; + +lhchar "Lowercase Cyrillic letter n_tl - en tail"; +cyrchar(n_tl,10u# if not serifs:+.5width_adj# fi,x_height#,desc_depth#); % n_width +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p +adjust_fit(serif_fit#,serif_fit#); +% lower_n; +pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +bar_stroke(x1,x3); % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut); fi % lower left serif + %dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi %!!! % lower right serif +%%%%% +% l_tail(4); +_zero:=4; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+vair'+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=max(x[_zero]l-bulb_diam, + floor x[_zero]-2.5u if monospace: / expansion_factor fi); + (x,y[_two]r)=whatever[z[_two]l,z[_one]l]; + x[_two]r:=max(x,.5[x[_three]r,x[_two]]); + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](vair',-90); pos[_three](.6[vair',flare],-105); + rt x[_three]r=x[_zero]-3u; bot y[_three]r=-d; + bot y[_two]r=-d-oo; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(1,2,3,4,5,6, 7,8,9,10,11); endchar; + +lhchar "Lowercase Cyrillic letter s_dsc - es descender (cedilla)"; +cyrchar(s_dsc,8u#,x_height#,desc_depth#); % eng +italcorr x_height#*slant-.2u#; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +% lower_s; +pickup fine.nib; pos2(vair',90); pos4(vair',270); +x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo; +pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h; % eng +if serifs: + pos1(hair,0); pos0(flare,0); + y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare); + rt x1r=hround(w-.7u); bulb(2,1,0); % bulb + pos5(hair,0); rt x5r=hround(w-.5u); + y5=max(good.y(.5bar_height-.9),y4l+vair'); + (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u); + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal +else: + pos1(4/7[vair',flare],80); + rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r]; + filldraw stroke term.e(2,1,right,.8,4); % upper terminal + pos5(.6[vair',flare],275); rt x5r=hround(w-.5u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e; + if angle direction 1 of p.e>75: + p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor + filldraw stroke pulled_super_arc.e(2,3)(.7superpull) + & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi % arc and lower terminal +%%%%% +% lowercase cedilla/ogonek +if is_ogonek: + path p_.r; + p_.r=if serifs: pulled_super_arc.r(3,4)(.5superpull) + ..tension .9 and 1..{x5-x4,5(y5-y4)}z5r + else: p.r fi; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + numeric tt; % the time... + tt=if serifs: if hefty: 2.6 else: 2.5 fi else: % sansserif + if is_bold: .6 else: .8 fi\\ fi; + join_angle=angle((direction tt of p_.r) rotated 180); + ogonek_pos=(point tt of p_.r)+.5(the_pen-if serifs: tiny else: fine fi)* + unitvector((direction tt of p_.r) rotated 90)-(ogonek_breadth-the_pen,0); + easy_ogonek(the_pen,6,7,8); % ogonek +else: + lowercase_cedilla(x4,0, 6,7,8,9,10); +fi +penlabels(0,1,2,3,4,5, 6,7,8,9,10); endchar; + +% Short U moved up for LH fonts + +lhchar "Lowercase Cyrillic letter y - straight u (as upper Y)"; +cyrchar(y,if serifs: 9.5u# else: 9u# fi,x_height#,desc_depth#); +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit#,serif_fit#); +% lower_y; +numeric left_stem,right_stem,outer_jut,dy,alpha; left_stem=stem-stem_corr; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); outer_jut=.75jut; +x1l=w-x4r=l+letter_fit+outer_jut+.05u; +x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; +y2=y3=y5=0; dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=-d; +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0>y2+notch_cut: + y0:=y2+notch_cut; + fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % diagonals and stem +else: + fill z0--diag_end(0,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % diagonals and stem +if serifs: + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(6',5,e,1/3,jut,f,1/3,jut); % lower serif + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); fi % upper right serif +%%%%% +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter y_hcrs - straight u hcrossed"; +cyrchar(y_hcrs,if serifs: 9.5u# else: 9u# fi,x_height#,desc_depth#); +italcorr x_height#*slant+.25u#; +adjust_fit(serif_fit#,serif_fit#); +% lower_y; +numeric left_stem,right_stem,outer_jut,dy,alpha; left_stem=stem-stem_corr; +right_stem=min(hair if hefty:-2stem_corr fi,left_stem); outer_jut=.75jut; +x1l=w-x4r=l+letter_fit+outer_jut+.05u; +x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; +y2=y3=y5=0; dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=-d; +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0>y2+notch_cut: + y0:=y2+notch_cut; + fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % diagonals and stem +else: + fill z0--diag_end(0,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % diagonals and stem +if serifs: + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5); + if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(6',5,e,1/3,jut,f,1/3,jut); % lower serif + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); fi % upper right serif +%%%%% +% hcross +pickup crisp.nib; pos7(bar,90); pos8(bar,90); +x7=.25w; x8=.75w; top y7r=top y8r=vround -eps; +filldraw stroke z7e--z8e; +penlabels(0,1,2,3,4,5,6, 7,8); endchar; + +lhchar "Lowercase Cyrillic letter h_dsc - kha descender"; +cyrchar(h_dsc,if serifs:9.5u# else:9u# fi,x_height#, + if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-.05u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +begingroup +% lower_h; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=fudged.stem-4stem_corr; stem2=min(fudged.hair,stem1); +outer_jut=.75jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.1u+outer_jut; x2r=r-letter_fit-.3u-outer_jut-xjut; +x3l=l+letter_fit+outer_jut+xjut; x4r=r-letter_fit-outer_jut; y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +if hefty: + z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.2[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' + --diag_end(34',4l,.5,1,4r,24')--z24' + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: + fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +numeric inner_jut[]; pickup tiny.nib; %moved for cyr_serif +prime_points_inside(3,2);prime_points_inside(4,1); +if rt x3'r+jut+.5u+1<=lft x4'l-jut-xjut: inner_jut2=jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi +save slab; % lower.slab +if serifs: + prime_points_inside(1,4); prime_points_inside(2,3); + if rt x1'r+jut+.5u+1<=lft x2'l-jut-xjut: inner_jut1=jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + slab:=vair; % lower.slab + if is_ogonek: + dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + fi + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,5,6,7); % ogonek +else: + slab:=vair; % lower.slab + numeric right_jut; + right_jut=if serifs: 1.1 outer_jut else: .4tiny fi; + r_serif(4',1,x,1/3,inner_jut2,y,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(0,1,2,3,4,12,13,24,34, 5,6,7); endchar; + +lhchar "Lowercase Cyrillic letter h_tl - kha (looks like X)"; +cyrchar(h_tl,if serifs:9.5u# else:9u# fi,x_height#,desc_depth#); +italcorr x_height#*slant-.05u#; +adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#); +% lower_h_tail; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=fudged.stem-4stem_corr; stem2=min(fudged.hair,stem1); +outer_jut=.75jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.1u+outer_jut; x2r=r-letter_fit-.3u-outer_jut-xjut; +x3l=l+letter_fit+outer_jut+xjut; x4r=r-letter_fit-outer_jut; y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +numeric t; t=slab+bracket; +forsuffixes e=l,r: z54e=(((0,t)--(w,t)) intersectionpoint (z4e--z1e)); endfor; +if hefty: + z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.2[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')-- + z34'--z54l--z54r--z24' %!!! + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: + fill diag_end(4r,1r,.5,1,1l,4l)-- + z54l--z54r--cycle; %!!! left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +if serifs: + numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(3,2); prime_points_inside(4,1); + if rt x3'r+jut+.5u+1<=lft x4'l-jut-xjut: inner_jut2=jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi + prime_points_inside(1,4); prime_points_inside(2,3); + if rt x1'r+jut+.5u+1<=lft x2'l-jut-xjut: inner_jut1=jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + save slab; slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + slab:=vair; % lower.slab + %dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +%%%%% +% l_tail(4);x_tail +_zero:=4; +_one:=7; _two:=8; _three:=9; _four:=10; +% +% x_ +pickup fine.nib; +stem3=hround (max(fine.breadth,.5[stem1,x[_zero]r-x[_zero]l])); +x[_one]'r=x4r; +penpos[_one]'(stem3,0); pos[_one](stem3,0); z[_one]=z[_one]'; +bot y[_one]=max(-1/3d,-d+vair')-eps; +(x[_one]'l,y54')=whatever[z4l,z4l+dir angle(z4l-if serifs:z1l else:z34'fi)]; +z54'=(x[_one]'l,y54'); +fill z54l{z4r-z1r} + ..controls (z54').. + {down}z[_one]'l--z[_one]'r{up} + ..controls (z4r).. + {z1r-z4r}z54r--cycle; %link +% _x +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare])); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=max(x[_one]l-bulb_diam,%!!! + floor x[_one]-2.5u if monospace: / expansion_factor fi);%!!! + (x,y[_two]r)=whatever[z[_two]l,z[_one]l]; + x[_two]r:=max(x,.5[x[_three]r,x[_two]]); + filldraw stroke pulled_arc.e([_one],[_two]);%!!! + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](vair',-90); pos[_three](.6[vair',flare],-105); + rt x[_three]r=x[_one]-3u; bot y[_three]r=-d;%!!! + bot y[_two]r=-d-oo; x[_two]=.4[x[_three]r,x[_one]r];%!!! + filldraw stroke super_arc.e([_one],[_two])%!!! + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(0,1,2,3,4,54,54',5,6,7',8); endchar; + +lhchar "Lowercase Cyrillic letter ch_ldsc - che left descender"; +cyrchar(ch_ldsc,10u# if not serifs:+.5width_adj# fi, % n_width + x_height#,sbeak#); +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#,serif_fit#); +% lower_ch; +pickup tiny.nib; save slab; %!!!lower.slab +numeric middle_weight; middle_weight=.6[thin_join,vair]; +pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +penpos2'(fudged.stem,0); z2'=z2; +penpos5(middle_weight,90); penpos6(middle_weight,90); +penpos6'(middle_weight,90); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; x5l=1/3[x1,x3]; +y6l=vround(.48h-.5middle_weight if serifs:-.15(.5[hair,.7stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +y5l=y6l; x6=x6'=x3; +if serifs: y6'l=min(3/5h,y6l-hair+1.05stem); fi +if serifs: + if ((y6'l-y6l)>=middle_weight+1+eps): + fill stroke z2'e{down}..z5e{right}...{.75(z5-z6)+z6'}z6'e; % arc + else: + fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + slab:=vair; % lower.slab + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); % lower right serif +else: + fill stroke pulled_arc.e(2',5) & z5e{right}...{right}z6e; fi % arc +%%%%% +% lower left descender +slab:=vair; % lower.slab +numeric right_jut; +right_jut= + if serifs: max(limit_dist,1.1jut) + else: hround (w+serif_fit+.5(stem-u)-rt x4r-.5u) fi; +l_serif(4,3,o,1/3,beak_darkness,right_jut,.6beak_jut,p,1/3,inner_jut); % lower left descender +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Lowercase Cyrillic letter ch_rdsc - che right descender"; +cyrchar(ch_rdsc,10u# if not serifs:+.5width_adj# fi,x_height#, % n_width + if is_ogonek: desc_depth# else: sbeak# fi); %ldesc/og_depth +italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut +adjust_fit(serif_fit#, + serif_fit# if not serifs:+.5(stem#-u#) fi) %dl_adj +begingroup +% lower_ch; +pickup tiny.nib; save slab; %!!! lower.slab +numeric middle_weight; middle_weight=.6[thin_join,vair]; +pos1(fudged.stem,0); pos2(fudged.stem,0); +pos3(fudged.stem,0); pos4(fudged.stem,0); +penpos2'(fudged.stem,0); z2'=z2; +penpos5(middle_weight,90); penpos6(middle_weight,90); +penpos6'(middle_weight,90); +lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; x5l=1/3[x1,x3]; +y6l=vround(.48h-.5middle_weight if serifs:-.15(.5[hair,.7stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +y5l=y6l; x6=x6'=x3; +if serifs: y6'l=min(3/5h,y6l-hair+1.05stem); fi +if serifs: + if ((y6'l-y6l)>=middle_weight+1+eps): + fill stroke z2'e{down}..z5e{right}...{.75(z5-z6)+z6'}z6'e; % arc + else: + fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + slab:=Vround(vair-vair_corr); % lower.slab + dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut); % upper right serif + if is_ogonek: + slab:=vair; % lower.slab + dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); %!!! % lower right serif + fi +else: + fill stroke pulled_arc.e(2',5) & z5e{right}...{right}z6e; fi % arc +%%%%% +% lowercase descender/ogonek +if is_ogonek: + endgroup; + def the_pen= + if known ogonek_pen: ogonek_pen elseif serifs: tiny else: fine fi + enddef; + % |stem| was drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + slab:=vair; % lower.slab + numeric right_jut; + right_jut= + if serifs: max(limit_dist,1.1jut) + else: hround (w+serif_fit+.5(stem-u)-rt x4r-.5u) fi; + r_serif(4,3,o,1/3,jut,p,1/3,beak_darkness,right_jut,.6beak_jut); % lower right descender + endgroup; +fi +penlabels(1,2,3,4,5,6, 7,8,9); endchar; + +lhchar "Lowercase Cyrillic letter schwa"; +cyrchar(schwa,8.25u#,x_height#,0); %erev +italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); +adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi); +% lower_schwa; +numeric left_curve,right_curve; +left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; pos1(right_curve,-180); pos2(vair',-90); pos3(left_curve,0); +set_bar_axis; bot y2r=-oo; y0l=top y1=h-y1.bh; +lft x1r=hround max(.5u,u-.5right_curve); +rt x3r=hround min(w-.5u,w-1.25u+.5left_curve); x2=.5w-.25u; +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; top y4r=h+oo; x4=x2;% if not serifs:-.25u fi; +if serifs: + pos4(vair,90); pos5(hair,180); + y5=min(bar_height+.25flare+2vair'+2,.9[bar_height,h]-.75flare); %z + lft x5r=hround(lft x1r+1/3u)+eps; + (x,y4l)=whatever[z4r,z5]; x4l:=max(x,x4l-.5u); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4); % left bowl, arc, + pickup fine.nib; pos4'(vair,90); z4'=z4; x4'r:=x4r; + filldraw stroke z4'e{left}...{x5-x4,5(y5-y4)}z5e; % and terminal + path upper_arc; upper_arc=z5{x4-x5,5(y4-y5)}..z4{right}; + pos6(.3[fine.breadth,hair],180); x6r=x5r; top y6=h+oo; + x5'-x5r=2curve-fine; y5'=y5; + numeric t; t=xpart(upper_arc intersectiontimes (z6l--z5')); + filldraw z5r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +else: + pos4(vair,90); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,90); z4=z4'; pos5(4/7[vair',flare],100); + lft x5r=hround(tiny.lft x1r+2/3u)+eps; + top y5r=vround min(top y4r,max(.82[bar_height,top y4r], + y2.bh+.5(y2.bh-y1.bh)-4/7[vair',flare]*sind 280+eps)); + filldraw stroke term.e(4',5,left,.8,4); fi % terminal +pickup tiny.nib; path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'l=y0l; x1'l=x1'r=x1; y1'r=y0r=y0l-.6[thin_join,vair];%y1.bh; +forsuffixes $=l,r: +x0$=xpart(((w,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +%%%%% +penlabels(0,1,2,3,4,5,5',6); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lgt2upu.mf b/Master/texmf-dist/fonts/source/lh/base/lgt2upu.mf new file mode 100644 index 00000000000..bc7c6cefb98 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lgt2upu.mf @@ -0,0 +1,1197 @@ +% +% lgt2upu.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Uppercase Cyrillic letters 128--255 for T2 encoding +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% List of letternames and their codes in T2 +% +% X2 T2A T2B T2C +% +% G_hcrs "81 "81 - - Ghe horisontally crossed +% G_dsc "82 - "82 - Ghe with descender +% G_tl "83 - "83 - Ghe tail +% SHHA "84 "84 "84 "84 Shha (same as lower h) +% ZH_dsc "85 "85 "85 - Zhe with descender +% Z_dsc "86 "86 - - Ze with descender (cedilla) +% ABH_DZE "87 - "87 "87 Abkhasian dze +% K_dsc "89 "89 "89 "89 Ka with descender +% K_beak "8a "8a - - Ka with reversed beak +% K_tl "8b - "8b - Ka with tail +% L_tl "8c - "8c - El with tail +% N_dsc "8d "8d "8d "8d En with descender +% N_tl "8f - "8f "8f En with tail +% S_dsc "91 "91 - - Es with descender (cedilla) +% Y "93 "93 "93 - Straingt u (as upper Y) +% Y_hcrs "94 "94 - - Straingt u horisontally crossed +% H_dsc "95 "95 "95 "95 Kha with descender +% H_tl "96 - "96 - Kha with tail +% CH_ldsc "97 - "97 - Che with left descender +% CH_rdsc "98 "98 "98 "98 Che with right descender +% SCHWA "9a "9a "9a "9a Schwa +% + +LHver_check(3,4); % like |version_check| in ec + +lhchar "Uppercase Cyrillic letter G_hcrs - GHE hcrossed"; +cyrchar(G_hcrs,if monospace: 9u# else: 11u# fi-width_adj#, %G_width + cap_height#,0); +if is_small_cap: getcharcode(g_hcrs); fi +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(cap_serif_fit#,0); +% upper_g +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u ,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +%%%%% +% hcross +pickup crisp.nib; numeric outer_jut; +outer_jut=if serifs: max(limit_dist,1.1cap_jut) else: 1.8u fi; +pos5(bar,90); pos6(bar,90); +top y6r=top y5r=vround (.52h+.5bar)+eps; +x6=tiny.rt x1r+1.15outer_jut; x5=hround1/3u-cap_serif_fit; +filldraw stroke z5e--z6e; +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter G_dsc - GHE descender"; +cyrchar(G_dsc,if monospace: 9u# else: 11u# fi-width_adj#, %G_width + cap_height#,if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(g_dsc); fi +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(cap_serif_fit#,0); +% upper_g +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u ,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +%%% +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + if is_ogonek: + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi %!!! % lower serif +fi +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x2 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,5,6,7); % ogonek +else: + numeric right_jut; + right_jut=if serifs: 1.414cap_jut else: .5cap_stem+.5u fi; + if not serifs: + numeric arm_thickness; arm_thickness=vround(slab-vair_corr); + save slab; slab:=arm_thickness; fi % bottom.desc.slab + r_serif(2,1,x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(0,1,2,3,4, 5,6,7); endchar; + +lhchar "Uppercase Cyrillic letter G_tl - GHE tail"; +cyrchar(G_tl,12.5u#+width_adj#, %V_width+width_adj + cap_height#,desc_depth#); +if is_small_cap: getcharcode(g_tl); fi +italcorr .75cap_height#*slant-.5u#; %B +adjust_fit(cap_serif_fit#,0); full_w:=w; w:=11u;%G_width +% upper_g +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u ,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi % lower serif +%%%%% +pickup tiny.nib; +w:=full_w; +% Tail_part(2); +_zero:=2; +_one:=5; _two:=6; _three:=7; +_four:=8; _five:=9; _six:=10; _seven:=11; _eight:=12; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); +penpos[_one](vair,90); penpos[_two](vair,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +y[_three]=.5[y[_one],-d]; x[_two]=max(.5w-.25u,w-7u); +x[_one]=x[_zero]; x[_three]r=hround(w-u); +x[_two]l:=x[_two]-.25cap_curve; y[_one]=y[_two]=.52h; +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_four]=z[_three]; + pos[_four](cap_curve if hefty:-3stem_corr fi,0); + pos[_five](vair',-90); bot y[_five]r=-d-oo; y[_six]-.5flare=-.85d; + pos[_six](cap_hair,-180); pos[_seven](bulb_diam,-180); + rt x[_seven]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-3.5u if monospace: / expansion_factor fi); + z[_six]r=z[_seven]r; + x[_five]=max(rt x[_seven]l,.6[x[_four],x[_seven]r]); + (x,y[_five]r)=whatever[z[_five]l,z[_four]l]; + x[_five]r:=max(x,.5[x[_six]r,x[_five]]); + filldraw stroke super_arc.e([_four],[_five]); + bulb([_five],[_six],[_seven]); % bulb +else: + pickup fine.nib; z[_four]=z[_three]; + pos[_four](max(fine.breadth,cap_curve if hefty:-3stem_corr fi),0); + pos[_eight](vair,-90); pos[_five](flare,-105); + rt x[_five]r=x[_three]-6u; bot y[_five]r=-d; + y[_five]l:=good.y y[_five]l; x[_five]l:=good.y x[_five]l; + bot y[_eight]r=-d-o; x[_eight]=.35[lft x[_five]r,x[_three]r]; + filldraw stroke super_arc.e([_four],[_eight]) + & term.e([_eight],[_five],left,.75,4); fi +%%% +penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar; + +lhchar "Uppercase Cyrillic letter SHHA (as lower h)"; +cyrchar(SHHA,13.5u#,cap_height#,0); %CH width +if is_small_cap: getcharcode(shha); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pos3(cap_stem,0); x3=w-x1; +save thin_join; thin_join=cap_hair; +full_x:=x_height; x_height:=1.15x_height; +h_stroke(2,g,3,4); x_height:=full_x; % arch and right stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper right serif + numeric inner_jut; pickup tiny.nib; + if rt x2r+jut+.5u+1<=lft x4l-cap_jut: inner_jut=cap_jut; + else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower right serif + dish_serif(4,3,e,1/3,inner_jut,f,1/3,cap_jut); fi % lower left serif +penlabels(1,2,3,4); endchar; + +iff not specific:% +lhchar "Uppercase Cyrillic letter ZH_dsc - ZHE descender (`roman')"; +cyrchar(ZH_dsc,13.5u#,cap_height#, % N_width + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(zh_dsc); fi +italcorr cap_height#*slant-.5u#; %K +adjust_fit(w#-2max(2u#+.5fudged.cap_stem#,3u#)+cap_serif_fit#,cap_serif_fit#); %ZHr_adj +% upperr_zh; +if odd((r-l)-fudged.cap_stem): change_width; fi % symmetric & all three equal +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround (.5[l,r]-.5fudged.cap_stem)-eps; % middle stem point +top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi % lower stem serif +% K_rbowl;zh%mono:+.75u +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +rt x3r=hround(r-letter_fit-u-right_jut if monospace:+.75u fi); %!!! +rt x6r=hround(r-letter_fit-.75u-right_jut if monospace:+.75u fi); %!!! +y4=1/3h; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +numeric inner_jut,up_inner_jut; +%%% +if serifs: + if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; + else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + if is_ogonek: + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi %!!! % lower diagonal serif +fi +%%% +% mirror +forsuffixes $ = 3r,3,3l,3'r,3'l,4r,4,4l,5l,5,5r,6l,6,6r,6'l,6'r: + x.m$=l+(r-x$); y.m$=y$; endfor; +fill z.m4r--diag_end(.m4r,.m3'r,1,.5,.m3'l,.m4l)--z.m4l--cycle; % upper diagonal +fill z.m5l--diag_end(.m5l,.m6'l,.5,1,.m6'r,.m5r)--z.m5r--cycle; % lower diagonal +%% +if serifs: + penpos7(alpha1*(stem1-tiny),0); penpos8(whatever,-90); + penpos10(alpha2*(stem2-tiny),0); + z7=z.m3; z8=z.m4; z9l=z.m5r; z9=z.m5; z9r=z.m5l; z10=z.m6; + dish_serif(7,8,i,1/2,right_jut,j,2/3,up_inner_jut)(dark); % upper diagonal serif + dish_serif(10,9,k,1/3,right_jut,l,1/2,inner_jut)(dark); fi % lower diagonal serif +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x6 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,11,12,13); % ogonek +else: + if not serifs: + right_jut:=max(right_jut,hround (r-rt x6r-.65u)); fi + r_serif(6,1,x,1/3,jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(1,2,3,4,5,6,7,8,9,10, 11,12,13); endchar; + +lhchar "Uppercase Cyrillic letter Z_dsc - ZE descender (cedilla)"; +cyrchar(Z_dsc,11u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(z_dsc); fi +italcorr .75cap_height#*slant-.5u#; %B +adjust_fit(if monospace: .35u#,.25u# else: 0,0 fi); +% upper_z; +pickup fine.nib; numeric right_curve,middle_weight; +middle_weight=max(fine.breadth,.6vair+.5); +pos2(cap_band,90); pos8(cap_band,-90); +if serifs: + right_curve=cap_curve-stem_corr; + pos1(cap_hair,180); pos9(cap_hair,-180); y1=.4[y5l,y2l]; +else: + right_curve=cap_curve-3stem_corr; + pos1(1.1flare,120); pos9(flare,-120); + top y1r=vround 7/8h+o; bot y9r=vround 1/7h-o; fi +pos4(middle_weight,-90); pos5(middle_weight,-90); +pos6(middle_weight,90); pos5'(middle_weight,90); +pos3(max(fine.breadth,right_curve-stem_corr),0); +pos7(max(fine.breadth,right_curve),0); +top y2r=h+o; bot y8r=-o; +x2=x6=x8=.5[1.5u,x7]; rt x7r=hround(w-.75u); rt x3r=hround(w-1.25u); +lft x5=lft x5'=min(hround 3.5u,lft x6)+eps; +y3=.5[y4l,y2l]; y7=.5[y6l,y8l]; x4=1/3[x5,x3l]; y4=y5; y5'=y6; +lft x1r=hround 1.1u; lft x9r=hround.9u; +top y5l-bot y5'l=vair; .5[y5l,y5'l]=.52h; +if serifs: y9=max(.52[top y8l,bot y5'l],y7+1); + else: y9l:=good.y y9l; x9l:=good.x x9l; fi +filldraw stroke {{if not serifs:interim superness:=hein_super; fi + super_arc.e(2,3)}} & super_arc.e(3,4)..z5e; % upper bowl +filldraw stroke z5'e..super_arc.e(6,7) & super_arc.e(7,8); % lower bowl +if serifs: + filldraw stroke z1e{x2-x1,15(y2-y1)}....{right}z2e; % upper arc + filldraw stroke + {{interim superness:=more_super; super_arc.e(8,9)}}; % lower arc +else: + filldraw stroke rterm.e(2,1,left,.9,4); % upper arc + filldraw stroke term.e(8,9,left,.8,4); % lower arc +fi +if serifs: + path upper_arc; upper_arc=z1{x2-x1,15(y2-y1)}....{right}z2; + pos10(.3[fine.breadth,cap_hair],0); x10l=x1r; top y10=h+o; + x1'-x1l=2cap_curve; y1'=y1; + numeric t; t=xpart(upper_arc intersectiontimes (z10r--z1')); + filldraw z1r--z10l--z10r--subpath(t,0) of upper_arc--cycle; fi % upper serif +%%%%% +% uppercase cedilla/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + ogonek_pos=(x8r,0); + easy_ogonek(the_pen,11,12,13); % ogonek +else: + uppercase_cedilla(x8,0, 11,12,13,14,15); +fi +penlabels(0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15); endchar; + +lhchar "Uppercase Cyrillic letter ABH_DZE - Abkhasian DZE"; +cyrchar(ABH_DZE,10u#,cap_height#,0); +if is_small_cap: getcharcode(abh_dze); fi +italcorr cap_height#*slant-.5u#; %K +adjust_fit(0,.5serif_fit#); +pickup if serifs: tiny.nib else: fine.nib fi; +numeric arm_thickness,z_stem[]; +z_stem1=max(currentbreadth,hround(if hefty:1/3[vair,hair] else: fudged.hair fi)); +arm_thickness=if hefty: 2/3 else:.75 fi[slab,cap_stem]; +if z_stem1<currentbreadth+eps: z_stem1:=currentbreadth+eps; fi +rt x1r=rt x2r=hround(w-.8u)+eps; +lft x3l=lft x4l=good.x(hround.3[.5u,w-.8u])-eps; +top y1=h; bot y2=min(bot y1,good.y(h-arm_thickness)); +bot y4=good.y.(.52h-.5vair)-eps; +y3=max(y4,good.y(bot y4+vair-.5currentbreadth)-eps); +numeric alpha; alpha=diag_ratio(1,.5(z_stem1-currentbreadth),y2-y4,x2r-x3l); +z_stem2=alpha*(z_stem1-currentbreadth); % +if z_stem2<eps: z_stem2:=eps; fi +penpos1(z_stem2,0); penpos2(z_stem2,0); +penpos3(z_stem2,0); penpos4(z_stem2,0); +pair delta; delta=penoffset z3-z2 of currentpen; +fill top z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pos7(cap_curve,0); pos8(vair',-90); pos12(rt x4r-lft x4l,180); pos13(vair,90); +x12r=x4l; y12=y4; rt x7r=hround(w-.75u); y7=.5[bot y13l,top y8l]; +bot y8r=-o; x8=hround.5[.5u,w-.8u]; x13=max(x8,rt x12l+eps); +y13=1/15[y4,h]; y13l:=min(y13l,.5[y4,y13l]); +filldraw stroke z12e{z2l-z3l}...{right}z13e; %link +filldraw stroke pulled_arc.e(13,7) & pulled_arc.e(7,8); % bowl +if serifs: + numeric bulb_diam[]; bulb_diam2=flare+(cap_stem-stem); + pos10(bulb_diam2,-180); pos9(cap_hair,-180); + lft x10r=hround .75u; + y10+.5bulb_diam2=max(.52[top y8l,bot y13l],y7+1); + {{less_tense; bulb(8,9,10)}}; % lower bulb +else: + pos9(max(currentbreadth+eps,cap_hair-.2tiny),-175); lft x9r=hround .75u; y9=.23h; + filldraw stroke z8e{left}....{dir 95}z9e; fi % lower terminal +pickup crisp.nib; +pos5(max(h-bot y2l-.5crisp-vair_corr,crisp.breadth),90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround .75u; +y6=max(good.y(if serifs: h-slab-beak else: y5l-vair_corr fi)-eps,y3+1); +arm(5,6,a,beak_darkness,-beak_jut); % upper arm and beak +penlabels(1,2,3,4,5,6,7,8,9,10,12,13); endchar; + +% Ukrainian i moved up for LH font + +iff not specific:% +lhchar "Uppercase Cyrillic letter K_dsc - KA descender (`roman')"; +cyrchar(K_dsc,13.5u#,cap_height#, % N_width + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(k_dsc); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); %ur_serif_adj +% upperr_k; +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi % lower stem serif +% K_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +rt x3r=hround(r-letter_fit-u-right_jut); +rt x6r=hround(r-letter_fit-.75u-right_jut); +y4=1/3h; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +numeric inner_jut,up_inner_jut; +%%% +if serifs: + if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; + else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + if is_ogonek: + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +fi +%%% +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x6 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + if not serifs: + right_jut:=max(right_jut,hround (r-rt x6r-.65u)); fi + r_serif(6,1,x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower left serif +fi +penlabels(1,2,3,4,5,6, 7,8,9); endchar; + +iff not specific:% +lhchar "Uppercase Cyrillic letter K_beak - KA beak (`roman')"; +cyrchar(K_beak,13.5u#,cap_height#,0); % N_width +if is_small_cap: getcharcode(k_beak); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(min(4.5u#-.5cap_stem#,3.5u#)-.5width_adj#, % Beak_adj + cap_serif_fit#); +% upperr_k;beak +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +if serifs: + nodish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); %!!! upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi % lower stem serif +% K_rbowl; +numeric right_jut,stem[],alpha[]; pickup tiny.nib; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); +stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); +rt x3r=hround(r-letter_fit-u-right_jut); +rt x6r=hround(r-letter_fit-.75u-right_jut); +y4=1/3h; top y3=h; bot y6=0; x4=x1; +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos6(alpha2*(stem2-tiny),0); +alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); +forsuffixes $=l,r: y3'$=h; y6'$=0; z4.$=z3'$+whatever*(z3-z4); + z5.$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor +z5=.5[z5l,z5r]; +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); +z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +numeric inner_jut,up_inner_jut; +%% +if serifs: + if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; + else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi + if rt x1r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + dish_serif(3,4,e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark); fi % lower diagonal serif +%%% +%%%%% +% upper left beak +pickup crisp.nib; +top y7r=h; x7=x1; pos7(slab,90); pos8(hair,180); +lft x8r=l+letter_fit+hround.65u; y8=good.y(y7l-beak)-eps; +arm(7,8,q,beak_darkness,-.7beak_jut); +penlabels(1,2,3,4,5,6, 7,8); endchar; + +iff not specific:% +lhchar "Uppercase Cyrillic letter K_tl - KA tail (`roman')"; +cyrchar(K_tl,13.5u#,cap_height#,desc_depth#); % N_width +if is_small_cap: getcharcode(k_tl); fi +italcorr cap_height#*slant-.5u#; %K +adjust_fit(cap_serif_fit#,cap_serif_fit#); +pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +% Tail_part(2); +_zero:=2; +_one:=7; _two:=8; _three:=9; +_four:=10; _five:=11; _six:=12; _seven:=13; _eight:=14; +% +pickup tiny.nib; +numeric bulb_diam; +bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); +penpos[_one](vair,90); penpos[_two](vair,90); +penpos[_three](cap_curve if hefty:-3stem_corr fi,0); +y[_three]=.5[y[_one],-d]; x[_two]=max(.5w-.25u,w-7u); +x[_one]=x[_zero]; x[_three]r=hround(w-u); +x[_two]l:=x[_two]-.25cap_curve; y[_one]=y[_two]=.52h; +{{interim superness:=more_super; + fill stroke super_arc.e([_three],[_two])..z[_one]e}}; % lobe +if serifs: + z[_four]=z[_three]; + pos[_four](cap_curve if hefty:-3stem_corr fi,0); + pos[_five](vair',-90); bot y[_five]r=-d-oo; y[_six]-.5flare=-.85d; + pos[_six](cap_hair,-180); pos[_seven](bulb_diam,-180); + rt x[_seven]l=max(lft x[_zero]l-jut+bulb_diam, + floor x[_three]-3.5u if monospace: / expansion_factor fi); + z[_six]r=z[_seven]r; + x[_five]=max(rt x[_seven]l,.6[x[_four],x[_seven]r]); + (x,y[_five]r)=whatever[z[_five]l,z[_four]l]; + x[_five]r:=max(x,.5[x[_six]r,x[_five]]); + filldraw stroke super_arc.e([_four],[_five]); + bulb([_five],[_six],[_seven]); % bulb +else: + pickup fine.nib; z[_four]=z[_three]; + pos[_four](max(fine.breadth,cap_curve if hefty:-3stem_corr fi),0); + pos[_eight](vair,-90); pos[_five](flare,-105); + rt x[_five]r=x[_three]-6u; bot y[_five]r=-d; + y[_five]l:=good.y y[_five]l; x[_five]l:=good.y x[_five]l; + bot y[_eight]r=-d-o; x[_eight]=.35[lft x[_five]r,x[_three]r]; + filldraw stroke super_arc.e([_four],[_eight]) + & term.e([_eight],[_five],left,.75,4); fi +%%% +% udiagonal; +pickup tiny.nib; +numeric right_jut,stem[],alpha[]; +right_jut=if serifs:.6cap_jut else:.4tiny fi; +stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); +top y3=h; rt x3r=hround(r-letter_fit-u-right_jut); x4=x1; y4=1/3h; +alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); +penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); +forsuffixes $=l,r: y3'$=h; y4'$=.52h; +z4'$=z3'$+whatever*(z3-z4); z4$=z3'$+whatever*(z3-z4); endfor +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +z4'=.5[z4'l,z4'r]; pickup fine.nib; +fill z4'r--diag_end(4r,3'r,1,.5,3'l,4l)--z4'l--cycle; % upper diagonal +%% +if serifs: + numeric inner_jut,up_inner_jut; + z1'=z1; pos1'(fudged.cap_stem,0); z2'=z2; pos2'(fudged.cap_stem,0); + if rt x1'r+cap_jut+.5u+1<=lft x3l-1.2cap_jut: up_inner_jut=1.2cap_jut; + else: rt x1'r+cap_jut+.5u+1=lft x3l-up_inner_jut; fi + if rt x2r+cap_jut+.5u+1<=x[_three]r: inner_jut=cap_jut; + else: rt x2r+inner_jut+.5u+1=x[_three]r; fi + dish_serif(3,4',e,2/3,up_inner_jut,f,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); fi % lower stem serif +penlabels(1,2,3,4,5,6, 7,8,9,10,11,12,13,14); endchar; + +lhchar "Uppercase Cyrillic letter L_tl - EL tail"; +cyrchar(L_tl,13.5u#,cap_height#,desc_depth#); % DL_width:N_width +if is_small_cap: getcharcode(l_tl); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi, %DL_adj + cap_serif_fit#); % +% upper_l; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; %stem +numeric bulb_diam; bulb_diam=flare+(cap_stem-stem); +numeric light_hair,bot_vair,left_jut; +light_hair=max(tiny.breadth,fudged.hair if hefty:-4stem_corr fi); +left_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit-rt x2r-.65u) fi; +bot_vair=Vround(.5[vair,light_hair]); +x3=1/3[w-rt x1r-(1/6left_jut),rt x1r] if not serifs:-.5(cap_stem-u) fi+eps; +if serifs: + pos3(light_hair,0); pos4(light_hair,-90); + pos6(bulb_diam,-180); pos5(cap_hair,-180); + top y3=h; y6=1/6h-max(0,flare-stem-2vair_corr-.5); z6r=z5r; + lft x6r=l+letter_fit+hround(.5u-.5); + x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]); bot y4r=-o; + filldraw stroke z4e{right}.. + controls (min(15/16[x4,x3],max(x4,lft x6r+2flare))+(x3e-x3)+eps,y4e) + and (x3e,good.y(min(y6-.5,1/3h)+1/3(y4e-y4))-eps)..z3e; % left tail + {{less_tense; bulb(4,5,6)}}; +else: + pos3'(slab,90); pos1'(slab,90); + lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h; + filldraw stroke z3'e--z1'e; + pickup fine.nib; pos3(max(fine.breadth,light_hair),0); pos4(bot_vair,-90); pos5(bot_vair,-90); + bot y5r=0; x4=2/3[x3l,x5r]; lft x5=l+letter_fit+hround(.35u-.5); + bot y4r=bot y5r; y3=y3'; x4l:=.25[x4,x5]; + path p; + p=stroke z3{down} + ..controls (x3,y5+.35h-eps) and (min(7/8[x4,x3],x5+2.5light_hair+.5u),y4) + ..{left}z4--z5; + z6=point .35 of p; + pos6(max(fine.breadth,7/8[bot_vair,light_hair]),angle(direction .35 of p)+90); + filldraw stroke z3e{down}...z6e{direction .35 of p}...{left}z4e--z5e; fi % arc +%%% +if serifs: + x0=x3; y0=0; + numeric inner_jut; inner_jut=min(.5(lft x1l-rt x3r)-eps,.5cap_jut); + %dish_serif(2,1,a,1/3,cap_jut,b,1/3,cap_jut); %lower right serif + nodish_serif(1,2,c,1/3,inner_jut,d,1/3,cap_jut); %upper right serif + nodish_serif(3,0,e,1/3,1.05cap_jut,f,1/3,inner_jut); %upper left serif + filldraw z.c0--z.c1--z.f1--z.f0--cycle; fi % upper inter_serif bar +%%%%% +% L_tail(2); +_zero:=2; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+if serifs: vair' else: slab fi+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=floor x[_zero]-2.5u if monospace: / expansion_factor fi; + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](slab,-90); pos[_three](flare,-105); + rt x[_three]r=x[_zero]-4u; bot y[_three]r=-d; + bot y[_two]r=-d-o; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(0,1,2,3,4,5,6, 7,8,9,10,11); endchar; + +lhchar "Uppercase Cyrillic letter N_dsc - EN descender"; +cyrchar(N_dsc,13.5u#,cap_height#, + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(n_dsc); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#, + cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi); %DL_adj +% upper_n; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(cap_bar,90); penpos6(cap_bar,90); +x5=x1; x6=x3; y5=y6=.52h; +fill stroke z5e--z6e; % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + if is_ogonek: + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +fi +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |stem| is drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + numeric right_jut; + right_jut=if serifs: max(limit_dist,1.1cap_jut) else: hround (r-rt x4r-.65u) fi; + if not serifs: + numeric arm_thickness; arm_thickness=vround(slab-vair_corr); + save slab; slab:=arm_thickness; fi %bottom.desc.slab + r_serif(4,3,x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter N_tl - EN tail"; +cyrchar(N_tl,13.5u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(n_tl); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_n; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=bot y4=0; +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +penpos5(cap_bar,90); penpos6(cap_bar,90); +x5=x1; x6=x3; y5=y6=.52h; +fill stroke z5e--z6e; % bar +%%% +if serifs: + numeric inner_jut; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); fi % upper right serif + %dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower right serif +%%%%% +% L_tail(4); +_zero:=4; +_one:=7; _two:=8; _three:=9; _four:=10; _five:=11; +% +pickup fine.nib; +pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0); +z[_five]=z[_zero]; x[_one]r=x[_five]r; +bot y[_one]=max(-1/3d,-d+if serifs: vair' else: slab fi+eps); +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=floor x[_zero]-2.5u if monospace: / expansion_factor fi; + filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](slab,-90); pos[_three](flare,-105); + rt x[_three]r=x[_zero]-4u; bot y[_three]r=-d; + bot y[_two]r=-d-o; x[_two]=.4[x[_three]r,x[_zero]r]; + filldraw stroke z[_five]e--super_arc.e([_one],[_two]) + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(1,2,3,4,5,6, 7,8,9,10,11); endchar; + +iff serifs: +lhchar "Uppercase Cyrillic letter S_dsc - ES descender (cedilla)"; +cyrchar(S_dsc,13u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(s_dsc); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% upper_s; +pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90); +pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360); +rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1]; +top y2r=h+o; bot y4r=-o; y3=.5[y2,y4]; +bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps); +y5=max(good.y .95(h-y1),y4l+eps); +(x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u); +(x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u); +filldraw stroke z1e{x2-x1,10(y2-y1)} + ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc +pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o; +x1r-x1'=2cap_curve-fine; y1'=y1; +path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left}; +numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1')); +filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb +%%%%% +% uppercase cedilla/ogonek +if is_ogonek: + path p.r; + p.r=pulled_arc.r(3,4)...{up}z5r; + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + numeric tt; % the time... + tt=if hefty: 2.6 else: 2.5 fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_pos=(point tt of p.r)+.5(the_pen-if serifs: tiny else: fine fi)* + unitvector((direction tt of p.r) rotated 90)-(ogonek_breadth-the_pen,0); + easy_ogonek(the_pen,7,8,9); % ogonek +else: + uppercase_cedilla(x4,0, 7,8,9,10,11); +fi +penlabels(1,1',2,3,4,5,6, 7,8,9,10,11); endchar; + +iff not serifs:% +lhchar "Uppercase Cyrillic letter S_dsc - ES descender (cedilla)"; +cyrchar(S_dsc,11.5u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(s_dsc); fi +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +% uppers_s; +pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); +pos3(cap_curve,180); pos4(slab,270); pos5(flare,275); +rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u; +lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u); +top y1r=vround .95h+o; top y2r=h+o; y3=.5h; +bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l; +filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,.8,4); % arc and terminals +%%%%% +% uppercase cedilla/ogonek +if is_ogonek: + path p.r; + p.r=term.r(4,5,right,.8,4); + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + numeric tt; % the time... + tt=if is_bold: .3 else: .2 fi; + join_angle=angle((direction tt of p.r) rotated 180); + ogonek_move=-hi.o; + ogonek_pos=(point tt of p.r)+.5(the_pen-if serifs: tiny else: fine fi)* + unitvector((direction tt of p.r) rotated 90)-(ogonek_breadth-the_pen,0); + easy_ogonek(the_pen,7,8,9); % ogonek +else: + uppercase_cedilla(x4,0, 6,7,8,9,10); +fi +penlabels(1,1',2,3,4,5, 6,7,8,9,10); endchar; + +% Short U moved up for LH fonts + +lhchar "Uppercase Cyrillic letter Y - straight U (looks like Y)"; +cyrchar(Y,13u#,cap_height#,0); +if is_small_cap: getcharcode(y); fi +italcorr cap_height#*slant+.45u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_y; +numeric left_stem,right_stem,outer_jut,dy,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.05u; +x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; y2=y3=y5=.4h; +dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=0; +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0>y2+cap_notch_cut: + y0:=y2+cap_notch_cut; + fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % diagonals and stem +else: + fill z0--diag_end(0,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % diagonals and stem +if serifs: + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5); + if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif + dish_serif(6',5,e,1/3,cap_jut,f,1/3,cap_jut); fi % lower serif +penlabels(0,1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter Y_hcrs - straight U hcrossed"; +cyrchar(Y_hcrs,13u#,cap_height#,0); +if is_small_cap: getcharcode(y_hcrs); fi +italcorr cap_height#*slant+.45u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_y; +numeric left_stem,right_stem,outer_jut,dy,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.05u; +x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; y2=y3=y5=.4h; +dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=0; +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0>y2+cap_notch_cut: + y0:=y2+cap_notch_cut; + fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1} + ...{down}z0+.5left--cycle; % diagonals and stem +else: + fill z0--diag_end(0,4l,1,1,4r,3r)--z5r + --diag_end(5r,6r,1,1,6l,5l)--z5l + --diag_end(2l,1l,1,1,1r,0)--cycle; fi % diagonals and stem +if serifs: + numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5); + if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; + else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % upper left serif + dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif + dish_serif(6',5,e,1/3,cap_jut,f,1/3,cap_jut); fi % lower serif +% hcross +pickup crisp.nib; pos7(bar,90); pos8(bar,90); +x7=.25w; x8=.75w; top y7r=top y8r=vround (y3-eps); +filldraw stroke z7e--z8e; +penlabels(0,1,2,3,4,5,6, 7,8); endchar; + +lhchar "Uppercase Cyrillic letter H_dsc - KHA descender"; +cyrchar(H_dsc,13u#,cap_height#, + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth +if is_small_cap: getcharcode(h_dsc); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_h; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1); +outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut; +x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-outer_jut; +y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); +alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +if hefty: + z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.1[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' + --diag_end(34',4l,.5,1,4r,24')--z24' + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: + fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +numeric inner_jut[]; pickup tiny.nib; % moved for cyr_serif +prime_points_inside(3,2); prime_points_inside(4,1); +if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi +if serifs: + prime_points_inside(1,4); prime_points_inside(2,3); + if rt x1'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + if is_ogonek: + dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + fi + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + numeric right_jut; + right_jut=if serifs: 1.1 outer_jut else: .4tiny fi; + if not serifs: + numeric arm_thickness; arm_thickness=vround(slab+vair_corr); + save slab; slab:=arm_thickness; fi %bottom.desc.slab + r_serif(4',1,x,1/3,inner_jut2,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(0,1,2,3,4,12,13,24,34); endchar; + +lhchar "Uppercase Cyrillic letter H_tl (looks like X)"; +cyrchar(H_tl,13u#,cap_height#,desc_depth#); +if is_small_cap: getcharcode(h_tl); fi +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_h_tail; +numeric stem[],outer_jut,xjut,alpha[]; +stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1); +outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut; +x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-outer_jut; +y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); +alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +numeric t; t=slab+bracket; +forsuffixes e=l,r: z54e=(((0,t)--(w,t)) intersectionpoint (z4e--z1e)); endfor; +if hefty: + z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.1[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')-- + z34'--z54l--z54r--z24' %!!! + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: + fill diag_end(4r,1r,.5,1,1l,4l)-- + z54l--z54r--cycle; %!!! left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +%%% +if serifs: + numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,4); prime_points_inside(2,3); + prime_points_inside(3,2); prime_points_inside(4,1); + if rt x1'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + %dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + dish_serif(2',3,e,2/3,inner_jut1+xjut,f,1/2,outer_jut+xjut)(dark); % upper right serif + dish_serif(3',2,g,1/2,outer_jut+xjut,h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +%%%%% +% L_tail(4);X_tail +_zero:=4; +_one:=7; _two:=8; _three:=9; _four:=10; +% +% X_ +pickup fine.nib; +stem3=hround (max(fine.breadth,.5[stem1,x[_zero]r-x[_zero]l])); +x[_one]'r=x[_zero]r; +penpos[_one]'(stem3,0); pos[_one](stem3,0); z[_one]=z[_one]'; +bot y[_one]=max(-1/3d-eps,-d+if serifs: vair'else: slab fi); +(x[_one]'l,y54')=whatever[z4l,z4l+dir angle(z4l-if serifs:z1l else:z34'fi)]; +z54'=(x[_one]'l,y54'); +fill z54l{z4r-z1r} + ..controls (z54').. + {down}z[_one]'l--z[_one]'r{up} + ..controls (z4r).. + {z1r-z4r}z54r--cycle; %link +% _X +if serifs: + numeric bulb_diam; + bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); + pos[_two](vair',-90); pos[_three](hair,-180); + pos[_four](bulb_diam,-180); + x[_two]=.5[x[_one],x[_three]r]; + bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d; + z[_three]r=z[_four]r; + rt x[_four]l=floor x[_one]-2.5u if monospace: / expansion_factor fi;%!!! + filldraw stroke pulled_arc.e([_one],[_two]);%!!! + bulb([_two],[_three],[_four]); % bulb +else: + pos[_two](slab,-90); pos[_three](flare,-105); + rt x[_three]r=x[_one]-4u; bot y[_three]r=-d;%!!! + bot y[_two]r=-d-o; x[_two]=.4[x[_three]r,x[_one]r];%!!! + filldraw stroke super_arc.e([_one],[_two])%!!! + & term.e([_two],[_three],left,.8,4); fi +%%% +penlabels(0,1,2,3,4,12,13,24,34,54,54', 5,6,7',8); endchar; + +lhchar "Uppercase Cyrillic letter CH_ldsc - CHE left descender"; +cyrchar(CH_ldsc,13.5u#,cap_height#,cap_sbeak#); +if is_small_cap: getcharcode(ch_ldsc); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +% upper_ch; +pickup tiny.nib; +pos1(cap_stem,0); pos2(cap_stem,0); pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; +x5l=1/3[x1,x3]; y5=y6; if serifs: y6'=y6-cap_hair+1.05cap_stem; fi +x6=x6'=x3; y6=good.y (h-.52h if serifs: -.35(.5[cap_hair,.7cap_stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +clearpen; penpos2'(cap_stem,0); z2'=z2; +numeric middle_weight; middle_weight=.5[vair,cap_band]; +penpos5(middle_weight,90); penpos6(middle_weight,90); penpos6'(middle_weight,90); +if serifs: + if y6'-y6>=middle_weight+1+eps: + fill stroke pulled_arc.e(2',5) & z5e{right}...{.75(z5-z6)+z6'}z6'e; + else: + fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + %dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif +else: + filldraw stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc +%%%%% +% upper left descender +numeric right_jut; +right_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit+.5(stem-u)-rt x4r-.65u) fi; +l_serif(4,3,x,1/3,beak_darkness,right_jut,beak_jut,y,1/3,cap_jut); % lower left descender +penlabels(1,2,3,4,5,6); endchar; + +lhchar "Uppercase Cyrillic letter CH_rdsc - CHE right descender"; +cyrchar(CH_rdsc,13.5u#,cap_height#, + if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth` +if is_small_cap: getcharcode(ch_rdsc); fi +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +adjust_fit(cap_serif_fit#, + cap_serif_fit# if not serifs:+.5(cap_stem#-u#) fi); %DL_adj +% upper_ch; +pickup tiny.nib; +pos1(cap_stem,0); pos2(cap_stem,0); pos3(cap_stem,0); pos4(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1; +top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; +x5l=1/3[x1,x3]; y5=y6; if serifs: y6'=y6-cap_hair+1.05cap_stem; fi +x6=x6'=x3; y6=good.y (h-.52h if serifs: -.35(.5[cap_hair,.7cap_stem]) fi); +filldraw stroke z1e--z2e; % left stem +filldraw stroke z3e--z4e; % right stem +clearpen; penpos2'(cap_stem,0); z2'=z2; +numeric middle_weight; middle_weight=.5[vair,cap_band]; +penpos5(middle_weight,90); penpos6(middle_weight,90); penpos6'(middle_weight,90); +if serifs: + if y6'-y6>=middle_weight+1+eps: + fill stroke pulled_arc.e(2',5) & z5e{right}...{.75(z5-z6)+z6'}z6'e; + else: + fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc + numeric inner_jut; pickup tiny.nib; + if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; + else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi +%%% + dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif + dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif + if is_ogonek: + dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif + fi +else: + filldraw stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc +%%%%% +% uppercase descender/ogonek +if is_ogonek: + def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi + enddef; + % |stem| is drawn by |tiny| pen, hence |tiny| in the following equation: + ogonek_pos=(x4 if not serifs: l if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; + easy_ogonek(the_pen,7,8,9); % ogonek +else: + numeric right_jut; + right_jut= + if serifs: max(limit_dist,1.1cap_jut) + else: hround (w+cap_serif_fit+.5(stem-u)-rt x4r-.65u) fi; + if not serifs: + numeric arm_thickness; arm_thickness=vround(slab-vair_corr); + save slab; slab:=arm_thickness; fi % bottom.desc.slab + r_serif(4,3,x,1/3,cap_jut,y,1/3,beak_darkness,right_jut,beak_jut); % lower right descender +fi +penlabels(1,2,3,4,5,6, 7,8,9); endchar; + +lhchar "Uppercase Cyrillic letter SCHWA"; +cyrchar(SCHWA,11.25u#+max(.75u#,.5cap_curve#),cap_height#,0); +if is_small_cap: getcharcode(schwa); fi +italcorr .7cap_height#*slant-.5u#; %O +adjust_fit(0 if monospace: +\\-.25u#,-.25u#+ else:,fi\\ 0); +% upper_schwa;`large e' shape (ecfonts) +numeric left_curve,right_curve; +left_curve=right_curve+3stem_corr=cap_curve if not serifs: -1.5stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; +pos1(right_curve,-180); pos2(vair',-90); pos3(left_curve,0); +y1=.48h; bot y2r=-o; y0l=top y1; +if serifs: x2-.25u=x4=.5w-.5u; else: x2=x4=.5w-.25u; fi +lft x1r=hround max(.5u,u-.5right_curve); +rt x3r=w-hround max(.75u,1.5u-.5left_curve); %lower_e+.25u +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; top y4r=h+o; +if serifs: + pos4(cap_band,90); + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4); % left bowl, arc, + pickup fine.nib; pos4'(cap_band,90); z4'=z4; + lft x5r=max(hround u,lft x1r+1/3u+eps); + pos5(cap_hair,180); bot y5=min(vround .675h,bot y4l-eps); + filldraw stroke z4'e{left}...{x5-x4,10(y5-y4)}z5e; % and terminal + pos6(.3[fine.breadth,cap_hair],180); x6r=x5r; top y6=h+o; + x5'-x5r=2cap_curve-fine; y5'=y5; + path upper_arc; upper_arc=z5{x4-x5,10(y4-y5)}..{right}z4; + numeric t; t=xpart(upper_arc intersectiontimes (z6l--z5')); + filldraw z5r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % upper serif +else: + pos4(slab,90); + {{interim superness:=min(1.03superness,more_super); + filldraw stroke super_arc.e(2,3)}}; + filldraw stroke super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(slab,90); z4=z4'; + pos5(1.2flare,100); lft x5r=lft x1r+u; top y5r=vround .95h+o; + filldraw stroke rterm.e(4',5,left,.75,20); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l-7/8[thin_join,vair']; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: x0$=xpart(((w,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +%%%%% +penlabels(0,1,2,3,4,5,6); endchar; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lkligtbl.mf b/Master/texmf-dist/fonts/source/lh/base/lkligtbl.mf new file mode 100644 index 00000000000..0214dc8cc72 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lkligtbl.mf @@ -0,0 +1,138 @@ + +% lkligtbl.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) A.Berdnikov +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Macro definitions for lig & kern data +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +if known loaded_lgligtbl: endinput; fi +loaded_lgligtbl:=1; % if known this file has been loaded + +%if unknown loaded_lgerrors: +% index:=0; input lgerrors; % error messages; +%fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% %% +%% Procedures which may be used to make the ligtable data %% +%% independent from the particular font coding scheme %% +%% %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +if unknown dummy_kern_char: + numeric dummy_kern_char; dummy_kern_char:=0; +fi + +boolean debug_ligdata; debug_ligdata:=false; + +def beginligtable = + boolean flag_gener, flag_sp, flag_fst; + flag_gener:=false; flag_sp:=false; flag_fst:=true; + def table_data = enddef; +enddef; + +vardef labelchar (text chars) = + forsuffixes $=chars: + if (str $) <> "": if known $: if $ > -1: + if flag_sp: + flag_fst:=false; + expandafter def expandafter table_data expandafter = + table_data , $ : + enddef; + else: + expandafter def expandafter table_data expandafter = + table_data $ : + enddef; + fi + flag_gener:=true; flag_sp:=false; + fi fi fi + endfor; +enddef; + +vardef setkern @# (text chars)= + if flag_gener: + forsuffixes $=chars: + if (str $) <> "": if known $: if $ > -1: + if flag_sp: + expandafter def expandafter table_data expandafter = + table_data , $ kern @# + enddef; + else: + expandafter def expandafter table_data expandafter = + table_data $ kern @# + enddef; + fi + flag_sp:=true; + fi fi fi + endfor; + fi; +enddef; + +vardef setlig(suffix charA, charB) = + if flag_gener: + if (known charA) and (known charB): + if (charA > -1) and (charB > -1): + if flag_sp: + expandafter def expandafter table_data expandafter = + table_data , charA =: charB + enddef; + else: + expandafter def expandafter table_data expandafter = + table_data charA =: charB + enddef; + fi; + flag_sp:=true; + fi fi; + fi; +enddef; + +vardef endligtable= + if debug_ligdata: showtoken table_data; fi + if flag_gener: + if not flag_sp: + if not flag_fst: + message ("Something is wrong in ligtable:"); + showtoken table_data; + message ("Dummy kerning with char " + & (decimal dummy_kern_char) & " is inserted"); + expandafter def expandafter table_data expandafter = + table_data dummy_kern_char kern 0 + enddef; + ligtable table_data; + fi + else: + ligtable table_data; + fi; + fi; + def table_data = enddef; +enddef; + +vardef liggroup @# (text chars)= + def @# = enddef; + forsuffixes $=chars: + if (str $) <> "": if known $: if $ > -1: + expandafter def expandafter @# expandafter = + @# , $ + enddef; + fi fi fi + endfor; + if debug_ligdata: showtoken @#; fi +enddef; + +endinput; +% end-of-file diff --git a/Master/texmf-dist/fonts/source/lh/base/llcligtb.mf b/Master/texmf-dist/fonts/source/lh/base/llcligtb.mf new file mode 100644 index 00000000000..b787c738898 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/llcligtb.mf @@ -0,0 +1,120 @@ +% +% llcligtb.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lig & kern data for Caps and Small Caps font (T2) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + +ligtable "P": + "T": + "Y": "a" kern kk#, + "A" kern kk#; + +ligtable "F": + "V": + "W": if serifs: "a" kern kkk#, + "A" kern kkk#, + else: "a" kern kk#, + "A" kern kk#, fi + "K": + "X": "o" kern k#, + "O" kern k#, + "c" kern k#, + "C" kern k#, + "g" kern k#, + "G" kern k#, + "q" kern k#, + "Q" kern k#; + +ligtable "O": + "D": "x" kern k#, + "X" kern k#, + "w" kern k#, + "W" kern k#, + "a" kern k#, + "A" kern k#, + "v" kern k#, + "V" kern k#, + "y" kern k#, + "Y" kern k#; + +ligtable "A": + if serifs: "R": fi + "c" kern k#, + "C" kern k#, + "o" kern k#, + "O" kern k#, + "g" kern k#, + "G" kern k#, + "u" kern k#, + "U" kern k#, + "q" kern k#, + "Q" kern k#, + "L": "T" kern kk#, + "t" kern kk#, + "Y" kern kk#, + "y" kern kk#, + "V" kern kkk#, + "v" kern kkk#, + "W" kern kkk#, + "w" kern kkk#; + +ligtable "I": "I" kern -k#; %fi % Richard III + +%$.#:=lower.$.#; +k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning + +ligtable "p": + "t": + "y": "a" kern kk#; + +ligtable "f": + "v": + "w": "a" kern if serifs: kkk# else: kk#\\fi, + "k": + "x": "o" kern k#, + "c" kern k#, + "g" kern k#, + "q" kern k#; + +ligtable "o": + "d": "x" kern k#, + "w" kern k#, + "a" kern k#, + "v" kern k#, + "y" kern k#; + +ligtable "a": + if serifs: "r": fi + "c" kern k#, + "o" kern k#, + "g" kern k#, + "u" kern k#, + "q" kern k#, + "l": "'" kern kk#, + "t" kern kk#, + "y" kern kk#, + "v" kern kkk#, + "w" kern kkk#; + +ligtable "i": "i" kern -k#; % skiing + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lliligtb.mf b/Master/texmf-dist/fonts/source/lh/base/lliligtb.mf new file mode 100644 index 00000000000..9b71320faca --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lliligtb.mf @@ -0,0 +1,142 @@ +% +% lliligtb.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lig & kern data for Italic font (T2) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +% +% addtitional kern value +% +numeric itc#; % modified italic correction on `f' and `ff' %exilig +itc#=(asc_height#-x_height#)*slant+.75u#; + +%>>>!!! +ligtable + "f": "i"=:oct"034", + "f"=:oct"033", + "l"=:oct"035", + "'" kern itc#, + "`" kern itc#, + oct"020" kern itc#, + oct"021" kern itc#, + "?" kern itc#, + "!" kern itc#, + ")" kern itc#, + "]" kern itc#; +ligtable + oct"033": % ff + "i"=:oct"036", + "l"=:oct"037", + "'" kern itc#, + "`" kern itc#, + oct"020" kern itc#, + oct"021" kern itc#, + "?" kern itc#, + "!" kern itc#, + ")" kern itc#, + "]" kern itc#; +%<<<!!! + +ligtable "d": + "w": + "l": "l" kern +u#; + +ligtable "F": + "W": %!!! + "V": "o" kern kk#, + "e" kern kk#, + "u" kern kk#, + "r" kern kk#, + "a" kern kk#, + "A" kern kkk#, +% "K": + "X": + "O" kern k#, + "C" kern k#, + "G" kern k#, + "Q" kern k#; + +%>>>!!! +ligtable + "K": "v" kern k#, + "w" kern k#, + "O" kern k#, + "C" kern k#, + "G" kern k#, + "Q" kern k#; +%<<<!!! + + +ligtable "T": "y" kern kk#, + "Y": "e" kern kk#, + "o" kern kk#, + "r" kern kk#, + "a" kern kk#, + "u" kern kk#, + "P": +% "W": + "A" kern kk#; + +ligtable "O": + "D": "X" kern k#, + "W" kern k#, + "A" kern k#, + "V" kern k#, + "Y" kern k#; + +ligtable "A": + "y" kern k#, %!!! + "R": "n" kern k#, + "l" kern k#, + "r" kern k#, + "u" kern k#, + "m" kern k#, + "t" kern k#, + "i" kern k#, + "C" kern k#, + "O" kern k#, + "G" kern k#, + "h" kern k#, + "b" kern k#, + "U" kern k#, + "k" kern k#, + "v" kern k#, + "w" kern k#, + "Q" kern k#, + "L": "T" kern kk#, + "Y" kern kk#, + "V" kern kkk#, + "W" kern kkk#, + "b": + "c": + "e": + "o": + "p": + "r": "e" kern -u#, + "a" kern -u#, + "o" kern -u#, + "d" kern -u#, + "c" kern -u#, + "g" kern -u#, + "q" kern -u#; + +ligtable "n": "'" kern kkk#; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/llmligtb.mf b/Master/texmf-dist/fonts/source/lh/base/llmligtb.mf new file mode 100644 index 00000000000..d48f1497b4b --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/llmligtb.mf @@ -0,0 +1,85 @@ +% +% llmligtb.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Ligatures +% This file should be called for monospaced fonts ! +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% The following ligatures are integrated: +% +% for CM fonts +% !` +% ?` +% for T2 +% -- gives - +% --- gives -- +% -<hyphenchar> gives <hyphenchar> +% common +% << +% >> +% ,, +% '' +% `` +% + +LHver_check(3,4); % like |version_check| in ec + +if known spanish_shriek: % for CM fonts only + + ligtable "!": "`" =: spanish_shriek; + ligtable "?": "`" =: spanish_query; + +fi + +if genmode="ex": % for T2 only + +%english quotes + ligtable "`": "`" =: oct"020"; + ligtable "'": "'" =: oct"021"; + +%dashes + ligtable "-": + "-" =: oct"025", % number range dash equals "-" + oct"177" =: oct"177"; % <hyphen><hyphenchar> => <hyphenchar> +% +fi + + +% ligatures for cyrillic quotes +if (altcoding and (ligs <> 0)) % for CM + or (genmode="ex"): % if T2 started + + beginligtable + labelchar ([ASCII"<"]); + setlig ([ASCII"<"],CYR_.flqq); % "<<" + endligtable; + + beginligtable + labelchar ([ASCII">"]); + setlig ([ASCII">"],CYR_.frqq); % ">>" + endligtable; + + beginligtable + labelchar ([ASCII","]); + setlig ([ASCII","],CYR_.baseqq); % ",," + endligtable; + +fi % ligatures for cyrillic quotes + +% +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/llrligtb.mf b/Master/texmf-dist/fonts/source/lh/base/llrligtb.mf new file mode 100644 index 00000000000..886553d2bb6 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/llrligtb.mf @@ -0,0 +1,228 @@ +% +% llrligtb.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Lig & kern data for Roman font (T2) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +% +% addtitional kern value +% +numeric itc#; % modified italic correction on `f' and `ff'%exrlig +itc#=if serifs: max(0,flare#-.25u#) else: 1.25u# fi; + +%>>>!!! +ligtable + "f": "i"=:oct"034", + "f"=:oct"033", + "l"=:oct"035", + "'" kern itc#, + "`" kern itc#, + oct"020" kern itc#, + oct"021" kern itc#, + "?" kern itc#, + "!" kern itc#, + ")" kern itc#, + "]" kern itc#; +ligtable + oct"033": % ff + "i"=:oct"036", + "l"=:oct"037", + "'" kern itc#, + "`" kern itc#, + oct"020" kern itc#, + oct"021" kern itc#, + "?" kern itc#, + "!" kern itc#, + ")" kern itc#, + "]" kern itc#; +%<<<!!! + +ligtable "k": + "W" kern kk#, %!!! + "V" kern kk#, %!!! + if serifs: + "v": "a" kern -u#, + fi\\ + "w": "e" kern k#, + "a" kern k#, + "o" kern k#, + "c" kern k#; + +ligtable "P": "A" kern kk#, + "y": "o" kern k#, + "e" kern k#, + "a" kern k#, + "." kern kk#, + "," kern kk#; + +ligtable "F": + "V": + "W": if serifs: + "o" kern kk#, + "e" kern kk#, + "u" kern kk#, + "r" kern kk#, + "a" kern kk#, + "A" kern kkk#, + %>>>!!! + "y" kern kk#, + "v" kern kk#, + "s" kern kk#, + "c" kern kk#, + "d" kern kk#, + "g" kern kk#, + "m" kern kk#, + "n" kern kk#, + "p" kern kk#, + "w" kern kk#, + "z" kern kk#, + %<<<!!! + else: + "o" kern k#, + "e" kern k#, + "u" kern k#, + "r" kern k#, + "a" kern k#, + "A" kern kk#, + %>>>!!! + "y" kern k#, + "v" kern k#, + "s" kern k#, + "c" kern k#, + "d" kern k#, + "g" kern k#, + "m" kern k#, + "n" kern k#, + "p" kern k#, + "w" kern k#, + "z" kern k#, + %<<<!!! + fi +% "K": + "X": + "O" kern k#, + "C" kern k#, + "G" kern k#, + "Q" kern k#; + +%>>>!!! + ligtable "K": if serifs: + "v" kern kk#, + "w" kern k#, + else: + "v" kern k#, + fi + "o" kern k#, + "C" kern k#, + "G" kern k#, + "Q" kern k#; +%<<<!!! + +ligtable "T": "y" kern if serifs: k# else: kk# fi, + "Y": "e" kern kk#, + "o" kern kk#, + "r" kern kk#, + "a" kern kk#, + "A" kern kk#, + %>>>!!! + "n" kern kk#, + oct"031" kern kk#, % \i + "c" kern kk#, + "d" kern kk#, + "g" kern kk#, + "p" kern kk#, + "s" kern kk#, + "v" kern kk#, + "w" kern kk#, + "x" kern kk#, + "z" kern kk#, + %<<<!!! + "u" kern kk#; + +ligtable "O": + "D": "X" kern k#, + "W" kern k#, + "A" kern k#, + "V" kern k#, + "Y" kern k#; + +if serifs: + ligtable "h": + "m": + "n": + %>>>!!! + "W" kern kk#, "V" kern kk#, + %<<<!!! + "t" kern k#, + "u" kern k#, + "b" kern k#, + "y" kern k#, + "v" kern k#, + "w" kern k#; + + ligtable "c": "h" kern k#, + "k" kern k#; +fi + +ligtable "o": + "b": + "p": "e" kern -k#, + "o" kern -k#, + "x" kern k#, + "d" kern -k#, + "c" kern -k#, + "q" kern -k#, + "a": if serifs: "v" kern k#, + "j" kern u#, + else: "r" kern k#, fi + "t": "y" kern k#, + "u": "w" kern k#; + +ligtable "A": + %>>>!!! + "y" kern if serifs: kk# else: k# fi, + "v" kern if serifs: kkk# else: k# fi, + "w" kern if serifs: kk# else: k# fi, + "c" kern k#, + "d" kern k#, + "e" kern k#, + "o" kern k#, + "q" kern k#, + %<<<!!! + if serifs: "R": fi\\ "t" kern k#, + "C" kern k#, + "O" kern k#, + "G" kern k#, + "U" kern k#, + "Q" kern k#, + "L": "T" kern kk#, + "Y" kern kk#, + "V" kern kkk#, + "W" kern kkk#; + +ligtable "g": "j" kern -k#; % logjam + +ligtable "I": "I" kern -k#; % Richard III + +%>>>!!! +ligtable "e": "V" kern kk#; % eV +%<<<!!! + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/llvligtb.mf b/Master/texmf-dist/fonts/source/lh/base/llvligtb.mf new file mode 100644 index 00000000000..902ea7a956a --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/llvligtb.mf @@ -0,0 +1,244 @@ +% +% llvligtb.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.1 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Ligatures +% This file should be called for NOT monospaced fonts ! +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +% The following ligatures are integrated: +% +% for CM fonts: +% !` +% ?` +% for T2 +% -- gives - +% --- gives -- +% -<hyphenchar> gives <hyphenchar> +% common +% << +% >> +% ,,(LH:in new version only) +% '' +% `` +% + +if known spanish_shriek: % for CM fonts only + + ligtable "!": "`" =: spanish_shriek; + ligtable "?": "`" =: spanish_query; + +fi + +if genmode="ex": % for T2 only + + %english quotes + ligtable + "`": "`"=:oct"020", %ec:`` + oct"020" kern 2u#, %ec:`` + "?" kern 2u#, + "!" kern 2u#; + + ligtable + "'": "'"=:oct"021", %ec:'' + oct"021" kern 2u#, %ec:'' + "?" kern 2u#, + "!" kern 2u#; + + %dashes + ligtable + "-": "-" =: oct"025", %endash + oct"177" =: oct"177"; % <hyphen><hyphenchar> => <hyphenchar> + + ligtable + oct"025": "-"=: oct"026"; % "---" => cyremdash in t2 !!! + +fi + + +% ligatures for cyrillic quotes +if (altcoding and (ligs <> 0)) % for CM + or (genmode="ex"): % or if T2 started + + beginligtable + labelchar ([ASCII"<"]); + setlig ([ASCII"<"],CYR_.flqq); % "<<" + endligtable; + + beginligtable + labelchar ([ASCII">"]); + setlig ([ASCII">"],CYR_.frqq); % ">>" + endligtable; + + beginligtable + labelchar ([ASCII","]); + setlig ([ASCII","],CYR_.baseqq); % ",," + endligtable; + +fi % ligatures for cyrillic quotes + +k#:=-.5u#; ku#:=-1u#; kk#:=-1.5u#; kkk#:=-2u#; % four degrees of kerning + +% kerning for T2 only +if genmode="ex": + + beginligtable + labelchar (boundarychar); + setkern [-kk#] ([oct"020"], %ec:`` + [oct"021"], %ec:'' + CYR_.baseqq,%t2:,, + [oct"055"], %- + [oct"140"], %` + [oct"047"]);%' + endligtable; + + beginligtable + labelchar ([oct"020"]); %ec:`` + setkern [2u#] ([oct"140"], %` + [oct"020"]);%ec:`` + setkern [-kk#] (boundarychar); + endligtable; + + beginligtable + labelchar ([oct"021"]); %ec:'' + setkern [2u#] ([oct"047"], %' + [oct"021"]);%ec:'' + setkern [-kk#] (boundarychar); + endligtable; + +fi % for T2 only + + +% here is used full Cyrillic letter stuff for kerning + beginligtable + labelchar (CYR_.baseqq); %ec[oct"022"]:,, + if roman_ec: + setkern [2u#] ([oct"015"]); %ec:, + fi + if altcoding or roman_ec: + setkern [2u#] ([ASCII","]); + fi + if roman_ec: + labelchar ([oct"015"]); + fi + setkern [2u#] (CYR_.baseqq);%t2:,, + setkern [-kk#] (boundarychar); + if altcoding or roman_ec: + setkern [kkk#] ([ASCII"V"]); + setkern [kk#] ([ASCII"W"], + [ASCII"Y"]); + setkern [k#] ([ASCII"O"], + [ASCII"C"], + [ASCII"G"], + [ASCII"Q"]); + if not TITLEfont: + if ROMANfont: + setkern [-kkk#] ([ASCII"j"]); + setkern [u#] ([ASCII"g"]); + fi + if ROMANfont or SmallCapsfont: + setkern [u#] ([ASCII"y"]); + fi + setkern [kk#] ([ASCII"v"]); + setkern [-u#] ([ASCII"w"]); + fi + fi + setkern [-kk#] (CYR_.D); + setkern [kkk#] (CYR_.IZH, + CYR_.IZH_dgr, + CYR_.IZH_uml, + CYR_.IZH_ac); + setkern [kk#] (CYR_.Y, + CYR_.Y_hcrs, + CYR_.Y_bar, + CYR_.Y_ac, + CYR_.LAT_W); + setkern [kk#] (CYR_.U, + CYR_.U_shrt, + CYR_.U_bar, + CYR_.U_gr, + CYR_.U_ac, + CYR_.U_uml, + CYR_.U_dac, + CYR_.U_hat, + CYR_.U_tld, + CYR_.U_com); + setkern [k#] (CYR_.O, + CYR_.O_uml, + CYR_.O_lcom, + CYR_.O_bar, + CYR_.O_ac, + CYR_.F, + CYR_.OTLD, + CYR_.OTLD_uml, + CYR_.OTLD_bar, + CYR_.OTLD_ac, + CYR_.ABH_HA, + CYR_.LAT_Q, + CYR_.OMGA, + CYR_.OMGA_tlo, + CYR_.OT, + CYR_.PSI, + CYR_.FITA, + CYR_.OMGA_rnd, + CYR_.OO_cdot, + CYR_.OO_cddot, + CYR_.S, + CYR_.S_dsc, + CYR_.UKR_E, + CYR_.UKR_E_ac, + CYR_.KOPPA, + CYR_.VKOPPA); + if not TITLEfont: + if ROMANfont: + setkern [-kkk#] (CYR_.lat_j); + fi + if ROMANfont or SmallCapsfont: + setkern [-kk#] (CYR_.d); + setkern [u#] (CYR_.u, + CYR_.u_shrt, + CYR_.u_bar, + CYR_.u_gr, + CYR_.u_ac, + CYR_.u_uml, + CYR_.u_dac, + CYR_.u_hat, + CYR_.u_tld, + CYR_.u_com); + fi + setkern [-u#] (CYR_.lat_w); + setkern [kk#] (CYR_.izh, + CYR_.izh_dgr, + CYR_.izh_uml, + CYR_.izh_ac, + CYR_.lat_w, + CYR_.y, + CYR_.y_hcrs, + CYR_.y_bar, + CYR_.y_ac); + fi + endligtable; + + beginligtable + labelchar (CYR_.frqq);%ec[oct"024"]:>> + setkern [kk#] ([ASCII"."], + [ASCII","]); + endligtable; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lwnligs.mf b/Master/texmf-dist/fonts/source/lh/base/lwnligs.mf new file mode 100644 index 00000000000..ce7d9b745f2 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lwnligs.mf @@ -0,0 +1,190 @@ +% +% lwnligs.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% File with ligs for Washington encoding (for tt-fonts) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +% ligatures for cyrillic quotes +beginligtable + labelchar ([ASCII"["]); + setlig ([ASCII"["],CYR_.flqq); % "<<" +endligtable; + +beginligtable + labelchar ([ASCII"]"]); + setlig ([ASCII"]"],CYR_.frqq); % ">>" +endligtable; +% ligatures for cyrillic quotes + +beginligtable + labelchar (CYR_.D); setlig([ASCII "1"],CYR_.DJE); + setlig([ASCII "2"],CYR_.DZHE); setlig([ASCII "3"],CYR_.LAT_S); + setlig([ASCII "J"],CYR_.DJE); setlig([ASCII "j"],CYR_.DJE); +endligtable; + +beginligtable + labelchar (CYR_.L); setlig([ASCII "1"],CYR_.LJE); + setlig([ASCII "J"],CYR_.LJE); setlig([ASCII "j"],CYR_.LJE); +endligtable; + +beginligtable + labelchar (CYR_.Z); setlig([ASCII "1"],CYR_.ZH); + setlig([ASCII "H"],CYR_.ZH); setlig([ASCII "h"],CYR_.ZH); +endligtable; + +beginligtable + labelchar (CYR_.E); setlig([ASCII "0"],CYR_.YO); + setlig([ASCII "1"],CYR_.EREV); setlig([ASCII "2"],CYR_.UKR_E); +endligtable; + +beginligtable + labelchar (CYR_.S); + setlig([ASCII "H"],CYR_.SH); setlig([ASCII "h"],CYR_.SH); +endligtable; + +beginligtable + labelchar (CYR_.C); setlig([ASCII "1"],CYR_.TSHE); + setlig([ASCII "H"],CYR_.CH); setlig([ASCII "h"],CYR_.CH); +endligtable; + +beginligtable + labelchar ( CYR_.K ); + setlig([ASCII "H"],CYR_.H); setlig([ASCII "h"],CYR_.H); +endligtable; + +beginligtable + labelchar ( CYR_.T ); + setlig([ASCII "S"],CYR_.C); setlig([ASCII "s"],CYR_.C); +endligtable; + +beginligtable + labelchar (CYR_.d); + setlig([ASCII "1"],CYR_.dje); setlig([ASCII "2"],CYR_.dzhe); + setlig([ASCII "3"],CYR_.lat_s); setlig([ASCII "j"],CYR_.dje); +endligtable; + +beginligtable + labelchar (CYR_.l); + setlig([ASCII "1"],CYR_.lje); setlig([ASCII "j"],CYR_.lje); +endligtable; + +beginligtable + labelchar (CYR_.z); setlig([ASCII "1"],CYR_.zh); + setlig([ASCII "h"],CYR_.zh); +endligtable; + +beginligtable + labelchar (CYR_.e); + setlig([ASCII "0"],CYR_.yo); setlig([ASCII "1"],CYR_.erev); + setlig([ASCII "2"],CYR_.ukr_e); +endligtable; + +beginligtable + labelchar (CYR_.s); + setlig([ASCII "h"],CYR_.sh); +endligtable; + +beginligtable + labelchar (CYR_.c); + setlig([ASCII "1"],CYR_.tshe); setlig([ASCII "h"],CYR_.ch); +endligtable; + +beginligtable + labelchar ( CYR_.k ); setlig([ASCII "h"],CYR_.h); +endligtable; + +beginligtable + labelchar ( CYR_.t ); setlig([ASCII "s"],CYR_.c); +endligtable; + +beginligtable + labelchar ([ASCII "6"]); + setlig([ASCII "h"],CYR_.SHCH); setlig([ASCII "H"],CYR_.SHCH); +endligtable; + +beginligtable + labelchar ([ASCII "7"]); + setlig([ASCII "h"],CYR_.shch); +endligtable; + +beginligtable + labelchar ([ASCII "I"]); + setlig([ASCII "0"],CYR_.I_shrt); setlig([ASCII "1"],CYR_.LAT_I); +endligtable; + +beginligtable + labelchar ([ASCII "J"]); + setlig([ASCII "1"],CYR_.YA); setlig([ASCII "2"],CYR_.YU); +endligtable; + +beginligtable + labelchar ([ASCII "N"]); + setlig([ASCII "0"],CYR_.No); setlig([ASCII "1"],CYR_.NJE); + setlig([ASCII "J"],CYR_.NJE); setlig([ASCII "j"],CYR_.NJE); +endligtable; + +beginligtable + labelchar ([ASCII "P"]); + setlig([ASCII "1"],CYR_.SFTSN); setlig([ASCII "2"],CYR_.HRDSN); +endligtable; + +beginligtable + labelchar ([ASCII "X"]); + setlig([ASCII "Q"],CYR_.SHCH); setlig([ASCII "q"],CYR_.SHCH); + setlig([ASCII "C"],[ASCII "6"]); setlig([ASCII "c"],[ASCII "6"]); +endligtable; + +beginligtable + labelchar ([ASCII "Y"]); + setlig([ASCII "A"],CYR_.YA); setlig([ASCII "a"],CYR_.YA); + setlig([ASCII "U"],CYR_.YU); setlig([ASCII "u"],CYR_.YU); +endligtable; + +beginligtable + labelchar ([ASCII "i"]); + setlig([ASCII "0"],CYR_.i_shrt); setlig([ASCII "1"],CYR_.lat_i); +endligtable; + +beginligtable + labelchar ([ASCII "j"]); + setlig([ASCII "1"],CYR_.ya); setlig([ASCII "2"],CYR_.yu); +endligtable; + +beginligtable + labelchar ([ASCII "n"]); + setlig([ASCII "1"],CYR_.nje); setlig([ASCII "j"],CYR_.nje); +endligtable; + +beginligtable + labelchar ([ASCII "p"]); + setlig([ASCII "1"],CYR_.sftsn); setlig([ASCII "2"],CYR_.hrdsn); +endligtable; + +beginligtable + labelchar ([ASCII "x"]); + setlig([ASCII "q"],CYR_.shch); setlig([ASCII "c"],[ASCII "7"]); +endligtable; + +beginligtable + labelchar ([ASCII "y"]); + setlig([ASCII "a"],CYR_.ya); setlig([ASCII "u"],CYR_.yu); +endligtable; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lxpseudo.mf b/Master/texmf-dist/fonts/source/lh/base/lxpseudo.mf new file mode 100644 index 00000000000..aa7d9f921f3 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lxpseudo.mf @@ -0,0 +1,105 @@ +% +% lxpseudo.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% expseudo.mf (ec fonts) with another beginning :-) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% This file contains pseudoparameters which are not entered in the +% parameter files, but are computed from the initial parameter set. +% There are also ad hoc parameters needed only once, and scratch +% parameters with different values at each occuerence (like |theta|). +% + +LHver_check(3,4); % like |version_check| in ec + +% Diameters of dots +% +numeric idot_diam#,udot_diam#,pdot_diam#; +idot_diam#=max(dot_size#,cap_curve#); % dot of letters `i' and `j' +udot_diam#=max(dot_size#,cap_curve#); % umlaut dots +pdot_diam#=if monospace: 5/4 fi\\ dot_size#; % punctuation dots + + +% The following umlaut dot diameter is used inside |exbase.mf|: +% dot_diam:=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr)); +% Several symbols just use |dot_size|. + +% |heavy_hair| occurs in italic lowercase `e'. Since there are many +% accented versions of it, it is declared once here + +vardef heavy_hair=hround .2[hair,stem] enddef; + +% |qvair| (quotes vair) for the french quotes + +vardef qvair=max(round(xvair),fine+epsilon) enddef; + +% |limit_dist| is used in |put_accent| and |put_cross| +% (the value of |u| is changed by |mono_adjust|, hence the global setting) + +vardef limit_dist=5/4u enddef; + +% Height of lowercase umlaut, taken from csfonts +% Changed again, since the |lowercase_umlaut| macro works differently + +numeric lc_trema_height#; +% lc_trema_height# = min(cap_height#,9/7x_height#+.5max(dot_size#,cap_curve#)); +lc_trema_height# = min(cap_height#,9/7hi.x_height#+max(dot_size#,cap_curve#)); + + +% More parametrisations for accents from csaccent.mf (csfonts): + +numeric uc_acc_height, uc_acc_height#, + lc_acute_height, lc_acute_height#, + lc_hachek_height, lc_hachek_height#, + accent_u, accent_u#, + accent_thin, + uc_acc_shift, asc_acc_shift; +if unknown circ_weight: circ_weight:=1; fi + +%uc_acc_height# = cap_height#+asc_height#-x_height#; +uc_acc_height# = cap_height#+acc_height#; +lc_acute_height# = asc_height#; +lc_hachek_height# = hi.x_height#+acc_height#; +accent_u# = u#; % unexpanded dimension unit + +vardef accent_thin = if thin_join > crisp: thin_join else: crisp+eps fi enddef; + +vardef uc_acc_shift = cap_height - x_height enddef; +vardef asc_acc_shift = asc_height - x_height enddef; + +numeric cap_accent_height, cap_accent_height#; +%cap_accent_height# = uc_acc_height#; +cap_accent_height# = cap_height# + acc_height#; + +def pseudo_setup = + define_whole_blacker_pixels(idot_diam,udot_diam,pdot_diam); + define_whole_vertical_pixels(lc_trema_height); + define_whole_vertical_pixels(uc_acc_height,lc_acute_height, + lc_hachek_height); + define_pixels(accent_u); + define_whole_vertical_pixels(cap_accent_height); +% LAST MINUTE EXTRA FONT SETUP +%%% define_pixels prepare_pen +if not serifs: fisp#:=1/3[fine#,crisp#]; define_whole_pixels(fisp); + prepare_pen fisp; fi +if known ogonek_pen#: + define_whole_pixels(ogonek_pen); prepare_pen ogonek_pen; +fi +enddef; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lycyracc.mf b/Master/texmf-dist/fonts/source/lh/base/lycyracc.mf new file mode 100644 index 00000000000..053856c787d --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lycyracc.mf @@ -0,0 +1,317 @@ +% +% lycyracc.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% accents from txaccent.mf (tc fonts) + Cyrillic accents +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Accents for capital letters +% + +LHver_check(3,4); % like |version_check| in ec + +% A dirty trick, better left unseen. |cap_height| and |cap_height#| +% are restored at the end of this file. + +numeric saved_cap_height#; saved_cap_height#=cap_height#; +cap_height#:=hi.x_height#; +numeric saved_cap_height; saved_cap_height=cap_height; +cap_height:=hi.x_height; + +%turn for this file: is_cap toggled by this value +cyrcaph:=true; + +lhchar"Grave accent"; +cyrchar_twice(Agrave,9u#,x_height#,0); % |put_gravis| changes the height +adjust_fit(0,0); +put_gravis; +repeat_once; +endchar; + +lhchar"Acute accent"; % using acute from plfonts +cyrchar_twice(Aacute,9u#,x_height#,0); % |put_accent| changes the height +italcorr h#*slant-if serifs: 1.5 fi u#; +adjust_fit(0,0); +put_accent; +repeat_once; +endchar; + +lhchar"Circumflex (hat) accent"; +cyrchar(Ahat,9u#,cap_accent_height#,0); +if serifs: italcorr .5[x_height#,h#]*slant+.5hair#-1.75u#; +else: italcorr 2/3[x_height#,h#]*slant-.5stem#+.5vair#-.75u#; +fi +adjust_fit(0,0); +uppercase_hat(.5w,0,1,2,3,4,5); +penlabels(1,2,3,4,5); endchar; + +lhchar"Tilde (squiggle) accent"; +cyrchar(Atilde,9u#,cap_accent_height#,0); +italcorr h#*slant-u#; +adjust_fit(0,0); +uppercase_tilde(0,0,1,2,3,4,5); +penlabels(1,2,3,4,5); endchar; + +lhchar"Umlaut (double dot) accent"; +cyrchar(Aumlaut,9u#,cap_accent_height#,0); +adjust_fit(0,0); +uppercase_umlaut(0,0,1,2,3,4); +penlabels(1,2,3,4); endchar; + +lhchar"Double acute accent (Long Hungarian umlaut accent)"; +cyrchar_twice(Aacute_dbl,9u#,min(asc_height#,2x_height#),0); +italcorr h#*slant-u#; +adjust_fit(0,0); +if monospace: hpos_corr=-2u; put_accent; hpos_corr=2u; put_accent; +else: hpos_corr=-1.5u; put_accent; hpos_corr=1.5u; put_accent; fi +repeat_once; +endchar; + +lhchar"Scandinavian circle accent"; +cyrchar(Aring,13u#+.5width_adj#,cap_accent_height#,0); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +y[-1]= cap_height+if hefty: .5 fi accent_gap; +uppercase_circle(.5w,y[-1],1,2,3,4); +penlabels(1,2,3,4); endchar; + +lhchar"Hachek (check) accent"; +cyrchar(Ahachek,9u#,cap_accent_height#,0); +adjust_fit(0,0); +uc_hachek_accent(.5w); +endchar; + +lhchar"Breve accent"; +cyrchar(Abreve,9u#,cap_accent_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +uppercase_breve(.5w,0,1,2,3); +penlabels(1,2,3); endchar; + +lhchar"Macron (bar) accent"; +numeric macron_breadth#; macron_breadth#=.2[vair#,stem#]; +cyrchar(Abar,9u#,cap_accent_height#,0); +italcorr h#*slant-.75u#; +adjust_fit(0,0); +numeric macron_breadth; macron_breadth:=Vround .2[vair,stem]; +pickup if serifs: crisp.nib else: fine.nib fi; +pos1(macron_breadth,90); pos2(macron_breadth,90); +top y1r=top y2r=h+o; lft x1=w-rt x2=hround 1.25u; +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +lhchar"Dot accent"; +cyrchar_twice(Adot,5u#,x_height#,0); +adjust_fit(0,0); +put_dot(tiny,max(dot_size#,cap_curve#)); +repeat_once; +endchar; + +lhchar"Cedilla accent"; +cyrchar(Acedilla,8u#,0,.875desc_depth#); +adjust_fit(0,0); +uppercase_cedilla(.5w,0,1,2,3,4,5); +penlabels(1,2,3,4,5); endchar; + +lhchar"Ogonek"; +cyrchar(Aogonek,5u#,0,desc_depth#); +italcorr 0; +adjust_fit(0,0); +%the_ogonek(.5w,0,1,2,3); +% polish-like "easy_ogonek" instead of Computer Modern "the_ogonek" +def the_pen=if known ogonek_pen: ogonek_pen + elseif serifs: tiny elseif is_bold: fisp else: fine fi +enddef; +% |diag_end| refers to |tiny| pen, hence |tiny| in the following equation: +ogonek_pos=(.5w if not serifs: +.5stem if is_bold: +.75tiny fi\\ fi,.5the_pen) + if serifs and not is_egyptian: +(.5xvair,0) fi; +easy_ogonek(the_pen, 1,2,3); % ogonek +penlabels(1,2,3); endchar; + +% +% differs from lowercase form +% +lhchar "Cyrillic accent Ahcross - horisontal cross"; +cyrchar(Ahcross,7u#,cap_height#,desc_depth#); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +% hcross +pickup crisp.nib; numeric outer_jut; +% some funny fonts have an extremally small |jut|: +outer_jut=.5cap_stem+if serifs: max(limit_dist,cap_jut) else: 1.8u fi; +pos1(bar,90); pos2(bar,90); +top y1r=top y2r=vround (.52h+.5bar)+eps; +x1=.5w-outer_jut; x2=.5w+outer_jut; +filldraw stroke z1e--z2e; % cross bar +endchar; + +% differs from lowercase form +lhchar "Cyrillic accent Avcross - vertical cross"; +cyrchar(Avcross,5u#,cap_height#,0); +italcorr asc_height#*slant+.5dot_size#-2u#; +adjust_fit(0,0); +% vcross +if serifs: pickup crisp.nib; else: pickup fine.nib; fi +pos1(bar,0); pos2(bar,0); +lft x1l=lft x2l=hround(.5w-.5bar); +top y2-bot y1=.5cap_height; .5[y1,y2]=.52h; +filldraw stroke z1e--z2e; +endchar; + +lhchar "Cyrillic accent Aacute_cross - diagonal cross"; % cross from pl_ml (plfonts) +cyrchar_twice(Aacute_cross,7u#,cap_height#,0); +italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#,serif_fit#); +numeric unbalance,outer_jut; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5cap_stem+if serifs: max(limit_dist,cap_jut) else: 1.8u fi; +put_cyrcross(.5w,0,outer_jut,unbalance*outer_jut); +repeat_once; +endchar; + +lhchar "Cyrillic accent Agrave_cross - diagonal cross"; % cross from pl_ml (plfonts) +cyrchar_twice(Agrave_cross,7u#,cap_height#,0); +italcorr asc_height#*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#,serif_fit#); +numeric unbalance,outer_jut; +unbalance=if monospace: 1 else: 1.1 fi; +% some funny fonts have an extremally small |jut|: +outer_jut=.5cap_stem+if serifs: max(limit_dist,cap_jut) else: 1.8u fi; +put_cyrcross(.5w,0,-unbalance*outer_jut,-outer_jut); +repeat_once; +endchar; + +lhchar"Cyrillic accent Agrave_dbl - double grave"; +cyrchar_twice(Agrave_dbl,9u#,x_height#,0); +italcorr h#*slant-u#; +adjust_fit(0,0); +if monospace: hpos_corr=-2u; put_accent; hpos_corr=2u; put_accent; +else: hpos_corr=-1.5u; put_gravis; hpos_corr=1.5u; put_gravis; fi +repeat_once; +endchar; + +lhchar "Cyrillic accent Acyrbreve - cyrillic breve"; +cyrchar(Acyrbreve,9u#,cap_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +cbreve(.5w,0, 1,2,3,4,5,6,7); +endchar; + +lhchar"Cyrillic tie accent"; % centered +cyrchar(Atie,9u#,asc_height#,0); +italcorr 4/9[x_height#,asc_height#]*slant+4.5u#+2letter_fit#+.5hair#; +adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi); +pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90); +pos3(hair,0); +lft x1r=w-rt x3r=hround(2u-.5vair); x2=.5w; +y1=y3=4/9[x_height,asc_height]; top y2r=vround 8/9[x_height,asc_height]; +filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % arc +penlabels(1,2,3); endchar; + +lhchar "Cyrillic frown accent"; +cyrchar(Afrown,9u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +%!!! uppercase_breve flipped +x_center:=.5w; y_move:=0; _one:=1; _two:=2; _three:=3; +% +pickup crisp.nib; pos[_one](vair,-180); +pos[_three](vair,0); +top y[_two]r=cap_height + acc_height; +x[_two]=hround x_center; +x[_two]-rt x[_one]l + =(lft x[_three]l)-x[_two] + =hround (2.5u if monospace: /expansion_factor fi -.5vair); +numeric mid_thickness; +mid_thickness=max(crisp.breadth,vround min(1/3[vair,stem],.5acc_height));%!!! +pos[_two](mid_thickness,90); +% |accent_gap| SHOULD be defined by the acute accent, before this macro runs +if unknown accent_gap: % accent_gap emulation + if serifs: + y[_two]'=h-.5mid_stem+eps-max(2/3[h,hi.x_height],hi.x_height+o+hair); + accent_gap=a_ht-(y[_two]'+.5mid_stem)-hi.x_height; + else: + top y[_two]'=h-vround(2/3[h,hi.x_height]); + accent_gap=a_ht-y[_two]'-hi.x_height; + fi +fi +bot y[_one]=bot y[_three]=cap_height + if hefty: .5 fi accent_gap; +filldraw stroke z[_one]e{up}...z[_two]e{right}... + {down}z[_three]e; % stroke +% +penlabels(1,2,3); endchar; + +lhchar "Cyrillic accent Abreve_long - long breve"; %accent width enlarged by 3u +cyrchar(Abreve_long,12u#,x_height#+acc_height#,0); +italcorr h#*slant+.5vair#-1.5u#; +adjust_fit(0,0); +x_center:=.5w; y_move:=0; +_one:=1; _two:=2; _three:=3; +pickup crisp.nib; pos[_one](vair,-180); +pos[_three](vair,0); +top y[_one]=top y[_three]=h; +x[_two]=x_center; +lft x[_one]r=hround(x[_two]-4.75u%!2.5u + if monospace: /expansion_factor fi -0.5vair); +rt x[_three]r=hround(x[_two]+4.75u%!2.5u + if monospace: /expansion_factor fi +0.5vair); +numeric mid_thickness; mid_thickness=vround 1/3[vair,stem]; +pos[_two](mid_thickness,-90); +bot y[_two]r= + vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness); +filldraw stroke z[_one]e{down}... + z[_two]e{right}...{up}z[_three]e; % stroke +endchar; + +lhchar "Cyrillic accent Abar_long - long bar"; %accent width enlarged by 3u +cyrchar(Abar_long,12u#,lc_trema_height#,0); +italcorr h#*slant-.75u#; +adjust_fit(0,0); +numeric macron_breadth; macron_breadth:=Vround .2[vair,stem]; +pickup if serifs: crisp.nib else: fine.nib fi; +pos1(macron_breadth,90); pos2(macron_breadth,90); +top y1r=top y2r=h+o; lft x1=w-rt x2=hround .5u;%!1.25u +filldraw stroke z1e--z2e; % bar +penlabels(1,2); endchar; + +% +% outsiders +% + +lhchar "Cyrillic accent Adesc_up - uppercase descender"; +cyrchar(Adesc_up,5u#,pdot_diam#,cap_sbeak#); +adjust_fit(0,cap_serif_fit#); +pickup tiny.nib; +pos1(cap_stem,0); pos2(cap_stem,0); +rt x1r=rt x2r=w-hround max(2u,3u-.5cap_stem); +top y1=h; bot y2=0; +inner_jut:=.5cap_stem+eps; +save bracket; bracket:=0; +numeric left_jut; +left_jut=if serifs: + max(limit_dist,if monospace: 1.414cap_jut else: 1.1cap_jut fi) + else: hround (r-rt x2r-.65u) fi; +cyr_serif(2,1,a,1/3,beak_darkness,left_jut,beak_jut); % right descender +endchar; + +% Restore original values of |cap_height| and |cap_height#| +cap_height:=saved_cap_height; numeric saved_cap_height; +cap_height#:=saved_cap_height#; numeric saved_cap_height#; + +cyrcaph:=false; %turned back + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/lypseudo.mf b/Master/texmf-dist/fonts/source/lh/base/lypseudo.mf new file mode 100644 index 00000000000..6deb4ac793d --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/lypseudo.mf @@ -0,0 +1,76 @@ +% +% lypseudo.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=0 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% txpseudo.mf (ec fonts) with another beginning :-) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +% This file contains pseudoparameters which are not entered in the +% parameter files, but are computed from the initial parameter set. +% There are also ad hoc parameters needed only once, and scratch +% parameters with different values at each occuerence (like |theta|). + +% +% Diameters of dots +% +numeric idot_diam#,udot_diam#,pdot_diam#; +idot_diam#=max(dot_size#,cap_curve#); % dot of letters `i' and `j' +udot_diam#=max(dot_size#,cap_curve#); % umlaut dots +pdot_diam#=if monospace: 5/4 fi\\ dot_size#; % punctuation dots + +% |limit_dist| is used in |put_cross| +% (the value of |u| is changed by |mono_adjust|, hence the global setting) + +vardef limit_dist=5/4u enddef; + +% More parametrisations for accents from csaccent.mf (csfonts): + +numeric uc_acc_height, uc_acc_height#, + lc_acute_height, lc_acute_height#, + lc_hachek_height, lc_hachek_height#, + accent_u, accent_u#, + accent_thin, + uc_acc_shift, asc_acc_shift; +if unknown circ_weight: circ_weight:=1; fi + +uc_acc_height# = cap_height#+asc_height#-hi.x_height#; +lc_acute_height# = asc_height#; +lc_hachek_height# = hi.x_height#+acc_height#; +accent_u# = u#; % unexpanded dimension unit + +vardef accent_thin = if thin_join > crisp: thin_join else: crisp+eps fi enddef; + +vardef uc_acc_shift = cap_height - hi.x_height enddef; +vardef asc_acc_shift = asc_height - hi.x_height enddef; + +% Height of floating accents for capitals (note, that TeX raises them +% by |uc_acc_shift|) + +numeric cap_accent_height, cap_accent_height#; +cap_accent_height# = acc_height# + hi.x_height#; + +def pseudo_setup= + define_whole_blacker_pixels(idot_diam,udot_diam,pdot_diam); + define_whole_vertical_pixels(uc_acc_height,lc_acute_height, + lc_hachek_height); + define_pixels(accent_u); + define_whole_vertical_pixels(cap_accent_height); +enddef; + +endinput; +%end of file diff --git a/Master/texmf-dist/fonts/source/lh/base/nodraw.mf b/Master/texmf-dist/fonts/source/lh/base/nodraw.mf new file mode 100644 index 00000000000..ee9ee949671 --- /dev/null +++ b/Master/texmf-dist/fonts/source/lh/base/nodraw.mf @@ -0,0 +1,77 @@ +% +% nodraw.mf +% +%% Cyrillic font container with T2 encoding beta-support +% +% This file is future part of lxfonts package +% Version 3.4 // Patchlevel=1 +% (c) O.Lapko +% +% This package belongs to the public domain under conditions similar to +% those of D. E. Knuth specified for the Computer Modern family of fonts. +% In particular, only the authors are entitled to modify this file +% and to save it under the same name. +% +% Content: +% +% Disable almost all of cmbase drawing commands +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LHver_check(3,4); % like |version_check| in ec + +def addto text t = enddef; % Draw nothing +def filldraw text t = enddef; +%vardef serif(suffix $,$$,@) % serif at |z$| for stroke from |z$$| +% (expr darkness,jut) suffix modifier = enddef; +def dish_serif text t = enddef; +%def nodish_serif text t = enddef; +vardef sloped_serif.l(suffix $,$$,@)(expr darkness,jut,drop) = enddef; +vardef sloped_serif.r(suffix $,$$,@)(expr darkness,jut,drop) = enddef; +vardef arm(suffix $,$$,@)(expr darkness,jut) = % arm from |z$| to |z$$| + x@0=good.x(x$$r-jut); y@0=y$r; + if serifs: y@1=y$l; z@1=z$$l+whatever*(z$$r-z@0); z@2=.5[z$l,z@1]; fi + penlabels(@0,@1,@2); enddef; +def bulb(suffix $,$$,$$$) = z$$$r=z$$r; enddef; +def v_bulb(suffix $,$$)= enddef; +def dot(suffix $,$$) = enddef; +def comma(suffix $,@)(expr dot_size,jut,depth) = enddef; +def ammoc(suffix $,@)(expr dot_size,jut,depth) = enddef; +def f_stroke(suffix $,$$,@,left_serif,right_serif)(expr left_jut,right_jut)= + enddef; +def h_stroke(suffix $,@,@@,$$) = + penpos$$(x@@r-x@@l,0); x$$=x@@; bot y$$=0; + y@@=1/3[bar_height,x_height]; enddef; +def hook_out(suffix $,$$,$$$) suffix modifier= % |x$| and |x$$$| (only) are known + pos$(stem,0); pos$$(vair,90); x$$$:=hround(x$$$+.5hair-eps)-.5hair; pos$$$(hair,180); + y$=1/4x_height; bot y$$l=-oo; y$$$=1/3x_height; + if skewed.modifier: x$$=x$+1.25u; else: x$$=x$+1.5u; fi enddef; % hook +def hook_in(suffix $,$$,$$$)suffix modifier= % |x$| and |x$$$| (only) are known + x$:=hround(x$-.5hair)+.5hair; pos$(hair,180); pos$$(vair,90); pos$$$(stem,0); + y$=2/3x_height; top y$$r=x_height+oo; y$$$=3/4x_height; + if skewed.modifier: x$$=x$$$-1.25u; else: x$$=x$$$-1.5u; fi enddef; % hook +%def ital_arch(suffix $,$$,$$$) = enddef; +def draw_circle = enddef; +def left_paren(expr min_breadth, max_breadth) = enddef; +def right_paren(expr min_breadth, max_breadth) = enddef; +def left_bracket(expr breadth,do_top,do_bot) = enddef; +def right_bracket(expr breadth,do_top,do_bot) = enddef; +def left_curly(expr min_breadth, max_breadth) = enddef; +def right_curly(expr min_breadth, max_breadth) = enddef; +def left_angle(expr breadth) = enddef; +def right_angle(expr breadth) = enddef; +def big_slash(expr breadth) = enddef; +def big_blash(expr breadth) = enddef; +def big_sqrt = enddef; +def big_hat = enddef; +def big_tilde = enddef; +def labels text t = enddef; +def penlabels text t = enddef; + +vardef bar_stroke(expr left_jut,right_jut) = enddef; +vardef cyr_serif(suffix $,$$,@) % serif at |z$| for stroke from |z$$| + (expr darkness,beak_darkness,jut,beak_jut) = +enddef; + +endinput; +%end of file |