Skip to content

Commit 1c23d4b

Browse files
committed
[css-font-loading] highlight some examples
1 parent fc83249 commit 1c23d4b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

css-font-loading-3/Overview.bs

+5-5
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ Interaction with CSS Font Loading and Matching</h3>
925925
(This means it must run the same algorithm,
926926
not literally call the value currently stored in the <code>load</code> property of the object.)
927927

928-
<div class="example">
928+
<div class="example" highlight=js>
929929
Fonts are available when they are added to a {{FontFaceSet}}.
930930
Adding a new ''@font-face'' rule to a stylesheet
931931
also adds a new {{FontFace}} to the {{FontFaceSet}} of the {{Document}} object.
@@ -1071,7 +1071,7 @@ API Examples</h2>
10711071
<div class="example">
10721072
To show content only after all font loads complete:
10731073

1074-
<pre>
1074+
<pre highlight=js>
10751075
document.fonts.ready.then(function() {
10761076
var content = document.getElementById("content");
10771077
content.style.visibility = "visible";
@@ -1083,7 +1083,7 @@ API Examples</h2>
10831083
Drawing text in a canvas with a downloadable font, explicitly
10841084
initiating the font download and drawing upon completion:
10851085

1086-
<pre>
1086+
<pre highlight=js>
10871087
function drawStuff() {
10881088
var ctx = document.getElementById("c").getContext("2d");
10891089

@@ -1104,7 +1104,7 @@ API Examples</h2>
11041104
may already have been downloaded, the measurement procedures need to
11051105
occur after those font loads complete:
11061106

1107-
<pre>
1107+
<pre highlight=js>
11081108
function measureTextElements() {
11091109
// contents can now be measured using the metrics of
11101110
// the downloadable font(s)
@@ -1121,7 +1121,7 @@ API Examples</h2>
11211121
The {{loadingdone}} event only fires after all font related loads have completed
11221122
<strong>and</strong> text has been laid out without causing additional font loads:
11231123

1124-
<pre>
1124+
<pre highlight=html>
11251125
&lt;style>
11261126
@font-face {
11271127
font-family: latin-serif;

0 commit comments

Comments
 (0)