Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Looking For Script To Load Font Characters Into A Glyph Set

Return to Member Forum

  • Author
    Posts
    • #93490
      Anonymous
      Inactive

      I’m working on a reflowable ePUB that uses hieroglyphs. These are found in a typeface called JSesh.TTF. I added over a hundred of these, when I suddenly remembered that InDesign supports adding characters to a Glyph Set. I started to go back and add these, one by one. Yes, it’s tedious, so I wondered if anyone knew of a script that could search the document by font name and add only the characters in the doc to a Set.

    • #93499
      David Goodrich
      Participant

      I’m not much of a scripter, but there are often multiple ways to skin a cat. Most of my work involves Chinese, and scrolling through ID’s Glyph Pallette for char. sets that large is tedious. Sometimes I use BableMap, described as “a Unicode Character Map for Windows”: <https://www.babelstone.co.uk/Software/BabelMap.html; BabelMap is quite sophisticated so it takes some getting used to. I believe JSesh.TTF uses Unicode values, and if these are limited to just a few pages in BableMap that might aid searching by eye. Or not.

      Back within ID, I have a small glyph set I made for sinological diacritics. Both it and the stock Recent Glyphs show a simple structure when opened in a text editor (after closing ID). Notepad++ makes this easier than regular old Notepad, which runs the lines together: thus Notepad++ is much better for showing the <glyph> and </glyph> commands that open and close the code for every item in the set. Experimentation showed that un-checking the Glyph Pallette’s “Remember Font with Glyph” didn’t pull the font-name from the set’s file, and instead just turned its remember value to “false”. When I re-started ID with the a set glyph from which I’d stripped the <font> …</font> info, the font names came back (naturally, I closed ID before re-opening revising the file). This worried me, because each glyph also contains a string <id value=”XXX”/>, and I don’t know a quick way to get that.

      Incidentally, a helpful ID Secrets shows the glyph set editor and the CID/GID value:
      <https://creativepro.com/working-with-custom-glyph-sets.php;. Screenshots there show that the glyph set editor doesn’t let the user adjust the id.

      Happily, it seems that that <id value=”XXX”/> is not essential: when I loaded another test set with those lines stripped ID still found the glyphs (apparently in a default font), inserted that font’s id values, and then adjusted the file for my test set. In other words, I only need to know the Unicode values for any glyphs I want to add.

      Getting those is straight-forward thanks to a very useful script written up by Peter Kahrel, based on a very useful Adobe ID Forum thread, <https://www.kahrel.plus.com/indesign/missing_glyphs.jsx; (the jsx includes the URL for the thread). Un-install the font in question, open the file in ID, run the script, and it will list the Unicode values for the now-missing glyphs. That list can be copied, and then sorted to reveal duplicates for culling. Then all I need do is move each Unicode value into a <glyph> … </glyph> template with font info but no id value, and ID will supply the latter.

      Or at least I think that would work for IDCS6.

      Good luck!

      David

Viewing 1 reply thread
  • The forum ‘EPUB and eBook’ is closed to new topics and replies.
Forum Ads