latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
276 stars 33 forks source link

Fontspec with lualatex cannot find the italic, bold and bold-italic versions of the XITS font #384

Closed callegar closed 5 years ago

callegar commented 5 years ago

Description

Using LuaTex and a document relying on the XITS font, as in

 \setmainfont{XITS}

fontspec seems unable to find the italic, bold and bold italic versions of the font unless I explicitly indicate them as in

  \setmainfont{XITS}[ItalicFont=XITS-Italic,
  BoldFont=XITS-Bold, BoldItalicFont=XITS-BoldItalic]

The complaint that I find in the log file is

Package fontspec Info: Could not resolve font "XITS/BI" (it probably doesn't
(fontspec)             exist).

Package fontspec Info: Could not resolve font "XITS/B" (it probably doesn't
(fontspec)             exist).

Package fontspec Info: Could not resolve font "XITS/I" (it probably doesn't
(fontspec)             exist)

This seems strange, because with other fonts (e.g. Times New Roman, STIX Two Text, TeX Gyre Termes, etc.) fontspec can easily find the italic, etc font versions by itself. Furthermore, on my machine (Ubuntu linux with the upstream TeXLive), fc-match can find all versions of XITS:

fc-match XITS:italic
XITS-Italic.otf: "XITS" "Italic"

Furthermore, everything works just fine with xelatex.

Check/indicate

wspr commented 5 years ago

Thanks for taking the time to write this up. Resolving font variants like this is not a hard science. It may be that this cannot be done reliably. Regardless, this is not under the control of fontspec — if anything it is a luaotfload issue.