[Webkit-unassigned] [Bug 227224] New: Text disappears for multiple seconds when font requested but load interrupted

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 21 10:52:16 PDT 2021


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

            Bug ID: 227224
           Summary: Text disappears for multiple seconds when font
                    requested but load interrupted
           Product: WebKit
           Version: Safari 14
          Hardware: All
                OS: All
            Status: NEW
          Severity: Trivial
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ian at ianbellomy.com

In Safari/Mobile Safari 14 text stops rendering for a several seconds in an peculiar circumstance:

• Nothing on the page initially needed a font specified in @font-face.
• A style was changed such that that font is now needed, triggering the lazy load.
• The font-face in question has font-display:auto.
• The font download is ~interrupted~ after it's requested.

In Chrome, Firefox, and earlier versions of Safari there is an observable but brief 'blink' (maybe ~250ms), but in Safari 14 the disappearance can be several seconds long

Reproduction is here: http://ianbellomy.com/test/font-failure-test.html

(Note that caching may eliminate the issue if the page is refreshed.)

Admittedly the situation is pretty peculiar but it also seems like 'auto' should not lead to a behavior like this. 

FWIW, I ran into this after having done something bone-headed but it seems possible to inadvertently hit this in a large project, if, through some project change, a font is no longer needed on initial presentation, and additional network traffic is needed to properly display the site. In a PWA type situation for example a user might install the PWA but not hit an area that needs a font until they go to use the PWA while offline. I haven't tested for a 'failed' response though (opposed to an interruption).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210621/58c4537b/attachment.htm>


More information about the webkit-unassigned mailing list