summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf')
-rw-r--r--Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf140
1 files changed, 99 insertions, 41 deletions
diff --git a/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf b/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf
index 8f7796d668f..bf1f279ed0e 100644
--- a/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf
+++ b/Master/texmf-dist/fonts/source/lh/base/lcyrdefs.mf
@@ -4,13 +4,13 @@
%% Cyrillic font container with T2 encoding beta-support
%
% This file is future part of lxfonts package
-% Version 3.4 // Patchlevel=0
+% Version 3.5 // Patchlevel=2
% (c) O.Lapko
%
-% This package belongs to the public domain under conditions similar to
+% This package is freeware product 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.
+% (and all this package as well) and to save it under the same name.
%
% Content:
%
@@ -36,14 +36,14 @@
% (borrowed from exaccess)
%
-LHver_check(3,4); % like |version_check| in ec
+LHver_check(3,5); % 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;
+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
@@ -86,7 +86,7 @@ if unknown acc_height#: % emulation ecfonts parameter file
fi
-sbeak# := (if serifs: max(beak#,3/4desc_depth#) else: desc_depth# fi) /1.2;
+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;
%
@@ -95,20 +95,12 @@ cap_sbeak# := if serifs: max(beak#,3/4desc_depth#) else: desc_depth# fi;
%
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;
%
@@ -120,10 +112,10 @@ 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
+% set_bar_axis, bar_stroke
+% cyr_serif, l_serif, r_serif
+% cyrbulb
+% cbreve
% sets for bar axis in lowercase letters
%
@@ -198,14 +190,66 @@ vardef cyr_serif(suffix $,$$,@) % serif at |z$| for stroke from |z$$|
...{-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
+ ...(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;
+vardef siam_serif(suffix $,$$,@) % serif at |z$| for stroke from |z$$|
+ (expr darkness,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,3/5[fudged.hair,fudged.stem]));
+ % 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=x@0+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
+ --beak_corner
+ --z@4--(x@4,y@1)--z@5--z@6--cycle; % descender
+ else:
+ filldraw z@6--z@5--(x@4,y@1)--z@4
+ --beak_corner
+ --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,beak_corner);
+enddef;
%
% roman descenders
%
@@ -345,10 +389,13 @@ def hi = if is_small_cap: higher fi\\ enddef;
%!!!lhfonts: first goes umlaut for yo
vardef lowercase_umlaut(expr x_move,y_move,umlaut_one,umlaut_two,
umlaut_three,umlaut_four) =
+numeric dot_dist; dot_dist:=round(3.5u); % (CMBRIGHT)
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 ;
+%x[umlaut_one]=x[umlaut_two]=x_move+.5w-1.75u if monospace:/expansion_factor fi ;
+x[umlaut_one]=x[umlaut_two]=x_move+.5w-0.5dot_dist %(CMBRIGHT)
+ if monospace:/expansion_factor fi ; %(CMBRIGHT)
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
@@ -356,16 +403,20 @@ 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 ;
+% +3.5u if monospace: /expansion_factor fi ;
+ +dot_dist if monospace: /expansion_factor fi ; % (CMBRIGHT)
dot([umlaut_three],[umlaut_four]); % right dot
enddef;
%
vardef uppercase_umlaut(expr x_move,y_move,umlaut_one,umlaut_two,
umlaut_three,umlaut_four) =
+numeric dot_dist; dot_dist:=round(3.5u); % (CMBRIGHT)
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 ;
+%x[umlaut_one]=x[umlaut_two]=x_move+.5w-1.75u if monospace:/expansion_factor fi ;
+x[umlaut_one]=x[umlaut_two]=x_move+.5w-0.5dot_dist %(CMBRIGHT)
+ if monospace:/expansion_factor fi ; %(CMBRIGHT)
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
@@ -373,7 +424,8 @@ 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 ;
+% +3.5u if monospace: /expansion_factor fi ;
+ +dot_dist if monospace: /expansion_factor fi ; % (CMBRIGHT)
dot([umlaut_three],[umlaut_four]); % right dot
enddef;
%
@@ -1251,7 +1303,7 @@ vardef easy_ogonek (suffix penkind)(expr _one,_two,_three)=
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);
+ bot z[_one]l=(.5w,eps);
fi
pos[_one](max(ogonek_breadth,penkind+eps),0);
bot z[_three]'=(xpart z[_one]l-.5penkind,y_right-eps)+the_tip_pos;
@@ -1276,23 +1328,25 @@ vardef easy_ogonek (suffix penkind)(expr _one,_two,_three)=
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:
+ if known join_angle:
prim_angle:=join_angle;
- else:
+ 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
+ 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
+ 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;
+ 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
+ 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
@@ -1335,7 +1389,11 @@ def lc_hachek_accent(expr ref) =
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));
+ if ebbase=1:%!!!
+ bot y52=vround(0.33[x_height,lc_hachek_height]);% (CMBRIGHT)
+ else:
+ bot y52=vround(max(2/3[h,hi.x_height],hi.x_height+o+hair));
+ fi
top y51 = top y53 = max(lc_hachek_height,top y52+eps); %!!!
z50 = whatever[z51r,z52r] = whatever[z52l,z53l];
y54l=y54r=y52;