diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-12-29 00:20:14 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-12-29 00:20:14 +0000 |
| commit | 5942d2db30529ed41935e3c56921d822b246e893 (patch) | |
| tree | 34b19912e6cfe7ca73e7648751fdd298f7d6556f /src/ui/dialog/text-edit.cpp | |
| parent | Add improvements sugested by Eduard Brawn And Moini (diff) | |
| parent | Limit size of font preview to 100pt (diff) | |
| download | inkscape-5942d2db30529ed41935e3c56921d822b246e893.tar.gz inkscape-5942d2db30529ed41935e3c56921d822b246e893.zip | |
Merge branch 'maxfontsize' of gitlab.com:darktrojan/inkscape
Diffstat (limited to 'src/ui/dialog/text-edit.cpp')
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 1 |
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) ); |
