Copy glyph Unicodes


#1

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.


#2
  • 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.

#3

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?


#4

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.


#5

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?


#6

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


#7

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?


#8

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.


#9

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.


#10

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


#11

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.


#12

this might help:

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