register fonts in nik2img util
This commit is contained in:
parent
eb7716aeed
commit
b85ac0d6a5
1 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include <mapnik/image_util.hpp>
|
#include <mapnik/image_util.hpp>
|
||||||
#include <mapnik/graphics.hpp>
|
#include <mapnik/graphics.hpp>
|
||||||
#include <mapnik/datasource_cache.hpp>
|
#include <mapnik/datasource_cache.hpp>
|
||||||
|
#include <mapnik/font_engine_freetype.hpp>
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -84,8 +85,9 @@ int main (int argc,char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
mapnik::datasource_cache::instance().register_datasources("./plugins/input/");
|
mapnik::datasource_cache::instance().register_datasources("./plugins/input/");
|
||||||
|
mapnik::freetype_engine::register_fonts("./fonts",true);
|
||||||
mapnik::Map map(600,400);
|
mapnik::Map map(600,400);
|
||||||
mapnik::load_map(map,xml_file);
|
mapnik::load_map(map,xml_file,true);
|
||||||
map.zoom_all();
|
map.zoom_all();
|
||||||
mapnik::image_32 im(map.width(),map.height());
|
mapnik::image_32 im(map.width(),map.height());
|
||||||
mapnik::agg_renderer<mapnik::image_32> ren(map,im);
|
mapnik::agg_renderer<mapnik::image_32> ren(map,im);
|
||||||
|
|
Loading…
Reference in a new issue