Can I disable my local font in chrome?

前端 未结 2 762
长发绾君心
长发绾君心 2021-02-03 10:32

I work on a system who always bug with the google font load, but i can\'t see when the font is not loaded because I have all these font in local (for Photoshop) so the font look

相关标签:
2条回答
  • 2021-02-03 10:38

    Rather than disabling the fonts on your side of things, why not use the font API in Chrome or Opera and have run through all the fonts that have been specified as follows?

    document.fonts.ready.then(function(set) {
      // Log that the fonts are loaded
      console.log(set);
      var t;
      for(var t of set.entries()) {
        console.log(t); 
      }
    });
    

    The FontFaceSet will tell you if the font has been loaded or not.

    0 讨论(0)
  • 2021-02-03 11:04

    On Chrome/Brave you can now see where the font was loaded from. Go to view —> developer –> inspect elements –> make sure the elements tab is selected –> select the computed sub-tab –> scroll to the bottom and look for rendered fonts. If it's a local file it'll say YOUR_FONT – local file.


    Bonus:

    If using a Mac, then you can disable the local font in the Font Book application. Just open that app, then find the font you want to disable, right click, and select Disable "YOUR_FONT" Family. Then refresh the page and you should see what the user without that font will see.

    0 讨论(0)
提交回复
热议问题