diff --git a/bindings/python/mapnik_text_symbolizer.cpp b/bindings/python/mapnik_text_symbolizer.cpp index 8e269b933..bc1edae9b 100644 --- a/bindings/python/mapnik_text_symbolizer.cpp +++ b/bindings/python/mapnik_text_symbolizer.cpp @@ -189,6 +189,7 @@ void export_text_symbolizer() .value("NONE",NONE) .value("UPPERCASE",UPPERCASE) .value("LOWERCASE",LOWERCASE) + .value("CAPITALIZE",CAPITALIZE) ; class_("TextSymbolizer",init()) diff --git a/include/mapnik/text_symbolizer.hpp b/include/mapnik/text_symbolizer.hpp index da05565c7..1b6be80eb 100644 --- a/include/mapnik/text_symbolizer.hpp +++ b/include/mapnik/text_symbolizer.hpp @@ -86,6 +86,7 @@ enum text_transform NONE = 0, UPPERCASE, LOWERCASE, + CAPITALIZE, text_transform_MAX }; diff --git a/src/agg/process_shield_symbolizer.cpp b/src/agg/process_shield_symbolizer.cpp index 6477ba9f9..730664faf 100644 --- a/src/agg/process_shield_symbolizer.cpp +++ b/src/agg/process_shield_symbolizer.cpp @@ -61,6 +61,10 @@ void agg_renderer::process(shield_symbolizer const& sym, { text = text.toLower(); } + else if ( sym.get_text_transform() == CAPITALIZE) + { + text = text.toTitle(NULL); + } agg::trans_affine tr; boost::array const& m = sym.get_transform(); diff --git a/src/agg/process_text_symbolizer.cpp b/src/agg/process_text_symbolizer.cpp index 965424ce4..b0dade971 100644 --- a/src/agg/process_text_symbolizer.cpp +++ b/src/agg/process_text_symbolizer.cpp @@ -55,6 +55,10 @@ void agg_renderer::process(text_symbolizer const& sym, { text = text.toLower(); } + else if ( sym.get_text_transform() == CAPITALIZE) + { + text = text.toTitle(NULL); + } if ( text.length() > 0 ) { diff --git a/src/text_symbolizer.cpp b/src/text_symbolizer.cpp index f46c948e1..1f9b23191 100644 --- a/src/text_symbolizer.cpp +++ b/src/text_symbolizer.cpp @@ -75,6 +75,7 @@ static const char * text_transform_strings[] = { "none", "uppercase", "lowercase", + "capitalize", "" };