summaryrefslogtreecommitdiff
path: root/render/html_redraw.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-02-20 13:18:21 +0000
committerJames Bursa <james@netsurf-browser.org>2005-02-20 13:18:21 +0000
commit1a52a32e5d5ccf78639c268cc660d8d8b0d98092 (patch)
treeb2c2a416420eb006f8078afadde1d00380ea693c /render/html_redraw.c
parent51c5143a80d073866a74d133e26beb8b9d69bd11 (diff)
downloadnetsurf-1a52a32e5d5ccf78639c268cc660d8d8b0d98092.tar.gz
netsurf-1a52a32e5d5ccf78639c268cc660d8d8b0d98092.tar.bz2
[project @ 2005-02-20 13:18:21 by bursa]
Font rewrite, part 2. svn path=/import/netsurf/; revision=1518
Diffstat (limited to 'render/html_redraw.c')
-rw-r--r--render/html_redraw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c
index 20e9080aa..60c705cfa 100644
--- a/render/html_redraw.c
+++ b/render/html_redraw.c
@@ -292,7 +292,7 @@ bool html_redraw_box(struct box *box,
current_background_color))
return false;
- } else if (box->text && box->font) {
+ } else if (box->text) {
/* antialias colour for under/overline */
colour = html_redraw_aa(current_background_color,
/*print_text_black ? 0 :*/ box->style->color);
@@ -328,7 +328,7 @@ bool html_redraw_box(struct box *box,
}
if (!plot.text(x, y + (int) (box->height * 0.75 * scale),
- box->font, box->text, box->length,
+ box->style, box->text, box->length,
current_background_color,
/*print_text_black ? 0 :*/ box->style->color))
return false;
@@ -641,13 +641,15 @@ bool html_redraw_file(int x, int y, int width, int height,
text = messages_get("Form_Drop");
length = strlen(text);
- text_width = nsfont_width(box->font, text, length) * scale;
+ if (!nsfont_width(box->style, text, length, &text_width))
+ return false;
+ text_width *= scale;
if (width < text_width + 8)
x = x + width - text_width - 4;
else
x = x + 4;
- return plot.text(x, y + height * 0.75, box->font, text, length,
+ return plot.text(x, y + height * 0.75, box->style, text, length,
background_colour,
/*print_text_black ? 0 :*/ box->style->color);
}