• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

finding fonts by examining a hex dump of a psd file

Community Beginner ,
Mar 04, 2016 Mar 04, 2016

Copy link to clipboard

Copied

I want to be able to find out what fonts a psd file has using Python.  I was able to read a psd file as a binary file and convert the contents into hex.


>>> with open(test_file,'rb') as f:

...     content = f.read()

...     hex_content = binascii.hexlify(content)


Then I decoded the hex contents into a text file. 


>>> with open('./decoded1.txt', 'w') as f:

...     f.write(hex_content.decode("hex"))


Near the bottom of the decoded file, I found some sort of header named /FontSet, which I think is what I am looking for.


/FontSet [

  <<

  /Name (þÿ A d o b e I n v i s F o n t)

  /Script 0

  /FontType 0

  /Synthetic 0

  >>

  <<

  /Name (þÿ M y r i a d P r o - R e g u l a r)

  /Script 0

  /FontType 0

  /Synthetic 0

  >>

  ]

I recognize MyriadPro-Regular as the font used in my test file.  What is AdobeInvisFont?  Is this the Adobe Blank font?

Views

496

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation