Mercurial > pidgin.yaz
changeset 2776:3316f391df38
[gaim-migrate @ 2789]
i don't know why this is so difficult
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 20 Nov 2001 01:29:42 +0000 |
parents | 38c31679dd37 |
children | 0899f8c99a15 |
files | src/gtkimhtml.c |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkimhtml.c Tue Nov 20 01:23:37 2001 +0000 +++ b/src/gtkimhtml.c Tue Nov 20 01:29:42 2001 +0000 @@ -62,7 +62,7 @@ #define MAX_FONT_SIZE 7 #define DEFAULT_FONT_SIZE 3 -#define POINT_SIZE(x) (_point_sizes [(x) - 1]) +#define POINT_SIZE(x) (_point_sizes [MIN ((x), MAX_FONT_SIZE) - 1]) static gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; #define DEFAULT_PRE_FACE "courier" @@ -1931,7 +1931,7 @@ if (italics) newvals [SLANT] = "i"; if (fontsize) { - g_snprintf (fs, sizeof (fs), "%d", POINT_SIZE (MIN (fontsize, MAX_FONT_SIZE))); + g_snprintf (fs, sizeof (fs), "%d", POINT_SIZE (fontsize)); newvals [PXLSZ] = "*"; newvals [PTSZ] = fs; } @@ -1961,8 +1961,7 @@ for (i = 0; fontsize && names [i]; i++) { newvals [FMLY] = names [i]; - g_snprintf (fs, sizeof (fs), "%d", - POINT_SIZE (MIN (fontsize, MAX_FONT_SIZE)) / 10); + g_snprintf (fs, sizeof (fs), "%d", POINT_SIZE (fontsize) / 10); newvals [PXLSZ] = fs; newvals [PTSZ] = "*";