script to insert glyph using GID number

Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / script to insert glyph using GID number

Viewing 3 reply threads
  • Author
    Posts
    • #55998

      In Dotless_i script, a dotless i is inserted at the insertion point according to the unicode number – Can the script be altered so that a glyph can be inserted based on its GID number & not unicode number (as certain glyphs share the same unicode numbers but have different GID numbers-like arrows in Minion Pro font)

    • #56012

      I had a brief go at this, but the only — really, just one! — method that can access glyphs, rather than Unicodes, is findGlyph/changeGlyph (that's two… but they are the only two!).

      Problem is, #1: you have to find a glyph code first to replace. But you cannot simply insert any character and then replace it with the glyph you need, because you have to feed it the glyph code it has to find. And you don't know the glyph code of the character you just inserted, because you inserted it as a character — so you have to insert a glyph code to begin with. Round and round we go.

      #2 is much simpler: even with known glyph codes, just to test the idea, ID kept on complaining I didn't set the various parameters correctly. Perhaps it's due to inexperience: I used Find/Change Glyphs only once, with CS3, and boy, did it not work as advertised. Never used it again.

    • #56015

      Looks like it would be more prudent to set keyboard shortcuts to most recent glyphs to use glyphs rather than go through find/change routine. I was just wondering if a script could simplify this procedure

    • #91016
      David Blatner
      Keymaster

      OK, so this is coming 6.5 years late, but here you go: https://creativepro.com/insert-a-character-by-unicode-or-gid.php

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
>