Fixing the Biolinum Font in Beamer

The libertine package provides LaTeX support to the Linux Libertine and Linux Biolinum fonts. The package release dated 2011-06-06 contains a bug, in which the ex unit value of the san serif font, Linux Biolinum, is not set correctly. This causes problems if the libertine package is used in a beamer presentation:

Notice how the heights of the headline and footline coloured boxes are almost zero. The same thing happens to the itemized and enumerated list markers, too.

A bug report has been filed with the LinuxLibertine project, but it’s still open at the time of writing.

In the meantime, Ulrike Fischer and Robin Fairbairns have provided an interim solution by resetting the ex value in the .fd files. Here’s what I did following their suggestions.

Locate the Biolinum .fd files, which should be in $TEXMF/tex/latex/libertine/ . I usually work with T1 encoding, so I homed in on the files t1fxb.fd, t1fxbf.fd, t1fxbj.fd, t1fxbjo.fd and t1fxbo.fd. (All these files, because sometimes I want the old-style numbers fonts.) I then added the code in red below for each m-n series-shapes:

\DeclareFontShape{T1}{fxb}{m}{n}{
\fxl@@scale fxbr-t1
}{\fontdimen5\font=\fontcharht\font`\x}

I didn’t bother with the \DeclareFontShape of other series-shapes, as the above seems to have fixed the problem for me:

So hopefully this’ll help anyone else who’s run into a similar predicament. Thanks again to Ulrike and Robin for the solution.

Leave a Reply

Your email address will not be published. Required fields are marked *