Font-TTF-Scripts

 view release on metacpan or  search on metacpan

scripts/ttfbuilder  view on Meta::CPAN

                        if (defined $pt->{'cont'})
                        { $pt->{'loc'} = lookup_pt($aglyph->{'glyph'}, $pt->{'cont'}, $currif->{'scale'}); }
                        else
                        {
                            $xml->xpcarp("Unlocatable attachment point $attrs{'at'} on glyph $xml_dat[$fnum][$aglyph->{'gid'}]{'ps'} in $opt_c");
                            $pt->{'loc'} = [0, 0];
                        }
                    }
                    ($withx, $withy) = @{$pt->{'loc'}};
                    delete $aglyph->{'points'}{$attrs{'with'}}     # delete if attaching to a real glyph
                            if (defined $curbase->{'glyph'} && (!ref $curbase->{'glyph'}{'endpoints'} || $curbase->{'glyph'}{'numPoints'} != scalar @{$curbase->{'glyph'}{'endPoints'}}));
                } else
                {
                    $withx = $currif->{'hmtx'}{'advance'}[$aglyph->{'gid'}] / 2 * $currif->{'scale'};
                    $withy = 0;
                }
    
                $aglyph->{'roffset'} = [$atx - $withx, $aty - $withy];
            }
            $xml->{' curbase'} = $aglyph;
        }

scripts/ttfbuilder  view on Meta::CPAN


    $g->{'pathbase'} = $pathcount;
    $g->{'offset'} = [$g->{'roffset'}[0] + $orgx,
                      $g->{'roffset'}[1] + $orgy];
    $adv = (defined $g->{'adv'} ? $g->{'adv'} : $f->{'hmtx'}{'advance'}[$g->{'gid'}] * $s)
            + $g->{'offset'}[0];
    
    if ($glyph = $g->{'glyph'})
    {
        $glyph->read->get_points;
        $pathcount += scalar @{$glyph->{'endPoints'}} if (defined $glyph->{'endpoints'});

        push (@{$g->{'glyph_list'}}, pos_glyphs($f, $g->{'gid'}, $glyph, @{$g->{'offset'}}, $g->{'scale'}, $s));

        $xMin = $glyph->{'xMin'} * $s;
        $yMin = $glyph->{'yMin'} * $s;
        $xMax = $glyph->{'xMax'} * $s;
        $yMax = $glyph->{'yMax'} * $s;
    }
    elsif (!defined $g->{'glyph_list'})
    { $g->{'glyph_list'} = []; }



( run in 0.899 second using v1.01-cache-2.11-cpan-2b1a40005be )