Should I delete all my empty glyphs?

Discuss FontCreator here, please do not post support requests, feature requests, or bug reports!
Post Reply
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Should I delete all my empty glyphs?

Post by Psymon »

When you've finished up your font, and are ready to "put it out there" for people to download/use, how important is it to delete all the unused, empty glyphs? In each of my fonts I have tons and tons of empty glyphs in the PUA section of each font. The reason for that is because all the various ligatures in each font are coordinated in the same slots, but each font has different ligs, and some not many ligs at all. It's nice to leave all those empty slots there while I'm working on this family (so that if I discover I need to add in an additional lig I can squeeze it in easily), but is it "important" to delete them when you're finished up? I can see that it would bring the file size down a little, but they're all just empty slots, so I can't imagine that it would be a huge saving in file size, really.

Other than that, though, is there any real practical reason to delete all the empty slots (other than the necessary ones, of course)?
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Should I delete all my empty glyphs?

Post by Erwin Denissen »

It is best to delete all unused glyphs. Otherwise external software like word processors or font managers might show the glyphs to the end user while you never intended this.

And, yes, it will also save some bytes.

We could add a new feature which allows you to mark a glyph to be included on export. This is similar to what we're used with our manual generation software.
Erwin Denissen
High-Logic
Proven Font Technology
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Should I delete all my empty glyphs?

Post by Psymon »

Erwin Denissen wrote: Fri Feb 22, 2019 10:43 am It is best to delete all unused glyphs. Otherwise external software like word processors or font managers might show the glyphs to the end user while you never intended this.

And, yes, it will also save some bytes.
Yeah, that's what I figured -- and what I ended up doing with my fonts. ;)
We could add a new feature which allows you to mark a glyph to be included on export. This is similar to what we're used with our manual generation software.
Cool -- not sure if I would personally take advantage of that feature myself, but it's always nice to have more features for those that might. :)
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Should I delete all my empty glyphs?

Post by Bhikkhu Pesala »

I use a transform script to mark all of the glyphs in my fonts that I do not wish to include in the WOFF versions. It takes longer to explain than it does to do. It relies on using consistent glyph names. You can generate glyph names from the Tools menu if you don't use your own naming convention.
  1. Tag all of the glyphs that you do not wish to include
  2. Select all of the glyphs with that tag
  3. Copy to the clipboard
  4. Paste into Notepad2.exe
  5. Join all paragraphs = Ctrl+Shift+J
  6. Find and Replace "space" and replace it with "comma space"
  7. Paste into a Transform script for "Override Range by Glyph Name"
  8. Save the script for reuse on other fonts
  9. Run the script to select the glyphs to be tagged
  10. Before exporting the font, delete all tagged glyphs
  11. After exporting the font, undo delete
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Should I delete all my empty glyphs?

Post by Psymon »

Cool. I can't see myself having a need to do anything like that right now, but who knows, maybe some day I'll be back here to take a closer look at that again to try out. :)
William
Top Typographer
Top Typographer
Posts: 2038
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: Should I delete all my empty glyphs?

Post by William »

However, if you do delete all the unused Private Use Area (PUA) cells that each contain nothing, then if some user of your font uses one of those PUA code points then the Windows operating system might insert a Japanese character. So as you wrote:

> In each of my fonts I have tons and tons of empty glyphs in the PUA section of each font. The reason for that is because all the various ligatures in each font are coordinated in the same slots, but each font has different ligs, and some not many ligs at all.

So maybe for this particular circumstance a glyph of your own to mean "Not supported in this particular font" might be a better choice, so that if some user of your font uses one of those PUA code points, then he or she gets a "Not supported in this particular font" glyph that is documented for your fonts, rather than a Japanese character that is nothing to do with it.

William
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Should I delete all my empty glyphs?

Post by Psymon »

Oh, that's a thought -- or maybe just copy/paste the .notdef glyph into each of those unused slots.

I'll think about that, might not be a bad idea. :)
William
Top Typographer
Top Typographer
Posts: 2038
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: Should I delete all my empty glyphs?

Post by William »

> ... maybe just copy/paste the .notdef glyph into each of those unused slots.

Yes, that would be a good idea.

Keeping the cells in the font also has the advantage that should you at some future time want to add to the capabilities of a particular font, the cells would be already there in place rather than needing to add them in (again).

William
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Should I delete all my empty glyphs?

Post by Bhikkhu Pesala »

Even if you paste the .notdef glyph into each empty glyph as a composite glyph, it is still adding useless data to the font.

Delete the unused glyphs from the Font Project file, export the font, then undelete the deleted glyphs. If you tag the unused glyphs, deleting them takes a few clicks, and undeleting them is just Ctrl+Z.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Post Reply