NAME

GD::Persian - Persian UTF-8 support for GD module

DESCRIPTION

The GD lib dosn't support Persian and Arabic chars propebly. It shows characters unsticky and reverse the sentence. This package get Persian UTF-8 charecter and replace it with proper characters that is readable in GD

SYNOPSIS

use GD;

# create a new image
use GD;
use GD::Persian;
use utf8;
my $gd        = new GD::Image(800,200);
my $black     = $gd->colorAllocate(0,0,0); 
my $white     = $gd->colorAllocate(255,255,255);
my $font_path = "/Library/Fonts/Tahoma.ttf";
$gd->stringFT($white,$font_path ,40 ,0 ,20 ,90 ,
         GD::Persian::Convert("هوا بس ناجوان مردانه سرد است "),
          {linespacing=>0.6,
           charmap  => 'Unicode',
          });
binmode STDOUT;
print $gd->png;

METHODS

Convert
Convert Persian UTF-8 characters to proper characters for using in images that is created by GD lib

AUTHOR

Milad Rastian <milad@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2011 by Milad Rastian <milad@cpan.org>

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

BUGS

https://github.com/slashmili/perl-gd-persian/issues

VERSION

0.9

1 POD Error

The following errors were encountered while parsing the POD:

Around line 151:

Non-ASCII character seen before =encoding in 'GD::Persian::Convert("هوا'. Assuming CP1252