You're welcome. Perhaps you could ask the author of PDF::Report to add support for using external (TTF) fonts? Another method like the following would likely be all that's needed:
sub setTTFont { my ( $self, $fontfile, $size )= @_; if (exists $self->{__font_cache}->{$fontfile}) { $self->{font} = $self->{__font_cache}->{$fontfile}; } else { $self->{font} = $self->{pdf}->ttfont($fontfile); $self->{__font_cache}->{$fontfile} = $self->{font}; } $self->{fontname} = $fontfile; }
In other words, pretty much exactly the same as ->setFont(), but calling ->ttfont() rather than ->corefont() on the underlying PDF::API2 object.
(Notes - a) this'd go into PDF::Report, of course, not your script; b) completely untested; c) uses the same fontcache as ->setFont(), which may or may not be a good design choice; d) could be refactored to avoid code duplication (e.g. have this and ->setFont() call an internal helper routine).)
In reply to Re^3: Ho to produce Unicode text with PDF::Report?
by AppleFritter
in thread Ho to produce Unicode text with PDF::Report?
by flamey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |