2 Replies Latest reply on Mar 23, 2011 8:46 AM by Mayhem SWE

    View all missing fonts and FontStyles

    Zaza Chugoshvili

      Hi everyone!
      I have a problem with non-existing fonts in the document.
      Here is the code that should display all the non-existent fonts. Not working

      var usedFonts = app.activeDocument.fonts;
      for (var i=0; i<usedFonts.length; i++) {
           if(usedFonts[i].status != FontStatus.INSTALLED){
               alert ("Not Instaled => " + usedFonts[i].fontFamily + " | " + usedFonts[i].fontStyleName);
            }
      }
      

       

      Here is the code that works.

       

      var usedFonts = app.activeDocument.fonts;
      for (var i=0; i<usedFonts.length; i++) {
           if(usedFonts[i].status != FontStatus.INSTALLED){
               alert ("Not Instaled => " + usedFonts[i].fontFamily);
            }
      }
      

      But I also want to the font style of output. How do I do?
      Thanks in advance ...