1 package Font::TTF::Mort;
5 Font::TTF::Mort - Glyph Metamorphosis table in a font
14 use Font::TTF::AATutils;
15 use Font::TTF::Mort::Chain;
17 @ISA = qw(Font::TTF::Table);
21 Reads the table into memory
28 my ($dat, $fh, $numChains);
30 $self->SUPER::read or return $self;
32 $fh = $self->{' INFILE'};
35 ($self->{'version'}, $numChains) = TTF_Unpack("vL", $dat);
38 foreach (1 .. $numChains) {
39 my $chain = new Font::TTF::Mort::Chain->new;
41 $chain->{' PARENT'} = $self;
42 push @$chains, $chain;
45 $self->{'chains'} = $chains;
52 Writes the table to a file either from memory or by copying
60 return $self->SUPER::out($fh) unless $self->{' read'};
62 my $chains = $self->{'chains'};
63 $fh->print(TTF_Pack("vL", $self->{'version'}, scalar @$chains));
72 Prints a human-readable representation of the table
80 $self->read unless $self->{' read'};
81 my $feat = $self->{' PARENT'}->{'feat'};
83 my $post = $self->{' PARENT'}->{'post'};
86 $fh = 'STDOUT' unless defined $fh;
88 $fh->printf("version %f\n", $self->{'version'});
90 my $chains = $self->{'chains'};
104 Jonathan Kew L<Jonathan_Kew@sil.org>. See L<Font::TTF::Font> for copyright and