Mercurial > pidgin
comparison src/gtkimhtml.c @ 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 | d6408b1befc9 |
comparison
equal
deleted
inserted
replaced
2775:38c31679dd37 | 2776:3316f391df38 |
---|---|
60 #include "pixmaps/yell.xpm" | 60 #include "pixmaps/yell.xpm" |
61 | 61 |
62 #define MAX_FONT_SIZE 7 | 62 #define MAX_FONT_SIZE 7 |
63 #define DEFAULT_FONT_SIZE 3 | 63 #define DEFAULT_FONT_SIZE 3 |
64 | 64 |
65 #define POINT_SIZE(x) (_point_sizes [(x) - 1]) | 65 #define POINT_SIZE(x) (_point_sizes [MIN ((x), MAX_FONT_SIZE) - 1]) |
66 static gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; | 66 static gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; |
67 | 67 |
68 #define DEFAULT_PRE_FACE "courier" | 68 #define DEFAULT_PRE_FACE "courier" |
69 | 69 |
70 #define BORDER_SIZE 2 | 70 #define BORDER_SIZE 2 |
1929 if (bold) | 1929 if (bold) |
1930 newvals [WGHT] = "bold"; | 1930 newvals [WGHT] = "bold"; |
1931 if (italics) | 1931 if (italics) |
1932 newvals [SLANT] = "i"; | 1932 newvals [SLANT] = "i"; |
1933 if (fontsize) { | 1933 if (fontsize) { |
1934 g_snprintf (fs, sizeof (fs), "%d", POINT_SIZE (MIN (fontsize, MAX_FONT_SIZE))); | 1934 g_snprintf (fs, sizeof (fs), "%d", POINT_SIZE (fontsize)); |
1935 newvals [PXLSZ] = "*"; | 1935 newvals [PXLSZ] = "*"; |
1936 newvals [PTSZ] = fs; | 1936 newvals [PTSZ] = fs; |
1937 } | 1937 } |
1938 | 1938 |
1939 if (name) | 1939 if (name) |
1959 } | 1959 } |
1960 | 1960 |
1961 for (i = 0; fontsize && names [i]; i++) { | 1961 for (i = 0; fontsize && names [i]; i++) { |
1962 newvals [FMLY] = names [i]; | 1962 newvals [FMLY] = names [i]; |
1963 | 1963 |
1964 g_snprintf (fs, sizeof (fs), "%d", | 1964 g_snprintf (fs, sizeof (fs), "%d", POINT_SIZE (fontsize) / 10); |
1965 POINT_SIZE (MIN (fontsize, MAX_FONT_SIZE)) / 10); | |
1966 newvals [PXLSZ] = fs; | 1965 newvals [PXLSZ] = fs; |
1967 newvals [PTSZ] = "*"; | 1966 newvals [PTSZ] = "*"; |
1968 | 1967 |
1969 TRY_FONT; | 1968 TRY_FONT; |
1970 | 1969 |