Reputation: 234514
I can use the Glyphs panel to use a character with a manually chosen alternative glyph. But how can I then retrieve that glyph ID programmatically?
I am currently using IDrawingStyle::GetSpecialGlyph
, but it only works if the underlying character does not have a Unicode representation. But, say, if I drop some alternate glyph for the character U+0041 ʟᴀᴛɪɴ ᴄᴀᴘɪᴛᴀʟ ʟᴇᴛᴛᴇʀ ᴀ in a document using the Glyphs panel, the underlying character will be U+0041, so IDrawingStyle::GetSpecialGlyph
will not work. How can I programmatically retrieve that glyph ID?
Upvotes: 7
Views: 666
Reputation: 234514
You can get this by navigating the wax. Iterate the wax strand with CallbackWaxIterator
, and then, for each wax run boss on a wax line, obtain the IWaxGlyphs
interface and use PeekGlyphArray
or MapCharsToGlyphs
in combination with GetGlyphAt
.
Upvotes: 3