I cannot get the swedish character set on images. What can be wrong?
I would very much appreciate help.
regards, axier
I can supply some code here and a link:
http://www.mymobile.nu/services/fontgen/fonttest.php
Some people looks like they can get it to work with no effort at all
with the same script.
The code looks like this:
<?
setlocale (LC_ALL, 'swedish');
$sizes = 10;
$startsize = 6;
$printText = "A B C D E F G H ABCDEFGH AOUÅ EIYÄÖ ";
# $printText = htmlentities ($printText,ENT_QUOTES, 'UTF-8');
# $printText = utf8_encode ($printText);
$convertExec = "/usr/bin/convert";
$thisDir = '/fonts/';
$thisFont ='arial.ttf';
echo "$thisFont<br>";
for($i=$startsize;$i<$sizes;$i++) {
$im = imagecreate (400, 30);
$black = ImageColorAllocate ($im, 0, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);
ImageTTFText ($im, $i , 0, 10, 20, -$white, $thisDir.$thisFont, $printText);
ImagePng ($im,'test'.$i.'.png');
echo $i.' <img src="test'.$i.'.png"><br>';
ImageDestroy ($im);
}
?>