Annoying Firefox Bug

Ran into an annoying Firefox bug after upgrading to Ubuntu Dapper. It seems to affect rendering of ligatures.

At this point, I am not sure if it is an Ubuntu specific bug. The current conditions I know of to trigger the bug are:

  • Firefox 1.5 (I am using the 1.5.dfsg+ package).
  • Pango rendering enabled (the default for Ubuntu).
  • The web page must use a font that contains ligatures and use those ligatures. Since the “DejaVu Sans” includes ligatures and is the default “sans serif” font in Dapper, this is true for a lot of websites.
  • The text must be justified (e.g. use the “text-align: justify” CSS rule).

If you view a site where these conditions are met with an affected Firefox build, you will see the bug: ligature glyphs will be used to render character sequences like “ffi“, but only the advance of the first character’s normal glyph is used before drawing the next glyph. This results in overlapping glyphs

It also results in a weird effect when selecting text, since the ligatures get broken appart if the selection begins or ends in the middle of the ligature, causing the text to jump around.

I wonder if this bug affects the Firefox packages in any other distributions, or is an Ubuntu only problem?

14 thoughts on “Annoying Firefox Bug”

  1. Simos: I don’t think that bug is related.

    I grabbed version 2.4.1 of DejaVu Sans and put it in my ~/.fonts folder, restarted firefox and verified that it was using the new version of the font by looking in /proc/$pid/maps. The problem persisted.

    If it was a bug in the font, I’d expect it to be visible in other applications and not just with justified text.

  2. I have the same problem, Dapper Flight 6. Sorry, am no developer so I don’t know what else information you need.

  3. I have the same problem (albiet much less frequently – I use a different font altogether) on Gentoo, with Firefox compiled from source. I’m pretty sure it’s not a packaging bug.

  4. The Mozilla project makes generic Linux binaries available, you could use them to compare against. I don’t remember if they are built with Pango by default or not.

  5. Mike: you can switch to the non-Pango code in the Ubuntu packages (and any other builds with Pango enabled) by defining MOZ_DISABLE_PANGO=1 in the environment.

    The bug does not occur with pango text rendering disabled, but it also doesn’t use the ligatures provided by the font.

    However, disabling Pango isn’t that interesting to me since it also prevents firefox from rendering a number of other languages correctly. As a user, I don’t want to have to make a decision about which set of languages I want to display correctly: I want them all to display properly. With that aim in mind, the Pango backend seems like the one to promote and improve.

  6. I had some problems with this in Firefox 1.5 on Debian. All the Swedish charactes (åäö) caused this bug and it was really annoying! Changing the font from DejaVu to Bitstream solved all problems though. Don’t know if it is DejaVu’s or Pango’s fault, but it works well with Bitstream for now…
    The very same font works excellent in OpenOffice by the way, because I just wrote a text spanning 26 pages, in Swedish, without any problems. It looked good both on screen and when I printed it out.
    Your comments helped me alot – thanks!

  7. I have the same problem in Debian Unstable, though I first noticed it when using the FreeSerif, FreeSans, and FreeMono fonts. The most annoying bug I noticed was that monospace text left out characters entirely: the word “strict” looked like “trict.” For the moment, I’ve switched to fonts that don’t use ligatures, but it sure is annoying! And I miss my FreeX fonts.

Comments are closed.