summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/text-edit.cpp
diff options
context:
space:
mode:
authorGeoff Lankow <geoff@darktrojan.net>2017-12-18 04:14:02 +0000
committerGeoff Lankow <geoff@darktrojan.net>2017-12-18 04:14:02 +0000
commitabc07ad934a149803e56d1ad8fad39ff80caf9b6 (patch)
tree8ef1cdb50ba2314f455b06b564a1a4d5e918a747 /src/ui/dialog/text-edit.cpp
parentAdd README's so I don't have to figure out what these libraries are used for ... (diff)
downloadinkscape-abc07ad934a149803e56d1ad8fad39ff80caf9b6.tar.gz
inkscape-abc07ad934a149803e56d1ad8fad39ff80caf9b6.zip
Limit size of font preview to 100pt
Diffstat (limited to 'src/ui/dialog/text-edit.cpp')
-rw-r--r--src/ui/dialog/text-edit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index f6b2305b1..33c173a1c 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -372,6 +372,7 @@ void TextEdit::setPreviewText (Glib::ustring font_spec, Glib::ustring phrase)
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
double pt_size = Inkscape::Util::Quantity::convert(sp_style_css_size_units_to_px(sp_font_selector_get_size(fsel), unit), "px", "pt");
+ pt_size = std::min(pt_size, 100.0);
// Pango font size is in 1024ths of a point
// C++11: Glib::ustring size = std::to_string( int(pt_size * PANGO_SCALE) );