Jump to content
xisto Community
Sign in to follow this  
whistle

Is It Possible To Create A String Image In Chinese

Recommended Posts

Using imageloadfont<?php$im = imagecreate(50, 20);$black = imagecolorallocate($im, 0, 0, 0);$white = imagecolorallocate($im, 255, 255, 255);imagefilledrectangle($im, 0, 0, 49, 19, $white);$font = imageloadfont("04b.gdf");imagestring($im, $font, 0, 0, "Hello", $black);imagepng($im);?>  


This is an example for illustrating how to create a image including a string with a specific font. In the codes, a font named "04b.gdf" is loaded and the string is created according to the font. What is the font named gdf? I mean what's the limitation or specification of the font.

I wish to dynamically create a Chinese Words in a image. Is it possible to implemete it in PHP? If the imageloadfont can load my font in MS Window, that will be grateful. I can't think that I can map each Chinese word to a specific image, and combine some Chinese word image to form a string, because there will be more than 10,000 words in a Chinese font.

Can anyone give me a exact answer about whether I can dynamically create a Chinese string in a image? Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.