Indicating glyph names

128 views
Skip to first unread message

kateryna....@globallogic.com

unread,
Apr 1, 2015, 5:03:24 AM4/1/15
to ico...@googlegroups.com
Hey guys, thank you for such a great app.

The question is:
How could I indicate the glyph name?
Here are two printscreens of ttf files, the first ttf is generated by Icomoon, and the second by FontAwesome http://i.imgur.com/rhUOdXv.png
We need to achieve the same names as they are in FontAwesome (now in our font we can see only "uni+" codes), but I can't find where I can do this in Icomoon.

Thank you in advance!
Katya

Keyamoon

unread,
Apr 1, 2015, 5:10:25 AM4/1/15
to ico...@googlegroups.com
Hi,

In the font tab of the IcoMoon app, you can specify glyph names before downloading your font pack. There is a textbox right beside each glyph.

kateryna....@globallogic.com

unread,
Apr 1, 2015, 5:17:19 AM4/1/15
to ico...@googlegroups.com
Thanks for quick answer.
If you mean these textboxes http://i.imgur.com/EzZchiq.png - they specify css-class, not glyph names.
Ttf-editor don't recognize these names, it sees just "uniE600", "uniE601", etc... http://i.imgur.com/iPpr9Oo.png

kateryna....@globallogic.com

unread,
Apr 1, 2015, 7:20:07 AM4/1/15
to ico...@googlegroups.com
In other words, can we inherit Glyph name from Class name, not from Unicode number?

Keyamoon

unread,
Apr 1, 2015, 7:28:03 AM4/1/15
to ico...@googlegroups.com
I see. Thanks for clarifying. The original intention of this behaviour was to keep glyph names short, in order to keep the size of the TTF font smaller. I didn't expect anyone would use/see the glyph names inside the TTF. But if you think that glyph names inside TTF can be useful, I could add an option to allow that.

kateryna....@globallogic.com

unread,
Apr 1, 2015, 7:33:12 AM4/1/15
to ico...@googlegroups.com
It would be very great!!!!!
Can you please indicate some terms when we could expect for this update?

Keyamoon

unread,
Apr 3, 2015, 7:40:42 AM4/3/15
to ico...@googlegroups.com
Well, there are other higher priority features to implement. This is the first time someone's asking for glyph names inside the TTF. Could you please elaborate on why and how glyph names inside the TTF would be useful? Particularly, how do you plan to use them yourself? I would appreciate your feedback. It would help me decide it it would be worth it to implement sooner.

kostiantyn...@globallogic.com

unread,
Apr 3, 2015, 8:55:29 AM4/3/15
to ico...@googlegroups.com, kateryna....@globallogic.com
Hi,

I'm working with Kateryna. I would like to give purpose of this feature. We are developing some sort of UI framework and we are having icon font included in it.
On our website, we are having page, where user can select glyph and see all data of it. Also user can generate css with glyph classes in his own conventions

As example developer set up convention in which he want to get resulting css:
.__icon-[name]:before,
.__icon-left-[name]:before,
.__icon-right-[name]:after {
content: "\[unicode]";
}

name and unicode got replaced from icon name and unicode of glyph.
Iconmoon app has no ability to set up few class names per one icon, so we are using javascript parser opentype.js to do this when page loads, here is an example of this script:
http://bluejamesbond.github.io/CharacterMap/

and link to plugin
http://nodebox.github.io/opentype.js/

As you can see on CharacterMap page icon name is "undefined".
In our case, we fill it with value and parse it to get "name" value to generate css.

In svg this attribute looks like this:
<glyph glyph-name="arrow_left" unicode="&#xe60c;" d="M486 825l-486 -484l486 -483l145 144l-227 236h620v206h-631l238 237l-145 144v0z" />

glyph-name is included in glyph specification here, so its not something new we are inventing
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/glyph

The purpose of having this attribute is to minify actions required when icon font get updated, we simply replace one font with another, and class names automatically got generated from ttf

So our suggest of improvement is to:
1) add glyph-name as an attribute to font files, so it can be used by opentype.js or other parser to get glyph name attribute. It can be optional if you worries about font file size.
2) extend logic for creating css in preferences from only setting up "class prefix" and "class postfix" to something like this:
.__icon-[name]:before,
.__icon-left-[name]:before,
.__icon-right-[name]:after {
content: "\[unicode]";
}
which gives more flexability

commerce...@gmail.com

unread,
Aug 20, 2015, 7:38:46 AM8/20/15
to IcoMoon
Hi,
does Opentype js work on IE9 browser?

while run opentype js in IE browser,It gives error : SCRIPT5009: 'DataView' is undefined

Any alternate way?

Reply all
Reply to author
Forward
0 new messages