TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using Xe(La)TeX, how could the hyphenation character be set to any particular glyph in a given font? I'd also like to have the possibility to set a color for the glyph when used for that task and to set the glyph's size, too.

I am thinking of using some ornamental glyph as hyphenation character, but haven't figured out how to put to good use the facilities of the package fontspec to this end. I've tried with the key HyphenChar, but I wasn't able to set a value in terms of XeTeXglyph when I found a glyph not corresponding to any UniCode number; besides, I had no chance to set either color or size.

share|improve this question
You can't express the character by the font specific slot where the character happens to live (which is the purpose of \XeTeXglyph, but only by itself or by Unicode code point. – egreg Sep 12 '12 at 20:01

The character used for marking hyphenation must be chosen by its Unicode point, not with \XeTeXglyph.

So, if you're able to find the code point of the glyph, suppose it is U+1234, you can say


However you will not be able to change its color or size, even with the \XeTeXinterchartoks feature, because this is executed at an earlier stage than hyphenation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.