There is a certain amount of subtlety in choosing fonts and resolutions for maximum readability.
The fonts that dvi2bitmap
(currently) uses by
default are from the cmr
family, and generated
using Metafont mode ibmvga
, chosen because its
design resolution, of 110 pixels to the inch, is
approximately right for bitmaps viewed on the screen. This
is not, however, necessarily the optimal choice in all
circumstances.
You can produce some simple antialiasing by magnifying the output bitmaps then scaling them down, so that:
doubles the size of the bitmaps, then halfs it, effectively blurring it in the latter stage. This works quite well. You don't necessarily get better results with larger factors (though it does, of course, depend on the situation), because Metafont already does some work to make the characters easier to read, and I suspect that excessive antialiasing merely frustrates this.% dvi2bitmap --magnification=2 --scale=2 myfile.dvi
If you choose a different Metafont mode, it can make a
difference. In your TeX distribution, there should be a
file called modes.mf
, containing a large
collection of Metafont font-generation modes (look for it
using kpsewhich modes.mf
if you have that
command), and there are several modes in this set which have
resolutions in the 70 to 200 range, which are therefore
about the right size to be useful in this context. You're
probably aiming for a resolution of around 100 pixels per
inch, if you want the text in the output bitmap to be around
the same size as the other text on your monitor. For
example, try the ncd
and nec
modes:
Note that the declared resolution must match the font mode -- the default resolution of 110 is designed to match the default mode of% dvi2bitmap --magnification=2 --scale=2 --font-mode=ncd --resolution=95 try.dvi % dvi2bitmap --scale=2 --font-mode=nec --resolution=180 try.dvi % dvi2bitmap --magnification=2 --scale=4 --font-mode=nec --resolution=180 try.dvi
ibmvga
. Also the nec
mode,
because its base resolution is large anyway, only needs to
be scaled down to get adequate antialiasing.It should be possible to create a Metafont mode
specifically for dvi2bitmap
applications. That
might be a useful project for someone!
Another thing to look at is whether changing the font family can help. The Computer Modern family is, of course, designed for paper. The Concrete Math family, though also designed primarily for paper, has features which make it particularly suitable for this application. The FAQ article which discusses maths font choices remarks that
As well as this, these fonts have rather simpler outlines than Computer Modern and they are rather more upright, both of which make them more robust to being rendered at rather small resolutions.Since Concrete is considerably darker than Computer Modern, this variant may be of particular interest for use in low-resolution printing or in display-oriented applications such as posters, transparencies, or online documents.
You can use the concrete maths fonts simply by adding the declaration
to the preamble of your LaTeX document. In tests, the best configuration for clarity in a bitmap appeared to be a document using the concrete maths fonts, plus the\usepackage{concmath}
dvi2bitmap
invocation
% dvi2bitmap --magnification=2 --scale=4 --font-mode=nec --resolution=180 try-cc.dvi
Any observations on this topic would be warmly appreciated.
Many thanks to Doug du Boulay at titech.ac.jp
for raising this issue, for thus prompting me to discuss the
various options, and for then doing the critical testing
work.