X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/ef7911fba9c330552599bc6eb9dc22606246dd7e..68b03397a0872d10d3627cea2b92ae36bd59183c:/font-optimizer/ext/Font-TTF/t/ttfcopy.t diff --git a/font-optimizer/ext/Font-TTF/t/ttfcopy.t b/font-optimizer/ext/Font-TTF/t/ttfcopy.t new file mode 100644 index 0000000..c8969b3 --- /dev/null +++ b/font-optimizer/ext/Font-TTF/t/ttfcopy.t @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +use Test::Simple tests => 2; +use File::Compare; +use Font::TTF::Font; + +$f = Font::TTF::Font->open("t/testfont.ttf"); +ok($f); +$f->tables_do(sub { $_[0]->read; }); +$f->{'loca'}->glyphs_do(sub {$_[0]->read_dat; }); +$f->out("t/temp.ttf"); +$res = compare("t/temp.ttf", "t/testfont.ttf"); +ok(!$res); +unlink "t/temp.ttf" unless ($res); +