Re: [PHP] Asian fonts

2001-11-02 Thread speedboy

 Any idea how to use (install) asian fonts on an 
 english version of RH? I need them in the gd 
 library, to generate an image with chinese/japanese
 text.

Configure php with the following:

--with-gd=/tmp/www/gd-2.0.1
--with-freetype-dir=/usr/local/include/freetype2
--enable-gd-imgstrttf

Then just obtain some chinese/japanese true type fonts and use the
following script below and substitute arial.ttf for the asian font:

?php

### draw an image for the header and print some stuff on it.
###

## tell the browser what it is
header(Content-type: image/jpeg);

## draw a new image
$width = 600;
$height = 100;
$image = imagecreate($width, $height);

##make the background same as page
$backg = imagecolorallocate($image, 0, 51, 102);

##make the text white
$text = imagecolorallocate($image, 255, 255, 255);

imagefilledrectangle($image, 0, 0, $width, $height, $backg);

## now let's print some text to the image
imagettftext($image, 40, 0, 60, 75, $text,/home/www/htdocs/arial.ttf,
some guy);

## off it goes
imagejpeg($image);

## cleanup
imagedestroy($image);

?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Asian fonts

2001-10-31 Thread Daniel BI

Hi all!

Any idea how to use (install) asian fonts on an 
english version of RH? I need them in the gd 
library, to generate an image with chinese/japanese
text.

any clue greatly appreciated! 

Daniel BI


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]