![熟悉 Metafont 的人能帮我解决这个问题吗?](https://linux22.com/image/441905/%E7%86%9F%E6%82%89%20Metafont%20%E7%9A%84%E4%BA%BA%E8%83%BD%E5%B8%AE%E6%88%91%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%E5%90%97%EF%BC%9F.png)
我尝试用 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
来正确转换。