Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.

OTF CFF cmap / encoding question

New Here ,
Mar 27, 2013 Mar 27, 2013

Copy link to clipboard


I am currently writing the implemenation for subsetting a OTF CFF font. I have written the code to generate the cmap and everything in the CFF data apart from the encoding array. What is confusing me is why there is a need for an encoding array if the cmap is there. Say I have written "hello world" and I will create a subset for those characters from the font e.g.

h = gid 1

e = gid 2

l = gid 3

o = gid 4


What I have done is create the cmap so that the unicode codes map to those new gid's. Looking at the encoding array though, surely it performs the same task? If I were to have both in my font, would one  take precedence? If I leave out the encoding array from the CFF data in my font, will it correctly use the cmap, or use the StandardEncoding instead? If so, why is the cmap a required table if it is not used for anything with CFF extensions.

Some clarification on this would be helpful.








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