Copy glyph Unicodes

Please could the context menu in the main view have ‘copy Glyph Unicodes’ as well as ‘Copy Glyph names’? If I find characters in one font that I need to add to another font (not the outlines, just add empty glyphs), they might well have different names, so copying the names and adding them will not generate a popup if some characters already exist in the font.

  • What exactly should be the content of the clipboard? E.g., for gcommaaccent: uni0123 or 0123 or ģ?
  • What about glyphs that do not have a Unicode value assigned?
  • Considered the Glyphs system services already? That might do the trick for you already.

Yes, I’ve been using the system services thing, but it seems a bit of a roundabout way to go through a text editor and replace 0x with [space]uni for all characters.

I think uni0123 would be the most useful format. The actual character itself (ģ) can be copied by selecting the glyph cell. If no Unicode, skip that glyph?

Try:

  1. In Glyphs, select the glyphs and Copy Glyph Names
  2. In the target app, paste.
  3. In the target app, select the names, and from the Services, choose Make Production Glyph Names

If it does not show up, you may have to activate it in System Preferences first.

This does not work at all for me. When I use this service, the names stay the same. Any idea why it is not working? Is this still supposed to work in Glyphs 2.6.1?

The service doesn’t work inside of Glyphs. So you need to do it in TextEdit or TextMate.

Well, I did. I tried it both in Sublime Text and TextEdit, neither did work. I attached a mini screencast. Am I using the services incorrectly?

20190516-000331_Screencapture

The production names are the same as the nice names for the ones you show in the screen cast. Not every glyph has a uniXXXX name in the Adobe glyph list.

Ok, sorry. I thought the question was about how to copy unicodes of selected glyphs? Then, how do I copy/export the unicode information of selected glyphs? I need to somehow retrieve the unicodes as shown in the screenshot.

What do you need the unicodes for?
You could write a small script :wink:

I need them to create a JSON file which will later be used in an InDesign-Script.

I am neither very experienced with the Glyphs Scripting API nor with Python. I will see, what I can do. But so there seems to be no native way, alright.

this might help:

for layer in Font.selectedLayers:
    print layer.parent.unicode