[Webkit-unassigned] [Bug 122851] New: Use unicode-range to prevent unnecessary @font-face donwnloads

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 15 12:23:19 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=122851

           Summary: Use unicode-range to prevent unnecessary @font-face
                    donwnloads
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Keywords: BlinkMergeCandidate
          Severity: Normal
          Priority: P2
         Component: Text
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: koivisto at iki.fi, enrica at apple.com, akling at apple.com,
                    jonlee at apple.com, mmaxfield at apple.com


Consider merging https://chromium.googlesource.com/chromium/blink/+/342fe16bb002b8ba9cc06a10d8124df6a28c786f

This patch delays font loading until creation of GlyphPage whose
codepoint range intersects with the @font-face's unicode-range value.
GlyphPage is created when glyph data for a character in its codepoint
range is requested, so web fonts are not donwloaded if its glyph data
is not used.

Even if any glyph is not used, font metrics may be used (for example,
<input> uses font metrics to calculate its size). These metrics are
accessed via SimpleFontData::primarySimpleFontData, so we start loading
there too.

Caveat:
Since GlyphPage has glyph data for contiguous 256 Unicode codepoints,
this patch does not 100% prevent unnecessary downloads. Use of codepoint
*near* the unicode-range can trigger the font load. To fix this, we need
to delay font loading until a codepoint in unicode-range is requested.
That may require changing the GlyphPage data structure.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list