Run the following commands:

mf cmr10
mktextfm gray
gftodvi cmr10.2602gf

Last two characters have a vertical line on the right. What is that?

  • I don't know the full answer (this is my first time running gftodvi), but I'm pretty sure they are not spurious, and are intended to serve some purpose. (They are not part of the actual character.) You can see similar vertical lines on V (page 22), W (page 23), Y (page 25), f (page 32), g (page 33), v (page 48), w (page 49), y (page 51), ff (page 119), besides the – (page 127) and — (page 128) that you mentioned. – ShreevatsaR Jun 19 '17 at 2:28

Metafont book page 105:

The vertical line just to the right of the italic left parenthesis shows the italic correction of that character, i.e., the fourth box dimension mentioned earlier.

  • +1, and if any confirmation were needed, one can verify that removing the italcorr .61803x_height#*slant+.5u#; line from the definition of cmchar "En dash"; (in comlig.mf) makes the vertical line disappear. – ShreevatsaR Jun 19 '17 at 4:30

The vertical lines show italic correction, as already answered. So this "answer" is probably completely redundant and useless, but just sharing how I arrived at this before seeing @Henri Menke's answer:

What is the issue?

mf cmr10 generates cmr10.2602gf, and gftodvi cmr10.2602gf produces the cmr10.dvi file. What you're asking about are these vertical lines when cmr10.dvi is viewed:


Is it an issue?

If you look through the rest of the dvi file, you can see similar vertical lines for V (page 22), W (page 23), Y (page 25), f (page 32), g (page 33), v (page 48), w (page 49), y (page 51), ff (page 119), besides the – (page 127) and — (page 128) that you mentioned.

v and w

Where is the issue?

Is the vertical line introduced by gftodvi or is it already in the output of mf? We can use gftype -mnemonics cmr10.2602gf and see that (instructions to draw) the vertical rules are already present in the cmr10.2602gf generated by mf cmr10.

Narrowing down the issue

The logs for the mf cmr10 invocation show that it's opening /usr/local/texlive/2017/texmf-dist/fonts/source/public/cm/cmr10.mf so we can copy that file over as say stupid.mf in the present directory and see that it's reproducible with mf stupid && gftodvi stupid.2602gf. Next look in the log for which file it's including, copy it over and rename it (and include the renamed file), and so on... until you find that the characters come from comlig.mf. After copying it over as stupidcomlig.mf and deleting all the other characters and keeping only the en dash, we can start deleting instructions in the character's definition

cmchar "En dash";
italcorr .61803x_height#*slant+.5u#;
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;

one-by-one: most give an error or incorrect output, but removing the italcorr line makes the "spurious" vertical line go away.

At this point one can look up "italic correction" in the index to The METAFONTbook and find the answer on pages 102 and 105 (as already answered).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.