Font-TTF-Scripts
view release on metacpan or search on metacpan
lib/Font/Fret.pm view on Meta::CPAN
if ($glyph && $glyph->{' LEN'} != 0)
{
my (@instr, $in);
$glyph->read;
$xorg = ($glyph->{'xMax'} + $glyph->{'xMin'}) * $tsize / $upem;
$xorg = $xcentre - $xorg / 2;
$xadv = $xorg + $font->{'hmtx'}{'advance'}[$gid] * $tsize / $upem;
$ppage->add(sprintf("%s %.4f %d m %.4f %d l S [] 0 d\n", $dots, $xadv, $ybase + 7, $xadv,$ybase + 57)) if ($xadv < $xcentre + 27);
$ppage->add(sprintf("%s %.4f %d m %.4f %d l S [] 0 d\n", $dots, $xorg, $ybase + 7, $xorg, $ybase + 57)) if ($xorg > $xcentre - 27 && $xorg < $xcentre + 27);
$ppage->add(sprintf("BT 1 0 0 1 %.4f %.4f Tm /T$id $tsize Tf 100 Tz $gcol <%04X> Tj %s ET\n", $xorg, $yorg, $gid, ($gcol ? "0 g " : "")));
@instr = $package->overlay(@parms);
if (@instr)
{
$ppage->add("q ");
foreach $in (@instr)
{
if (defined $transformingops{$in->[0]})
{
for (my $j = 1; $j < @{$in}; $j++)
{ $in->[$j] = $in->[$j] * $tsize / $upem + ($j % 2 ? $xorg : $yorg); }
}
lib/Font/Fret.pm view on Meta::CPAN
=cut
sub extra_points
{
my ($class, $font, $gid, $glyph) = @_;
return [];
}
=head2 overlay
Returns an array of arrays, each is an operator string followed by the parameters that will precede
the operator. If the operator is a contour forming op, then the positions will be transformed
from glyph space for rendering.
=cut
sub overlay
{
my ($class, $cid, $gid, $glyph, $uid, $font) = @_;
return [];
}
=head2 final
Called at the very end to tidy things up in the package
scripts/fret view on Meta::CPAN
}
}
sub addminmax
{
my ($e, $v) = @_;
$e->[0] = $v if (!defined $e->[0] || $v < $e->[0]);
$e->[1] = $v if (!defined $e->[1] || $v > $e->[1]);
}
sub overlay
{
my ($class, $cid, $gid, $glyph, $uid, $font) = @_;
my (@res, @grid, $i, $j, $ei, $oldx, $oldy, $oldgx, $oldgy);
return () unless ($opts->{'b'});
if ($specialfh)
{ printf $specialfh " <glyph gid='%d' uid='%04X' name='%s'>\n", $gid, $uid, $font->{'post'}{'VAL'}[$gid]; }
foreach $i (0 .. 3)
{
( run in 0.317 second using v1.01-cache-2.11-cpan-49f99fa48dc )