use a fixed size for the popup and clamp to a maximum size (should

2003-04-01  Sven Neumann  <sven@gimp.org>

	* app/text/gimpfont.c: use a fixed size for the popup and clamp to
	a maximum size (should actually use GIMP_PREVIEW_MAX_SIZE here).

	* app/text/gimptext.c
	* app/tools/gimptextoptions.c: minor string changes.
This commit is contained in:
Sven Neumann 2003-04-01 00:35:38 +00:00 committed by Sven Neumann
parent 30fd587dd0
commit 0dad41aec4
5 changed files with 31 additions and 11 deletions

View File

@ -1,7 +1,7 @@
2003-04-01 Sven Neumann <sven@gimp.org>
* app/text/gimpfont.c: use a fixed size for the popup and added a
maximum size (should actually use GIMP_PREVIEW_MAX_SIZE here).
* app/text/gimpfont.c: use a fixed size for the popup and clamp to
a maximum size (should actually use GIMP_PREVIEW_MAX_SIZE here).
* app/text/gimptext.c
* app/tools/gimptextoptions.c: minor string changes.

View File

@ -38,6 +38,8 @@
contain all characters found in the alphabet. */
#define GIMP_TEXT_PANGRAM N_("Pack my box with\nfive dozen liquor jugs.")
#define GIMP_FONT_POPUP_SIZE (PANGO_SCALE * 32)
enum
{
@ -233,10 +235,7 @@ 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 * height * 2.0 / 3.0);
pango_font_description_set_size (font_desc, GIMP_FONT_POPUP_SIZE);
if (font->popup_layout)
g_object_unref (font->popup_layout);
@ -248,8 +247,11 @@ gimp_font_get_popup_size (GimpViewable *viewable,
pango_layout_set_text (font->popup_layout, gettext (GIMP_TEXT_PANGRAM), -1);
pango_layout_get_pixel_extents (font->popup_layout, NULL, &logical);
*popup_width = logical.width + 6;
*popup_height = logical.height + 6;
#ifdef __GNUC__
#warning FIXME #need to use GIMP_PREVIEW_MAX_SIZE here
#endif
*popup_width = MIN (logical.width + 6, 1024);
*popup_height = MIN (logical.height + 6, 1024);
font->popup_width = *popup_width;
font->popup_height = *popup_height;

View File

@ -155,11 +155,15 @@ gimp_text_class_init (GimpTextClass *klass)
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_HINTING,
"hinting",
N_("Hinting alters the font outline to "
"produce a crisp bitmap at small sizes"),
"produce a crisp bitmap at small "
"sizes"),
TRUE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_AUTOHINT,
"autohint", NULL,
"autohint",
N_("If available, hints from the font are "
"used but you may prefer to always use "
"the automatic hinter"),
FALSE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_ANTIALIAS,

View File

@ -274,7 +274,7 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (button);
auto_button = gimp_prop_check_button_new (config, "autohint",
_("Force use of auto-hinter"));
_("Force Auto-Hinter"));
gtk_table_attach (GTK_TABLE (table), auto_button, 1, 3, 4, 5,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (auto_button);

View File

@ -348,6 +348,20 @@ size).
<!-- ##### MACRO GIMP_STOCK_TEXT_DIR_LTR ##### -->
<para>
<inlinegraphic fileref="stock-text-dir-ltr-24.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_TEXT_DIR_RTL ##### -->
<para>
<inlinegraphic fileref="stock-text-dir-rtl-24.png" format="png"></inlinegraphic>
</para>
<!-- ##### MACRO GIMP_STOCK_TOOL_OPTIONS ##### -->
<para>
<inlinegraphic fileref="stock-tool-options-16.png" format="png"></inlinegraphic>