Rev 5816 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5816 | Rev 5846 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | :struct FONT |
24 | :struct FONT |
25 | { |
25 | { |
26 | __SIZE size; |
26 | __SIZE size; |
27 | byte r,g,b,weight,italic, smooth; |
27 | byte r,g,b,weight,italic, smooth; |
28 | byte width,height; |
28 | byte width,height; |
- | 29 | byte use_smooth; |
|
29 | word left,top; |
30 | word left,top; |
30 | byte encoding; |
31 | byte encoding; |
31 | dword color; |
32 | dword color; |
32 | dword file_size; |
33 | dword file_size; |
33 | dword buffer; |
34 | dword buffer; |
Line 217... | Line 218... | ||
217 | IF(DSBYTE[text1]=='_') len--; |
218 | IF(DSBYTE[text1]=='_') len--; |
218 | len+=symbol(len,0,DSBYTE[text1]); |
219 | len+=symbol(len,0,DSBYTE[text1]); |
219 | IF(weight)len+=math.ceil(size.text/17); |
220 | IF(weight)len+=math.ceil(size.text/17); |
220 | text1++; |
221 | text1++; |
221 | } |
222 | } |
222 | IF (no_bg_copy) && (!color) SmoothFont(buffer, size.width, size.height); |
223 | IF (use_smooth) SmoothFont(buffer, size.width, size.height); |
223 | return len; |
224 | return len; |
224 | } |
225 | } |
225 | :void FONT::show() |
226 | :void FONT::show() |
226 | { |
227 | { |
227 | _PutImage(left,top,size.width,size.height,buffer); |
228 | _PutImage(left,top,size.width,size.height,buffer); |
Line 304... | Line 305... | ||
304 | return rw; |
305 | return rw; |
305 | } |
306 | } |
306 | :byte FONT::load(dword path) |
307 | :byte FONT::load(dword path) |
307 | { |
308 | { |
308 | buffer_size = 0; |
309 | buffer_size = 0; |
- | 310 | use_smooth = true; |
|
309 | IF(data)free(data); |
311 | IF(data)free(data); |
310 | IF(!io.read(path)) { debug("Error while loading font: "); debugln(path); return false; } |
312 | IF(!io.read(path)) { debug("Error while loading font: "); debugln(path); return false; } |
311 | begin = data = io.buffer_data; |
313 | begin = data = io.buffer_data; |
312 | EBX = begin + io.FILES_SIZE; |
314 | EBX = begin + io.FILES_SIZE; |
313 | $dec ebx |
315 | $dec ebx |