if a directory is not passed to register_fonts, then assume it is a font file and try registering it
This commit is contained in:
parent
2fa027855a
commit
e0a765429f
1 changed files with 7 additions and 1 deletions
|
@ -88,7 +88,13 @@ bool freetype_engine::register_font(std::string const& file_name)
|
|||
bool freetype_engine::register_fonts(std::string const& dir, bool recurse)
|
||||
{
|
||||
boost::filesystem::path path(dir);
|
||||
if (!boost::filesystem::exists(path) || !boost::filesystem::is_directory(path)) return false;
|
||||
|
||||
if (!boost::filesystem::exists(path))
|
||||
return false;
|
||||
|
||||
if (!boost::filesystem::is_directory(path))
|
||||
return mapnik::freetype_engine::register_font(dir);
|
||||
|
||||
boost::filesystem::directory_iterator end_itr;
|
||||
for (boost::filesystem::directory_iterator itr(dir); itr != end_itr; ++itr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue