fixup fontset error reporting - a likely problem in mapnik2 upgrade - closes #596
This commit is contained in:
parent
5d46850222
commit
0f0e04e6dc
1 changed files with 11 additions and 6 deletions
|
@ -560,14 +560,19 @@ void map_parser::parse_font(font_set & fset, ptree const & f)
|
||||||
{
|
{
|
||||||
ensure_attrs(f, "Font", "face-name");
|
ensure_attrs(f, "Font", "face-name");
|
||||||
|
|
||||||
std::string face_name = get_attr(f, "face-name", std::string());
|
optional<std::string> face_name = get_opt_attr<std::string>(f, "face-name");
|
||||||
|
if (face_name)
|
||||||
|
{
|
||||||
if ( strict_ )
|
if ( strict_ )
|
||||||
{
|
{
|
||||||
ensure_font_face( face_name );
|
ensure_font_face(*face_name);
|
||||||
|
}
|
||||||
|
fset.add_face_name(*face_name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw config_error(std::string("Must have 'face-name' set"));
|
||||||
}
|
}
|
||||||
|
|
||||||
fset.add_face_name(face_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void map_parser::parse_layer( Map & map, ptree const & lay )
|
void map_parser::parse_layer( Map & map, ptree const & lay )
|
||||||
|
|
Loading…
Add table
Reference in a new issue