LaTeX forum ⇒ Fonts & Character SetsRaster 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

Postby vgi » Sun Sep 09, 2018 7:37 am

Hi!

I have a problem with vector fonts in pdf.

Let's take a sample file (sample.tex):
  1. \documentclass[russian,english]{article}
  2. \usepackage[cp1251]{inputenc}
  3. \usepackage{babel}
  4. \begin{document}
  5. \noindent ABC
  6. \selectlanguage{russian}
  7. \noindent ДЖЫ
  8. \noindent ABC
  9. \end{document}


After running
  1. latex sample.tex
  2. dvipdfm 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,
Vladimir.

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
sample.png (24.86 KiB) Viewed 447 times

rais
Posts: 177
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sun Sep 09, 2018 11:45 am

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 9203
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Sep 09, 2018 12:24 pm

Hi Vladimir!

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

  1. \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

  1. \usepackage{lmodern}


and keept the fontenc line.

Stefan
Site admin

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

Postby vgi » Sun Sep 09, 2018 5:34 pm

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?

  1. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8.
  2. LaTeX Font Info: ... okay on input line 8.
  3. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8.
  4. LaTeX Font Info: ... okay on input line 8.
  5. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8.
  6. LaTeX Font Info: ... okay on input line 8.
  7. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8.
  8. LaTeX Font Info: ... okay on input line 8.
  9. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8.
  10. LaTeX Font Info: ... okay on input line 8.
  11. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8.
  12. LaTeX Font Info: ... okay on input line 8.
  13. LaTeX Font Info: Checking defaults for T2A/cmr/m/n on input line 8.
  14. LaTeX Font Info: Try loading font information for T2A+cmr on input line 8.
  15. ("C:\Program Files\MiKTeX 2.9\tex\latex\cyrillic\t2acmr.fd"
  16. File: t2acmr.fd 2001/08/11 v1.0a Computer Modern Cyrillic font definitions
  17. )
  18. LaTeX Font Info: ... okay on input line 8.

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

Postby vgi » Sun Sep 09, 2018 5:42 pm

Hi, Stefan!

If I insert
  1. \usepackage[T1]{fontenc}

ALL three lines prove to be in raster fonts.

With
  1. \usepackage{lmodern}

no changes at all.

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

Postby vgi » Sun Sep 09, 2018 5:48 pm

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

Postby rais » Sun Sep 09, 2018 10:51 pm

Hi Vladimir,
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?

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

no, I meant a similar block to this:
  1. {c:/texlive/2016/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t2a.enc}<c:/texlive
  2. /2016/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/texlive/2016/texm
  3. f-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

Postby vgi » Sun Sep 09, 2018 11:05 pm

Here it is:
  1. <C:\Users\v\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\lh\lh-t2a\dpi600\larm1000
  2. .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

Postby rais » Mon Sep 10, 2018 1:59 pm

Hi Vladimir,
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

Postby vgi » Tue Sep 11, 2018 2:41 am

rais wrote:What does the same section give you under TeXLive?


It gives
  1. {c:/WINPROG/texlive/2017/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t2a.enc
  2. }<c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi5.pfb><
  3. c:/WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi6.pfb><c:
  4. /WINPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb><c:/W
  5. INPROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><c:/WIN
  6. PROG/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb><c:/WINPRO
  7. G/texlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb><c:/WINPROG/t
  8. exlive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb><c:/WINPROG/texl
  9. ive/2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb><c:/WINPROG/texlive
  10. /2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb><c:/WINPROG/texlive/
  11. 2017/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb><c:/WINPROG/texlive/20
  12. 17/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy9.pfb><c:/WINPROG/texlive/2017
  13. /texmf-dist/fonts/type1/public/cm-super/sfbi0900.pfb><c:/WINPROG/texlive/2017/t
  14. exmf-dist/fonts/type1/public/cm-super/sfbi1000.pfb><c:/WINPROG/texlive/2017/tex
  15. mf-dist/fonts/type1/public/cm-super/sfbx0900.pfb><c:/WINPROG/texlive/2017/texmf
  16. -dist/fonts/type1/public/cm-super/sfbx1000.pfb><c:/WINPROG/texlive/2017/texmf-d
  17. ist/fonts/type1/public/cm-super/sfbx1200.pfb><c:/WINPROG/texlive/2017/texmf-dis
  18. t/fonts/type1/public/cm-super/sfcc0900.pfb><c:/WINPROG/texlive/2017/texmf-dist/
  19. fonts/type1/public/cm-super/sfrm0900.pfb><c:/WINPROG/texlive/2017/texmf-dist/fo
  20. nts/type1/public/cm-super/sfrm1000.pfb><c:/WINPROG/texlive/2017/texmf-dist/font
  21. s/type1/public/cm-super/sfrm1200.pfb><c:/WINPROG/texlive/2017/texmf-dist/fonts/
  22. 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
  1. <C:\Users\v\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\lh\lh-t2a\dpi600\larm1000
  2. .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?


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 2 guests