Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

What fonts are used in an .indd file?

Return to Member Forum

  • Author
    Posts
    • #1230115

      Hi all,
      Greetings.

      I like to have a list of the names of the fonts that are used in any .indd file. The name of the fonts are to be saved as a separate .indd file. How can I do this using the javascript scripts?

      Thanks in advance.

    • #14323029
      Robert Ploch
      Member

      Hi,
      try this simple piece fo code. Id saves a text file filled with complete list od used fonts on the same level as original INDD file.
      In my opinion it is the simplest and most flexible way to have a font list. You can use it with INDD or/and e.g. Excell.

      Best regards Robert

      if ( !app.documents.length ) { alert ( ‘Open document, please !’ ); exit(); }

      var doc = app.activeDocument, dp = doc.filePath.fsName, dn = doc.name.slice(0,-5), fonts = doc.fonts.everyItem().name;

      var raport = fonts.join( ‘\r’ );

      saveTextFile ( raport );

      function saveTextFile ( text ) {
      var tf = new File ( dp + ‘/’ + dn + ‘_FontList.txt’ );
      tf.open ( ‘w’ ); tf.encoding = ‘utf-8’; tf.write( text ); tf.close();
      }

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
Forum Ads