From 2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 21 Jul 2009 10:59:53 +0000 Subject: Refactor text plotter and other font functions to remove dependency on CSS. svn path=/trunk/netsurf/; revision=8641 --- render/loosen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'render/loosen.c') 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); -- cgit v1.2.3