Imager with UTF8

Discussion in 'Perl Misc' started by joe, Nov 25, 2008.

  1. joe

    joe Guest

    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);
     
    joe, Nov 25, 2008
    #1
    1. Advertising

  2. joe

    smallpond Guest

    On Nov 25, 10:31 am, joe <> 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?
     
    smallpond, Nov 25, 2008
    #2
    1. Advertising

  3. joe

    joe Guest

    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 <> wrote:
    > On Nov 25, 10:31 am, joe <> 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?
     
    joe, Nov 25, 2008
    #3
  4. joe wrote:
    > On Nov 25, 12:09 pm, smallpond <> wrote:
    >> On Nov 25, 10:31 am, joe <> 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
     
    RedGrittyBrick, Nov 25, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew

    Raw Imager

    Andrew, Feb 19, 2007, in forum: Python
    Replies:
    0
    Views:
    354
    Andrew
    Feb 19, 2007
  2. gry
    Replies:
    2
    Views:
    734
    Alf P. Steinbach
    Mar 13, 2012
  3. imager sample for text

    , Jan 17, 2007, in forum: Perl Misc
    Replies:
    2
    Views:
    102
  4. jwcarlton

    Imager module with GIFs

    jwcarlton, Feb 22, 2011, in forum: Perl Misc
    Replies:
    10
    Views:
    188
    Uri Guttman
    Feb 24, 2011
  5. Jason C

    Imager module to resize a GIF

    Jason C, Oct 19, 2011, in forum: Perl Misc
    Replies:
    3
    Views:
    489
    J. Gleixner
    Oct 20, 2011
Loading...

Share This Page