General ⇒ Embed fonts in pdf
Embed fonts in pdf
Hello,
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
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
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Embed fonts in pdf
You have to give a bit more detailed information. Embedding fonts is normally no problem. To figure out what could be going wrong, please post the complete preamble of the affected document.
Best regards
Thorsten
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
Thanks for your reply.
Here is my main tex file, and some extra style files I used. Does that help?
Here is my main tex file, and some extra style files I used. Does that help?
- Attachments
-
- macros.sty
- (1.58 KiB) Downloaded 494 times
-
- thesis.sty
- (6.95 KiB) Downloaded 478 times
-
- thesis.tex
- (1.91 KiB) Downloaded 575 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Embed fonts in pdf
OK, that's something I can deal with. At first sight, there's the activation of Type 1 fonts missing (Cork Encoding).
This already could be enough to get the desired result. Furthermore I noticed that you are loading the mathptmx package as one single additional postscript font. That means that for other font families (sans serif, typewriter) there are possibly no Type 1 fonts provided. And if you are using commands like \textsf{...} or \texttt{...} (or switches like \sffamily or \ttfamily), these font families can't be provided in the demanded quality hence they can't be embedded in the resulting PDF document.
Now there are two possible solutions. Load the mathptmx package in combination with two other postscript font packages.
Since your standard font style is Times, you may take a look at the txfonts. You then only have to load one single package with a complete set for all families, series and shapes with Times style.
All the mentioned packages and their documentations can be found in the CTAN Catalogue. In case of further problems, feel free to ask.
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}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
Thank you very much, however I cannot get this txfonts package working.
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
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: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Embed fonts in pdf
Hi Rens,
go to the MiKTeX Options and click the Refresh FNDB button to update the package database.
Stefan
go to the MiKTeX Options and click the Refresh FNDB button to update the package database.
Stefan
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Embed fonts in pdf
Instruct MiKTeX to use a server in your home country. Open the MiKTeX Package Manager (Start > Programs > MiKTeX > Browse Packages) and select via the Repository menu "Change Package Repository". There you can choose the new server from a list. Make sure that you use MiKTeX 2.6 or higher.
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.
Additionally you should put the documentation into the texmf tree.
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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
Ok, thanks.
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
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.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Embed fonts in pdf
Nope, that didn't work, but still thanks for the help. any other suggestions?
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
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