我尝试用 Metafont 输出一个小写的字母 i,结果却很糟糕。就好像字符定义内部的度量单位与外部的度量单位不同一样。
常规.mf
font_size 10pt#;
u#:=20/36pt#;
x_height#:=160/36pt#;
caps_height#:=260/36pt#;
descender#:=72/36pt#;
% Width of vertical stroke
stroke_width:=5/6pt#;
% First optical correction
oo#:=.1pt#;
input romanl;
romanl.mf
numeric dot_height;
dot_height#=(x_height#*2/3)+(caps_height#/3)+0.55*stroke_width;
beginchar("i",4u#,dot_height#,0);
"The letter i";
pickup pencircle xscaled stroke_width# yscaled 0.9stroke_width#;
x1=x2=x3=.5w;
top y1=x_height#+oo#; bot y2=-oo#;
y3=2/3x_height#+caps_height#/3;
draw z1--z2;
pickup pencircle scaled 1.1stroke_width#;
drawdot z3;
endchar;
答案1
刚刚解决了我自己的问题。似乎有两个不同的坐标,定义中不应该使用井号。相反,我应该使用类似命令define_pixels
来正确转换。