7

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.

6
  • same here with cygwin texlive 2012 Jun 13, 2013 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. Jun 13, 2013 at 20:17
  • 2
    I can reproduce it too. As a workaround you can setup the bold font directly: \setmainfont[BoldFont=DejaVu Serif Condensed Bold]{DejaVu Serif Condensed} Jun 14, 2013 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. Jun 14, 2013 at 11:17
  • @KhaledHosny Would you like me to add an issue to your github tracker? Jun 15, 2013 at 17:45

1 Answer 1

2

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.)

4
  • 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, 2013 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, 2013 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, 2013 at 15:54
  • Thank you very much for the workaround. I reported the bug in the luaotfload bugtrack.
    – JLDiaz
    Jul 9, 2013 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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