General ⇒ Embed fonts in pdf
Embed fonts in pdf
I am creating my PhD thesis using MikTex and TexnicCenter. I created a PDF from my dvi file using dvips and ghostscript, but when I sent this pdf-file to the print-shop they said that not all fonts were embedded which could give trouble when they print it. Can somebody tell me how I can embed the fonts?
Thanks,
Rens
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Embed fonts in pdf
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
Here is my main tex file, and some extra style files I used. Does that help?
- Attachments
-
- macros.sty
- (1.58 KiB) Downloaded 498 times
-
- thesis.sty
- (6.95 KiB) Downloaded 482 times
-
- thesis.tex
- (1.91 KiB) Downloaded 579 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Embed fonts in pdf
Code: Select all
\usepackage[T1]{fontenc}
Now there are two possible solutions. Load the mathptmx package in combination with two other postscript font packages.
Code: Select all
\usepackage{mathptmx}
\usepackage[scaled]{helvet} % for sans serif fonts (\textsf{...} or \sffamiliy)
\usepackage{luximono} % for monospaced fonts (\texttt{...} or \ttfamily)
Code: Select all
\usepackage{txfonts}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
I used the command: \usepackage{txfonts}
and when I compiled, TexnicCenter asked to download this missing package, but it did not succeed. So, alternatively, I downloaded it manually from the CTAN page you referred to. But after following the setup instructions I still get the error message:
the required file: tex\latex\txfonts\txfonts.sty is missing. ...etc
which is not strange because I put txfonts.sty in tex\latex\txr as suggested in the installation guide. But even if I rename the directory to txfonts I still get the same error message. What's wrong?
Thanks,
Rens
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Embed fonts in pdf
go to the MiKTeX Options and click the Refresh FNDB button to update the package database.
Stefan
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Embed fonts in pdf
Now that you have already copied the STY file into the texmf tree, you have to refresh the file name database. You can do that with the MikTeX Options (Start > Programs > MiKTeX > Settings) or in the command prompt.
Code: Select all
texhash
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
I managed to install the packages, but unfortunately it didn't solve my original problem. When I open my pdf and look at document properties -> fonts then most fonts are embedded, but still some fonts (Helvetica, Symbol, Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman) are not embedded and for these fonts it also states that the actual font is something else. For example TimesNewRomanPSMT for Times-Roman etc.
Maybe there is something wrong with my ghostscript, because when I build a postscript file everything is fine, but when I use ghostscript to make a pdf out of my ps file i get errormessages in texniccenter like these:
Can't find (or can't open) font file C:\program files\gs\gs8.54\Resource/Font/TimesNewRomanPSMT
Can't find (or can't open) font file TimesNewRomanPSMT
Didn't find this font on the system!
Substituting Times-Roman for TimesNewRomanPSMT
etc.
I would really appreciate help on this subject.
Rens
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Embed fonts in pdf
Perhaps an upgrade to the newest version of Ghostscript will do. For Windows the current version is 8.61, because version 8.62 is not yet available for this operating system.rensv wrote:[...] Maybe there is something wrong with my ghostscript, because when I build a postscript file everything is fine, but when I use ghostscript to make a pdf out of my ps file i get errormessages in texniccenter like these:
Can't find (or can't open) font file C:\program files\gs\gs8.54\Resource/Font/TimesNewRomanPSMT
Can't find (or can't open) font file TimesNewRomanPSMT
Didn't find this font on the system!
Substituting Times-Roman for TimesNewRomanPSMT
[...]
Another possible solution could be that you did not install the fonts for Ghostscript. But as far as I remember, this is done automatically but can be unchecked during installation process. So, make sure that the fonts are properly installed when upgrading.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
I am not really attached to these fonts so if someone can tell me how to replace them, maybe that would do the trick.
Rens