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

Problem using Biolinum font with Beamer in pdflatex

251 views
Skip to first unread message

Lian Tze Lim

unread,
Oct 13, 2011, 11:11:46 AM10/13/11
to
I'm using the Biolinum font (part of the libertine package) in a Beamer
presentation. This used to work fine, until a recent slew of updates.
Notice how, in the following, the heights of the headline and footline
boxes are very small, almost as if they can't detect a font size. The
same happens with the enumerated list markers.

-----------8<------------
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine}

\author{An Author}
\title{A Presentation}

\begin{document}
\begin{frame}
\maketitle
\end{frame}

\section{Intro}
\begin{frame}
\begin{enumerate}
\item Hey
\end{enumerate}
\end{frame}
\end{document}
-----------8<------------

The problem is only with the Biolinum font, i.e. the sans serif font
supplied by the libertine package. If you add

\usefonttheme{serif}

or even use a different sans serif font altogether, such as

\usepackage{helvet}

then the headline and footline boxes, as well as the enumerate list
marker, will have the correct heights. This happens with both TeXLive
and MikTeX.

While I know xelatex is one possible solution, does anyone know how to
solve this problem if one absolutely has to use pdflatex?


Many thanks in advance,

- Lian Tze -

Ulrike Fischer

unread,
Oct 13, 2011, 11:40:48 AM10/13/11
to
Am Thu, 13 Oct 2011 23:11:46 +0800 schrieb Lian Tze Lim:

> I'm using the Biolinum font (part of the libertine package) in a Beamer
> presentation. This used to work fine, until a recent slew of updates.
> Notice how, in the following, the heights of the headline and footline
> boxes are very small, almost as if they can't detect a font size.

That's obviously a bug in the font. It doesn't set the "ex" value
correctly. You should make a bug report.

You can reset the value, but I don't know how you can add this to
the beamer font command.

\documentclass{article}


\usepackage[T1]{fontenc}
\usepackage{libertine}

\begin{document}
\sffamily x \rule{1ex}{1ex}

\rmfamily x \rule{1ex}{1ex}

\sffamily x \fontdimen5\font=\fontcharht\font`\x \rule{1ex}{1ex}
\end{document}

--
Ulrike Fischer

Lian Tze Lim

unread,
Oct 13, 2011, 11:52:39 AM10/13/11
to
On 10/13/11 11:40 PM, Ulrike Fischer wrote:
> That's obviously a bug in the font. It doesn't set the "ex" value
> correctly. You should make a bug report.

Thank you Ulrike. I've just discovered that a bug about this has indeed
been filed (and is still open). Funny how I didn't see it in the bug
list earlier this evening... *shamefaced*


Thanks again and best regards,
- Lian Tze -

Robin Fairbairns

unread,
Oct 13, 2011, 2:09:45 PM10/13/11
to
Ulrike Fischer <ne...@nililand.de> writes:

put it in the last (6th) arg to the \DeclareFontShape command (that arg
is normally empty in .fd files) -- it'll then get executed every time
the font is selected.
--
Robin Fairbairns, Cambridge
my address is @cl.cam.ac.uk, regardless of the header. sorry about that.

Lian Tze Lim

unread,
Oct 13, 2011, 9:49:56 PM10/13/11
to
On 10/14/11 2:09 AM, Robin Fairbairns wrote:

> Ulrike Fischer<ne...@nililand.de> writes:
>> You can reset the value, but I don't know how you can add this to
>> the beamer font command.
>>
>> \documentclass{article}
>> \usepackage[T1]{fontenc}
>> \usepackage{libertine}
>> \begin{document}
>> \sffamily x \rule{1ex}{1ex}
>>
>> \rmfamily x \rule{1ex}{1ex}
>>
>> \sffamily x \fontdimen5\font=\fontcharht\font`\x \rule{1ex}{1ex}
>> \end{document}
>
> put it in the last (6th) arg to the \DeclareFontShape command (that arg
> is normally empty in .fd files) -- it'll then get executed every time
> the font is selected.

Thank you, Robin, modifying the .fd files did the trick!

Can I also say a personal "thanks" for your hard and excellent work at
maintaining the FAQs? It remains my first reference whenever I'm
wondering how to do something.


Best regards,
- Lian Tze -

Bob T.

unread,
Dec 13, 2012, 5:04:42 PM12/13/12
to ne...@nililand.de
I've received a complaint about a Biolinum type1 font which is apparently similar to this. Please enlighten me where the ex value is set in a pfb font. The otf version doesn't have the same issue when xelatex is used. The pfb is generated by cfftot1 from the otf font without any modification (except the FontName).

Bob T.

Ulrike Fischer

unread,
Dec 14, 2012, 3:42:50 AM12/14/12
to
Am Thu, 13 Dec 2012 14:04:42 -0800 (PST) schrieb Bob T.:

>>> I'm using the Biolinum font (part of the libertine package) in a Beamer
>>> presentation. This used to work fine, until a recent slew of updates.
>>> Notice how, in the following, the heights of the headline and footline
>>> boxes are very small, almost as if they can't detect a font size.

>> That's obviously a bug in the font. It doesn't set the "ex" value
>> correctly. You should make a bug report.


> I've received a complaint about a Biolinum type1 font which is
> apparently similar to this. Please enlighten me where the ex
> value is set in a pfb font. The otf version doesn't have the same
> issue when xelatex is used. The pfb is generated by cfftot1 from
> the otf font without any modification (except the FontName).

Well if you mean there is a problem when the font is used with
pdflatex: the value must be in the tfm-file. And the tfm-file
normally gets it from the afm and the "XHeight" value. But there are
no afm files in the package so I can't check what their value is and
I don't have today the time to run autoinst.

But I can confirm that the ex-value is wrong in the type1 case: it
is about 1.38pt instead of 4.3pt:

\documentclass{book}
\usepackage[biolinum]{libertine}

\begin{document}
\showthe\fontdimen5\font %ok

\sffamily abc \showthe\fontdimen5\font %wrong

\fontdimen5\font=\fontcharht\font`\x \rule{1ex}{1ex}
\showthe\fontdimen5\font %now ok.
\end{document}


--
Ulrike Fischer
http://www.troubleshooting-tex.de/

Bob Tennent

unread,
Dec 14, 2012, 8:05:26 AM12/14/12
to
On Fri, 14 Dec 2012 09:42:50 +0100, Ulrike Fischer wrote:
>
>>>> I'm using the Biolinum font (part of the libertine package) in a Beamer
>>>> presentation. This used to work fine, until a recent slew of updates.
>>>> Notice how, in the following, the heights of the headline and footline
>>>> boxes are very small, almost as if they can't detect a font size.
>
>>> That's obviously a bug in the font. It doesn't set the "ex" value
>>> correctly. You should make a bug report.
>
>
>> I've received a complaint about a Biolinum type1 font which is
>> apparently similar to this. Please enlighten me where the ex
>> value is set in a pfb font. The otf version doesn't have the same
>> issue when xelatex is used. The pfb is generated by cfftot1 from
>> the otf font without any modification (except the FontName).
>
> Well if you mean there is a problem when the font is used with
> pdflatex: the value must be in the tfm-file. And the tfm-file
> normally gets it from the afm and the "XHeight" value. But there are
> no afm files in the package so I can't check what their value is and
> I don't have today the time to run autoinst.
>
> But I can confirm that the ex-value is wrong in the type1 case: it
> is about 1.38pt instead of 4.3pt:

Thanks. The afms aren't generated by otftotfm and I never see them using
autoinst. But I think I've managed to fix the problem.

From the discussion at linuxlibertine.org, I learned that the original
(2011) bugs were introduced by a buggy version of fontforge and that
the current otfs didn't have those bugs; indeed the Beamer problems
don't arise with xelatex or lualatex. But I had unknowingly used
fontforge-2011 to change the FontNames and re-introduced the original
bugs!

I've now installed fontforge-2012, re-generated and over-written the
pfbs and support files for Biolinum, and the Beamer problems seem to be
gone. The ex value is 4.6pt, which is perhaps more than it should be but
better than 1.38pt.

Bob T.
0 new messages