Mercurial > pidgin.yaz
comparison src/gtkimhtml.c @ 2774:6fab04e257a5
[gaim-migrate @ 2787]
>>Comment By: Decklin
> I'm also curious as to why you didn't want the POINT_SIZE
> macro...
i just didn't see it before :)
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 20 Nov 2001 01:22:16 +0000 |
parents | 367d19133917 |
children | 38c31679dd37 |
comparison
equal
deleted
inserted
replaced
2773:a0fd8f91e294 | 2774:6fab04e257a5 |
---|---|
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 gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; | 65 #define POINT_SIZE(x) (_point_sizes [(x) - 1]) |
66 static gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; | |
66 | 67 |
67 #define DEFAULT_PRE_FACE "courier" | 68 #define DEFAULT_PRE_FACE "courier" |
68 | 69 |
69 #define BORDER_SIZE 2 | 70 #define BORDER_SIZE 2 |
70 #define TOP_BORDER 10 | 71 #define TOP_BORDER 10 |
1928 if (bold) | 1929 if (bold) |
1929 newvals [WGHT] = "bold"; | 1930 newvals [WGHT] = "bold"; |
1930 if (italics) | 1931 if (italics) |
1931 newvals [SLANT] = "i"; | 1932 newvals [SLANT] = "i"; |
1932 if (fontsize) { | 1933 if (fontsize) { |
1933 g_snprintf (fs, sizeof (fs), "%d", _point_sizes [MIN (fontsize, MAX_FONT_SIZE) - 1]); | 1934 g_snprintf (fs, sizeof (fs), "%d", POINT_SIZE (MIN (fontsize, MAX_FONT_SIZE))); |
1934 newvals [PXLSZ] = "*"; | 1935 newvals [PXLSZ] = "*"; |
1935 newvals [PTSZ] = fs; | 1936 newvals [PTSZ] = fs; |
1936 } | 1937 } |
1937 | 1938 |
1938 if (name) | 1939 if (name) |
1959 | 1960 |
1960 for (i = 0; fontsize && names [i]; i++) { | 1961 for (i = 0; fontsize && names [i]; i++) { |
1961 newvals [FMLY] = names [i]; | 1962 newvals [FMLY] = names [i]; |
1962 | 1963 |
1963 g_snprintf (fs, sizeof (fs), "%d", | 1964 g_snprintf (fs, sizeof (fs), "%d", |
1964 _point_sizes [MIN (fontsize, MAX_FONT_SIZE) - 1] / 10); | 1965 POINT_SIZE (MIN (fontsize, MAX_FONT_SIZE) - 1) / 10); |
1965 newvals [PXLSZ] = fs; | 1966 newvals [PXLSZ] = fs; |
1966 newvals [PTSZ] = "*"; | 1967 newvals [PTSZ] = "*"; |
1967 | 1968 |
1968 TRY_FONT; | 1969 TRY_FONT; |
1969 | 1970 |