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?

  • 1
    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
  • 3
    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
  • @KhaledHosny With LuaTeX, I get 1.01 pt for Linux Biolinum O and 4.32129 pt for Linux Biolinum G. Under XɘTeX, the values are respectively 4.32 pt and 4.32129 pt. What explains this difference? – MarcRdC Mar 7 '12 at 19:26
  • 3
    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
  • 1
    @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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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