Shouldn't you better discuss this with the gd people over at boutell.com?
Ron
"Tim Toohey" <ttoohey@toowards.com> wrote in message
news:20041106062158.78783.qmail@pb1.pair.com...
> I've had a need to draw underlines in text created with the GD image
> functions, specifically ImagePSText(). As far as I could tell there's no
> way to do this (apart from using ImageLine(), which would be difficult to
> really get right). [I'm happy to hear suggestions if I've missed the
> obvious :-)]
>
> An added complication of what I wanted to achieve was to underline only
part
> of the string being drawn, while maintaining kerning between characters.
>
> The system I've come up with is to embed "control sequences" into the
string
> that is passed to ImagePSText(). A control sequence contains commands
which
> change various characteristics of the output, for instance, toggle
> underlining. I'm currently using the escape character (chr(27)) to
indicate
> the start of a control sequence, and a semi-colon to end the sequence.
>
> For example:
> $str="Some text with an " . chr(27) . "u;underlined" . chr(27) . "u;
word";