Page 1 of 1

underscores

Posted: Mon Aug 06, 2018 11:18 pm
by Jonne Haven
Hey Y'all!

Is there any advantage to name my glyphs with underscores instead of spaces?

Thanks

Blessings,

Jonne

Re: underscores

Posted: Tue Aug 07, 2018 6:07 am
by Bhikkhu Pesala
As far as I can tell, a glyphname with spaces, e.g. "f f i" works OK, but it seems to violate the specification: so I suggest not using spaces. I just leave out the underscores to make the name easier to read and type, e.g. "ffi"
2.f.i. Glyph name

A glyph name may be up to 63 characters in length, must be entirely comprised of characters from the following set:

A-Z a-z 0-9 . (period) _ (underscore)

and must not start with a digit or period. The only exception is the special character ".notdef".

"twocents", "a1", and "_" are valid glyph names. "2cents" and ".twocents" are not.

An initial backslash serves to differentiate a glyph name from an identical keyword in the feature file language. (See §2.c for a list of keywords.) For example, a glyph named "table" must be specified in the feature file as:

\table
A glyph name alias database may be used by the implementation of the feature file grammar. If it is used, then it is the responsibility of the implementation to correlate the glyph name aliases used in the feature file with the actual glyph names in the font.

Re: underscores

Posted: Tue Aug 07, 2018 6:28 am
by PJMiller
My understanding is that some software doesn't work properly with glyph names that have spaces, it just takes the name of the glyph as the part up to the space which can cause problems and duplications.

Of course Font Creator is well written and works with spaces but be aware that other software might not be so well behaved.

As Bhikkhu Pesala said spaces are not in the specification so software doesn't have to support them.

Re: underscores

Posted: Tue Aug 07, 2018 5:00 pm
by nabsltd
I've seen a few commercial fonts that still have the glyph names embedded which violate the spec Bhikkhu referred to in various ways (spaces, starts with number, etc.).

FontCreator handles these errors with no problem, and if you export a font without glyph names (the default in FontCreator), there should be no issues.

Re: underscores

Posted: Tue Aug 07, 2018 5:50 pm
by Erwin Denissen
nabsltd wrote:
Tue Aug 07, 2018 5:00 pm
FontCreator handles these errors with no problem, and if you export a font without glyph names (the default in FontCreator), there should be no issues.
FontCreator is very flexible and allows you to user friendly names for glyphs. As soon as your font is ready for production, you can either choose "No" or "Regenerate for release" on exporting the font file.

Re: underscores

Posted: Wed Aug 08, 2018 1:22 am
by Jonne Haven
Thank you all for your responses!

So I am understanding that when my font is ready, I am to choose an option on exporting that reads, "No" or "Regenerate for release". I am assuming that if I select the right option my glyphs will automatically be named without spaces as is best to use with software that may not support spaces.

Blessings,

Jonne

Re: underscores

Posted: Wed Aug 08, 2018 6:35 am
by PJMiller
If you select 'No' there will be no glyph names which is OK.

If you select 'Regenerate for release' then the glyph names will all be correct and conform to the specification, which is also OK.

No glyph names generates a smaller file.