RESOLVED FIXED 41509
Ranges for @font-face unicode-range must be separated by commas
https://bugs.webkit.org/show_bug.cgi?id=41509
Summary Ranges for @font-face unicode-range must be separated by commas
Yuzo Fujishima
Reported 2010-07-02 00:24:46 PDT
http://dev.w3.org/csswg/css3-fonts/#unicode-range-desc says that multiple ranges separated by commas can be specified for unicode-range descriptor. But as of r62335, WebKit considers such unicode-range as invalid. For example, @font-face { font-family:myfont; src: local('Courier'); unicode-range: u+69, u+6a; /* 'i' and 'j' */ } is erroneously treated as if it were @font-face { font-family:myfont; src: local('Courier'); }
Attachments
Fix for Bug 41509 - Multiple ranges for unicode-range causes parse error (5.94 KB, patch)
2010-07-02 01:04 PDT, Yuzo Fujishima
no flags
Make operator checking more strict. (14.14 KB, patch)
2010-07-04 23:46 PDT, Yuzo Fujishima
no flags
Also fixed LayoutTests/platform/win/css2.1/resources/Mac-compatible-font-fallback.css (15.16 KB, patch)
2010-07-05 19:05 PDT, Yuzo Fujishima
mitz: review+
Yuzo Fujishima
Comment 1 2010-07-02 01:04:00 PDT
Created attachment 60346 [details] Fix for Bug 41509 - Multiple ranges for unicode-range causes parse error
mitz
Comment 2 2010-07-02 08:02:47 PDT
Comment on attachment 60346 [details] Fix for Bug 41509 - Multiple ranges for unicode-range causes parse error Isn't this going to allow multiple consecutive commas, only commas, and no commas? The working draft doesn't appear to allow any of these.
mitz
Comment 3 2010-07-02 08:05:01 PDT
I think the title and the description of the bug are wrong. WebKit currently supports space-separated lists of ranges, but the WD calls for comma separation.
Yuzo Fujishima
Comment 4 2010-07-04 23:46:20 PDT
Created attachment 60496 [details] Make operator checking more strict.
Yuzo Fujishima
Comment 5 2010-07-04 23:49:25 PDT
Hi, mitz, Thank you for the review. I've: - made the operator checking stricter - added tests - corrected existing tests that use space-separated ranges - changed the bug's title.
mitz
Comment 6 2010-07-05 11:26:15 PDT
There are a couple more layout tests that use the old space-separated syntax: fast/text/international/resources/Mac-compatible-font-fallback.css platform/win/svg/W3C-SVG-1.1/resources/Mac-compatible-font-fallback.css platform/win/css2.1/resources/Mac-compatible-font-fallback.css
Yuzo Fujishima
Comment 7 2010-07-05 19:05:39 PDT
Created attachment 60575 [details] Also fixed LayoutTests/platform/win/css2.1/resources/Mac-compatible-font-fallback.css
Yuzo Fujishima
Comment 8 2010-07-05 19:11:42 PDT
Hi, Thank you for the review. (In reply to comment #6) > There are a couple more layout tests that use the old space-separated syntax: > > fast/text/international/resources/Mac-compatible-font-fallback.css > platform/win/svg/W3C-SVG-1.1/resources/Mac-compatible-font-fallback.css These don't contain space-separated values, do they? > platform/win/css2.1/resources/Mac-compatible-font-fallback.css Fixed this. I've grep'ed all the files under LayoutTests as follows and found no others. $ find LayoutTests | xargs grep -i 'unicode-range.*u+[^;,]* *u' LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range.html: unicode-range: u+69 u+6a ; /* 'i' and 'j' */
Yuzo Fujishima
Comment 9 2010-07-06 00:09:46 PDT
Eric Seidel (no email)
Comment 10 2010-07-06 00:13:13 PDT
I wonder if this affects <svg::font-face> and if we need further testing for such.
WebKit Review Bot
Comment 11 2010-07-06 01:07:54 PDT
http://trac.webkit.org/changeset/62530 might have broken Qt Linux Release
Note You need to log in before you can comment on or make changes to this bug.