Page 1 of 1

Character to glyph mapping bulk edit

Posted: Mon Oct 12, 2015 7:35 pm
by Jan Kučera
Hello,

I need to move a bunch of glyphs from one Unicode block to another, i.e. change CMAP table for such amount of glyphs that makes it painful to go through each one individually and do the clicking with mouse. Is there way to edit the table values directly, or export & import it?

Thanks,
Jan

Re: Character to glyph mapping bulk edit

Posted: Mon Oct 12, 2015 8:10 pm
by Bhikkhu Pesala
  1. Sort the font in Unicode order from the Tools menu
  2. Insert Characters, and add empty glyphs with the new Unicode mappings that you need
  3. Copy the glyphs that you need to move
  4. Select the new empty glyphs
  5. Edit menu paste special, and overwrite the existing mappings.
  6. Delete the old glyphs that are now unmapped
Paste Special.png
Paste Special.png (26.16 KiB) Viewed 1744 times

Re: Character to glyph mapping bulk edit

Posted: Tue Oct 13, 2015 6:36 pm
by Jan Kučera
That creates glyphs with new IDs. I want to keep the same glyph IDs so that substitutions and everything else works as is.

Re: Character to glyph mapping bulk edit

Posted: Tue Oct 13, 2015 6:59 pm
by Bhikkhu Pesala
OpenType Features don't use Glyph IDs, they use Glyph names.

If you really need to keep the glyph IDs, then copy the code points from the newly added glyphs over the existing glyph outlines, using paste special, but only the code points.

Re: Character to glyph mapping bulk edit

Posted: Sat Oct 17, 2015 9:45 pm
by Erwin Denissen
In general the actual glyphs are used, but when compiling an OpenType layout feature script, the glyph names are used to find the glyphs.

To keep the same glyphs, this might slightly different approach should work:
  1. Sort the font in Unicode order from the Tools menu
  2. Insert Characters, and add the selection of codepoints
  3. Copy these new characters to the clipboard
  4. Select the original glyphs
  5. Edit menu paste special, to only copy the codepoints. Ensure you have selected "overrule same codepoints".
  6. Delete the newly added characters that are now unmapped