diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/widgets/font-selector.cpp | 9 | ||||
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index da87457a5..03d29a753 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -31,6 +31,7 @@ #include "desktop.h" #include "widgets/font-selector.h" +#include "preferences.h" /* SPFontSelector */ @@ -344,11 +345,15 @@ static void sp_font_selector_size_changed( GtkComboBox */*cbox*/, SPFontSelector value = -1; free (text); } + + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + int max_size = prefs->getInt("/dialogs/textandfont/maxFontSize", 10000); // somewhat arbitrary, but text&font preview freezes with too huge fontsizes + if (value <= 0) { return; // could not parse value } - if (value > 10000) - value = 10000; // somewhat arbitrary, but text&font preview freezes with too huge fontsizes + if (value > max_size) + value = max_size; fsel->fontsize = value; if ( fabs(fsel->fontsize-old_size) > 0.001) diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 13274a175..779504633 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -360,6 +360,12 @@ static void sp_text_fontsize_value_changed( Ink_ComboBoxEntry_Action *act, GObje } g_free( text ); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + int max_size = prefs->getInt("/dialogs/textandfont/maxFontSize", 10000); // somewhat arbitrary, but text&font preview freezes with too huge fontsizes + + if (size > max_size) + size = max_size; + // Set css font size. SPCSSAttr *css = sp_repr_css_attr_new (); Inkscape::CSSOStringStream osfs; |
