Re: Validator incorrectly reports validity for case of font-family _keyword_ that is enclosed in quotes

Thanks to David and Philip for their opinions as to what they believe the
spec means. I am not suggesting that I know the answer, as I have no idea
what the spec means, since to me it's quite ambiguous. At the very least, if
a spec leads reasonable people to come to differing conclusions then it
needs clarification.

Certainly where the spec "Generic font family names are keywords, and
therefore must not be quoted" this did not seem to me to be in the least
ambiguous. "Serif" is a "keyword". And so Serif must not be quoted. I
thought that that was fairly clear. That may or may not be what the spec
authors intended to say, but that's what it does say. Maybe we have to
supply the missing last part of that sentence for ourselves. It seems to me
that our options would be

(i)	keywords must not be quoted ... because to do so is illegal

or

(ii)	keywords must not be quoted ... because to do so not produce the
intended effect of selecting the special generic font family name.

In the case where a real font called literally "Serif" happens to be present
in the system, then the reading (i) of the spec would require that that font
be inaccessible. Which is the usually the case when we define a "keyword"
unless there is some escape-like mechanism. [Example; if keywords are
"reserved words" in a programming language, then you must not give such a
name to a variable or function.] The fact that the authors chose the word
"keyword" signalled this kind of intent to me.

So then, if we want a way to make that real font called "Serif" accessible
then we do indeed need Philip's "use quotes" technique as a way of
signalling "non-keyword". In that case we have to read the spec as (ii), and
it seems to me that the wording of the spec is unfortunate and unhelpful,
and it should say "do not use quotes if..." rather than "must not be
quoted". Since this would be a noteworthy point to be explained I might
expect that the sentence would have to have been written as something like
"Generic font family names are keywords, which are not quoted. Any reference
to a font whose name corresponds to a generic font family name must be
quoted to distinguish it from the keyword." I have not noticed anything in
the spec about such a reason for needing to use quotes, other than the case
of needing quotes for font names which contain spaces (or other punctuation
such as commas?).

Maybe I missed something in that the words MUST NOT would have had to be all
uppercase to indicate reading (i)?
 
So the validator may or may not be correct. I started looking at the
validator as a way to check my understanding of the spec, because I found
the spec unclear.

Anyway, either way, we learn something.

If Philip's reading turns out to be correct, then this would be a nice
example of something which could go into a wish-list "lint warnings" option,
if the validator were to have such a feature. A warn-"are you sure you meant
that?" option.

Cecil Ward.

Received on Monday, 21 August 2006 16:05:14 UTC