Preload fonts and font-display: swap do not work together
Reported by
bustyasi...@gmail.com,
Nov 17
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3613.0 Safari/537.36 Steps to reproduce the problem: When you add font-display: swap and preload fonts Google Chrome brings up an error message. Please see github issue for more details: https://github.com/w3c/preload/issues/133 What is the expected behavior? What went wrong? I was kind of expecting the browser to preload the font and 'hang on to it' while it goes through the swapping stage. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 72.0.3613.0 Channel: canary OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version:
,
Nov 18
,
Nov 19
reporter@ - Thanks for filing the issue...!! Could you please provide a sample test file/url to test the issue from TE-end. This will help us in triaging the issue further. Thanks...!!
,
Nov 20
,
Nov 20
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 21
Tried testing the issue on reported chrome version #72.0.3613.0 using Windows 10 by following below steps. Steps: ====== 1.Launched chrome. 2.Copied code snippet from "https://github.com/ayumihamsaki/preload-fonts-chrome/blob/master/preload-test.html" and saved it in a file with ".html" extension. 3.Opened the HTML file in chrome. 4.Navigated to Devtools->Console and observed an error "The resource https://fonts.gstatic.com/s/notosans/v7/o-0IIpQlx3QUlC5A4PNr5TRA.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.". Attached screencast and HTML file as reference. @reporter: Could you please confirm if this is the issue you are pointing to, so that it would be really helpful in further triaging of it. Thanks.!
,
Nov 22
So the example code without preload doesn't load the font at all. I believe that your font-family definition rule is at fault. Defining it as `font-family: 'Noto Sans';` (without the "sans-serif") works as expected (the font is preloaded and swapped) Closing as WONTFIX |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by domfarolino@gmail.com
, Nov 18Components: Blink>Loader>Preload