Rechercher dans l’assistance

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Why aren't the monospace fonts displaying fixed length whitespace in Firefox 4?

  • 28 réponses
  • 24 ont ce problème
  • 479 vues
  • Dernière réponse par okarge

more options

I have written several applications for browser-based DNA sequence analysis that rely on the fixed glyph width of monospace fonts to insure proper alignment of DNA sequences and the protein(s) they encode. Because exact alignment is necessary, the page contents are presented within the scope of a <pre> style directive. In Firefox 4 the space character has a smaller glyph width than other characters, creating misalignment that severely reduces the accuracy and intelligibility of the page. The problem does not appear to be font-specific.

Since the original post I have created a test page that demonstrates the problem here. The page passes in Safari5, Chrome11, IE9 and fails in FF4.

Modifié le par brianseed

Toutes les réponses (8)

more options

Odd... that doesn't have an effect in my environment. Sounds somewhat encouraging, though.

more options

Does it work properly in a new profile or does it only work there in Save mode ?


more options

No, in a clean profile it shows the same behavior. In safe mode under the new profile the test page passes.

more options

Maybe this will help: Before turning off that setting, I also turned off all of the font smoothing capabilities of my machine.

System->Advanced system settings->Performance (Settings...)->Adjust for best performance

Fonts-Adjust ClearType text->Untick "Turn on ClearType" and follow the wizard

more options

Both of those are off on my system by default (I always choose the 'Adjust for Best Performance' option) and Control Panel\Appearance and Personalization\Fonts\Adjust Clear Type text\Clear Type Text Tuner shows an unchecked "Turn on Clear Type" checkbox. I suspect the more efficient route to identify the offending code may be to dump the config switches to a file and compare Safe Mode with Default Mode. Unfortunately I don't know how to do this.

more options

Did you try to set gfx.direct2d.disabled to true and close and restart Firefox?

more options

I was able to reproduce the safe mode (desired) behavior by setting gfx.direct2d.disabled to true and restarting, but only once I set gfx.font_rendering.directwrite.enabled to false. I am not sure why the latter was set to true, as false seems to be the default. Anyway, it seems that the direct2d switch controls the glyph (mis)behavior. Oddly, this appears to be set to false following a start in safe mode. But perhaps the config listing doesn't reflect the actual application state in safe mode.

more options



that sets it right.

  1. 1
  2. 2