(This is sort of a follow-up to libertineotf and xelatex - bold smallcaps broken?, based on a problem that I had noticed earlier, but hadn't put my finger on.)
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}% 1
% \setmainfont{LinLibertine_R_0.otf}% 2
% \usepackage{libertineotf}% 3
\begin{document}
Foo bar. \textsc{Foo bar \textbf{baz!}}
\end{document}
Unexpectedly, this file doesn't use the otf Linux Libertine O files in C:\Windows\Fonts\
, but the pfb files in my texmf tree (cf. log snippets below). I presume this is why the small caps don't work as described in Herbert's answer here, and also why doing any OpenType magic à la \addfontfeauture
doesn't work either.
I'm not quite sure where the problem is coming from. Variant 2, which calls the otf font directly, runs, but doesn't use small caps; I assume that's because this font file is too specific for fontspec
to automatically find the small caps font, so that I'd have to specify the file with the SmallCapsFont
option manually. Variant 3 works pretty well, but as outlined in the question linked above, the calling of small caps is buggy there (and I want to solve the problem, not circumvent it).
As for background, I'm using MiKTeX 2.9, all up-to-date; and I have version 5.3 of the Linux Libertine fonts installed in C:\Windows\Fonts\
(independently from LaTeX, these are the ones I would've expected fontspec
to use).
Some seemingly relevant bits from the log file (of variant 1):
Requested font "Linux Libertine O" at 10.0pt
-> C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/libertine/LinLibertine
O.pfb
Requested font "Linux Libertine O/ICU" at 10.0pt
-> C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/libertine/LinLibertine
O.pfb
[and a number of similar lines, but then:]
Requested font "Linux Libertine O/BI/ICU" at 10.0pt
-> C:/Windows/Fonts/LinLibertine_RB.otf
Requested font "Linux Libertine O/BI/BI/ICU" at 10.0pt
-> C:/Windows/Fonts/LinLibertine_RB.otf
I don't really have a specific question, other than: What's going on here, and how can I fix it?