Discussion:
Baskerville swash ampersand
(too old to reply)
Peter Flynn
2018-01-04 22:06:32 UTC
Permalink
I'm using Libre Baskerville with XeLaTeX. It appears that I have badly
misunderstood the effect of \setmainfont.

I was under the impression that it would correctly locate the roman,
italic, bold, and bold-italic fonts for the typeface specified (assuming
they exist and are indexed in the font cache.

I am in fact getting a slanted font instead of italics for \textit.

However, if I load the italic font explicitly, it does provide the
correct italics.

What have I misunderstood?

///Peter

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Libre Baskerville}
\newfontface{\italicfont}{LibreBaskerville-Italic}
\begin{document}
\Huge
This is normal text \textit{\& this is italics}

This is normal text {\italicfont\& this is italics}
\end{document}
Herb Schulz
2018-01-04 23:40:25 UTC
Permalink
Post by Peter Flynn
I'm using Libre Baskerville with XeLaTeX. It appears that I have badly
misunderstood the effect of \setmainfont.
I was under the impression that it would correctly locate the roman,
italic, bold, and bold-italic fonts for the typeface specified (assuming
they exist and are indexed in the font cache.
I am in fact getting a slanted font instead of italics for \textit.
However, if I load the italic font explicitly, it does provide the
correct italics.
What have I misunderstood?
///Peter
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Libre Baskerville}
\newfontface{\italicfont}{LibreBaskerville-Italic}
\begin{document}
\Huge
This is normal text \textit{\& this is italics}
This is normal text {\italicfont\& this is italics}
\end{document}
Howdy,

Fontspec doesn't always get the font choices right. You can use

\setmainfont[ItalicFont=LibreBaskerville-Italic]{Libre Baskerville}

Good Luck,
Herb Schulz
Peter Flynn
2018-01-05 20:16:56 UTC
Permalink
On 04/01/18 23:40, Herb Schulz wrote:
[...]
Post by Herb Schulz
Fontspec doesn't always get the font choices right. You can use
\setmainfont[ItalicFont=LibreBaskerville-Italic]{Libre Baskerville}
On 05/01/18 03:30, Bob Tennent wrote:
[...]
Post by Herb Schulz
It might be easier to use
\usepackage{librebaskerville}
Excellent advice, thank you both.

///Peter
jon
2018-01-06 02:59:24 UTC
Permalink
Post by Herb Schulz
Fontspec doesn't always get the font choices right. You can use
\setmainfont[ItalicFont=LibreBaskerville-Italic]{Libre Baskerville}
note that this is the older form of the command. it still works, but is
(i believe) deprecated.

the newer/current form would be:

\setmainfont{Libre Baskerville}[ItalicFont=LibreBaskerville-Italic]

cheers,
jon.

Bob Tennent
2018-01-05 03:30:47 UTC
Permalink
Post by Peter Flynn
I'm using Libre Baskerville with XeLaTeX. It appears that I have badly
misunderstood the effect of \setmainfont.
I was under the impression that it would correctly locate the roman,
italic, bold, and bold-italic fonts for the typeface specified (assuming
they exist and are indexed in the font cache.
What have I misunderstood?
It might be easier to use

\usepackage{librebaskerville}

which works for latex, pdflatex and lualatex as well as
xelatex.

Bob T.
Loading...