diff --git a/src/app/qgslabelinggui.cpp b/src/app/qgslabelinggui.cpp
index 6bdb6e45982..c4534df5eeb 100644
--- a/src/app/qgslabelinggui.cpp
+++ b/src/app/qgslabelinggui.cpp
@@ -406,7 +406,7 @@ void QgsLabelingGui::updateFont( QFont font )
{
fontSizeUnitString = tr( "map units" );
}
- lblFontName->setText( QString( "%1, %2 %3" ).arg( font.family() ).arg( font.pointSize() ).arg( fontSizeUnitString ) );
+ lblFontName->setText( QString( "%1, %2 %3" ).arg( font.family() ).arg( font.pointSizeF() ).arg( fontSizeUnitString ) );
lblFontPreview->setFont( font );
updatePreview();
}
diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp
index 438cecdadd4..3e115c7a226 100644
--- a/src/core/qgspallabeling.cpp
+++ b/src/core/qgspallabeling.cpp
@@ -263,10 +263,11 @@ void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
placement = ( Placement ) layer->customProperty( "labeling/placement" ).toInt();
placementFlags = layer->customProperty( "labeling/placementFlags" ).toUInt();
QString fontFamily = layer->customProperty( "labeling/fontFamily" ).toString();
- int fontSize = layer->customProperty( "labeling/fontSize" ).toInt();
+ double fontSize = layer->customProperty( "labeling/fontSize" ).toDouble();
int fontWeight = layer->customProperty( "labeling/fontWeight" ).toInt();
bool fontItalic = layer->customProperty( "labeling/fontItalic" ).toBool();
textFont = QFont( fontFamily, fontSize, fontWeight, fontItalic );
+ textFont.setPointSizeF( fontSize ); //double precision needed because of map units
textColor = _readColor( layer, "labeling/textColor" );
enabled = layer->customProperty( "labeling/enabled" ).toBool();
priority = layer->customProperty( "labeling/priority" ).toInt();
@@ -295,7 +296,7 @@ void QgsPalLayerSettings::writeToLayer( QgsVectorLayer* layer )
layer->setCustomProperty( "labeling/placementFlags", ( unsigned int )placementFlags );
layer->setCustomProperty( "labeling/fontFamily", textFont.family() );
- layer->setCustomProperty( "labeling/fontSize", textFont.pointSize() );
+ layer->setCustomProperty( "labeling/fontSize", textFont.pointSizeF() );
layer->setCustomProperty( "labeling/fontWeight", textFont.weight() );
layer->setCustomProperty( "labeling/fontItalic", textFont.italic() );
diff --git a/src/ui/qgslabelingguibase.ui b/src/ui/qgslabelingguibase.ui
index 6679174dc9a..1c892e82fa2 100644
--- a/src/ui/qgslabelingguibase.ui
+++ b/src/ui/qgslabelingguibase.ui
@@ -6,8 +6,8 @@
0
0
- 504
- 686
+ 515
+ 692
@@ -568,6 +568,9 @@
-
+
+ 4
+
999999999.000000000000000