+ ParsePropertyString( fontFamilyValue, map );
+
+ if( map.Empty() )
+ {
+ // There is no map. The font has been passed as a font's family name with no format.
+ controller->SetDefaultFontFamily( fontFamilyValue );
+ }
+ else
+ {
+ /// Family key
+ Property::Value* familyValue = map.Find( FAMILY_KEY );
+
+ std::string fontFamilyName;
+ if( NULL != familyValue )
+ {
+ fontFamilyName = familyValue->Get<std::string>();
+ }
+
+ /// Type key
+ Property::Value* typeValue = map.Find( TYPE_KEY );
+
+ std::string typeStr;
+ if( NULL != typeValue )
+ {
+ typeStr = typeValue->Get<std::string>();
+ }
+
+ if( TokenComparison( SYSTEM_TOKEN, typeStr.c_str(), typeStr.size() ) )
+ {
+ controller->UpdateAfterFontChange( fontFamilyName );
+ }
+ else
+ {
+ controller->SetDefaultFontFamily( fontFamilyName );
+ }
+ }
+ }
+}
+
+void SetFontStyleProperty( ControllerPtr controller, const Property::Value& value, FontStyle::Type type )
+{
+ if( controller )
+ {
+ Property::Map map;
+ if( Property::STRING == value.GetType() )
+ {
+ const std::string& fontStyleProperties = value.Get<std::string>();
+
+ ParsePropertyString( fontStyleProperties, map );
+ controller->FontStyleSetByString( true );
+
+ }
+ else
+ {
+ map = value.Get<Property::Map>();
+ controller->FontStyleSetByString( false );
+ }