Merge branch 'master' into expr-v2

This commit is contained in:
Dane Springmeyer 2014-01-17 19:59:05 -08:00
commit 2b08987903
4 changed files with 5 additions and 3 deletions

View file

@ -14,6 +14,8 @@ Released ...
Summary: TODO Summary: TODO
- Added support for web fonts: .woff format (#2113)
- Added missing support for `geometry-transform` in `line-pattern` and `polygon-pattern` symbolizers (#2065) - Added missing support for `geometry-transform` in `line-pattern` and `polygon-pattern` symbolizers (#2065)
- Dropped support for Sun compiler - Dropped support for Sun compiler

View file

@ -1029,7 +1029,7 @@ def register_plugins(path=None):
path = inputpluginspath path = inputpluginspath
DatasourceCache.register_datasources(path) 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""" """Recursively register fonts using path argument as base directory"""
if not path: if not path:
if os.environ.has_key('MAPNIK_FONT_DIRECTORY'): if os.environ.has_key('MAPNIK_FONT_DIRECTORY'):

View file

@ -58,7 +58,6 @@ static void shape_text(text_line & line,
const std::unique_ptr<hb_buffer_t, decltype(hb_buffer_deleter)> buffer(hb_buffer_create(),hb_buffer_deleter); const std::unique_ptr<hb_buffer_t, decltype(hb_buffer_deleter)> buffer(hb_buffer_create(),hb_buffer_deleter);
hb_buffer_set_unicode_funcs(buffer.get(), hb_icu_get_unicode_funcs()); hb_buffer_set_unicode_funcs(buffer.get(), hb_icu_get_unicode_funcs());
hb_buffer_pre_allocate(buffer.get(), length); hb_buffer_pre_allocate(buffer.get(), length);
const char* const shapers[] = { "ot", "fallback", NULL };
for (auto const& text_item : list) 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)); hb_buffer_set_script(buffer.get(), hb_icu_script_to_script(text_item.script));
face_ptr const& face = *face_itr; face_ptr const& face = *face_itr;
hb_font_t *font(hb_ft_font_create(face->get_face(), nullptr)); 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); hb_font_destroy(font);
unsigned num_glyphs = hb_buffer_get_length(buffer.get()); unsigned num_glyphs = hb_buffer_get_length(buffer.get());

View file

@ -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(".pfa")) ||
boost::algorithm::ends_with(fn,std::string(".pfb")) || boost::algorithm::ends_with(fn,std::string(".pfb")) ||
boost::algorithm::ends_with(fn,std::string(".ttc")) || boost::algorithm::ends_with(fn,std::string(".ttc")) ||
boost::algorithm::ends_with(fn,std::string(".woff"))||
// Plus OSX custom ext // Plus OSX custom ext
boost::algorithm::ends_with(fn,std::string(".dfont")); boost::algorithm::ends_with(fn,std::string(".dfont"));
} }