bool Map::insert_fontset(std::string const& name, font_set const& fontset) { if (fontset.get_name() != name) { throw mapnik::config_error("Fontset name must match the name used to reference it on the map"); } return fontsets_.emplace(name, fontset).second; }
face_set_ptr face_manager::get_face_set(font_set const& fset) { std::vector<std::string> const& names = fset.get_face_names(); face_set_ptr face_set = std::make_unique<font_face_set>(); for (auto const& name : names) { face_ptr face = get_face(name); if (face) { face_set->add(face); } #ifdef MAPNIK_LOG else { MAPNIK_LOG_DEBUG(font_engine_freetype) << "Failed to find face '" << name << "' in font set '" << fset.get_name() << "'\n"; } #endif } return face_set; }
face_set_ptr face_manager<T>::get_face_set(const font_set &fset) { std::vector<std::string> const& names = fset.get_face_names(); face_set_ptr face_set = std::make_shared<font_face_set>(); for (std::vector<std::string>::const_iterator name = names.begin(); name != names.end(); ++name) { face_ptr face = get_face(*name); if (face) { face_set->add(face); } #ifdef MAPNIK_LOG else { MAPNIK_LOG_DEBUG(font_engine_freetype) << "Failed to find face '" << *name << "' in font set '" << fset.get_name() << "'\n"; } #endif } return face_set; }
static boost::python::tuple getinitargs(const font_set& fs) { return boost::python::make_tuple(fs.get_name()); }