in reply to Using Unicode chars in GD

I don't know about GD, but i just recently did this using Image::Magick, so perhaps either the same technique of the \x codes will work in GD or if it's possible you can use ImageMagick for your solution instead of GD...
use Image::Magick; my $image = Image::Magick->new(); ... $image->Annotate( x=>$x, y=>$y, text=>"Up: \x{2191} and Down: \x{2193}", font=> '@YOURFONT.TTF', pointsize => 12, stroke => 'black', );

Replies are listed 'Best First'.
Re^2: Using Unicode chars in GD
by cormanaz (Deacon) on May 23, 2005 at 13:43 UTC
    That did it. Here's the working GD code, in case anyone is insterested. Many thanks......Steve
    use strict; use GD; my $image = GD::Image->new(200,100); my $white = $image->colorAllocate(255,255,255); my $black = $image->colorAllocate(0,0,0); my $uparrow = "\x{2191}"; my $dnarrow = "\x{2193}"; $image->stringFT($black,'/windows/fonts/arial.ttf',12,0,80,50,"up: $up +arrow dn: $dnarrow"); open(OUT,">test.png") or die "Can't open output: $!\n"; binmode OUT; print OUT $image->png; close OUT;