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

=head1 NAME

Font::TTF::Cvt_ - Control Value Table in a TrueType font

=head1 DESCRIPTION

This is a minimal class adding nothing beyond a table, but is a repository
for cvt type information for those processes brave enough to address hinting.

=head1 INSTANCE VARIABLES

=over 4

=item val

This is an array of CVT values. Thus access to the CVT is via:

    $f-&gt;{'cvt_'}{'val'}[$num];

=back    

=head1 METHODS

=cut

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

@ISA = qw(Font::TTF::Table);

$VERSION = 0.0001;

=head2 $t-&gt;read

Reads the CVT table into both the tables C&lt;' dat'&gt; variable and the C&lt;val&gt;
array.

=cut

sub read
{
    my ($self) = @_;

    $self-&gt;read_dat || return undef;
    $self-&gt;{' read'} = 1;
    $self-&gt;{'val'} = [TTF_Unpack("s*", $self-&gt;{' dat'})];
    $self;
}


=head2 $t-&gt;update

Updates the RAM file copy C&lt;' dat'&gt; to be the same as the array.

=cut

sub update
{
    my ($self) = @_;

    return undef unless ($self-&gt;{' read'} &amp;&amp; $#{$self-&gt;{'val'}} &gt;= 0);
    $self-&gt;{' dat'} = TTF_Pack("s*", @{$self-&gt;{'val'}});
    $self;
}

1;

=head1 BUGS

None known

=head1 AUTHOR

Martin Hosken Martin_Hosken@sil.org. See L&lt;Font::TTF::Font&gt; for copyright and
licensing.

=cut

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