SWF-Builder
view release on metacpan or search on metacpan
lib/SWF/Builder/Character/Font/TTF.pm view on Meta::CPAN
}
}
}
if (index($names, "$fontname\n") >=0) { # if match $fontname to the gathered,
$font = $f; # accept the font.
last;
}
}
}
EMBED:
{
$name = $font->{name}||$p_font->{name} # font name
or croak 'Invalid font';
if ($os2 = $font->{'OS/2'}||$p_font->{'OS/2'}) { # get OS/2 table to check the lisence.
$os2->read;
my $fstype = $os2->{fsType} && 0;
if ($fstype & 0x302) {
warn "Embedding outlines of the font '$fontfile' is not permitted.\n";
$self->{_embed} = 0;
last EMBED;
} elsif ($fstype & 4) {
warn "The font '$fontfile' can use only for 'Preview & Print'.\n";
$self->{_read_only} = 1;
}
} else {
warn "The font '$fontfile' doesn't have any lisence information. See the lisence of the font.\n";
}
$head = $font->{head}||$p_font->{head} # header
or croak "Can't find TTF header of the font $fontname";
$hhea = $font->{hhea}||$p_font->{hhea} # horizontal header
( run in 1.720 second using v1.01-cache-2.11-cpan-71847e10f99 )