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'm trying to set a heading in DejaVu Serif Condensed Bold. Simplified, here's the code:

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{DejaVu Serif Condensed}
\begin{document}
\thispagestyle{plain}
\bfseries\huge Curriculum Vitæ
\end{document}

On processing with XeLaTeX, I get this:

XeTeX output

while with LuaLaTeX, this:

LuaTeX output

which is the regular series. This is backed up by the log. XeLaTeX shows no warnings, but LuaLaTeX gives this:

LaTeX Font Warning: Font shape EU2/DejaVuSerifCondensed(0)/bx/n' undefined usingEU2/DejaVuSerifCondensed(0)/m/n' instead on input li

What's going on here?

For reference, TeXLive 2012 updated to final version, Windows 7


It occurred to me that I might have different fonts in the Windows system font folder and in the texmf-dist tree. Not so - the two folders have identical copies of the fonts.

share|improve this question
    
same here with cygwin texlive 2012 –  David Carlisle Jun 13 '13 at 18:58
3  
The warning means that luaotfload couldn’t find the bold font when fontspec asked for it. I can reproduce it with TeX Live 2013 as well, so it is a luaotfload bug and should be reported. –  Khaled Hosny Jun 13 '13 at 20:17
1  
I can reproduce it too. As a workaround you can setup the bold font directly: \setmainfont[BoldFont=DejaVu Serif Condensed Bold]{DejaVu Serif Condensed} –  Ulrike Fischer Jun 14 '13 at 8:38
1  
Can’t reproduce it with the current luaotfload. Here, luaotfload-tool --find="DejaVu Serif Condensed" correctly resolves to DejaVuSerifCondensed.ttf (in TL texmf tree). Consequently, the example code produces the same result with Luatex as with Xetex. –  phg Jun 14 '13 at 11:17
    
@KhaledHosny Would you like me to add an issue to your github tracker? –  Brent.Longborough Jun 15 '13 at 17:45

1 Answer 1

up vote 2 down vote accepted

You can do a hack to get the right fonts when LuaLaTeX is used, while the bug is being solved:

\documentclass[12pt]{article}
\usepackage{fontspec}

\usepackage{ifluatex}

\ifluatex
  \setmainfont[
    BoldFont={* Bold},
    ItalicFont={* Italic},
    BoldItalicFont={* BoldItalic}
  ]{DejaVu Serif Condensed}
\else
  \setmainfont{DejaVu Serif Condensed}
\fi

\begin{document}
\thispagestyle{empty}
\huge

Curriculum Vitae

{\bfseries Curriculum Vitae}

{\itshape Curriculum Vitae}

{\bfseries\itshape Curriculum Vitae}

\end{document}

This is the result with LuaLaTeX

enter image description here

(I've changed æ, that I consider wrong, into ae, I hope you don't mind.)

share|improve this answer
    
I detected a similar problem. "DejaVu Serif" is resolved to "dejavuserifcondensed.ttf" instead of "dejavuserif.ttf". So setting main font to "DejaVu Serif" causes a very different line and page breaks between lualatex and xelatex. Any workaround for this? –  JLDiaz Jul 9 '13 at 15:31
    
@JLDiaz It seems that luaotfload matches the wrong font; indeed luaotfload-tool --find="DejaVu Serif" prints out Resolved file name “DejaVuSerifCondensed.ttf” –  egreg Jul 9 '13 at 15:45
    
@JLDiaz This seems a bug. Loading the font with \setmainfont[ Extension=.ttf, UprightFont=*, ItalicFont=*-Italic, BoldFont=*-Bold, BoldItalicFont=*-BoldItalic, ]{DejaVuSerif} at least is a workaround. –  egreg Jul 9 '13 at 15:54
    
Thank you very much for the workaround. I reported the bug in the luaotfload bugtrack. –  JLDiaz Jul 9 '13 at 16:19

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.