/// Weight key
Property::Value* weightValue = map.Find( WEIGHT_KEY );
- FontWeight weight = TextAbstraction::FontWeight::NONE;
+ FontWeight weight = TextAbstraction::FontWeight::NORMAL;
const bool weightDefined = weightValue != NULL;
if( weightDefined )
{
/// Width key
Property::Value* widthValue = map.Find( WIDTH_KEY );
- FontWidth width = TextAbstraction::FontWidth::NONE;
+ FontWidth width = TextAbstraction::FontWidth::NORMAL;
const bool widthDefined = widthValue != NULL;
if( widthDefined )
{
/// Slant key
Property::Value* slantValue = map.Find( SLANT_KEY );
- FontSlant slant = TextAbstraction::FontSlant::NONE;
+ FontSlant slant = TextAbstraction::FontSlant::NORMAL;
const bool slantDefined = slantValue != NULL;
if( slantDefined )
{
case FontStyle::DEFAULT:
{
// Sets the default font's style values.
- if( !weightDefined ||
- ( weightDefined && ( controller->GetDefaultFontWeight() != weight ) ) )
+ if( weightDefined && ( controller->GetDefaultFontWeight() != weight ) )
{
controller->SetDefaultFontWeight( weight );
}
- if( !widthDefined ||
- ( widthDefined && ( controller->GetDefaultFontWidth() != width ) ) )
+ if( widthDefined && ( controller->GetDefaultFontWidth() != width ) )
{
controller->SetDefaultFontWidth( width );
}
- if( !slantDefined ||
- ( slantDefined && ( controller->GetDefaultFontSlant() != slant ) ) )
+ if( slantDefined && ( controller->GetDefaultFontSlant() != slant ) )
{
controller->SetDefaultFontSlant( slant );
}
case FontStyle::INPUT:
{
// Sets the input font's style values.
- if( !weightDefined ||
- ( weightDefined && ( controller->GetInputFontWeight() != weight ) ) )
+ if( weightDefined && ( controller->GetInputFontWeight() != weight ) )
{
controller->SetInputFontWeight( weight );
}
- if( !widthDefined ||
- ( widthDefined && ( controller->GetInputFontWidth() != width ) ) )
+ if( widthDefined && ( controller->GetInputFontWidth() != width ) )
{
controller->SetInputFontWidth( width );
}
- if( !slantDefined ||
- ( slantDefined && ( controller->GetInputFontSlant() != slant ) ) )
+ if( slantDefined && ( controller->GetInputFontSlant() != slant ) )
{
controller->SetInputFontSlant( slant );
}
break;
}
}
- } // map not empty
- else
- {
- switch( type )
- {
- case FontStyle::DEFAULT:
- {
- controller->SetDefaultFontWeight( TextAbstraction::FontWeight::NONE );
- controller->SetDefaultFontWidth( TextAbstraction::FontWidth::NONE );
- controller->SetDefaultFontSlant( TextAbstraction::FontSlant::NONE );
- break;
- }
- case FontStyle::INPUT:
- {
- controller->SetInputFontWeight( TextAbstraction::FontWeight::NONE );
- controller->SetInputFontWidth( TextAbstraction::FontWidth::NONE );
- controller->SetInputFontSlant( TextAbstraction::FontSlant::NONE );
- break;
- }
- }
}
}
}