Commit 06cb5e15 authored by Geoff Lankow's avatar Geoff Lankow Committed by Marc Jeanmougin

Limit size of font preview to 100pt

(backported from abc07ad9)
parent dc8f30ef
......@@ -434,6 +434,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) );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment