# [tex-live] Font features linked with fontspec-preparse-external apparently broken in fontspec

Bruno Voisin bruno.voisin at legi.cnrs.fr
Tue Oct 14 18:58:08 CEST 2014

Hello,

The following issue comes from the Lucida list, in relation to the creation of .fontspec config files for loading the fonts by file name without having to tediously specify each time the file names of the bold, italic and bold italic fonts.

It turns out the problem does not seem to lie there, and lies instead in the BoldFont feature key being apparently broken, along with several keys (like Path, ExternalLocation, Extension, ...) implemented through

\__fontspec_keys_define_code:nnn {fontspec-preparse-external}

A (more-or-less) minimal test file:

\documentclass[12pt]{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{fontspec}
\setlength{\parindent}{0pt}
\begin{document}
{
Color=Blue,
}
Roman text.\par
\textbf{Bold text}\par
\textit{Italic text.}\par
\textbf{\textit{Bold italic text.}}
\end{document}

As is, it produces blue text as intended, with none of the bold and italic switches taken into account. If the line attempting to specify the BoldFont is uncommented, an error pops up

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
./Last-Test.tex:11: LaTeX error: "kernel/key-unknown"
!
! The key 'fontspec/BoldFont' is unknown and is being ignored.
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................

Unfortunately, my LaTeX3 skills are non-existent, hence I cannot offer an analysis what's wrong with fontspec-preparse-external. I tried to create an issue at <https://github.com/wspr/fontspec/>, but that seems to require a login and I have none. Hence I'm switching to here, hoping this is the right place.

Cheers,

===================================================
Bruno Voisin
LEGI, BP 53, 38041 Grenoble Cedex 9, France
bruno.voisin at legi.cnrs.fr / bvoisin at icloud.com
www.legi.cnrs.fr/people/Bruno.Voisin/english.html
www.legi.cnrs.fr/web/spip.php?auteur50&lang=en
===================================================