diff --git a/include/mapnik/text/face.hpp b/include/mapnik/text/face.hpp index 7624aa290..0a4908ff0 100644 --- a/include/mapnik/text/face.hpp +++ b/include/mapnik/text/face.hpp @@ -36,7 +36,7 @@ extern "C" } //stl -#include +#include #include #include #include @@ -47,6 +47,7 @@ namespace mapnik class font_face : mapnik::noncopyable { public: + using glyph_info_cache_type = std::unordered_map; font_face(FT_Face face); std::string family_name() const @@ -75,7 +76,7 @@ public: private: FT_Face face_; - mutable std::map glyph_info_cache_; + mutable glyph_info_cache_type glyph_info_cache_; mutable double char_height_; }; using face_ptr = std::shared_ptr; diff --git a/src/text/face.cpp b/src/text/face.cpp index 11afd18cb..3f57bc89a 100644 --- a/src/text/face.cpp +++ b/src/text/face.cpp @@ -64,7 +64,7 @@ bool font_face::set_unscaled_character_sizes() bool font_face::glyph_dimensions(glyph_info & glyph) const { // Check if glyph is already in cache - std::map::const_iterator itr; + glyph_info_cache_type::const_iterator itr; itr = glyph_info_cache_.find(glyph.glyph_index); if (itr != glyph_info_cache_.end()) { glyph = itr->second;