1.Added 'face_names' method which returns list of face names:
>>> from mapnik import * >>> for name in FontEngine.instance().face_names(): ... print name ... DejaVu Sans Bold DejaVu Sans Bold Oblique .... 2. std::vector<std::string> is reflected as mapnik_.Names object TODO: test if there are more then one face in the file
This commit is contained in:
parent
c0d411d14e
commit
0e9c542d11
2 changed files with 7 additions and 5 deletions
|
@ -39,6 +39,8 @@ void export_font_engine()
|
|||
class_<freetype_engine,bases<singleton<freetype_engine,CreateStatic> >,
|
||||
boost::noncopyable>("FontEngine",no_init)
|
||||
.def("register_font",&freetype_engine::register_font)
|
||||
.def("face_names",&freetype_engine::face_names)
|
||||
.staticmethod("register_font")
|
||||
.staticmethod("face_names")
|
||||
;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ std::vector<std::string> & (mapnik::Layer::*_styles_)() = &mapnik::Layer::styles
|
|||
void export_layer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<std::vector<std::string> >("Styles")
|
||||
class_<std::vector<std::string> >("Names")
|
||||
.def(vector_indexing_suite<std::vector<std::string>,true >())
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in a new issue