If you find no other way, you can always edit the PostScript that is generated for enscript's bggray special escape (in a similar way to my answer to your previous question).
When you use in your input bggray{0.5} after the special escape character (which you can change with -e), enscript will output code to call the PostScript function bgs to draw the background shade. You can modify this function between the output of enscript and the input of ps2pdf to look for a particular shade value, say 0.01 and draw a thin line instead of a background box.
My version of enscript defines bgs with
/bgs { % x y height blskip gray str -> - show string with bg color
...
x y blskip sub str stringwidth pop height Box
We can change the line doing the drawing, x y ... Box, with a sed script
enscript ... |
sed '
/^\/bgs/,/^}/{
/x y blskip sub str stringwidth pop height Box/{
s/^/ %--% /
a\
/lh height .05 mul def \
/y2 y height .2 mul add def \
gray 0.01 eq { x y2 blskip sub str stringwidth pop lh Box /gray 0 store } \
{ x y blskip sub str stringwidth pop height Box } ifelse
}
}' |
ps2pdf ...
I've added two parts you can easily change: the line beginning /lh defines the thickness of the line as a fraction of the height. Change the .05 to make the line thicker (i.e. bolder). The next line beginning /y2 moves the underline up by 0.2 times the box height; this corresponds to the fix I made in your last question.
Note that you must be careful not to underline trailing spaces by making sure the bggray escapes are right next to the text. For example,
enscript -fCourierBold12 -e@ -p- | ...
@bggray{0.01}underlined text@bggray{1} normal text
produces this image:
