[Omaha.pm] [rt.cpan.org #74087] PDF::TextBlock::Font->new

Jay Hannah jay at jays.net
Tue Jan 24 15:30:54 PST 2012


On Jan 22, 2012, at 1:44 AM, Andreas Krueger via RT wrote:
>    fonts => {
>      b   => PDF::TextBlock::Font->new({
>        pdf  => $pdf,
>        font => $pdf->ttfont('C:/WINNT/Fonts/comic.ttf'),
>      }),
>    },
>  });
>  $tb1->text('blah blah blah ....'
>  $tb1->apply;
> Not all the words was shown with the specified font. This problem often occurs for line breaks ...

Huh. So if you do 

   $tb1->text('blah <b>blah</b> blah');

It seems to work, but with really long examples that end up on multiple lines it sometimes doesn't work?

Can you send me a real example and the .pdf that is generated so I can look at both?

I don't use Windows, but if I can reproduce it on Linux or OSX then I could see how I might fix it.

> The font was correct shown if i used this text code:
> $tb1->text('<b>blah <b>blah <b>blah <b>....'

Umm... Every <b> needs a </b> to have any chance of working as I originally expected. I have no idea what <b> <b> <b> does.  :)

Thanks,

j




More information about the Omaha-pm mailing list