debug font crash - refs #2341

This commit is contained in:
Dane Springmeyer 2014-08-10 20:35:23 -07:00
parent c285cfa188
commit 48078da22d
2 changed files with 4 additions and 0 deletions

View file

@ -52,3 +52,6 @@ before_script:
script:
- if [[ ${BENCHMARK} != False ]]; then make bench; fi;
# install some exotic fonts to ensure we don't crash registering them
- sudo apt-get install ttf-*
- python -c "import mapnik;mapnik.logger.set_severity(mapnik.severity_type.Debug);mapnik.register_fonts('/usr/share/fonts/');mapnik.register_fonts('/usr/share/fonts/');print '\n'.join(list(mapnik.FontEngine.instance().face_names()))"

View file

@ -132,6 +132,7 @@ bool freetype_engine::register_font(std::string const& file_name)
bool freetype_engine::register_font_impl(std::string const& file_name, FT_LibraryRec_ * library)
{
MAPNIK_LOG_DEBUG(font_engine_freetype) << "registering: " << file_name;
#ifdef _WINDOWS
FILE * file = _wfopen(mapnik::utf8_to_utf16(file_name).c_str(), L"rb");
#else