Fonts & Character SetsProblem with Type1 and Type3 fonts

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
darie20
Posts: 3
Joined: Thu Apr 12, 2012 10:51 am

Problem with Type1 and Type3 fonts

Post by darie20 »

Hello everyone,

I'm a latex newbie and after recently installed texlive and Texmaker on a first computer (both the latest version), everything worked fine, pdflatex generated a nice and clean pdf file. The same process on a second computer: same steps, same versions, same operating system, but the generated pdf file is a little bit blurry (it's not so obvious, but noticeable). After reading this, I checked the font of the generated pdf file (File > Properties > Fonts) and it is, indeed, type3 font. I compared it with the output on the first computer, where only type1 font is used. So, why the pdf file is a little bit blurry, is to me pretty clear.

My question is: how to set as a default the type1 font? I'm working on a Windows 7 machine, with texlive and Texmaker 3.3.3.

Maybe an important thing to mention: after installing everything on the 2nd computer (where the problem occurs), at first pdflatex couldn't even generate the pdf file, throwing the exeption "!pdfTeX error: pdflatex (file cmbx12.pfb): cannot open Type 1 font file for reading". After searching for solutions and trying several commands, I finally executed the command updmap in the console, after which things started to work normally, just that the quality of the output is not so good as the one on the 1st computer.

I would be very grateful if anyone here could help me solve this problem. Thanks in advance.

Best regards

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Problem with Type1 and Type3 fonts

Post by Stefan Kottwitz »

Hi,

welcome to the board!
darie20 wrote:My question is: how to set as a default the type1 font?
You need to ensure that the type 1 font supports the document font encoding. Computer Modern type 1 is used by default, but if you switch to T1 font encoding by \usepackage[T1]{fontenc}, the default Computer Modern doesn't support it. This can be fixed by installing the cm-super package which adds T1 support. Afterwards you would have type 1 as default also with T1 encoding, without changes to the document.

Stefan
LaTeX.org admin
darie20
Posts: 3
Joined: Thu Apr 12, 2012 10:51 am

Problem with Type1 and Type3 fonts

Post by darie20 »

Hi Stefan,

thanks for the reply.

I tried installing the cm-super package by running

Code: Select all

tlmgr install cm-super
in the console, but besides the fact that I had to wait a couple of seconds, I didn't get any confirmation that the package was installed and the generated pdf file is still using type3 fonts.

But if I add the line

Code: Select all

\usepackage[T1]{fontenc}
in the header of my .tex document, the generated pdf file is using type1 fonts and is looking very good, so the problem is kind of solved. What I don't understand is why using the same versions of the latex distribution and of the editor works different on two computers? On the first computer I didn't have to use the T1 package explicitly in the header.

Anyway, thank you very much for the tip, although it's working now, it's just a curiosity why this behaviour occured :)

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

Problem with Type1 and Type3 fonts

Post by Stefan Kottwitz »

darie20 wrote:What I don't understand is why using the same versions of the latex distribution and of the editor works different on two computers?
Obviously the installations are different. If you have a different set of packages installed, the result differs. Most times it's just an error that a package is missing. You understand it, install it, don't think much about it. This time it's been the same, a package was missing, but it was hardly noticable because it compiled without. cm-super updates the map files and your document uses the new fonts silently. Commonly, LaTeX works the same even with different editors and different operation systems. You just need the same basis, such as the same installed packages and similar format and map files, sometimes just a different character encoding, depending on the OS, hoewever today even this is gone since most editors and systems support UTF-8.
darie20 wrote:On the first computer I didn't have to use the T1 package explicitly in the header.
So you used the default font encoding, which is OT1.

Stefan
LaTeX.org admin
darie20
Posts: 3
Joined: Thu Apr 12, 2012 10:51 am

Re: Problem with Type1 and Type3 fonts

Post by darie20 »

Okay, got it. You are right, one or more packages were probably not installed (correctly), which caused the error.

Thank you very much for your help!
Post Reply