Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Imager with UTF8

Reply
Thread Tools

Imager with UTF8

 
 
joe
Guest
Posts: n/a
 
      11-25-2008
Hello. Does anyone know if I can print japanese text with imager. This
is what i did but so far it prints numbers and symbols, no japanese
characters. THanks.

my $font = Imager::Font->new(
file => '/usr/share/fonts/truetype/freefont/FreeSans.ttf',
index => 0,
color => $blue,
size => 10.5,
aa => 1);


$img->string(
font=>$font,
text=>$line2,
x=>$x2,
y=>75);
 
Reply With Quote
 
 
 
 
smallpond
Guest
Posts: n/a
 
      11-25-2008
On Nov 25, 10:31 am, joe <(E-Mail Removed)> wrote:
> Hello. Does anyone know if I can print japanese text with imager. This
> is what i did but so far it prints numbers and symbols, no japanese
> characters. THanks.
>
> my $font = Imager::Font->new(
> file => '/usr/share/fonts/truetype/freefont/FreeSans.ttf',
> index => 0,
> color => $blue,
> size => 10.5,
> aa => 1);
>
> $img->string(
> font=>$font,
> text=>$line2,
> x=>$x2,
> y=>75);


FreeSans has Japanese?
 
Reply With Quote
 
 
 
 
joe
Guest
Posts: n/a
 
      11-25-2008
I doubt there is a ttf with many languages. It works great with
english not sure what to do here I have found a couple of posts but no
details on how to implement it. Does imager have a built in font with
all the languages? thanks


On Nov 25, 12:09*pm, smallpond <(E-Mail Removed)> wrote:
> On Nov 25, 10:31 am, joe <(E-Mail Removed)> wrote:
>
>
>
> > Hello. Does anyone know if I can print japanese text with imager. This
> > is what i did *but so far it prints *numbers and symbols, no japanese
> > characters. THanks.

>
> > my $font = Imager::Font->new(
> > * *file *=> '/usr/share/fonts/truetype/freefont/FreeSans.ttf',
> > * *index => 0,
> > * *color => $blue,
> > * *size *=> 10.5,
> > * *aa * *=> 1);

>
> > $img->string(
> > * *font=>$font,
> > * *text=>$line2,
> > * *x=>$x2,
> > * *y=>75);

>
> FreeSans has Japanese?


 
Reply With Quote
 
RedGrittyBrick
Guest
Posts: n/a
 
      11-25-2008

joe wrote:
> On Nov 25, 12:09 pm, smallpond <(E-Mail Removed)> wrote:
>> On Nov 25, 10:31 am, joe <(E-Mail Removed)> wrote:
>>
>>> Hello. Does anyone know if I can print japanese text with imager. This
>>> is what i did but so far it prints numbers and symbols, no japanese
>>> characters. THanks.
>>> my $font = Imager::Font->new(
>>> file => '/usr/share/fonts/truetype/freefont/FreeSans.ttf',
>>> index => 0,
>>> color => $blue,
>>> size => 10.5,
>>> aa => 1);
>>> $img->string(
>>> font=>$font,
>>> text=>$line2,
>>> x=>$x2,
>>> y=>75);

>> FreeSans has Japanese?

>
> I doubt there is a ttf with many languages.


"supporting most major code pages and character sets in modern use ...
Ascender Uni is a 39MB TrueType (TTF) font with approximately 53,000
glyphs" - http://www.ascenderfonts.com/font/ascender-uni.aspx

Arial Unicode MS also has over 50,000 glyphs.
Bitstream Cyberbit has over 10,000 glyphs
....

Not that I'm recommending the idea of pan-unicode fonts. I believe there
are significant issues for the CJK character sets (which I think may
need to have different language-specific glyphs for many Unicode
codepoints). This might or might not be what joe's question is about.

--
RGB
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
given char* utf8, how to read unicode line by line, and output utf8 gry C++ 2 03-13-2012 04:32 AM
there are 3-imager video cameras, are there 3-imager still cameras? Bob Fleischer Digital Photography 14 02-07-2010 08:49 PM
Raw Imager Andrew Python 0 02-19-2007 05:54 PM
CMOS imager references? Don Stauffer Digital Photography 2 03-13-2006 04:38 PM
CCD Imager swnw Digital Photography 5 09-21-2003 07:05 AM



Advertisments