I would like to insert characters in my document based on GID, is that possible with FrameMaker 2017?
That's not possible out of the box. If you know the Unicode HEX value of the GID, you can use > Insert > Character > HEX input, type in the hex value (e.g. "01C5" for Dzcaron (ǅ)). You can also place the insert marker in the location where you want to add it, go to the Find/Change pod, type in \u01C5 ("\u" + UC-HEX) and press "Change".
If you want to insert special characters regularly, you might want to customize the > Insert > Symbols menu and add them there for easy access.
You can use a professional font editor, to get the GID of a cp first.
Also have a look at this blog post from David Blattner: Insert a Character by Unicode or GID that deals with the topic from an InDesign perspective. Have a special look at "GID script" mentioned there. It links to an ExtendScript from Olav Kvern, that makes it possible to insert a char based on its GID into the current text position. It would need to be modified to work with FrameMaker, but the concept should work for FM as well.
Everything else would need more programming. You can access the Windows API and the CMAP to get the UC-HEX for a given GID in a font, see here: cmap - Character To Glyph Index Mapping Table. This table defines the mapping of character codes to the glyph index values used in the font. It may contain more than one subtable, in order to support more than one character encoding scheme.
Let me know of this helps.
Thanks for the details Stefan; unfortunately, the methods mentioned didn't work for FrameMaker. The glyph I want to use has no Unicode mapping (a special glyph variant). So I have to use the GID which I got from InDeisgn glyphs panel. Blattner's blog does have the script for InDesign, however, changing it to work with FrameMaker seems not possible as far as my humble programming skills go, I can't find a method to insert a glyph by GID in FrameMaker.
I guess there is no simple way to do it.