[Koha-bugs] [Bug 2246] Label printing doesn't work with Hindi characters

bugzilla-daemon at pippin.metavore.com bugzilla-daemon at pippin.metavore.com
Wed Nov 12 03:26:06 CET 2008


http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2246





------- Comment #8 from mason.loves.sushi at gmail.com  2008-11-11 18:26 -------
(In reply to comment #7)
> In investigating the bug, I have discovered that it will be fairly difficult to
> fix. The problem is that PDF::Reuse reopens STDOUT, making it impossible for us
> to set binmode ':utf8' on it. 

Jesse, I think this is not the problem.

> 
> Thoughts?
> 


I wrote the 1st go of this, so ill comment


the good news is that pdf::reuse now supports unicode (from july 08)  so this
is *technically* possibile
which is a good start ;)

http://groups.google.com/group/PDF-Reuse/browse_thread/thread/99457d4e40d6a5ed


the *only*?? way to do this - is to use the new RDP::Reuse::prTTFont() sub 
and embed the non-standard (eg: korean/japanese/hindi)  font in the actual pdf
file.

(after installing all your extra *.ttf fonts on your server , of course)


something like this...

  my $hindi= prTTFont('/path/to/hindi.ttf');
  prPage();
  prTTFont($hindi);
  prText(20, 675, "दिशा दिशा दिशा दिशा
दिशा"); 


Its going to need a simple proof-of-concept first, as
embedded-unicode-hindi-fonts is close to what PDF::Reuse is capable of
currently, it seems


http://search.cpan.org/dist/PDF-Reuse/Reuse.pm#prTTFont_-_select_and_embed_a_TrueType_font

" Using TrueType fonts also enables the prText function to accept UTF-8
strings, which allows you to use characters outside the Mac-Roman/Win-ANSI
character sets used by the built-in fonts. "

Mason




------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the Koha-bugs mailing list