This thread was archived. Please ask a new question if you need help.
Why aren't the monospace fonts displaying fixed length whitespace in Firefox 4?
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.
Modified by brianseed
All Replies (8)
Odd... that doesn't have an effect in my environment. Sounds somewhat encouraging, though.
No, in a clean profile it shows the same behavior. In safe mode under the new profile the test page passes.
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
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.
Did you try to set gfx.direct2d.disabled to true and close and restart Firefox?
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.
that sets it right.