Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
1  
It seems there are some questions where you didn't accept any of the given answers. Please go back and look if your problem is solved. Your future questions are much more likely to receive attention if your accept rate is high. –  canaaerus Sep 12 '12 at 19:42
    
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

1 Answer 1

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

\setmainfont[Ligatures=TeX,HyphenChar="1234]{MyFont}

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

 
discard

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.