Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want inspect (and just that, without editing this layer) which font, size, color etc. were used in a given text layer in PSD file created with Photoshop. Is this doable without Pixelmator seems to be unable to accomplish that, same with Acorn. Anything else I could try?

share|improve this question
up vote 1 down vote accepted

For rather raw data, try saving this as, e.g.


import sys, re

input = sys.argv[1]

# This write_title function is just for vanity and easier manual searching
def write_title(num):
  filler = 97
  if num < 10:
    filler2 = filler - 25
  elif num < 100:
    filler2 = filler - 26
    filler2 = filler - 27
  print("\n" * 2)
  print("#" * filler)
  print("#" * filler)
  print("#" * 11 + " Text layer " + str(num) + " " + "#" * filler2)
  print("#" * filler)
  print("#" * filler)
  print("\n" * 2)  

def psd_texts(input):
  t = x = 0
  for line in open(input, 'r'):
    if"^\s+/Text\s+.*", line):
      x = 1
      t += 1
    elif x == 1:
      if "warp" in line:
        x = 0
      elif ">>" not in line and "<<" not in line:

if __name__ == "__main__":

Then make it runnable: $ chmod a+x

Save the output as a file*: $ ./ my_file_with_text_layers.psd > textinfo.txt

Open in an editor: $ open textinfo.txt

For example: you can search for /Text in your editor to loop through the text content of different layers, or search for /FontSet to loop through the fonts (the first font listed is the one the layer uses, others are fallbacks)

I know the output is ugly, but hey, it contains all the info.

*) I wouldn't do just $ ./ file.psd as it visually messes up the Terminal — try e.g. $ ./ file.psd | less instead.

share|improve this answer
Wow, thanks, maybe not the most convenient way, but with a little patience I should get all all the info I need ;) – piobyz Jul 6 '11 at 14:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.