XeTeXUnable to access font variants

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
nikoett
Posts: 2
Joined: Wed May 12, 2010 5:51 pm

Unable to access font variants

Post by nikoett »

I'm having a problem being able to access variants of a particular font using the fontspec package. For example, when a word should be emboldened, it isn't and when a word should be emphasised, it also isn't.

I've written the following code TeXShop and typesetting using XeLaTeX:

Code: Select all

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\fontspec[BoldFont=Helvetica Neue]{Helvetica Neue Light} The final \emph{word} of this sentence is \textbf {bold}
\end{document}
The resulting pdf doesn't italicise or embolden. More accurately, the regular text isn't in Helvetica Neue Light, simply Helvetica Neue. The logfile follows, which appears to not have a problem finding Helvetica Neue Light:

Code: Select all

This is XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)
 %&-line parsing enabled.
entering extended mode
(./Untitled.tex
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus
sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis
h, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2008/texmf-dist/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/local/texlive/2008/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2008/texmf-dist/tex/xelatex/fontspec/fontspec.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2008/texmf-dist/tex/latex/tools/calc.sty)
(/usr/local/texlive/2008/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2008/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/local/texlive/2008/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2008/texmf-dist/tex/xelatex/euenc/eu1enc.def)
(/usr/local/texlive/2008/texmf-dist/tex/xelatex/euenc/eu1lmr.fd))
fontspec.cfg loaded.
(/usr/local/texlive/2008/texmf-dist/tex/xelatex/fontspec/fontspec.cfg))
(./Untitled.aux) [1] (./Untitled.aux) )
Output written on Untitled.pdf (1 page).
Transcript written on Untitled.log.
Many thanks in advance for any advice that anyone can offer!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Unable to access font variants

Post by meho_r »

Check if you have all necessary fonts installed and check exact names of fonts (is it "Helvetica Neue" or "HelveticaNeue", without the space?). I tested your code with Aller (Aller instead of Helvetica Neue and Aller Light instead of Helvetica Neue Light), since I don't have Helvetica, and noticed that the log is the same (only you have older packages installed). However, when I disabled Aller Light Italic and leave only Regular on, \emph doesn't create italics (which is expected since Aller Light Italic doesn't exist anymore on the system). Note that there was no error, just no italics. So, check if you have installed ALL necessary fonts, regular, bold and italic.
nikoett
Posts: 2
Joined: Wed May 12, 2010 5:51 pm

Unable to access font variants

Post by nikoett »

Many thanks for your reply. I have found a solution to this issue for the benefit of others:

A thread discusses the issue here: http://www.apfelwiki.de/forum/viewtopic ... it=xelatex

This issue is related to the different font format used by Mac OS 10.6 and is resolved in the most recent version of MacTeX. Another reason to make sure your TeXLive distribution is up to date!
Post Reply