diff --git a/.travis.yml b/.travis.yml index e0fe7ec51..47cf2286d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tests/cpp_tests/font_registration_test.cpp b/tests/cpp_tests/font_registration_test.cpp index 93a9d5854..94d65eb47 100644 --- a/tests/cpp_tests/font_registration_test.cpp +++ b/tests/cpp_tests/font_registration_test.cpp @@ -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) {