Re: Specific/generic font-family name clashes

Clover Andrew wrote:
> 
> This seems quite an obvious issue to me, I was surprised not to be able to
> find an answer in the spec or list archives.
> 
> What should happen when the name of a generic font family matches the name
> of an actual font the user has installed? I've come across tediously-named
> fonts like "Serif" before, for sure. And IE5 for one will use the specific
> font over the generic; of course there's no guarantee the specific font
> will be a good match at all. Should generic names, then, have predence?

The generic names are keywords; thus they *must not* be quoted. And the
other font names are strings; they may be qwuoted (and should be quoted if
they have spaces, etc in them).

So font-family: 'serif' means the font called serif, not the generic serif
font family.

In addition, you can use @font-face to do indirection.

@font-face mysillyname { src: local(serif) }

then use font-family: mysillyname

> (According to one IE5.5 user, a site I maintain turned up all in a symbol
> font for him; I had simply applied font-family: serif to the main text and
> had rather hoped this would be at least readable for everyone.

It should have been, yes.

> The problem
> went away when I specified a more specific font before the generic one. I
> thought this could be caused by the issue above, although he swears he
> doesn't have a symbol font installed under the name 'serif'! Can anyone
> think of any other explanation?)

No, it sounds like his user preferences in IE setup were causing that.

--
Chris

Received on Monday, 11 September 2000 08:53:30 UTC