<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package Font::TTF::Mort::Noncontextual;

=head1 NAME

Font::TTF::Mort::Noncontextual - Noncontextual Mort subtable for AAT

=head1 METHODS

=cut

use strict;
use vars qw(@ISA);
use Font::TTF::Utils;
use Font::TTF::AATutils;

@ISA = qw(Font::TTF::Mort::Subtable);

sub new
{
    my ($class, $direction, $orientation, $subFeatureFlags) = @_;
    my ($self) = {
                    'direction'            =&gt; $direction,
                    'orientation'        =&gt; $orientation,
                    'subFeatureFlags'    =&gt; $subFeatureFlags
                };

    $class = ref($class) || $class;
    bless $self, $class;
}

=head2 $t-&gt;read

Reads the table into memory

=cut

sub read
{
    my ($self, $fh) = @_;
    my ($dat);
    
    my ($format, $lookup) = AAT_read_lookup($fh, 2, $self-&gt;{'length'} - 8, undef);
    $self-&gt;{'format'} = $format;
    $self-&gt;{'lookup'} = $lookup;

    $self;
}

=head2 $t-&gt;pack_sub($fh)

=cut

sub pack_sub
{
    my ($self) = @_;
    
    return AAT_pack_lookup($self-&gt;{'format'}, $self-&gt;{'lookup'}, 2, undef);
}

=head2 $t-&gt;print($fh)

Prints a human-readable representation of the table

=cut

sub print
{
    my ($self, $fh) = @_;
    
    my $post = $self-&gt;post();
    
    $fh = 'STDOUT' unless defined $fh;

    my $lookup = $self-&gt;{'lookup'};
    $fh-&gt;printf("\t\tLookup format %d\n", $self-&gt;{'format'});
    if (defined $lookup) {
        foreach (sort { $a &lt;=&gt; $b } keys %$lookup) {
            $fh-&gt;printf("\t\t\t%d [%s] -&gt; %d [%s])\n", $_, $post-&gt;{'VAL'}[$_], $lookup-&gt;{$_}, $post-&gt;{'VAL'}[$lookup-&gt;{$_}]);
        }
    }
}

1;

=head1 BUGS

None known

=head1 AUTHOR

Jonathan Kew L&lt;Jonathan_Kew@sil.org&gt;. See L&lt;Font::TTF::Font&gt; for copyright and
licensing.

=cut

</pre></body></html>