Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[labels] Fix word and letter spacing truncated to integers
(cherry-picked from 449fcad)
  • Loading branch information
nyalldawson committed Jul 29, 2016
1 parent 6f904fb commit ae211b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgspallabeling.cpp
Expand Up @@ -3362,7 +3362,7 @@ void QgsPalLayerSettings::parseTextStyle( QFont& labelFont,
wordspace = wspacing;
}
}
labelFont.setWordSpacing( sizeToPixel( wordspace, context, fontunits, false, fontSizeMapUnitScale ) );
labelFont.setWordSpacing( scaleToPixelContext( wordspace, context, fontunits, false, fontSizeMapUnitScale ) );

// data defined letter spacing?
double letterspace = labelFont.letterSpacing();
Expand All @@ -3376,7 +3376,7 @@ void QgsPalLayerSettings::parseTextStyle( QFont& labelFont,
letterspace = lspacing;
}
}
labelFont.setLetterSpacing( QFont::AbsoluteSpacing, sizeToPixel( letterspace, context, fontunits, false, fontSizeMapUnitScale ) );
labelFont.setLetterSpacing( QFont::AbsoluteSpacing, scaleToPixelContext( letterspace, context, fontunits, false, fontSizeMapUnitScale ) );

// data defined font capitalization?
QFont::Capitalization fontcaps = labelFont.capitalization();
Expand Down

0 comments on commit ae211b4

Please sign in to comment.