[Tex/LaTex] Setting font protrusion in XeLaTeX with microtype v2.5

microtypeprotrusionxetex

I am testing microtype v2.5 with XeLaTeX and have checked the font protrusion features. With the default features, the hyphen protrudes at a hyphenation about 50 per cent of its width. Nonetheless, I'd like to increase the protrusion factor for this character when setting text with the default roman font, and I have tried by typing in the preamble

\SetProtrusion{encoding=*,family=rm*}{"002D={1000,1000}}

expecting to get full-width protrusion, but nothing changed. I have also typed directly the hyphen sign – instead of its unicode value 002D (hex), in the code above, but it remained the same. Furthermore, no matter the factor figures I set, nothing seems to change. I may be using the wrong code, but if so, how could I amend it?

EDIT: After having commented upon Honza's answer I checked that the way to refer to unicode glyphs in terms of their hexadecimal encoding is not the TeX way as in \char"002D, but simply "002D without the control sequence \char. Moreover, just in case someone stumbles upon it, in order to set the protrusion factor for a comma it seems that the unicode "002C must be used — the character "," itself won't do (maybe because it is used as a delimiter in the microtype command).

Best Answer

I think the problem might be in the character you are trying to adjust. With the hex specification \char"002D the protrusion does not work for me, however, if I replace it with -, which I copied out from the PDF, or a regular hyphen -, it works without problems.

Related Question