+
+ if( !isSetbyString )
+ {
+ Property::Map map;
+
+ if( weightDefined )
+ {
+ if( TextAbstraction::FontWeight::NONE != weight )
+ {
+ const std::string weightStr( GetEnumerationName( weight,
+ FONT_WEIGHT_STRING_TABLE,
+ FONT_WEIGHT_STRING_TABLE_COUNT ) );
+
+ map.Insert( WEIGHT_KEY, weightStr );
+ }
+ }
+
+ if( widthDefined )
+ {
+ if( TextAbstraction::FontWidth::NONE != width )
+ {
+ const std::string widthStr( GetEnumerationName( width,
+ FONT_WIDTH_STRING_TABLE,
+ FONT_WIDTH_STRING_TABLE_COUNT ) );
+
+ map.Insert( WIDTH_KEY, widthStr );
+ }
+ }
+
+ if( slantDefined )
+ {
+ if( TextAbstraction::FontSlant::NONE != slant )
+ {
+ const std::string slantStr( GetEnumerationName( slant,
+ FONT_SLANT_STRING_TABLE,
+ FONT_SLANT_STRING_TABLE_COUNT ) );
+
+ map.Insert( SLANT_KEY, slantStr );
+ }
+ }
+
+ value = map;
+ } // SetbyMAP
+ else
+ {
+ std::string fontStyleProperties = "{";
+
+ if( weightDefined )
+ {
+ if( TextAbstraction::FontWeight::NONE != weight )
+ {
+ const std::string weightStr( GetEnumerationName( weight,
+ FONT_WEIGHT_STRING_TABLE,
+ FONT_WEIGHT_STRING_TABLE_COUNT ) );
+
+ fontStyleProperties += "\"weight\":\"" + weightStr + "\",";
+ }
+ }
+
+ if( widthDefined )
+ {
+ if( TextAbstraction::FontWidth::NONE != width )
+ {
+ const std::string widthStr( GetEnumerationName( width,
+ FONT_WIDTH_STRING_TABLE,
+ FONT_WIDTH_STRING_TABLE_COUNT ) );
+ fontStyleProperties += "\"width\":\"" + widthStr + "\",";
+ }
+ }
+
+ if( slantDefined )
+ {
+ if( TextAbstraction::FontSlant::NONE != slant )
+ {
+ const std::string slantStr( GetEnumerationName( slant,
+ FONT_SLANT_STRING_TABLE,
+ FONT_SLANT_STRING_TABLE_COUNT ) );
+
+ fontStyleProperties += "\"slant\":\"" + slantStr + "\"";
+ }
+ }
+
+ // If last character is comma, it will be removed.
+ if((*fontStyleProperties.rbegin()) == ',' )
+ {
+ fontStyleProperties = fontStyleProperties.substr( 0, fontStyleProperties.size()-1 );
+ }
+ fontStyleProperties += "}";
+
+ value = fontStyleProperties;
+ } // SetbyString
+ }// controller