script to insert glyph using GID number
- This topic has 3 replies, 3 voices, and was last updated 7 years, 3 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / script to insert glyph using GID number
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / script to insert glyph using GID number
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)
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.
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
OK, so this is coming 6.5 years late, but here you go: https://creativepro.com/insert-a-character-by-unicode-or-gid.php
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!