WebCore:
Reviewed by Dave Hyatt.
- fix for @font-face rules with unicode-range: always use a local font where not
explicitly overlaid.
Test: fast/css/font-face-implicit-local-font.html
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Changed to insert an implicit
@font-face rule with the local font the matches the family and description before
any explicit @font-face rules that overlay specific ranges of the same font.
* css/CSSSegmentedFontFace.h:
(WebCore::CSSSegmentedFontFace::numRanges): Addded.
LayoutTests:
Reviewed by Dave Hyatt.
- add test for @font-face rules with unicode-range: always use a local
font where not explicitly overlaid.
* fast/css/font-face-implicit-local-font.html: Added.
* platform/mac-leopard/fast/css/font-face-implicit-local-font-expected.checksum: Added.
* platform/mac-leopard/fast/css/font-face-implicit-local-font-expected.png: Added.
* platform/mac/fast/css/font-face-implicit-local-font-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/css/font-face-implicit-local-font.html b/LayoutTests/fast/css/font-face-implicit-local-font.html
new file mode 100644
index 0000000..cb89780
--- /dev/null
+++ b/LayoutTests/fast/css/font-face-implicit-local-font.html
@@ -0,0 +1,19 @@
+<style>
+ @font-face {
+ font-family: 'courier';
+ src: local('Times');
+ unicode-range: U+003?;
+ }
+</style>
+<p>
+ This tests that when @font-face rules with unicode-range are specified for a
+ font that exists on the system, the system font is used for all characters
+ not explictly overridden.
+</p>
+<p>
+ In the next line, the digits should be in Times, but the letters should be
+ in Courier.
+</p>
+<span style="font-family: 'courier'; font-size: 24px;">
+ ABCDEFGHIJ 1234567890
+</span>