|
Posted by Alan J. Flavell on 01/31/06 00:58
On Mon, 30 Jan 2006, Algomeysa2 wrote:
[...]
> My reference book mentions the
> "trebuchet" font, but in my windows fonts directory my font is named
> "trebuchet MS", and if I just use "trebuchet" the font won't display, it
> just uses a default font.
I'm sure that the CSS spec was quite intentional when it didn't
specify exactly how font names are to be resolved. Implementers are
supposed to work out their own ideas of how to implement a fuzzy match
when an exact match isn't found.
> How can I tell which fonts are safe to use?
Basically, reviewing the history of font support in browsers, I'd
conclude that /none/ are entirely safe to use. You have to interpret
"safe" in some kind of context.
"Successfully" selecting a named font which, on the user's system, has
a restricted character repertoire, could make your document unreadable
or inaccurate. You have no way of knowing whether their "Arial" is
the totally inadequate USA-specific version that was distributed with
Win95, or the WGL4-ish version that comes with XA, or anything in
between. They're all called "Arial" and you can't, in CSS, specify a
minimum version number; there's supposed to be a way of specifying
character repertoires, but they aren't widely supported, and the most
widespread faults in this area are exhibited by a browser-like object
with poor CSS support anyway, namely MSIE.
The user might have installed and selected a much better font than the
default they got with their OS - only to get it trampled on by your
CSS.
Nowadays, browser support for the generic CSS font names, such as
sans-serif, is OK; but in older versions of MSIE, it was appalling.
So what do you mean by "safe" ?
> I know I can be safer by writing, for example:
> font-family: Comic Sans MS, Arial, sans-serif;
That's plain silly. Those fonts are so unlike each other that you
might as well not specify anything, and leave the reader's default
choice to be in effect.
> I mean, obviously, you don't want to use some wacky Klingon TrueType
> font that only a handful of people would have,
That opens a *completely* different can of worms. Well, serpents
rather than mere worms...
> but what can I assume almost everybody has?
You know what they say about "assume" :-}
I'd say there's no one-size-fits-all answer to your question. You
need to understand more about the detailed issues, and then decide
what is the best compromise - because it *is* always going to be a
compromise of one kind or another - *in the context of what you are
doing, and what your users need*.
good luck
[Back to original message]
|