## LaTeX forum ⇒ Fonts & Character Sets ⇒ Raster fonts in PDF Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
vgi
Posts: 10
Joined: Fri Nov 08, 2013 11:46 am

### Raster fonts in PDF

Hi!

I have a problem with vector fonts in pdf.

Let's take a sample file (sample.tex):
\documentclass[russian,english]{article}\usepackage[cp1251]{inputenc}\usepackage{babel}\begin{document}\noindent ABC\selectlanguage{russian}\noindent ДЖЫ\noindent ABC\end{document}

After running
latex sample.texdvipdfm sample.dvi

we get a sample.pdf. On the picture one can see that the first "ABC" proves to be in a vector font, but after switching to Russian both "ДЖЫ" and the second "ABC" are raster. How can I make a pdf with vector Russian fonts?

WBR,

P.S. I use MikTeX 2.9.6730 now and do remember very well that in some earlier version of MikTeX there were no such problem. All fonts in pdf were vector ones.
Attachments
sample.png (24.86 KiB) Viewed 535 times

rais
Posts: 177
Joined: Sun Nov 16, 2014 8:51 pm
Hi to you, too!
Do you get the same result when running pdfLaTeX directly?
Then post the last couple of lines of your sample.log file of that pdfLaTeX run (where it lists the fonts used, each enclosed in <>).
My guess is, you're using cm standard font now and you used cm-super before.

KR
Rainer

Stefan Kottwitz
Posts: 9244
Joined: Mon Mar 10, 2008 9:44 pm

You can install cm-super, that Rainer mentioned, as a normal package using the MiKTeX package manager. You don't need to add something in the code, it's automatically used if needed. Actually, it's used when T1 font encoding is enabled. That's actually recommendable.

So, if you verified that cm-super is installed, you can enable the (better, newer, non-default) T1 font encoding by

\usepackage[T1]{fontenc}

Test, if it improved.

If it doesn't, there's another option. The Latin Modern font was designed to be a future replacement for the default Computer Modern font. It's very similar and of high quality. You can load it by

\usepackage{lmodern}

and keept the fontenc line.

Stefan

vgi
Posts: 10
Joined: Fri Nov 08, 2013 11:46 am
Hi, Rainer!

rais wrote:Do you get the same result when running pdfLaTeX directly?

Yes.

rais wrote:Then post the last couple of lines of your sample.log file of that pdfLaTeX run (where it lists the fonts used, each enclosed in <>).

Do you mean these lines?

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.LaTeX Font Info:    ... okay on input line 8.LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.LaTeX Font Info:    ... okay on input line 8.LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.LaTeX Font Info:    ... okay on input line 8.LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.LaTeX Font Info:    ... okay on input line 8.LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.LaTeX Font Info:    ... okay on input line 8.LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.LaTeX Font Info:    ... okay on input line 8.LaTeX Font Info:    Checking defaults for T2A/cmr/m/n on input line 8.LaTeX Font Info:    Try loading font information for T2A+cmr on input line 8.("C:\Program Files\MiKTeX 2.9\tex\latex\cyrillic\t2acmr.fd"File: t2acmr.fd 2001/08/11 v1.0a Computer Modern Cyrillic font definitions)LaTeX Font Info:    ... okay on input line 8.

vgi
Posts: 10
Joined: Fri Nov 08, 2013 11:46 am
Hi, Stefan!

If I insert
\usepackage[T1]{fontenc}

ALL three lines prove to be in raster fonts.

With
\usepackage{lmodern}

no changes at all.

vgi
Posts: 10
Joined: Fri Nov 08, 2013 11:46 am
P.S. I have tried TeX Live 2017 now and it works fine: all fonts in pdf are vector.

Nevertheless, it would be great to understand what is bad with MikTeX.

rais
Posts: 177
Joined: Sun Nov 16, 2014 8:51 pm
vgi wrote:
rais wrote:Then post the last couple of lines of your sample.log file of that pdfLaTeX run (where it lists the fonts used, each enclosed in <>).

Do you mean these lines?

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.LaTeX Font Info:    ... okay on input line 8.

no, I meant a similar block to this:
{c:/texlive/2016/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t2a.enc}<c:/texlive/2016/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/texlive/2016/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb>

It's usually written close to the end of the log file (notice the <> characters enclosing each (path to) font file used.

KR
Rainer

vgi
Posts: 10
Joined: Fri Nov 08, 2013 11:46 am
Here it is:
<C:\Users\v\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\lh\lh-t2a\dpi600\larm1000.pk><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>

I guess the reason is larm1000.pk. How to deal with it?

rais
Posts: 177
Joined: Sun Nov 16, 2014 8:51 pm
sorry for the late reply, I'm currently a bit out of sync.

I'd still say you're missing the cm-super fonts in your MikTeX installation.
What does the same section give you under TeXLive? Since it's working there, I'd assume you've got cm-super installed in TL but not in MikTeX...

KR
Rainer

vgi
Posts: 10
Joined: Fri Nov 08, 2013 11:46 am
rais wrote:What does the same section give you under TeXLive?

It gives
{c:/WINPROG/texlive/2017/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t2a.enc}<c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi5.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi6.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy9.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfbi0900.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfbi1000.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfbx0900.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfbx1000.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfbx1200.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfcc0900.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfrm0900.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfrm1200.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/cm-super/sfti0900.pfb>

Really I found that cm-super package was not installed. I've installed it now (by MikTeX console) but I do not see any changes. In particular, the line in the pdflatex log is still
<C:\Users\v\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\lh\lh-t2a\dpi600\larm1000.pk><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>

May be, I need updating some MikTex database to switch on the changes?