[tex-live] Metafont: DVI and PDF trouble

Thomas Hühn xf27 at arcor.de
Thu Mar 12 18:11:35 CET 2009


Dan Luecking <luecking at uark.edu> writes:

> In most TeX distributions, the tfm file gray.tfm is produced at 300dpi.
> This includes Tex Live 2008. However, the file gray.mf that would be
> used to creates the PK font file contains
>   if mode=ljfour: input graylj;
>   elseif mode=cx: input graycx;
>   elseif mode=aps: input grayaps;
>   fi
> The default mode on most systems (e.g., when automatically generating
> a PK font file) is ljfour, and that is a 600dpi font. Thus, there
> will almost always be a mismatch between the tfm file and the PK file
> used for display.

Just a second: Isn't the tfm file created together with the pk file
(\fontmaking=yes)? Shouldn't those two files be consistent, no matter
which mode has been selected?

> This is what I would do (and have done but see caveat at end).
>
> 1. I would determine what the default PK font resolution is for
> various programs. For dviout this is found somewhere in the
> its menu system (I think). For dvips this is found in config.ps. For
> dvipdfm I don't know if this is configurable. For dvipdfmx this is
> found in dvipdfmx.cfg.

I wasn't even aware that there are actually three dvipdf* programs. I'll
check all those settings.

> 2. I would then make sure all of them are set to 600dpi and then I
> would copy graylj.mf to gray.mf (in directory
> texmf-dist/fonts/source/public/misc/)
>
> 3. Then I would generate gray.tfm with
>   mf \mode:=ljfour; input gray.mf
> and for good measure a PK file with
>   gftopk gray.600gf
>
> 4. I would then replace the existing
>      texmf-dist/fonts/tfm/public/misc/gray.tfm
>    with the new one and put the gray.600pk in
>      texmf-var/fonts/tfm/public/misc/gray.tfm
>
> 5. Finally, run texhash.

Thanks for your explanations.

> This may not always produce good results when viewed on screen, as
> screens normally have to reduce the size of bitmap fonts by pixel
> averaging. For regular patterns of pixels, such as found in gray.mf,
> this generally produces streaking effects. However, if the dpi matches
> your printer, the printed proof is usually good.

Good. I'd like to the screen at least for following the exercises and
playing with the system, so that I don't waste too much paper. So I was
concetrating on screen output for now.

But trying out actual printouts is on my todo list.

> One final configuration step is useful: find modes.mf and edit the last
> line which probably says
>   localfont:=ljfour;
> If 600dpi is your default resolution, do nothing. But if it is 300dpi,
> change this to
>   localfont:=cx; % or some other 300dpi mode like jetiiisi
> Then remake the mf format.

That means mf -ini and dumping plain Metafont?

Thanks again!
Thomas



More information about the tex-live mailing list