PDF-Template
view release on metacpan or search on metacpan
lib/PDF/Template/Container/Font.pm view on Meta::CPAN
use PDF::Template::Container;
}
my @current_font = ();
sub new
{
my $class = shift;
my $self = $class->SUPER::new(@_);
$self->{EMBED} = 0 unless defined $self->{EMBED};
return $self;
}
sub render
{
my $self = shift;
my ($context) = @_;
my $size = $context->get($self, 'H') ||
lib/PDF/Template/Container/Font.pm view on Meta::CPAN
unless ($context->retrieve_font($face))
{
my $encoding = $context->get($self, 'PDF_ENCODING') || 'host';
# $self->_validate_option('FACE', \$face)
# unless $encoding eq 'host';
my $font = pdflib_pl::PDF_findfont(
$context->{PDF},
$face,
$encoding,
$context->get($self, 'EMBED'),
);
$font == -1 && die "Font not found for '$face' by the time <font> was rendered", $/;
$context->store_font($face, $font);
}
return $self->SUPER::begin_page($context);
}
1;
( run in 1.669 second using v1.01-cache-2.11-cpan-71847e10f99 )