Home Ensure text remains visible during webfont load Solved Skip to main content

Ensure text remains visible during webfont load Solved

 Best Tectonic Ensure text remains visible during webfont load





you can solve this problem in 2 step very easy to resolve. you have to add all font links in it that u are getting in speed errer in #2 point

use this and paste it 👇above </body> tag

#!

&lt;link

  href=&quot;https://fonts.googleapis.com/css?family=Roboto:400,700&amp;display=swap&quot;

  rel=&quot;stylesheet&quot;

/&gt;


 add more font in style below body{ tag

 #3


@font-face { font-family: 'YourFontFamily'; font-display: swap; /* Other font properties */ }




agar appko uper diye gaye code se eleminate render blocking font ka issue aa raha ahi to app isko try kare

Add this code below the <head>

&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;!-- Other head elements --&gt; &lt;style&gt; /* Open Sans Regular 400 */ @font-face { font-family: &#39;Open Sans&#39;; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/opensans/v40/mem8YaGs126MiZpBA-UFVZ0b.woff2) format(&#39;woff2&#39;); font-display: swap; } /* Open Sans Italic 400 */ @font-face { font-family: &#39;Open Sans&#39;; font-style: italic; font-weight: 400; src: url(https://fonts.gstatic.com/s/opensans/v40/mem5YaGs126MiZpBA-UNirkOUuhs.woff2) format(&#39;woff2&#39;); font-display: swap; } /* Open Sans Bold 700 */ @font-face { font-family: &#39;Open Sans&#39;; font-style: normal; font-weight: 700; src: url(https://fonts.gstatic.com/s/opensans/v40/mem5YaGs126MiZpBA-UN7rgOUuhs.woff2) format(&#39;woff2&#39;); font-display: swap; } /* Open Sans Bold Italic 700 */ @font-face { font-family: &#39;Open Sans&#39;; font-style: italic; font-weight: 700; src: url(https://fonts.gstatic.com/s/opensans/v40/mem5YaGs126MiZpBA-UN8rsOUuhs.woff2) format(&#39;woff2&#39;); font-display: swap; } /* Lora Regular 400 */ @font-face { font-family: &#39;Lora&#39;; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/lora/v32/0QI6MX1D_YAJKOYtA8fjPzLPaQ.woff2) format(&#39;woff2&#39;); font-display: swap; } /* Lora Bold 700 */ @font-face { font-family: &#39;Lora&#39;; font-style: normal; font-weight: 700; src: url(https://fonts.gstatic.com/s/lora/v32/0QI6MX1D_YAJKOYtA8fjPzJDbUY.woff2) format(&#39;woff2&#39;); font-display: swap; } /* Roboto Regular 400 */ @font-face { font-family: &#39;Roboto&#39;; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu7WxP.woff2) format(&#39;woff2&#39;); font-display: swap; } /* Roboto Bold 700 */ @font-face { font-family: &#39;Roboto&#39;; font-style: normal; font-weight: 700; src: url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmSU5fBBc9.woff2) format(&#39;woff2&#39;); font-display: swap; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- Body content --&gt; &lt;/body&gt; &lt;/html&gt;


Comments

Lazy Loading Example Preloaded Image Another Preloaded Image