[FIXED] Successive open/export cycles cause CFF outlines to change

Post your bug reports here. Include information that helps us to understand and reproduce the bug.
Post Reply
nabsltd
Posts: 52
Joined: Tue Oct 18, 2016 12:35 am

[FIXED] Successive open/export cycles cause CFF outlines to change

Post by nabsltd » Sat Dec 24, 2016 2:26 am

1. Open a font with PostScript outlines.
2. Export the font without making any changes, and note that the file size has grown dramatically if you start with most commercial fonts.
3. Delete the original file, open the exported file, and export it to a new file...again, the file grows.
4. Repeat a few times, and the file suddenly starts to shrink again.

Here's the sizes (in bytes) for a few of these cycles:

Code: Select all

  380,496
1,507,376
1,729,616
2,010,092
2,069,016
1,843,876
1,725,720
1,688,916
1,665,168
Assuming that the outlines are still high quality at this point (they appear OK at first glance), whatever is causing the file size to be reduced after the first few iterations needs to be used on the initial save to get the file size down.

To avoid some of this, a user could save every font you open as a FontCreator project. The problem with this is that if you just want to make what you think is a small, one-off change, you still need to make sure you create a project, otherwise any new changes will require that you go back to the original source, remember what you did the first time, redo it, then make the new change.

And, creating projects isn't a great solution, either, as the project file is even bigger than the exported font, so now my 180MB of Adobe Font files will expand to take up 930MB (original fonts plus FontCreator project files). Yeah, I know that 1GB isn't much these days, but that's only 2300 fonts...a small collection for many people.

I still don't understand how the size can grow that much even with a curve conversion. Other applications that can import PostScript curves (Adobe Illustrator, etc.) seem to be able to import then export back to PostScript without such a dramatic size increase.

Last, even ignoring the increase in size from the source, what this means is that fonts created from scratch with FontCreator are likely larger than fonts created by other editors, and this is important for things like embedding, installing on portable devices with limited memory. In addition, the outlines are more difficult to render, requiring more memory, which is another issue for many portable devices.

MikeW
Posts: 404
Joined: Mon May 20, 2013 2:51 pm

Re: Successive open/export cycles cause CFF outlines to change

Post by MikeW » Sat Dec 24, 2016 2:55 am

Project files are what you should be saving and opening to make your changes. Period.

I would have never known what you describe as happening because I would never work that way.

Mike

nabsltd
Posts: 52
Joined: Tue Oct 18, 2016 12:35 am

Re: Successive open/export cycles cause CFF outlines to change

Post by nabsltd » Wed Jan 04, 2017 10:42 pm

MikeW wrote:Project files are what you should be saving and opening to make your changes. Period.
I don't create my own fonts, so I can't do this. I have to start with an existing .OTF or .TTF file.

Still, the load/save of outlines isn't deterministic. This means that if you lose your project file, you are completely and utterly screwed, as the OTF or TTF files contain radically different outlines, and who knows exactly which version of the outlines you had in that particular save.

Also, it means that if you make a change, you have to either test the change before you save the project file or save a copy of the project file, because you can't get back the previous version any other way. If the outlines didn't change, you could export to OTF, then test, tweak, save, repeat, using OTF files, then finally save a new project file when you are happy.

And, it still doesn't address the question of why CFF fonts created with FontCreator are 3-4x as large as fonts with the "same" outlines created using different products. I really don't want to triple the size of an EPUB file just because I embed one font that was created using FontCreator.

MikeW
Posts: 404
Joined: Mon May 20, 2013 2:51 pm

Re: Successive open/export cycles cause CFF outlines to change

Post by MikeW » Wed Jan 04, 2017 11:00 pm

I work on far more other people's fonts (generally adding glyphs, OT Features, that sort of thing) as a contractor than my own fonts.

I always save the font project. Why wouldn't I? I save incremental versions and I back all of them up just like I do the fonts I generate. Sometimes I do receive just the OTF or TT version and that is my starting point. But as soon as they are opened I'll save a font project.

After this discussion began, I compared some of the genreated fonts of about 1k glyphs I have worked on to Adobe fonts that have roughly the same number of glyphs. And yep, the FC-generated font is a bit larger. But it isn't unreasonably larger. I also used FL and those fonts are roughly the same size as FC's. My take-away on this exercise is that manually generating a font using the Adobe command line kit likely creates smaller OTFs. As well, there are other tools out there (like DTL's) that also may create smaller files. I dunno.

But I would suggest that once opened you save and use the FC project file versus always opening the OTF if that's what you are doing (it isn't clear to me what you are doing, really). And if loosing those projects is a concern (and it is to me), then use a good back-up strategy that includes an off-line redundancy.

Mike

Erwin Denissen
Moderator
Moderator
Posts: 6645
Joined: Fri Oct 04, 2002 12:41 am
Location: De Bilt, The Netherlands
Contact:

Re: Successive open/export cycles cause CFF outlines to change

Post by Erwin Denissen » Fri May 12, 2017 3:44 pm

This issue is solved as FontCreator 11 supports cubic based outlines.
Erwin Denissen
High-Logic
Proven Font Technology

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest