From 75b17618058c045f6b1e53252b781b781d2355be Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 18 Dec 2013 09:08:38 -0500 Subject: [PATCH 1/4] mapnik-config build: fix relative path to libmapnik --- bin/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build.py b/bin/build.py index a71bea8b4..c2cb05f1b 100644 --- a/bin/build.py +++ b/bin/build.py @@ -144,7 +144,7 @@ write_config(configuration,template,config_file) target_path = os.path.normpath(os.path.join(config_env['INSTALL_PREFIX'],'bin')) full_target = os.path.join(target_path,config_file) -Depends(full_target, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME'])) +Depends(full_target, env.subst('../src/%s' % env['MAPNIK_LIB_NAME'])) if 'install' in COMMAND_LINE_TARGETS: # we must add 'install' catch here because otherwise From e52b4ebf9a2d9eba1c88a0a8207ddc378c276307 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 18 Dec 2013 12:22:40 -0500 Subject: [PATCH 2/4] harfbuzz_shaper: just call hb_shape not hb_shape_full --- include/mapnik/text/harfbuzz_shaper.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/mapnik/text/harfbuzz_shaper.hpp b/include/mapnik/text/harfbuzz_shaper.hpp index 453a74d80..2b0c5f96e 100644 --- a/include/mapnik/text/harfbuzz_shaper.hpp +++ b/include/mapnik/text/harfbuzz_shaper.hpp @@ -58,7 +58,6 @@ static void shape_text(text_line & line, const std::unique_ptr buffer(hb_buffer_create(),hb_buffer_deleter); hb_buffer_set_unicode_funcs(buffer.get(), hb_icu_get_unicode_funcs()); hb_buffer_pre_allocate(buffer.get(), length); - const char* const shapers[] = { "ot", "fallback", NULL }; for (auto const& text_item : list) { @@ -74,7 +73,7 @@ static void shape_text(text_line & line, hb_buffer_set_script(buffer.get(), hb_icu_script_to_script(text_item.script)); face_ptr const& face = *face_itr; hb_font_t *font(hb_ft_font_create(face->get_face(), nullptr)); - hb_shape_full(font, buffer.get(), NULL, 0, shapers); + hb_shape(font, buffer.get(), NULL, 0); hb_font_destroy(font); unsigned num_glyphs = hb_buffer_get_length(buffer.get()); From 453c29c09fd71ac493450eefa3b45c0b5878df87 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 20 Dec 2013 17:15:41 -0500 Subject: [PATCH 3/4] 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 2108b08fa..c75140da9 100644 --- a/bindings/python/mapnik/__init__.py +++ b/bindings/python/mapnik/__init__.py @@ -1025,7 +1025,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 f8b97ce69..ee7926cab 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -73,6 +73,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")); } From 55ca9f73ed257954f71aa800c4cc983c1cdd5cf8 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 20 Dec 2013 17:28:37 -0500 Subject: [PATCH 4/4] add woff support to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 241f3944c..92629c520 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ Released ... Summary: TODO +- Added support for web fonts: .woff format (#2113) + - Added missing support for `geometry-transform` in `line-pattern` and `polygon-pattern` symbolizers (#2065) - Dropped support for Sun compiler