2

I would like to use a TrueType font in pdfLatex. I am using MiKTeX 2.9.

I am following these instructions: http://www.radamir.com/tex/ttf-tex.htm (If there are updated instructions, please let me know.)

When I got to this step:

 Start=>Programs=>MiKTeX=>Maintenance=>Refresh Filename Database

I used these two instead

 Start, Programs, MiKTeX 2.9, Maintenance, Settings
   General, Refresh FNDB
 Start, Programs, MiKTeX 2.9, Maintenance (Admin), Settings (Admin)
   General, Refresh FNDB

Now I am at this step:

 tex testfont
 dvips testfont.dvi

And I get this error:

C:\download\fontTest>tex testfont
This is TeX, Version 3.1415926 (MiKTeX 2.9 64-bit)
("C:\Program Files\MiKTeX 2.9\tex\plain\base\testfont.tex"

Name of the font to test = eckeys
Now type a test command (\help for help):)
*\table\eject\init
[1]
Name of the font to test = eckeysb
Now type a test command (\help for help):
*\table\eject\init
[2]
Name of the font to test = eckeysi
Now type a test command (\help for help):
*\bye
[3]
Output written on testfont.dvi (3 pages, 21676 bytes).
Transcript written on testfont.log.

C:\download\fontTest>dvips testfont.dvi
This is dvips(k) 5.993 Copyright 2013 Radical Eye Software (www.radicaleye.com)
' TeX output 2014.11.29:0941' -> testfont.ps
Trying to make PK font reckeys at 600 DPI...
Running miktex-makemf.exe...
miktex-makemf: The reckeys source file could not be found.
Running ttf2pk.exe...
miktex-makepk: PK font reckeys could not be created.
dvips: Font reckeys not found; characters will be left blank.
Trying to make PK font reckeysb at 600 DPI...
Running miktex-makemf.exe...
miktex-makemf: The reckeysb source file could not be found.
Running ttf2pk.exe...
miktex-makepk: PK font reckeysb could not be created.
dvips: Font reckeysb not found; characters will be left blank.

.



[1] [2]
[3]

It appears that TeX can find the fonts because "tex testfont" will complain if I use a font name that does not exist. However, dvips and miktex-makepk cannot.

Would you please tell me how to proceed, or please point me to a newer document that explains how to use TrueType fonts in pdflatex?

  • I do not use MiKTeX. However, those instructions seem... odd. It is not possible to use .ttf with LaTeX without converting them i.e. you cannot use them directly. (As far as I know.) You can use them directly with pdfLaTeX. – cfr Nov 29 '14 at 21:51
  • Is XeLaTeX or LuaLaTeX an option? You could use the font without needing to mess around in that case. Installing fonts for use with (pdf)LaTeX is perfectly possible but it is not for the faint of heart. – cfr Nov 29 '14 at 21:56
  • I'm using MiKTeX. Which font do you want to use? Can you use lualatex or xelatex? The can use ttf, if the computer knows the font. Preparing a ttffont for pdflatex is not easy and needs more informations ... It could be that there is a pxkage for the support of your font. So please add the name of the font and, if possible, us give a link. – Kurt Nov 29 '14 at 23:23
1

Thanks cfr and Kurt. Moving to XeLaTeX worked for me. I am using Windows 7. These are custom True Type fonts which I am required to use, and none of the built-in fonts matched in all characters.

First I clicked on the .ttf files so Windows would install them.

Then in my .tex file, I removed all the font lines that looked like this (which were needed for pdfLaTeX but caused XeLaTeX to hang)

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[scaled]{uarial}
\renewcommand*\familydefault{\sfdefault}

Then I added the lines needed by XeLaTeX

\usepackage{fontspec}
\setmainfont{MyCustomFont}

Thanks for the tip of trying XeLaTeX. The instructions for installing a font on pdfLaTeX were very complicated. XeLaTeX was much simpler once I corrected the \usepackage lines shown above. XeLaTeX seems to work very well in creating a PDF with the correct True Type font.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.