Skip to content

Instantly share code, notes, and snippets.

@mipmip
Created July 11, 2013 12:29
Show Gist options
  • Select an option

  • Save mipmip/5975029 to your computer and use it in GitHub Desktop.

Select an option

Save mipmip/5975029 to your computer and use it in GitHub Desktop.
indesign font functions
require 'rubygems'
require 'appscript'
include Appscript
pdfpath = File.expand_path('~')+'/Desktop/myTempFile.pdf'
filepath = File.dirname(__FILE__)+'/snippetsTestDocument.indd'
filepath = MacTypes::FileURL.path(filepath).hfs_path
idApp = app('Adobe InDesign CS4')
myDoc= idApp.open(filepath)
p myDoc.fonts.get
p idApp.fonts.get
# applFont = content.characters[1].applied_font.get
# fontFam = applFont.font_family.get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment