summaryrefslogtreecommitdiff
path: root/rufl_test.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2006-01-29 12:20:25 +0000
committerJames Bursa <james@netsurf-browser.org>2006-01-29 12:20:25 +0000
commit87d2b7aa8e9b6e2209776a73da67398c795cbcb3 (patch)
treefac5f022fcebbfe684643055813f8489138819af /rufl_test.c
parent4581f7a89f79a828d161191f336a4444c8d2f9e8 (diff)
downloadlibrufl-87d2b7aa8e9b6e2209776a73da67398c795cbcb3.tar.gz
librufl-87d2b7aa8e9b6e2209776a73da67398c795cbcb3.tar.bz2
[project @ 2006-01-29 12:20:25 by bursa]
Improve handling of font weights. Now detects available weights better and supports up to 9 weights. Ignore control characters and spaces that are not spaces when scanning available characters. svn path=/import/rufl/; revision=2470
Diffstat (limited to 'rufl_test.c')
-rw-r--r--rufl_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rufl_test.c b/rufl_test.c
index f851832..ad536a7 100644
--- a/rufl_test.c
+++ b/rufl_test.c
@@ -2,7 +2,7 @@
* This file is part of RUfl
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license
- * Copyright 2005 James Bursa <james@semichrome.net>
+ * Copyright 2006 James Bursa <james@semichrome.net>
*/
#include <errno.h>
@@ -29,28 +29,28 @@ int main(void)
try(rufl_init(), "rufl_init");
rufl_dump_state();
- try(rufl_paint("NewHall", rufl_REGULAR, 240,
+ try(rufl_paint("NewHall", rufl_WEIGHT_400, 240,
utf8_test, sizeof utf8_test - 1,
1200, 1000, 0), "rufl_paint");
- try(rufl_width("NewHall", rufl_REGULAR, 240,
+ try(rufl_width("NewHall", rufl_WEIGHT_400, 240,
utf8_test, sizeof utf8_test - 1,
&width), "rufl_width");
printf("width: %i\n", width);
for (x = 0; x < width + 100; x += 100) {
- try(rufl_x_to_offset("NewHall", rufl_REGULAR, 240,
+ try(rufl_x_to_offset("NewHall", rufl_WEIGHT_400, 240,
utf8_test, sizeof utf8_test - 1,
x, &char_offset, &actual_x),
"rufl_x_to_offset");
printf("x to offset: %i -> %i %i \"%s\"\n", x, actual_x,
char_offset, utf8_test + char_offset);
- try(rufl_split("NewHall", rufl_REGULAR, 240,
+ try(rufl_split("NewHall", rufl_WEIGHT_400, 240,
utf8_test, sizeof utf8_test - 1,
x, &char_offset, &actual_x),
"rufl_split");
printf("split: %i -> %i %i \"%s\"\n", x, actual_x,
char_offset, utf8_test + char_offset);
}
- try(rufl_paint_callback("NewHall", rufl_REGULAR, 240,
+ try(rufl_paint_callback("NewHall", rufl_WEIGHT_400, 240,
utf8_test, sizeof utf8_test - 1,
1200, 1000, callback, 0), "rufl_paint_callback");
rufl_quit();