Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fontspec: No small caps with `Ligatures=TeX'

107 views
Skip to first unread message

Arash Esbati

unread,
Sep 27, 2010, 5:26:00 PM9/27/10
to
Dear all,

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

Enrico Gregorio

unread,
Sep 27, 2010, 5:42:23 PM9/27/10
to
Arash Esbati <esb...@gmx.de> wrote:

> \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

Will Robertson

unread,
Sep 27, 2010, 9:13:16 PM9/27/10
to
On 2010-09-28 07:12:23 +0930, Enrico Gregorio <greg...@math.unipd.it> said:

> 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

Enrico Gregorio

unread,
Sep 28, 2010, 3:43:57 AM9/28/10
to
Will Robertson <wsp...@gmail.com> wrote:

What about the problem with \textcolor?

Ciao
Enrico

Enrico Gregorio

unread,
Sep 28, 2010, 4:49:22 AM9/28/10
to
Enrico Gregorio <greg...@math.unipd.it> wrote:

That seems to be solved. :)

Ciao
Enrico

Enrico Gregorio

unread,
Sep 28, 2010, 6:39:15 AM9/28/10
to
Will Robertson <wsp...@gmail.com> wrote:

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

Arash Esbati

unread,
Sep 28, 2010, 9:09:14 AM9/28/10
to
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)

> {
> ["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

Enrico Gregorio

unread,
Sep 28, 2010, 9:21:37 AM9/28/10
to
Arash Esbati <esb...@gmx.de> wrote:

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

unread,
Sep 28, 2010, 5:29:36 PM9/28/10
to
Enrico Gregorio <greg...@math.unipd.it> writes:

> 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

0 new messages