summaryrefslogtreecommitdiff
path: root/rufl_dump_state.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_dump_state.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_dump_state.c')
-rw-r--r--rufl_dump_state.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/rufl_dump_state.c b/rufl_dump_state.c
index 81b7fb3..e1ba483 100644
--- a/rufl_dump_state.c
+++ b/rufl_dump_state.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 <stdio.h>
@@ -42,10 +42,21 @@ void rufl_dump_state(void)
printf("rufl_family_list:\n");
for (i = 0; i != rufl_family_list_entries; i++) {
printf(" %u \"%s\"\n", i, rufl_family_list[i]);
- for (j = 0; j != rufl_STYLES; j++)
- printf(" %u \"%s\"\n", j, rufl_font_list
- [rufl_family_map[rufl_STYLES * i + j]]
- .identifier);
+ for (j = 0; j != 9; j++) {
+ struct rufl_family_map_entry *e = &rufl_family_map[i];
+ printf(" %u ", j);
+ if (e->font[j][0] == NO_FONT)
+ printf("- ");
+ else
+ printf("\"%s\" ", rufl_font_list[e->font[j][0]].
+ identifier);
+ if (e->font[j][1] == NO_FONT)
+ printf("- ");
+ else
+ printf("\"%s\" ", rufl_font_list[e->font[j][1]].
+ identifier);
+ printf("\n");
+ }
}
printf("rufl_substitution_table:\n");