I'm very well aware that it is considered best practice not to use underlining other than on typewriters and in handwriting. But sometimes it is needed nonetheless.
In my opinion the typographically least offending way to underline in print is to leave out the descenders. This is also how I learned to do it in handwriting. Very few fonts offer a pre-made underlined variant, but some text-processors (e.g. OS X text-engine) do -- depending on the font used -- an acceptable job at emulating this effect:

How would I tweak any of the existing ways/packages for underlining to do the same?
As a bonus, I'd like to be able to tweak the behaviour (extent of the omitted part, apply to which letters) per font and text style, preferably working with XeLaTeX.






\sffamilyfrom your example. Any ideas how to solve this? – Florian Dec 03 '11 at 10:44\whiten{0}\whiten{-0.5}to get more removed. Or whiten in small steps in a loop. I'll add this when I've got time for it. – Stefan Kottwitz Dec 03 '11 at 11:05soul, perhaps adding some easy ways to tune the behaviour for the font used... – Florian Jun 26 '12 at 12:09\raiseboxmakes the line higher than necessary. It can be fixed by either the optional argument of\raisebox:\raisebox{\dp0}[\height]{\underline{\phantom{\the\SOUL@token}}}. Or it can be done in a simpler way without\raisebox:\underline{\kern\wd0}. – Heiko Oberdiek Jun 04 '14 at 01:26\myul{Coxeter-System}) the dash seems to interrupt the line as well. is it possible to redeem that? – milkpirate Feb 19 '16 at 17:45