caryll / otfcc

Optimized OpenType builder and inspector.
Apache License 2.0
422 stars 63 forks source link

Glyph names changing #45

Closed MalcolmWooden closed 7 years ago

MalcolmWooden commented 7 years ago

When dumping a TTF the glyph for U+0009, U+000D has it's name changed to "nonmarkingreturn". This does not seem to be the case for OTF (CFF) fonts. Would it be possible to have an option flag to preserve post tables names if a post table is present?

moyogo commented 7 years ago

Isn’t this FontLab Studio 5 renaming CR to nonmarkingreturn to match standard Mac post names when it generates the font?

MalcolmWooden commented 7 years ago

Hey Denis, The TTF I tested definitely started life with "CR" in the post table. After going through otfccdump I noticed that the dump file has glyph name "nonmarkingreturn" where I was expecting "CR".

be5invis commented 7 years ago

@MalcolmWooden Did your font REALLY have a post table? The naming priority in otfccdump for TTF fonts, when you are not using --name-by-hash and --ignore-order, is post > AGLFN > uni#### > glyph### / .notdef / .null.

be5invis commented 7 years ago

@MalcolmWooden Send a file that would cause a problem please.

MalcolmWooden commented 7 years ago

FontData.zip Here is some font data for you as requested. FullerSansLightItalic.ttf - The original TTF font data FullerSansLightItalic.json - json file produced by otfccdump FullerSansLightItalic_otfccbuild.ttf A TTF font from the json file created by otfccbuild Font_Compare.xls A compare file created by our own comparison tool showing the differences. The only flag used (appart from "-o") on json output was the "--pretty" flag.

be5invis commented 7 years ago

@MalcolmWooden Your glyph 2 is mapped into a standard Macintosh glyph name 2 (which is, nonmarkingreturn), in your post table. So otfcc's behavior is correct. Closed as by-design.

MalcolmWooden commented 7 years ago

FYI Screen Shot 2017-03-19.png.zip

be5invis commented 7 years ago

@MalcolmWooden otfcc is NOT designed to keep every byte unchanged after a dump-build roundtrip. Also, ttx and OTMaster do not name your glyph CR either.

MalcolmWooden commented 7 years ago

Maybe, but I don't understand why the post table is bloated with Mac names!

be5invis commented 7 years ago

@MalcolmWooden You should move into another issue. If you want to reduce file size, I recommend that you simply use -O3 to remove post names.

MalcolmWooden commented 7 years ago

Sorry, I do not understand what you mean by "You should move into another issue" can you explain please.

be5invis commented 7 years ago

@MalcolmWooden Open another issue about that the current post builder produces Mac names.