You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The <aclass=idl-codedata-link-type=eventhref=#dom-fontfaceset-loadingdonetitle=loadingdone>loadingdone</a> event only fires after all font related loads have completed
848
848
<strong>and</strong> text has been laid out without causing additional font loads:
849
849
850
-
<pre> @font-face {
850
+
<pre> <style>
851
+
@font-face {
851
852
font-family: latin-serif;
852
853
src: url(latinserif.woff) format("woff"); /* contains no kanji/kana */
853
854
}
854
-
855
855
@font-face {
856
856
font-family: jpn-mincho;
857
857
src: url(mincho.woff) format("woff");
858
858
}
859
+
@font-face {
860
+
font-family: unused;
861
+
src: url(unused.woff);
862
+
}
859
863
860
864
body { font-family: latin-serif, jpn-mincho; }
861
-
865
+
</style>
862
866
<p>納豆はいかがでしょうか
863
867
</pre>
864
868
<p> In this situation, the user agent first downloads “latinserif.woff”
865
-
and then tries to use this to draw the Japanese text. But because no
866
-
Japanese glyphs are present in that font, fallback occurs and the font
867
-
“mincho.woff” is downloaded. Only after the second font is downloaded
868
-
and the Japanese text laid out does the <aclass=idl-codedata-link-type=eventhref=#dom-fontfaceset-loadingdonetitle=loadingdone>loadingdone</a>
869
-
event fire.
869
+
and then tries to use this to draw the Japanese text.
870
+
But because no Japanese glyphs are present in that font,
871
+
fallback occurs and the font “mincho.woff” is downloaded.
872
+
Only after the second font is downloaded and the Japanese text laid out does the <aclass=idl-codedata-link-type=eventhref=#dom-fontfaceset-loadingdonetitle=loadingdone>loadingdone</a> event fire.
873
+
874
+
<p> The "unused" font isn’t loaded,
875
+
but no text is using it,
876
+
so the UA isn’t even <em>trying</em> to load it.
877
+
It doesn’t interfere witht he <aclass=idl-codedata-link-type=eventhref=#dom-fontfaceset-loadingdonetitle=loadingdone>loadingdone</a> event.
0 commit comments