summaryrefslogtreecommitdiff
path: root/render/loosen.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-07-21 10:59:53 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-07-21 10:59:53 +0000
commit2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3 (patch)
treef3fe5f224c9e0e4089aca2d9012dfe1a74cf9c90 /render/loosen.c
parent1930989f8ccdd574472ed72990b6a82fdcf9d5f4 (diff)
downloadnetsurf-2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3.tar.gz
netsurf-2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3.tar.bz2
Refactor text plotter and other font functions to remove dependency on CSS.
svn path=/trunk/netsurf/; revision=8641
Diffstat (limited to 'render/loosen.c')
-rw-r--r--render/loosen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/loosen.c b/render/loosen.c
index 80f64bdcb..85136d89b 100644
--- a/render/loosen.c
+++ b/render/loosen.c
@@ -115,6 +115,10 @@ bool loosen_text(struct box *text, int width, struct content *content)
unsigned int position;
const struct font_functions *font_func;
+ plot_font_style_t fstyle;
+
+ font_plot_style_from_css(text->style, &fstyle);
+
if (content->type == CONTENT_HTML)
font_func = content->data.html.font_func;
else
@@ -134,7 +138,7 @@ bool loosen_text(struct box *text, int width, struct content *content)
position = 0;
while (position < text->length) {
- font_func->font_position_in_string(text->style,
+ font_func->font_position_in_string(&fstyle,
text->text + position,
text->length - position,
width, &offset, &actual_x);