Firefox Windows / Linux inconstancies

920 views Asked by At

My website has very different rendering in Firefox Windows / Firefox Linux (however, similar versions, default parameters for both).

The reason seems to be that the font are rendered very differently. This:

font-family: sans-serif;

gives Arial-like font on Windows:

enter image description here

and a little bit different font on Linux:

enter image description here


How to solve this problem and have constant rendering in Firefox Win / Firefox Linux ?
(if possible, I'd like to keep the Windows rendering)

1

There are 1 answers

8
frontend_dev On BEST ANSWER

You only have defined the font name sans-serif which is not a font per se, just tells the browser to use any sans serif font the browser prefers. But even if you give a concrete font name, be aware that the installed fonts in Win / Linux are not the same. Also, the font rendering is OS dependant, so both OS might render fonts a bit differently. The best way to solve this would be to use a web font, where you have the same font files for both Win and Linux. Also gives you a lot more freedom in design, since you do not have to rely on the fonts the OS provides.

But even then, it can happen that the user chooses to use a bigger font size, and you still have rendering differences, but not as visible as with your example where you apparently have two completely different fonts.

In other words: achieving a result where each font rendering looks exactly the same is simply impossible. Thats the nature of the www.