1 package Font::TTF::Prep;
5 Font::TTF::Prep - Preparation hinting program. Called when ppem changes
9 This is a minimal class adding nothing beyond a table, but is a repository
10 for prep type information for those processes brave enough to address hinting.
15 use vars qw(@ISA $VERSION);
18 @ISA = qw(Font::TTF::Table);
25 Reads the data using C<read_dat>.
36 =head2 $t->out_xml($context, $depth)
38 Outputs Prep program as XML
44 my ($self, $context, $depth) = @_;
45 my ($fh) = $context->{'fh'};
49 $dat = Font::TTF::Utils::XML_binhint($self->{' dat'});
50 $dat =~ s/\n(?!$)/\n$depth$context->{'indent'}/omg;
51 $fh->print("$depth<code>\n");
52 $fh->print("$depth$context->{'indent'}$dat");
53 $fh->print("$depth</code>\n");
58 =head2 $t->XML_end($context, $tag, %attrs)
60 Parse all that hinting code
67 my ($context, $tag, %attrs) = @_;
71 $self->{' dat'} = Font::TTF::Utils::XML_hintbin($context->{'text'});
74 { return $self->SUPER::XML_end(@_); }
85 Martin Hosken Martin_Hosken@sil.org. See L<Font::TTF::Font> for copyright and