expose the name2file mapping of font family/style and font file publically so apps can ask mapnik where a given font face was found on the filesystem

This commit is contained in:
Dane Springmeyer 2011-07-29 18:03:45 +00:00
parent 53e0b22c2b
commit 81bf8b3d06
2 changed files with 8 additions and 1 deletions

View file

@ -237,7 +237,8 @@ public:
static bool is_font_file(std::string const& file_name);
static bool register_font(std::string const& file_name);
static bool register_fonts(std::string const& dir, bool recurse = false);
static std::vector<std::string> face_names ();
static std::vector<std::string> face_names();
static std::map<std::string,std::string> const& get_mapping();
face_ptr create_face(std::string const& family_name);
stroker_ptr create_stroker();
virtual ~freetype_engine();

View file

@ -143,6 +143,12 @@ std::vector<std::string> freetype_engine::face_names ()
return names;
}
std::map<std::string,std::string> const& freetype_engine::get_mapping()
{
return name2file_;
}
face_ptr freetype_engine::create_face(std::string const& family_name)
{
std::map<std::string,std::string>::iterator itr;