Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Issue 243453003: Proper unicode-range font loading behavior (Closed)

Created:
6 years, 8 months ago by Kunihiko Sakamoto
Modified:
6 years, 8 months ago
Reviewers:
eae, dglazkov
CC:
blink-reviews, jamesr, krit, dsinclair, jbroman, danakj, Rik, Stephen Chennney, pdr., rwlbuis
Visibility:
Public.

Description

Proper unicode-range font loading behavior Remote fonts defined by @font-face rules should be loaded only if any characters in its unicode-range descriptor are used [1]. Before this patch, remote fonts are loaded when the first glyph page for the font is created. It did not 100% prevent unnecessary downloads, as (1) All remote fonts in the fallback list were loaded, and (2) Use of codepoint near the unicode-range could trigger load. This patch adds m_customFontToLoad field to GlyphPage. It contains CustomFontData for the first unloaded remote font in the fallback list. GlyphPage::glyphDataForCharacter() triggers the font load. text-intro-09-b.svg had to be changed to wait loads because SVGHebrew and 'Ezra SIL SR' are now loaded sequentially, not at once. [1] http://www.w3.org/TR/css3-fonts/#composite-fonts BUG=247920 TEST=blink_platform_unittests,fast/css/font-face-unicode-range-overlap-load.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172443

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -68 lines) Patch
A LayoutTests/fast/css/font-face-unicode-range-overlap-load.html View 1 chunk +52 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/font-face-unicode-range-overlap-load-expected.txt View 1 chunk +16 lines, -0 lines 0 comments Download
M LayoutTests/svg/W3C-SVG-1.1-SE/text-intro-09-b.svg View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/platform/fonts/Font.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/fonts/GlyphPage.h View 7 chunks +35 lines, -9 lines 0 comments Download
M Source/platform/fonts/GlyphPageTreeNode.cpp View 2 chunks +15 lines, -6 lines 2 comments Download
M Source/platform/fonts/GlyphPageTreeNodeTest.cpp View 5 chunks +149 lines, -51 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Kunihiko Sakamoto
6 years, 8 months ago (2014-04-23 04:01:10 UTC) #1
eae
LGTM https://codereview.chromium.org/243453003/diff/110001/Source/platform/fonts/GlyphPageTreeNode.cpp File Source/platform/fonts/GlyphPageTreeNode.cpp (right): https://codereview.chromium.org/243453003/diff/110001/Source/platform/fonts/GlyphPageTreeNode.cpp#newcode230 Source/platform/fonts/GlyphPageTreeNode.cpp:230: for (int j = from; j < to; ...
6 years, 8 months ago (2014-04-23 18:38:38 UTC) #2
Kunihiko Sakamoto
Thank you for review. https://codereview.chromium.org/243453003/diff/110001/Source/platform/fonts/GlyphPageTreeNode.cpp File Source/platform/fonts/GlyphPageTreeNode.cpp (right): https://codereview.chromium.org/243453003/diff/110001/Source/platform/fonts/GlyphPageTreeNode.cpp#newcode230 Source/platform/fonts/GlyphPageTreeNode.cpp:230: for (int j = from; ...
6 years, 8 months ago (2014-04-24 01:49:24 UTC) #3
Kunihiko Sakamoto
The CQ bit was checked by ksakamoto@chromium.org
6 years, 8 months ago (2014-04-24 01:50:20 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ksakamoto@chromium.org/243453003/110001
6 years, 8 months ago (2014-04-24 01:50:38 UTC) #5
commit-bot: I haz the power
6 years, 8 months ago (2014-04-24 03:05:46 UTC) #6
Message was sent while issue was closed.
Change committed as 172443

Powered by Google App Engine
This is Rietveld 408576698