Re: text&image
| From: | Ajai Khattri | Date: | Fri, 30 Jan 2004 17:26:33 +0000 |
| Subject: | Re: text&image | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-176360@lists.php.net to get a copy of this message | ||
On Fri, 30 Jan 2004, Maciek Hofstede wrote:
> i'm writing a host monitor.
> image it's diagram generate from mysql,
> if i use imagestring or imagettftext web is too big, there is about 150
> - 170 hosts, and i have generate image and put html descriptions:
> <image>
> host alive: ble ble ble
> ble ble ble (statistic)
>
> ps.sorry for my english ;(
You can easily test for and adjust the size of the text.
You can use various functions to get the font metrics and see if they fit
in your image - if not, you can decrease the size and try again. If you
write it as a loop with a flag, you can have it automatically size the
text to the bounding box.
Its not as hard as it sounds...
--
Aj.
Sys. Admin / Developer