2016-06-25

Faking Font Faces in XeTeX

I wanted to use Linux Biolinum, specifically a bold italic face, in XeTeX. Unfortunately it only has faces for bold and italic, not both. So this is how you fake it:



\usepackage{fontspec}
\setmainfont[
 BoldFont={Linux Biolinum O Bold}, 
 ItalicFont={Linux Biolinum O Italic},
 BoldItalicFeatures={FakeBold=3.5,LetterSpace=5.0}
]{Linux Biolinum O}

abcdefghijklmnopqrstuvwxyz
\emph{abcdefghijklmnopqrstuvwxyz}
\textbf{abcdefghijklmnopqrstuvwxyz}
\textbf{\emph{abcdefghijklmnopqrstuvwxyz}}

The problem with using AutoFakeBold and AutoFakeSlant was that the produced fake used the regular face as a base, giving fake-looking letter forms for 'a', 'f' etc.

In one hand it's annoying that you have to worry about things like this, in the other hand it's great that you can do things exactly how you want.

No comments:

Post a Comment