When I load fontspec.sty (2.1a) with `Ligatures=TeX' option,
\textsc/\scshape don't switch to small caps (XeLaTeX and LuaLaTeX
TL2010). Example is attached below. Am I missing something?
\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont[%
Ligatures=TeX % <<-- Comment out
]{TeX Gyre Bonum}
\begin{document}
\textsc{Small Caps} or {\scshape Small Caps}; \TeX-ligatures: -- vs. –
\end{document}
TIA
--
Arash Esbati
> \textsc{Small Caps} or {\scshape Small Caps}; \TeX-ligatures: -- vs. ¡V
> \end{document}
No, it's fontspec that does wrong. In the log file I find
fontspec Info: Defining shape 'small caps' with NFSS specification:
(fontspec) <-> "TeX Gyre Bonum/ICU:script=latn;language=DFLT;
mapping=tex-text+smcp;"
(there is no break after "DFLT;", I added it for readability).
At the end there's also a message
Font mapping `tex-text+smcp.tec' for font `TeX Gyre Bonum' not found.
There should be a semicolon between "tex-text" and "+smcp".
Ciao
Enrico
> Arash Esbati <esb...@gmx.de> wrote:
>
>> When I load fontspec.sty (2.1a) with `Ligatures=TeX' option,
>> \textsc/\scshape don't switch to small caps (XeLaTeX and LuaLaTeX
>> TL2010). Example is attached below. Am I missing something?
>
> No, it's fontspec that does wrong.
Sigh, kill me now.
Thanks for this.
Are there any other bugs I should have caught lying around before I
update yet another bug-fix?
Thanks,
Will
There is also another one, but I'm not sure whether it depends
on fontspec or on luaotfload.
If I ask
\setmainfont{Linux Libertine O}
and compile with XeLaTeX, the bold family is found. If I compile
with LuaLaTeX it isn't. Minimal example
===
\documentclass[a4paper]{minimal}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\begin{document}
\noindent Roman a\\
\textbf{Boldface b}\\
\textit{Italic f}\\
\textit{\bfseries Boldface Italic f}\\
\textsc{Small Caps}
\end{document}
===
(I applied the fix to fontspec I found on Git, so the small caps work)
It may depend on luaotfload, though, since changing "Linux Libertine O"
into "TeX Gyre Termes" gives the boldface.
The entries for Linux Libertine O Bold in otfl-names.lua are
{
["familyname"]="Linux Libertine O",
["filename"]={ "fxlb.otf", false },
["fontname"]="LinLibertineOB",
["fullname"]="Linux Libertine O Bold",
["names"]={
["family"]="Linux Libertine O",
["fullname"]="Linux Libertine O Bold",
["psname"]="LinLibertineOB",
["subfamily"]="Bold Regular",
},
["size"]={},
["slant"]=0,
["weight"]=700,
["width"]=5,
},
{
["familyname"]="Linux Libertine O",
["filename"]={ "fxlbi.otf", false },
["fontname"]="LinLibertineOBI",
["fullname"]="Linux Libertine O Bold Italic",
["names"]={
["family"]="Linux Libertine O",
["fullname"]="Linux Libertine O Bold Italic",
["psname"]="LinLibertineOBI",
["subfamily"]="Bold Italic",
},
["size"]={},
["slant"]=-11.5,
["weight"]=700,
["width"]=5,
},
Ciao
Enrico
> There is also another one, but I'm not sure whether it depends
> on fontspec or on luaotfload.
I think the culprit is `fxlb.otf' itself. Try:
-> otfinfo -i fxlb.otf
Family: Linux Libertine O
Subfamily: Bold Regular
Full name: Linux Libertine O Bold
PostScript name: LinLibertineOB
Version: Version 4.1.5
...
The Subfamily should be `Bold' and not `Bold Regular'. I edited the
respecting line in my otfl-names.lua manually and it worked (see below)
> {
> ["familyname"]="Linux Libertine O",
> ["filename"]={ "fxlb.otf", false },
> ["fontname"]="LinLibertineOB",
> ["fullname"]="Linux Libertine O Bold",
> ["names"]={
> ["family"]="Linux Libertine O",
> ["fullname"]="Linux Libertine O Bold",
> ["psname"]="LinLibertineOB",
> ["subfamily"]="Bold Regular",
["subfamily"]="Bold", <<<<---- Changed
> },
> ["size"]={},
> ["slant"]=0,
> ["weight"]=700,
> ["width"]=5,
> },
What do you think, would you consider this a bug in the font?
--
Arash Esbati
Well found! I guess Élie Roux or whoever is in charge of this
business should try and correct the naming algorithm. After all
"Bold Regular" doesn't seem completely incorrect, albeit nonstandard.
Ciao
Enrico
> Arash Esbati <esb...@gmx.de> wrote:
>
>> Enrico Gregorio <greg...@math.unipd.it> writes:
>>
>> > There is also another one, but I'm not sure whether it depends
>> > on fontspec or on luaotfload.
>>
>> I think the culprit is `fxlb.otf' itself. Try:
>>
>> -> otfinfo -i fxlb.otf
>> Family: Linux Libertine O
>> Subfamily: Bold Regular
>> Full name: Linux Libertine O Bold
>> PostScript name: LinLibertineOB
>> Version: Version 4.1.5
>> ...
>>
>> The Subfamily should be `Bold' and not `Bold Regular'. I edited the
>> respecting line in my otfl-names.lua manually and it worked (see below)
[...]
> Well found! I guess Élie Roux or whoever is in charge of this
> business should try and correct the naming algorithm. After all
> "Bold Regular" doesn't seem completely incorrect, albeit nonstandard.
I did a google search and found this document saying[1]:
,----[ Name IDs ]
| Code 2: Font Subfamily name. The Font Subfamily name distiguishes the
| font in a group with the same Font Family name (name ID 1). This is
| assumed to address style (italic, oblique) and weight (light, bold,
| black, etc.). A font with no particular differences in weight or style
| (e.g. medium weight, not italic and fsSelection bit 6 set) should have
| the string “Regular” stored in this position.
`----
Hence, `Bold Regular' should be `Bold' in subfamily Linux Libertine O
(and Linux Biolinum O, Linux Biolinum Outline O Linux and Biolinum
Shadow O)[2]
Footnotes:
[1] http://www.microsoft.com/typography/otspec/name.htm
[2] I'm totally unfamiliar with this stuff and referencing to
MS-document :)
--
Arash Esbati