You are here: Re: create images with special chars « PHP Programming Language « IT news, forums, messages
Re: create images with special chars

Posted by petersprc on 12/07/06 19:10

Hi,

If you need more symbols, you can use a True Type font with
imagettftext (specify a vertical angle for your example). You could
also try loading another bitmap font with imageloadfont.

In my version of PHP (4.4.2), the built-in GD font seems to use the ISO
8859-2 character set. You can see the characters here:

http://nl.ijs.si/gnusl/cee/charset.html

For instance, latin "ae" is not shown. And I'm not sure if all
available chars are represented in the font...

Ask Josephsen wrote:
> Hi
>
> I want to create an image with vertical text, but how do I handle
> special chars like "æøå"? I'm using php version 4.4.2.
>
> This is my code so far:
>
> $string = "æøå";
> $fh = 6;
>
> $im = imagecreate ( 14, strlen($string)*$fh+2 );
> $bg = imagecolorallocate ( $im, 255, 17, 255 );
> $black = imagecolorallocate($im, 0, 0, 0);
>
> for ( $j=strlen($string)*$fh, $i=0; $i<strlen($string); $i++, $j-=$fh )
> imagecharup ( $im, 2, 0, $j, $string[$i], $black );
>
> header('Content-type: image/png');
> imagepng($im);
>
>
> Thanx
> Ask

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация