Skip to content

Commit

Permalink
Disabled test run
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 12, 2020
1 parent 7dfc510 commit 678fa88
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/core/textrenderer/qgstextcharacterformat.cpp
Expand Up @@ -22,6 +22,8 @@ QgsTextCharacterFormat::QgsTextCharacterFormat( const QTextCharFormat &format )
#if 0 // settings which affect font metrics are disabled for now
, mFontWeight( format.hasProperty( QTextFormat::FontWeight ) ? format.fontWeight() : -1 )
, mItalic( format.hasProperty( QTextFormat::FontItalic ) ? ( format.fontItalic() ? BooleanValue::SetTrue : BooleanValue::SetFalse ) : BooleanValue::NotSet )
, mFontPointSize( format.hasProperty( QTextFormat::FontPointSize ) ? format.fontPointSize() : - 1 )
, mFontFamily( format.hasProperty( QTextFormat::FontFamily ) ? format.fontFamily() : QString() )
#endif
, mStrikethrough( format.hasProperty( QTextFormat::FontStrikeOut ) ? ( format.fontStrikeOut() ? BooleanValue::SetTrue : BooleanValue::SetFalse ) : BooleanValue::NotSet )
, mUnderline( format.hasProperty( QTextFormat::FontUnderline ) ? ( format.fontUnderline() ? BooleanValue::SetTrue : BooleanValue::SetFalse ) : BooleanValue::NotSet )
Expand Down Expand Up @@ -72,19 +74,23 @@ void QgsTextCharacterFormat::setOverline( QgsTextCharacterFormat::BooleanValue e

void QgsTextCharacterFormat::updateFontForFormat( QFont &font ) const
{
if ( mUnderline != BooleanValue::NotSet )
font.setUnderline( mUnderline == QgsTextCharacterFormat::BooleanValue::SetTrue );
if ( mOverline != BooleanValue::NotSet )
font.setOverline( mOverline == QgsTextCharacterFormat::BooleanValue::SetTrue );
if ( mStrikethrough != QgsTextCharacterFormat::BooleanValue::NotSet )
font.setStrikeOut( mStrikethrough == QgsTextCharacterFormat::BooleanValue::SetTrue );

#if 0 // settings which affect font metrics are disabled for now
if ( mItalic != QgsTextCharacterFormat::BooleanValue::NotSet )
font.setItalic( mItalic == QgsTextCharacterFormat::BooleanValue::SetTrue );
if ( mFontWeight != -1 )
font.setWeight( mFontWeight );
if ( !mFontFamily.isEmpty() )
font.setFamily( mFontFamily );
if ( mFontPointSize != -1 )
font.setPointSizeF( mFontPointSize );
#endif

if ( mUnderline != BooleanValue::NotSet )
font.setUnderline( mUnderline == QgsTextCharacterFormat::BooleanValue::SetTrue );
if ( mOverline != BooleanValue::NotSet )
font.setOverline( mOverline == QgsTextCharacterFormat::BooleanValue::SetTrue );
if ( mStrikethrough != QgsTextCharacterFormat::BooleanValue::NotSet )
font.setStrikeOut( mStrikethrough == QgsTextCharacterFormat::BooleanValue::SetTrue );
}

#if 0 // settings which affect font metrics are disabled for now
Expand Down
2 changes: 2 additions & 0 deletions src/core/textrenderer/qgstextcharacterformat.h
Expand Up @@ -163,6 +163,8 @@ class CORE_EXPORT QgsTextCharacterFormat
#if 0 // settings which affect font metrics are disabled for now
int mFontWeight = -1;
BooleanValue mItalic = BooleanValue::NotSet;
double mFontPointSize = -1;
QString mFontFamily;
#endif

BooleanValue mStrikethrough = BooleanValue::NotSet;
Expand Down

0 comments on commit 678fa88

Please sign in to comment.