Subject: | Khmer script incorrectly rendered |
Date: | Tue, 12 Apr 2016 16:28:39 +0700 |
To: | bug-PDF-API2 [...] rt.cpan.org |
From: | Jerome B <jeromekampot [...] gmail.com> |
It seems subscript (footer letters) are not rendered for Khmer script.
PDF-API2 v2.0.27, perl 5.18.2
The code below should render 2 consonants, "under" each other but instead
renders them next to each other with the "Coeng"placeholder.
I tested with different fonts including KhmerOS.ttf (
http://sourceforge.net/projects/khmer/files/Fonts%20-%20KhmerOS/KhmerOS%20Fonts%205.0-%20LGPL%20Licence/)
Copy/paste of the text seems to work correctly so I guess it has something
to do with the way the font is generated.
my $pdf = PDF::API2->new(-file=>"testkhmer.pdf", -encode => 'utf8');
my $page = $pdf->page;
my $font = $pdf->ttfont('../font/khmerOS.ttf');
my $text = $page->text();
$text->font($font, 20);
$text->translate(200, 700);
$text->text("\x{1780}\x{17D2}\x{1780}");
$pdf->save();