Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have installed some fonts such as "HelveticaNeueLT Pro 53 Ex.otf" on my Windows, however my XeLaTeX cannot find the font. Here is my code:

\font\headers="HelveticaNeueLT Pro 53 Ex:letterspace=5" at 20pt
\font\SectionHeaders="HelveticaNeueLT Pro 53 Ex:letterspace=5" at 14pt

The error I get is:

Couldn't find `HelveticaNeueLT Pro 53 Ex:letterspace.cfg'

miktex-maketfm: No creation rule for font "HelveticaNeueLT Pro 53 Ex:letterspace=5".

! Font \headers="HelveticaNeueLT Pro 53 Ex:letterspace=5" at 20.0pt not loadabl e: Metric (TFM) file or installed font not found. l.36 ...icaNeueLT Pro 53 Ex:letterspace=5" at 20pt
share|improve this question
add comment

3 Answers

Use fc-list command to list full names of all available fonts in your computer. The result may be scroll many pages, so you'd better put them in a single file.

fc-list > fontnames.txt

enter image description here

Then you open the file generated and see the font name you can use. For example, you may get these in file fontnames.txt:

Minion Pro:style=Bold Italic
Minion Pro:style=Regular
Minion Pro:style=Italic
Minion Pro:style=Bold

Thus you can use Minion Pro as a font name. Say,

% plain TeX
\font\minion="Minion Pro"
{\minion This is Minion font.}
\bye

Using LaTeX, fontspec is preferred. For example:

\usepackage{fontspec}
\setmainfont{Minion Pro}

See manual of fontspec for more usage.

share|improve this answer
add comment

To load the font by file name, you have to enclose it in square brackets:

\font\headers="[HelveticaNeueLT Pro 53 Ex.otf]:letterspace=5" at 20pt
\font\SectionHeaders="[HelveticaNeueLT Pro 53 Ex.otf]:letterspace=5" at 14pt

Which works even for fonts not installed in the system directories (e.g. fonts in the current directory, or TeX directory structure). You have to find the internal font name (which is different than file name), to load fonts by font name.

share|improve this answer
add comment

As I pointed out I am a newbie. One must use "fontspec" package in order to use the fonts installed on the system.

I used the following code to solve my problem:

\usepackage[T1]{fontenc}

\usepackage{fontspec}
share|improve this answer
4  
Don't use fontenc in combination with fontspec. See tex.stackexchange.com/questions/2984. –  Philipp Jan 25 '11 at 0:15
    
Thanks Philip, I read the information in the post. However I still don't understand why I should not include fonttec in combination with fontspec. Do they CONFLICT? (I have found that the document compiles just fine) –  cyber.scientist Jan 25 '11 at 3:12
1  
No, they do not confilict. fontspec will internally include fontenc and set EU1 as the default font encoding using XeLaTeX. You must use fontenc carefully together with fontspec. –  Leo Liu Jan 25 '11 at 7:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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