summaryrefslogtreecommitdiffstats
path: root/src/widgets/text-toolbar.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-08-21 05:36:22 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-08-21 05:36:22 +0000
commitb3cb91168ba74ef510452d42697e322e27309691 (patch)
treedd58d410639ca242ff62e03ae7242beace6679a3 /src/widgets/text-toolbar.cpp
parentfix type (fixes Windows build) (diff)
downloadinkscape-b3cb91168ba74ef510452d42697e322e27309691.tar.gz
inkscape-b3cb91168ba74ef510452d42697e322e27309691.zip
Fix for 168164 : Font size, always output px option
(bzr r11616)
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
-rw-r--r--src/widgets/text-toolbar.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index b769c41f6..3d80008d8 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -445,10 +445,14 @@ static void sp_text_fontsize_value_changed( Ink_ComboBoxEntry_Action *act, GObje
size = max_size;
// Set css font size.
- int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
SPCSSAttr *css = sp_repr_css_attr_new ();
Inkscape::CSSOStringStream osfs;
- osfs << size << sp_style_get_css_unit_string(unit);
+ int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
+ if (prefs->getBool("/options/font/textOutputPx", false)) {
+ osfs << sp_style_css_size_units_to_px(size, unit) << sp_style_get_css_unit_string(SP_CSS_UNIT_PX);
+ } else {
+ osfs << size << sp_style_get_css_unit_string(unit);
+ }
sp_repr_css_set_property (css, "font-size", osfs.str().c_str());
// Apply font size to selected objects.
@@ -1218,7 +1222,7 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
// Size (average of text selected)
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
- double size = sp_style_get_css_font_size_units(query->font_size.computed, unit);
+ double size = sp_style_css_size_px_to_units(query->font_size.computed, unit);
gchar size_text[G_ASCII_DTOSTR_BUF_SIZE];
g_ascii_dtostr (size_text, sizeof (size_text), size);