diff options
author | Keith Packard <keithp@keithp.com> | 2017-06-29 12:45:18 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-06-29 14:16:26 -0700 |
commit | b618f49bc416a817fafb6a67aa844378690d453c (patch) | |
tree | 9a4e73610b0fb695f83a43c875bea56321a4db0a | |
parent | 621d96d56f9d27061090cb0c075d2ac2651447c1 (diff) |
Specify hinting for tests
Otherwise, the system configuration will take over and probably have
the wrong values.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rwxr-xr-x | test/test.5c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/test.5c b/test/test.5c index 7cc0bcb..0f58ab4 100755 --- a/test/test.5c +++ b/test/test.5c @@ -50,13 +50,17 @@ typedef struct { int test_width = 100; int test_height = 100; +bool dump_out = false; + +string font_style=":hintstyle=hintfull:hinting=true:autohint=false:lcdfilter=lcdlegacy:rgba=none"; +string font_family = "Bitstream Vera Sans-12"; +string font_name = font_family + font_style; -string font_name = "Bitstream Vera Sans-12"; string[*] font_names = { font_name, - "Bitstream Vera Sans-12:bold", - "Bitstream Vera Sans-12:italic", - "Bitstream Vera Sans-12:bold:italic" + font_family + ":bold" + font_style, + font_family + ":italic" + font_style, + font_family + ":bold:italic" + font_style, }; exception test_fail (string reason); @@ -884,6 +888,8 @@ run_image_test (image_test_t t, string srcdir) printf (" failed: %s\n", reason); return false; } + if (dump_out) + Surface::write_to_png (out, t.name + "-out.png"); } if (variations != 0) printf (" (%d minor variations)", variations); @@ -913,6 +919,7 @@ run_quiet_test (quiet_test_t t, string srcdir) string srcdir = "."; if (Environ::check ("SRCDIR")) srcdir = Environ::get ("SRCDIR"); +dump_out = Environ::check("DUMP_OUT"); if (dim (argv) > 1) srcdir = argv[1]; int |