From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- fonts/greek/levy/digits.mf | 342 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 342 insertions(+) create mode 100644 fonts/greek/levy/digits.mf (limited to 'fonts/greek/levy/digits.mf') diff --git a/fonts/greek/levy/digits.mf b/fonts/greek/levy/digits.mf new file mode 100644 index 0000000000..0f404531c2 --- /dev/null +++ b/fonts/greek/levy/digits.mf @@ -0,0 +1,342 @@ +% Copyright (C) 1991 Silvio Levy +% +% This file is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 2 of the License, or +% (at your option) any later version. +% +% This file is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program. If not, see . +% +% As a special exception, if you create a document which uses this font, +% and embed this font or unaltered portions of this font into the +% document, this font does not by itself cause the resulting document to +% be covered by the GNU General Public License. This exception does not +% however invalidate any other reasons why the document might be covered +% by the GNU General Public License. If you modify this font, you may +% extend this exception to your version of the font, but you are not +% obligated to do so. If you do not wish to do so, delete this exception +% statement from your version. + +% This file is the same as Computer Modern's romand.mf. +% It contains the ten digits in so-called roman style. +% Character codes \0060 through \0071 are generated. + +% All digits have the same height, width, depth, and italic correction. + +cmchar "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; + +cmchar "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 +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)); % 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; + +cmchar "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; 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; + +cmchar "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; + +cmchar "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