简体   繁体   中英

Writing colored HTML formatted text to an image in PHP

This is what I have so far.

在此处输入图片说明

http://gyazo.com/3605597b9b8135f021c1c3481ff34acb.png?1329009331

It successfully writes the source to the image, but I want it to render as HTML and then write the HTML formatted string to the image.

This is what I want it to look like, but in image form.

在此处输入图片说明

http://gyazo.com/5afdb47793844f7648210ecd540da1c3.png?1329009540

Thanks for looking. I am so frustrated with this, haha.

I think there is only one way to print multi colored text by using the standard PHP GD and Image functios. You must print it by having a seperate imagestring call for each color.

This works only for monospace font types, where all the characters having the same size.

If you want something "prettier" you must be using some other way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM