Rev 5981 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5981 | Rev 5985 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | void main() |
8 | void main() |
9 | { |
9 | { |
10 | proc_info Form; |
10 | proc_info Form; |
11 | word i, y, btn; |
11 | word i, y, btn; |
12 | char line[256], title[4196]; |
12 | char line[256], title[4196]; |
13 | font.no_bg_copy = true; |
- | |
14 | font.color = 0; |
13 | font.color = 0; |
15 | font.bg_color = 0xFFFFFF; |
14 | font.bg_color = 0xFFFFFF; |
16 | if (!param) strcpy(#param, DEFAULT_FONT); |
15 | if (!param) strcpy(#param, DEFAULT_FONT); |
17 | font.load(#param); |
16 | font.load(#param); |
18 | strcpy(#title, "Font preview: "); |
17 | strcpy(#title, "Font preview: "); |
Line 44... | Line 43... | ||
44 | } |
43 | } |
45 | else for (i=10, y=5; i<22; i++, y+=font.height;) //not flexible, need to calculate font count and max line length |
44 | else for (i=10, y=5; i<22; i++, y+=font.height;) //not flexible, need to calculate font count and max line length |
46 | { |
45 | { |
47 | font.size.text = i; |
46 | font.size.text = i; |
48 | sprintf(#line," §¬¥à èà¨äâ /size font %d ¯¨ªá¥«¥©.",i); |
47 | sprintf(#line," §¬¥à èà¨äâ /size font %d ¯¨ªá¥«¥©.",i); |
49 | font.prepare_buf(10,y,Form.cwidth,Form.cheight-PANELH, #line); |
48 | font.write_buf(10,y,Form.cwidth,Form.cheight-PANELH, #line); |
50 | } |
49 | } |
51 | if (font.smooth) SmoothFont(font.buffer, font.size.width, font.size.height); |
50 | if (font.smooth) font.apply_smooth(); |
52 | font.left = 0; |
- | |
53 | font.top = PANELH; |
51 | font.show_buf(0, PANELH); |
54 | font.show(); |
- | |
55 | } |
52 | } |
56 | } |
53 | } |
57 | } |
54 | } |
Line 58... | Line 55... | ||
58 | 55 |