Merge commit '940bb9827585885c6eaef9b1d4c62a38f4e81ea9' into harfbuzz

Conflicts:
	tests/visual_tests/test.py
This commit is contained in:
Hermann Kraus 2013-03-16 12:21:31 +01:00
commit 606361b75c

View file

@ -7,8 +7,7 @@ import os.path
from compare import compare, summary from compare import compare, summary
defaults = { defaults = {
'sizes': [(500, 100)], 'sizes': [(500, 100)]
'bbox': mapnik.Box2d(-0.05, -0.01, 0.95, 0.01)
} }
sizes_many_in_big_range = [(800, 100), (600, 100), (400, 100), sizes_many_in_big_range = [(800, 100), (600, 100), (400, 100),
@ -18,40 +17,43 @@ sizes_few_square = [(800, 800), (600, 600), (400, 400), (200, 200)]
sizes_many_in_small_range = [(490, 100), (495, 100), (497, 100), (498, 100), sizes_many_in_small_range = [(490, 100), (495, 100), (497, 100), (498, 100),
(499, 100), (500, 100), (501, 100), (502, 100), (505, 100), (510, 100)] (499, 100), (500, 100), (501, 100), (502, 100), (505, 100), (510, 100)]
default_text_box = mapnik.Box2d(-0.05, -0.01, 0.95, 0.01)
dirname = os.path.dirname(__file__) dirname = os.path.dirname(__file__)
files = [ files = [
{'name': "list", 'sizes': sizes_many_in_big_range}, {'name': "list", 'sizes': sizes_many_in_big_range,'bbox':default_text_box},
{'name': "simple", 'sizes': sizes_many_in_big_range}, {'name': "simple", 'sizes': sizes_many_in_big_range,'bbox':default_text_box},
{'name': "lines-1", 'sizes': sizes_few_square}, {'name': "lines-1", 'sizes': sizes_few_square,'bbox':default_text_box},
{'name': "lines-2", 'sizes': sizes_few_square}, {'name': "lines-2", 'sizes': sizes_few_square,'bbox':default_text_box},
{'name': "lines-3", 'sizes': sizes_few_square}, {'name': "lines-3", 'sizes': sizes_few_square,'bbox':default_text_box},
{'name': "lines-4", 'sizes': sizes_few_square}, {'name': "lines-4", 'sizes': sizes_few_square},
{'name': "lines-5", 'sizes': sizes_few_square}, {'name': "lines-5", 'sizes': sizes_few_square},
{'name': "lines-6", 'sizes': sizes_few_square}, {'name': "lines-6", 'sizes': sizes_few_square},
{'name': "lines-shield", 'sizes': sizes_few_square}, {'name': "lines-shield", 'sizes': sizes_few_square,'bbox':default_text_box},
{'name': "simple-E"}, {'name': "simple-E", 'bbox':mapnik.Box2d(-0.05, -0.01, 0.95, 0.01)},
{'name': "simple-NE"}, {'name': "simple-NE",'bbox':default_text_box},
{'name': "simple-NW"}, {'name': "simple-NW",'bbox':default_text_box},
{'name': "simple-N"}, {'name': "simple-N",'bbox':default_text_box},
{'name': "simple-SE"}, {'name': "simple-SE",'bbox':default_text_box},
{'name': "simple-SW"}, {'name': "simple-SW",'bbox':default_text_box},
{'name': "simple-S"}, {'name': "simple-S",'bbox':default_text_box},
{'name': "simple-W"}, {'name': "simple-W",'bbox':default_text_box},
{'name': "formatting"}, {'name': "formatting-1",'bbox':default_text_box},
{'name': "formatting-1"}, {'name': "formatting-2",'bbox':default_text_box},
{'name': "formatting-2"}, {'name': "formatting-3",'bbox':default_text_box},
{'name': "formatting-3"}, {'name': "formatting-4",'bbox':default_text_box},
{'name': "formatting-4"}, {'name': "formatting", 'bbox':default_text_box},
{'name': "expressionformat"}, {'name': "expressionformat",'bbox':default_text_box},
{'name': "shieldsymbolizer-1", 'sizes': sizes_many_in_small_range}, {'name': "shieldsymbolizer-1", 'sizes': sizes_many_in_small_range,'bbox':default_text_box},
{'name': "rtl-point", 'sizes': [(200, 200)],'bbox':default_text_box},
{'name': "jalign-auto", 'sizes': [(200, 200)],'bbox':default_text_box},
{'name': "line-offset", 'sizes':[(900, 250)],'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)},
{'name': "tiff-alpha-gdal", 'sizes':[(600,400)]},
{'name': "tiff-alpha-raster", 'sizes':[(600,400)]},
{'name': "shieldsymbolizer-2"}, {'name': "shieldsymbolizer-2"},
{'name': "shieldsymbolizer-3"}, {'name': "shieldsymbolizer-3"},
{'name': "shieldsymbolizer-4"}, {'name': "shieldsymbolizer-4"},
{'name': "rtl-point", 'sizes': [(200, 200)]},
{'name': "jalign-auto", 'sizes': [(200, 200)]},
{'name': "line-offset", 'sizes':[(900, 250)],
'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)},
{'name': "orientation", 'sizes': [(800, 200)]}, {'name': "orientation", 'sizes': [(800, 200)]},
{'name': "hb-fontsets", 'sizes': [(800, 200)]}, {'name': "hb-fontsets", 'sizes': [(800, 200)]},
{'name': "charspacing", 'sizes': [(200, 400)]}, {'name': "charspacing", 'sizes': [(200, 400)]},
@ -108,7 +110,7 @@ if __name__ == "__main__":
config = dict(defaults) config = dict(defaults)
config.update(f) config.update(f)
for size in config['sizes']: for size in config['sizes']:
m = render(config['name'], size[0], size[1], config['bbox'], quiet=quiet) m = render(config['name'], size[0], size[1], config.get('bbox'), quiet=quiet)
mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % config['name'])) mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % config['name']))
summary() summary(generate=False)