multiface font tests

This commit is contained in:
Dane Springmeyer 2014-08-11 17:30:48 -07:00
parent 6bfd920c6c
commit 9253ce10f8
2 changed files with 16 additions and 1 deletions

View file

@ -16,9 +16,11 @@ before_install:
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sudo apt-get update -qq
- sudo apt-get install -y make valgrind libgdal-dev libgdal1-dev libgdal1h=1.10.0-1~precise1 boost1.55 python-nose libicu-dev libpng-dev libjpeg-dev libtiff-dev libwebp-dev libz-dev libfreetype6-dev libxml2-dev libproj-dev libcairo-dev python-cairo-dev libsqlite3-dev
# multi-face ttc font: https://github.com/mapnik/mapnik/issues/2274
- sudo apt-get install ttf-wqy-microhei
script:
- ./configure CXX=${CXX} CC=${CC} XML_PARSER=$XML_PARSER DEBUG=False DEMO=True BENCHMARK=True BINDINGS='python' CPP_TESTS=True CAIRO=True FAST=True
- ./configure CXX=${CXX} CC=${CC} XML_PARSER=$XML_PARSER DEBUG=False DEMO=True BENCHMARK=False BINDINGS='python' CPP_TESTS=True CAIRO=True FAST=True
- JOBS=6 make
- make test-local
- sudo make install

View file

@ -87,6 +87,19 @@ int main(int argc, char** argv)
face_names = mapnik::freetype_engine::face_names();
//std::clog << "number of registered fonts: " << face_names.size() << std::endl;
BOOST_TEST( face_names.size() == 22 );
// now blindly register as many system fonts as possible
// the goal here to make sure we don't crash
// linux
mapnik::freetype_engine::register_fonts("/usr/share/fonts/", true);
mapnik::freetype_engine::register_fonts("/usr/local/share/fonts/", true);
// osx
mapnik::freetype_engine::register_fonts("/Library/Fonts/", true);
mapnik::freetype_engine::register_fonts("/System/Library/Fonts/", true);
// windows
mapnik::freetype_engine::register_fonts("C:\\Windows\\Fonts", true);
face_names = mapnik::freetype_engine::face_names();
BOOST_TEST( face_names.size() > 22 );
}
catch (std::exception const & ex)
{