Avoid flash of invisible text ::Check-in # Your script should now look like this:

PHOTO EMBED

Sat Mar 19 2022 13:30:07 GMT+0000 (UTC)

Saved by @mboljar #html #javascript

<script type="text/javascript">
const pacificoObserver = new FontFaceObserver('Pacifico');
const robotoObserver = new FontFaceObserver('Roboto');

Promise.all([
  pacificoObserver.load(),
  robotoObserver.load()
]).then(function(){
  /* Do things */
  document.documentElement.className += " fonts-loaded";
});
</script>
content_copyCOPY

https://web.dev/codelab-avoid-invisible-text/