TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Something is wrong with TeX and LaTeX logos with the font Linux Biolinum O under LuaTeX. I am using MiKTeX 2.9 on Windows. Here is a minimal working example:


\newfontfamily\LinBioO{Linux Biolinum O}
\newfontfamily\LinBioG{Linux Biolinum G}


With LuaTeX, I get


while with XɘTeX you get the correct result:


I did not really try other fonts, except Linux Libertine O and G, which both give a correct alignment of the ‘E’. Is the problem specific to the Linux Biolinum O font?

share|improve this question
I added the images for you. Tip: As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again. – Torbjørn T. Mar 7 '12 at 18:00
@TorbjørnT. O.K. Thanks. – MarcRdC Mar 7 '12 at 18:10
Might be that bug with some Linux Libertine fonts having wrong x height font dimen, what is the output of \the\fontdimen5\font (just after each font)? – Khaled Hosny Mar 7 '12 at 18:54
IIRC, XeTeX ignores the x height value in the font and calculates it by itself, in LuaTeX (or rather luaotfload package) we use the value supplied by the font. The proper solution here is to fix the font. – Khaled Hosny Mar 7 '12 at 20:01
@KhaledHosny "The proper solution here is to fix the font." - right. The os2_xheight is 101 which is in accordance to the \the\fontdimen5 above. – topskip Mar 9 '12 at 20:10
up vote 3 down vote accepted

Though it is a bug in the font, with LuaTeX we can “patch” fonts on the fly, and here is a possible fix:

\directlua {
local function fix_biolinum_xheight(fontdata)
  if fontdata.fullname:find("Linux Biolinum") then
    if fontdata.characters[string.byte("x")] then
      fontdata.parameters.x_height = fontdata.characters[string.byte("x")].height

luatexbase.add_to_callback("luaotfload.patch_font", fix_biolinum_xheight, "mypatch.fix_biolinum_xheight")

Adding those lines just after loading fontspec should do the trick.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.