5 Replies Latest reply on Sep 10, 2017 11:38 PM by Sudha K

    Font Name for Missing Fonts

    Sudha K Level 1

      Hi,

       

           I am getting font name for missing font.  When getting, could not able to get font postscript name and fontstyle name for few fonts because its don't have postscript name visually.  Few fonts, showing style name but could not able to get the style name.  So i tried to get font name but its returning style name twice.  How can i get font name with fontstyle name or postscript name. 

       

      Code :

       

       

       

      var myDoc = app.activeDocument;

      var allFontsStr = "";

       

      for(var i = 0; i < myDoc.fonts.length; i++)

      {

          var cFont = myDoc.fonts[i];

          allFontsStr += cFont.name +"\n";

         

          //allFontsStr += cFont.fontFamily + " - " + cFont.fontStyleName +"\n";

      }

       

      alert("allFontsStr " +allFontsStr)

      exit()

       

       

       

       

       

       

      PostScriptName_Empty.png

       

       

      FontStyleError_1.png

       

       

       

      FontStyleError_2.png

       

       

       

      FontStyle_Repeated_InNames.png

       

       

       

       

       

      Thanks,

      Sudha K