# Selecting optical size?

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:

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.

-
Each optical size is actually a separate font, named `cmr12`, `cmr17`, … Thus you should be able to load it with the standard TeX commands: `\font\myfont=cmr17 at 12pt`. However, I can't get a working example with `lmr` instead of `cmr` here :-( –  Andrey Vihrov May 20 '11 at 23:32

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.

-
Exactly. Really thanks. –  Diego Sevilla May 21 '11 at 22:50
Hello, I tried to define all fonts/text to the optical size of 7pt due to the low-res printer. I am using %\usepackage{cfr-lm}, however, I modified the above script, doesn't seem to be working under cfr-lm. Used it with normal latin modern, works brilliantly. any suggestion? –  Shi Yuan Jan 12 '13 at 0:57
@ShiYuan With `cfr-lm` the file to examine is `t1clm2j.fd`, but it would be different when options to the package are specified. You find the relevant file in the log, look for `t1clm`. –  egreg Jan 12 '13 at 10:50
@egreg thanks! it helps! I found the file here: ctan.mirror.ac.za/macros/latex/contrib/cfr-lm/tex/latex/cfr-lm it works brilliantly; I have problem with small caps where there is only one optical size specified (clmcsc2j8t10). I'm not sure if it is only available or there are other options to pick where it is not shown explicitly here? tx. –  Shi Yuan Jan 27 '13 at 21:03
@egreg ps. is there an overview to all the optical sizes? I found this, mirrors.ctan.org/fonts/lm/doc/fonts/lm/tstlmot1.pdf but it seems doesnt co-relates to actual files that t1clm2j.fd specified. –  Shi Yuan Jan 27 '13 at 21:06

An example for `tex`

``````\font\cmr=cmr12
\font\lmrLight=ec-lmr17 at 12pt

\cmr a font DEMO \par
\lmrLight a font DEMO

\bye
``````

-
This works perfectly. However, this is just for TeX. I wouldn't know exactly how to adapt all the fonts of a LaTeX article or a Koma-Script template :( –  Diego Sevilla May 21 '11 at 22:42