I have a Windows-centric website which I’d like to make work on Firefox on Linux. It uses web fonts and several weird parameters to display complex text, but on Linux it’s misaligned everywhere.
I just found out that, in Chromium, I had the same behavior. However, when I add option --disable-font-subpixel-positioning
when running Chromium, everything gets magically fixed!
However, I need it to work on Firefox. But I could not find an equivalent setting. I tried about:config
and toggling all gfx.font_rendering.*
settings, as well as all gfx.text.*
settings, including the very promising gfx.text.subpixel-position.force-disabled
, but it didn’t change anything. I tried changing and restarting Firefox, but I couldn’t see any differences. As if these options had no effect whatsoever.
Is there a way to disable font subpixel positioning on Firefox?
The images below show the different renderings in part of a page which contains a summary (unfortunately the website requires a login so I cannot just put a link to it). The leftmost is Firefox, the middle one is Chromium with default settings, and the rightmost is Chromium with --disable-font-subpixel-positioning
.
Note that the font size differences and height are due to me not being able to capture the exact same height on both browsers; the website automatically adjusts the text to fill the screen, so I cannot easily force both to maintain the same height.
FWIW, I’m using Firefox 104 and Chromium 103.