summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2006-01-31 20:07:23 (GMT)
committer James Bursa <james@netsurf-browser.org>2006-01-31 20:07:23 (GMT)
commit049c1e77d2a6bbe360a92c579e1f6df8a36636b1 (patch)
tree55f9cee6302e74eab97a1e65e8f0c20e6db6e7bd
parent87d2b7aa8e9b6e2209776a73da67398c795cbcb3 (diff)
downloadlibrufl-049c1e77d2a6bbe360a92c579e1f6df8a36636b1.tar.gz
librufl-049c1e77d2a6bbe360a92c579e1f6df8a36636b1.tar.bz2
[project @ 2006-01-31 20:07:23 by bursa]
Improve weight assigning algorithm and make weights 300 and 400 search up when missing. svn path=/import/rufl/; revision=2471
-rw-r--r--rufl_init.c2
-rw-r--r--rufl_paint.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/rufl_init.c b/rufl_init.c
index a195cd9..9190d3e 100644
--- a/rufl_init.c
+++ b/rufl_init.c
@@ -299,7 +299,7 @@ rufl_code rufl_init_add_font(char *identifier)
family = identifier;
if (dot)
*dot = 0;
- while (dot && (!weight || !slant)) {
+ while (dot) {
part = dot + 1;
dot = strchr(part, '.');
if (dot)
diff --git a/rufl_paint.c b/rufl_paint.c
index 28144e1..3236e9e 100644
--- a/rufl_paint.c
+++ b/rufl_paint.c
@@ -204,7 +204,7 @@ rufl_code rufl_process(rufl_action action,
struct rufl_family_map_entry *e =
&rufl_family_map[family - rufl_family_list];
used_weight = weight;
- if (weight <= 4)
+ if (weight <= 2)
search_direction = -1;
else
search_direction = +1;