|
Make CSSFontFace::willUseFontData() load fonts with unicode-range
Before this patch CSSFontFace::willUseFontData() loads font faces that
have no unicode-range. Since font faces with no unicode-range tends to
be used as fallback font of segmented font family, this behavior leads
to unnecessary font downloads.
This patch makes willUseFontData() loads the first unloaded font face
whose unicode-range intersects with given text. That check does not
need to be 100% precise (false negative is ok), so it only checks the
first character of the text, for speed.
TEST=fast/css/font-face-unicode-range-overlap-load.html
BUG= 247920, 246492
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172943
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+55 lines, -25 lines) |
Patch |
|
M |
LayoutTests/fast/css/font-face-unicode-range-overlap-load.html
|
View
|
|
3 chunks |
+14 lines, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/fast/css/font-face-unicode-range-overlap-load-expected.txt
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/CSSFontFace.h
|
View
|
1
2
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/CSSFontFace.cpp
|
View
|
1
2
|
3 chunks |
+14 lines, -10 lines |
0 comments
|
Download
|
|
M |
Source/core/css/CSSFontSelector.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/CSSFontSelector.cpp
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/css/CSSSegmentedFontFace.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/CSSSegmentedFontFace.cpp
|
View
|
1
2
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/RenderText.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/platform/fonts/Font.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/platform/fonts/Font.cpp
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/platform/fonts/FontSelector.h
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
Total messages: 8 (0 generated)
|