DescriptionProper 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
Messages
Total messages: 6 (0 generated)
|