[Tex/LaTex] Selecting optical size

fontsfontsizetex-core

For some time I've seen LaTeX-produced documents that had slight differences in fonts. When you looked at them, they had the same Computer-Modern or Latin-Modern, however, they looked more stylized (more lightweight).

By chance, and looking at another question here, I came across this document: http://dw.tug.org/pracjourn/2006-1/robertson/robertson.pdf in which I've seen clearly the difference, and has to do with optical size for a font at a given (output) point size. Here is a capture:

enter image description here

Look how the last line (even when they're all typeset at 12pt) looks with a more light font. I also noticed that in some Beamer documents using the sans-serif family (some had a more lightweight version of the font).

So the question is, without using XeTeX or LuaTeX (just plain LaTeX/pdfTeX), how can I get that lightweight (optical at 17pt) font for the size I want?

PD. I also noticed that there were some differences if one used tex->dvi->dvips->ps and pdflatex->pdf. In some .ps documents I've seen through the web, the fonts looked more lightweight by default. Maybe some TeX installations select those bigger optical sizes by default to obtain a more pleasing font rendering.

Best Answer

It all boils down to write in your preamble, for example,

\usepackage[T1]{fontenc}
\DeclareFontFamily{T1}{lmr}{}
\DeclareFontShape{T1}{lmr}{m}{n}{<->ec-lmr17}{}
\DeclareFontShape{T1}{lmr}{m}{sl}{<->ec-lmro17}{}
\DeclareFontShape{T1}{lmr}{m}{it}{<->ec-lmri12}{}
\DeclareFontShape{T1}{lmr}{m}{sc}{<->ec-lmcsc10}{}
\DeclareFontShape{T1}{lmr}{bx}{n}{<->ec-lmbx12}{}
\DeclareFontShape{T1}{lmr}{bx}{it}{<->ec-lmbxi10}{}
\DeclareFontShape{T1}{lmr}{bx}{sl}{<->ec-lmbxo10}{}

I've just copied the declarations for the Latin Modern font, using the biggest design size font available, as stated in t1lmr.fd. Similar declarations should be done for the sans serif fonts.

I don't think it's a good idea, though: well designed fonts gain in legibility and pleasantness from the fact that they have slightly different shapes at different sizes.

The differences you see in documents may depend on various reasons, the main one is the actual fonts a machine uses: they may be Type3 converted from bitmaps, BlueSky Computer Modern Type1 fonts, CM-Super fonts, or other versions.

Related Question