3 ms·
There are no more guarantees about which font is installed, although you will probably get a decent match if you use one of the old Microsoft core fonts (Verdan
by Freak_NL 10y ago
There are no more guarantees about which font is installed, although you will probably get a decent match if you use one of the old Microsoft core fonts (Verdana, Times New Roman, etc.). Just don't expect the exact font; often you will get a font that matches the metrics for the one you've chosen as a fall-back for those (once) popular fonts.
In any case, you can always safely specify one of these font groups: sans-serif, serif, monospace. These will give you the user's default font for that broad category of typefaces. No guarantees about which font you will get though.
If you do want to leverage installed fonts, you can craft a decent so-called font-stack that will cover a lot of fonts typically installed on various OSes. For instance, you might specify:
/* Just an example, these do not necessarily match. */
"DejaVu Sans", "Bitstream Vera Sans", "Droid Sans", Verdana, sans-serif;
Again, no guarantees, that is why we have web-fonts.
Also, I am probably missing something, but don't you just get the fall-back font (e.g., whatever matches sans-serif) with a web-font as long as you specify one? Isn't that common CSS knowledge among developers?
- angry-hacker 10y agoYou do get fallback but might experience FOIT and other nasty things.