[tex-live] Font features linked with fontspec-preparse-external apparently broken in fontspec
Ulrike Fischer
news3 at nililand.de
Wed Oct 15 10:28:46 CEST 2014
Am Wed, 15 Oct 2014 06:49:32 +0200 schrieb Bruno Voisin:
> Thanks for this. I should have provided more background: calling
> fonts by name is indeed the simplest, it works with LuaLaTeX
> whether the fonts are installed at the OS level or in the texmf
> trees, but with XeLaTeX only when the fonts are installed at the
> OS level.
I can without problem call fonts installed in the texmf tree by
names in windows.
> Based on the fontspec doc, this should work writing a file LucidaBrightOT.fontspec say containing
>
> \defaultfontfeatures[LucidaBrightOT]
> {
> Extension = .otf,
> BoldFont = LucidaBrightOT-Demi,
> ItalicFont = LucidaBrightOT-Italic,
> BoldItalicFont = LucidaBrightOT-DemiItalic
> }
>
> and then calling the font in a XeLaTeX/LuaLaTeX document via either
>
> \setmainfont{Lucida Bright OT}
> \setmainfont{LucidaBrightOT}
> Except it doesn't: there are error messages about the Extension,
> BoldFont, etc. keys being unknown.
> Looking closer, it seems \defaultfontfeatures doesn't accept keys
> defined through fontspec-preparse-external in
> fontspec-{xetex,luatex}.sty, such as
> Extension/BoldFont/ItalicFont/BoldItalicFont/Path/ExternalLocation.
> I think this is a fontspec bug, but couldn't get any confirmation
> so far.
It works if one use a symbolic name like \rmfamily:
\documentclass[12pt]{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{fontspec}
\setlength{\parindent}{0pt}
\begin{document}
\defaultfontfeatures[\rmfamily]
%\defaultfontfeatures[texgyreadventor-regular.otf]
{
Color=Blue,
BoldFont={texgyreadventor-bold.otf},
ItalicFont={texgyreadventor-italic.otf},%
BoldItalicFont={texgyreadventor-bolditalic.otf}%
}
\setmainfont{texgyreadventor-regular.otf}
Roman text.\par
\textbf{Bold text}\par
\textit{Italic text.}\par
\textbf{\textit{Bold italic text.}}
\end{document}
I don't have the time currently to really look at it, but imho there
is some confusing between "(single) font" and "family".
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
More information about the tex-live
mailing list