added an upper limit for the popup size to avoid a crash when

2003-03-26  Sven Neumann  <sven@gimp.org>

	* app/text/gimpfont.c (gimp_font_get_popup_size): added an upper
	limit for the popup size to avoid a crash when GIMP_PREVIEW_MAX_SIZE
	is exceeded.
This commit is contained in:
Sven Neumann 2003-03-26 22:17:37 +00:00 committed by Sven Neumann
parent a64d64ee88
commit 8f4c74e62a
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-03-26 Sven Neumann <sven@gimp.org>
* app/text/gimpfont.c (gimp_font_get_popup_size): added an upper
limit for the popup size to avoid a crash when GIMP_PREVIEW_MAX_SIZE
is exceeded.
2003-03-26 Sven Neumann <sven@gimp.org>
* configure.in (ALL_LINGUAS): removed "yi" until po files were

View File

@ -233,8 +233,10 @@ gimp_font_get_popup_size (GimpViewable *viewable,
if (!font_desc)
return FALSE;
height = CLAMP (height, 12, GIMP_VIEWABLE_MAX_POPUP_SIZE / 4);
pango_font_description_set_size (font_desc,
PANGO_SCALE * MAX (12, height));
PANGO_SCALE * height * 2.0 / 3.0);
if (font->popup_layout)
g_object_unref (font->popup_layout);