X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e9aeedc51047d8d5e9e45c5253c776f8994da965..3a0c83394d5783715fab2be29fa1a9cfc3574e28:/src/librarian/font-optimizer/ext/Font-TTF/lib/Font/TTF/Fpgm.pm diff --git a/src/librarian/font-optimizer/ext/Font-TTF/lib/Font/TTF/Fpgm.pm b/src/librarian/font-optimizer/ext/Font-TTF/lib/Font/TTF/Fpgm.pm deleted file mode 100644 index 4cc7709..0000000 --- a/src/librarian/font-optimizer/ext/Font-TTF/lib/Font/TTF/Fpgm.pm +++ /dev/null @@ -1,87 +0,0 @@ -package Font::TTF::Fpgm; - -=head1 NAME - -Font::TTF::Fpgm - Font program in a TrueType font. Called when a font is loaded - -=head1 DESCRIPTION - -This is a minimal class adding nothing beyond a table, but is a repository -for fpgm type information for those processes brave enough to address hinting. - -=cut - -use strict; -use vars qw(@ISA $VERSION); - -@ISA = qw(Font::TTF::Table); - -$VERSION = 0.0001; - -=head2 $t->read - -Reading this table is simply a process of reading all the data into the RAM -copy. Nothing more is done with it. - -=cut - -sub read -{ - $_[0]->read_dat; - $_[0]->{' read'} = 1; -} - -=head2 $t->out_xml($context, $depth) - -Outputs Fpgm program as XML - -=cut - -sub out_xml -{ - my ($self, $context, $depth) = @_; - my ($fh) = $context->{'fh'}; - my ($dat); - - $self->read; - $dat = Font::TTF::Utils::XML_binhint($self->{' dat'}); - $dat =~ s/\n(?!$)/\n$depth$context->{'indent'}/omg; - $fh->print("$depth\n"); - $fh->print("$depth$context->{'indent'}$dat"); - $fh->print("$depth\n"); - $self; -} - - -=head2 $t->XML_end($context, $tag, %attrs) - -Parse all that hinting code - -=cut - -sub XML_end -{ - my ($self) = shift; - my ($context, $tag, %attrs) = @_; - - if ($tag eq 'code') - { - $self->{' dat'} = Font::TTF::Utils::XML_hintbin($context->{'text'}); - return $context; - } else - { return $self->SUPER::XML_end(@_); } -} - -1; - -=head1 BUGS - -None known - -=head1 AUTHOR - -Martin Hosken Martin_Hosken@sil.org. See L for copyright and -licensing. - -=cut -