X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e316fc14bef26f958937aec0e6854b61f71a3b34..09dded3d8606e8e4406fffcf477ceb4a1c97fee2:/font-optimizer/gen-tests.pl?ds=inline
diff --git a/font-optimizer/gen-tests.pl b/font-optimizer/gen-tests.pl
deleted file mode 100644
index 63bb153..0000000
--- a/font-optimizer/gen-tests.pl
+++ /dev/null
@@ -1,235 +0,0 @@
-# This script generates various 'interesting' fonts, and outputs an HTML file
-# containing the subsetted fonts and the original fonts.
-# View the output in browsers (preferably multiple, on multiple platforms) to
-# make sure the output looks the same as the original.
-
-use strict;
-use warnings;
-
-use lib 'ext/Font-TTF/lib';
-use Font::Subsetter;
-use Font::EOTWrapper;
-use Encode;
-use Clone;
-
-use utf8;
-
-# The following fonts need to exist in a directory called 'testfonts':
-my @all = qw(
- GenBasR.ttf
- GenR102.TTF
- LinLibertine_Re-4.1.8.ttf
- DoulosSILR.ttf
- DejaVuSans.ttf
- DejaVuSerif.ttf
- calibri.ttf
- FedraSansPro-Demi.ttf
-);
-
-my $index = $ARGV[0];
-die "Run '$0', or '$0 n' where n is the number of the test to rebuild\n"
- if defined $index and $index !~ /^\d+$/;
-
-my @tests = (
- # These aren't proper tests (they drop features that affect the rendering)
- # TODO: fix them so they are proper, and test that they're really dropping the
- # unneeded glyphs etc
-# [ [qw(DejaVuSans.ttf FedraSansPro-Demi.ttf)], ["fluffily Ùا f"], [20], [qw(aalt ccmp dlig fina hlig init liga locl medi rlig salt kern mark mkmk)] ],
-# [ [qw(DejaVuSans.ttf FedraSansPro-Demi.ttf)], ["fluffily Ùا f"], [20], [qw(liga)] ],
-# [ [qw(DejaVuSans.ttf FedraSansPro-Demi.ttf)], ["fluffily Ùا f"], [20], [qw(fina init rlig)] ],
-# [ [qw(DejaVuSans.ttf FedraSansPro-Demi.ttf)], ["fluffily Ùا f"], [20], [] ],
-
- # Basic rendering
- [ [@all], ["Hello world ABC abc 123"], [20] ],
-
- # Substitution and NFC issues
- [ [qw(GenBasR.ttf DejaVuSans.ttf FedraSansPro-Demi.ttf)], [
- "i",
- "\xec",
- "i\x{0300}",
- "i \x{0300}",
- "ixixi",
- "i\x{0300}",
- ], [20, 8] ],
- [ [qw(DejaVuSans.ttf FedraSansPro-Demi.ttf)], [
- "s\x{0323}\x{0307}", # s, combining dot below, combining dot above
- "s\x{0307}\x{0323}", # s, combining dot above, combining dot below
- "\x{1e61}\x{0323}", # s with dot above, combining dot below
- "\x{1e63}\x{0307}", # s with dot below, combining dot above
- "\x{212b}", # angstrom
- ], [20, 8] ],
-
- # Ligature rendering
- [ [qw(LinLibertine_Re-4.1.8.ttf DejaVuSans.ttf FedraSansPro-Demi.ttf)], [
- "fluffily",
- "fluffily",
- "fluffily",
- ], [20, 8] ],
-
- # GPOS issues
- [ [qw(DejaVuSans.ttf FedraSansPro-Demi.ttf calibri.ttf)],
- ["|VAVAV|", "ToToT", "x//x"], [20], ['kern'] ],
-
- # Lots of stuff
- [ [@all], ["VABC(123) fTo fluffiest ffi!\@#,. \x{00e2}\x{00eb}I\x{0303}o\x{0300}u\x{030a}\x{0305}\x{0303} i\x{0331}\x{0301} \x{0d23}\x{0d4d}\x{200d} ÏαÏÎ±ÎºÎ±Î»Ï Ñ
Ñлло ä½ å¥½ 表示é®å ãã اÙتÙÙÙÙ ×××"], [20, 8] ],
-
-);
-
-my $common_css = <
-$text
}, (join ' ', map "$_", sort @glyph_names), qq{
}; - print $html qq{}, dump_sizes("testoutput/$path.ttf"), qq{}; - } - print $out "