Vote count:
0
I am trying to create pdf file in perl using Google Noto fonts. I have tried with ttf and it works fine. When I try to change the font to otf, get the error.
requested cmap '' not installed at PDF-API2-0.73/lib//PDF/API2/Resource/CIDFont/TrueType/FontFile.pm line 66.
Here is my sample code which works with ttf font.
#!/usr/bin/perl
use strict;
use warnings;
use lib 'PDF-API2-0.73/lib/';
use PDF::API2;
my $text = "A sample text using Noto TTF";
my $pdf = PDF::API2->new();
my $page = $pdf->page;
my $txt = $page->text;
my $font = $pdf->ttfont('C:/temp/fonts/NotoSans-Bold.ttf');
$txt->font($font, 25);
$txt->translate(200, 550);
$txt->fillcolor('black');
$txt->text($text);
$pdf->saveas("Noto-TTF.pdf");
When I change to otf by replacing ttf with otf my $font = $pdf->ttfont('C:/temp/fonts/NotoSansCJKkr-Light.otf');
I start seeing the error
I have seen people are able to work with otf fonts, not necessarily NOTO so I think this is possible.
Can some one please explain me if what mistake I am doing ?
I am on windows cygwin with PDF-API2-0.73
Note : I am perl newbie.
asked 1 min ago
Error in using Noto otf fonts with perl API2 pdf
Aucun commentaire:
Enregistrer un commentaire