Ivo said:
Well, to optimize the chances of things looking the intended way of
course.
That is what CSS is for. Something like this:
body {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
means that the user agent should attempt to use Verdana, then Geneva,
then Arial, then Helvetica, then if none of those can be found on the
target platform, use any sans-serif font the platform can provide.
Failing that, the user agent will display your content in whatever
default font it chooses (it may do that anyway, more on that below).
That is a very natural and healthy desire, it would be rather strange
if
(web) designers didn't care about something so fundamental as fonts,
not to
say criminal. It really is a shame that this has been standardized
long ago.
How do you standardize the way fonts will appear using a mechanism that
can be viewed on multiple operating systems on multiple devices? There
is simply no way to guarantee a platform is going to have your choice of
fonts (or any font aside from some uncontrollable default for that
matter).
Not only that, but the end-user is always 100% in control of their
_user_ agent (Web browser). I can override _any_ choice you make about
which font to use. I can override _any_ choice you make about what color
the font is, I can override _any_ choice you make about how big the font
should be.
As explained, because it's impossible from both a technical (you can't
use ECMAScript running in the user agent on the client to determine what
fonts are available) and a practical (even if you could determine what
fonts are installed, you have no guarantee you can actually _use_ those
fonts) perspective.
The Web is not desktop publishing. HTML/CSS are nothing more than
_suggestions_ to user agents about how to layout and display content.
User agents are completely free to ignore any and all choices you as a
Web site designer make about how the site should appear.