3

Question

I am wondering if there is a way to provide the \XeTeXglyph as input and get the the character code (preferably in hexidecimal) as output.

Situation

I've been doing many experiments with Generating a table of glyphs with XeTeX. The XeTeX reference manual mentions a few commands:

According to the manual, you can look up characters by

  • \XeTeXglyph ⟨glyph slot⟩
  • \XeTeXglyphname ⟨font⟩ ⟨glyph slot⟩
  • \XeTeXglyphindex "⟨glyph name⟩" ⟨space⟩ or \relaxx
  • \XeTeXcharglyph ⟨char code⟩

This would be an insanely useful feature.

Related Questions

5
  • No, there isn't. Two character codes could point to the same glyph.
    – egreg
    Mar 29, 2015 at 20:57
  • @egreg disappointed face ಠ_ಠ. Two character codes point to the same glyph? really? Don't you mean that one glyph could have different representations (roman, italic, bold, etc.) Mar 29, 2015 at 20:59
  • @egreg: What about Lua(La)TeX?
    – user31729
    Mar 29, 2015 at 20:59
  • @SoundsOfSilence I think it's the same problem.
    – egreg
    Mar 29, 2015 at 21:00
  • @macmadness86 egreg means that fonts can reuse a glyph for various (unicode) symbols. After all a lot of symbols look quite similar. A font can e.g use the same glyph for U+0162 and U+021A. Mar 29, 2015 at 21:36

1 Answer 1

1

Unfortunately, this is currently not possible.

Some glyphs could but used for multiple unicode slots.


Note: It seems perfectly reasonable to create a function that acquires multiple code points, should the same glyph be used in multiple code points. Maybe someone will make this possible someday.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .