From 448d093f770438971e88d67b4021cd6dcb29b93b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 20 Dec 2013 17:15:41 -0500 Subject: [PATCH] accept woff (web font) format - closes #2113 --- bindings/python/mapnik/__init__.py | 2 +- src/font_engine_freetype.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/python/mapnik/__init__.py b/bindings/python/mapnik/__init__.py index b0afbcf3c..03681eabc 100644 --- a/bindings/python/mapnik/__init__.py +++ b/bindings/python/mapnik/__init__.py @@ -1030,7 +1030,7 @@ def register_plugins(path=None): path = inputpluginspath DatasourceCache.register_datasources(path) -def register_fonts(path=None,valid_extensions=['.ttf','.otf','.ttc','.pfa','.pfb','.ttc','.dfont']): +def register_fonts(path=None,valid_extensions=['.ttf','.otf','.ttc','.pfa','.pfb','.ttc','.dfont','.woff']): """Recursively register fonts using path argument as base directory""" if not path: if os.environ.has_key('MAPNIK_FONT_DIRECTORY'): diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index 9e368d9f4..b6581c56b 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -83,6 +83,7 @@ bool freetype_engine::is_font_file(std::string const& file_name) boost::algorithm::ends_with(fn,std::string(".pfa")) || boost::algorithm::ends_with(fn,std::string(".pfb")) || boost::algorithm::ends_with(fn,std::string(".ttc")) || + boost::algorithm::ends_with(fn,std::string(".woff"))|| // Plus OSX custom ext boost::algorithm::ends_with(fn,std::string(".dfont")); }