Skip to content

Commit 695e3e2

Browse files
committedJul 30, 2013
Fix rounding in composer item text width calculation
1 parent b54b31e commit 695e3e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/composer/qgscomposeritem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ void QgsComposerItem::drawArrowHead( QPainter* p, double x, double y, double ang
995995
double QgsComposerItem::textWidthMillimeters( const QFont& font, const QString& text ) const
996996
{
997997
QFont metricsFont = scaledFontPixelSize( font );
998-
QFontMetrics fontMetrics( metricsFont );
998+
QFontMetricsF fontMetrics( metricsFont );
999999
return ( fontMetrics.width( text ) / FONT_WORKAROUND_SCALE );
10001000
}
10011001

0 commit comments

Comments
 (0)
Please sign in to comment.