Shouldn't you better discuss this with the gd people over at boutell.com?

Ron

"Tim Toohey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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";
>
> I've attached a patch for gd.c which does what I'm talking about.
>
> I wondering whether people think this is a good way to go, and if so if I
> should commit this code? If it's not a good idea, any suggestions for
> drawing underlines?
>
> Thanks,
> Tim
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to