WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
47371
Font family name containing more than one word without quote is not recognized if a word looks like a number
https://bugs.webkit.org/show_bug.cgi?id=47371
Summary
Font family name containing more than one word without quote is not recognize...
Xiaomei Ji
Reported
2010-10-07 12:49:57 PDT
Created
attachment 70133
[details]
test case Load the attached test case. observe the alerted font name. Font name with more than one word is recognized when quote is around the name. If there is no quote around, the font name is not recognized. Computed font is the fallback font (system font when no other fonts specified). Firefox recognizes both. Following is from W3C (
http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property
): <family-name> The name of a font family of choice such as Helvetica or Verdana in the previous example. Font family names containing more than one word should be quoted. If quoting is omitted, whitespace characters before and after the font family name are ignored and any sequence of whitespace characters inside the font name is converted to a single space. Depending upon the font format used, font family names may be case-sensitive. It is not a *must* to quote font name with multiple words.
Attachments
test case
(1.55 KB, text/html)
2010-10-07 12:49 PDT
,
Xiaomei Ji
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Yuzo Fujishima
Comment 1
2010-10-28 04:04:04 PDT
Unquoted space-separated font name is handled property by WebKit as far as no components look like a number. In the test case, 010 in "Kruti Dev 010" is causing the issue. If the font is renamed to "Kruti Dev a010", the test case works. I corrected the bug title accordingly.
Yuzo Fujishima
Comment 2
2010-10-28 04:24:52 PDT
Actually, Kruti Dev 010 is invalid if unquoted. (010 is not an identifier.) So this is not a bug.
http://www.w3.org/Style/css2-updates/css2/fonts.html#font-family-prop
Font family names must either be given quoted as strings, or unquoted as a sequence of one or more identifiers. This means most punctuation characters and digits at the start of each token must be escaped in unquoted font family names. For example, the following declarations are invalid: font-family: Red/Black, sans-serif; font-family: "Lucida" Grande, sans-serif; font-family: Ahem!, sans-serif; font-family: test@foo, sans-serif; font-family: #POUND, sans-serif; font-family: Hawaii 5-0, sans-serif; If a sequence of identifiers is given as a font family name, the computed value is the name converted to a string by joining all the identifiers in the sequence by single spaces.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug