diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-21 10:59:53 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-21 10:59:53 +0000 |
commit | 2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3 (patch) | |
tree | f3fe5f224c9e0e4089aca2d9012dfe1a74cf9c90 /desktop/selection.c | |
parent | 1930989f8ccdd574472ed72990b6a82fdcf9d5f4 (diff) | |
download | netsurf-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 'desktop/selection.c')
-rw-r--r-- | desktop/selection.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop/selection.c b/desktop/selection.c index 014c44659..623caf414 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -609,6 +609,9 @@ bool redraw_handler(const char *text, size_t length, struct box *box, struct rdw_info *r = (struct rdw_info*)handle; int width, height, space_width; int x, y; + plot_font_style_t fstyle; + + font_plot_style_from_css(box->style, &fstyle); /* \todo - it should be possible to reduce the redrawn area by * considering the 'text', 'length' and 'space' parameters */ @@ -618,7 +621,7 @@ bool redraw_handler(const char *text, size_t length, struct box *box, height = box->padding[TOP] + box->height + box->padding[BOTTOM]; if (box->type == BOX_TEXT && box->space && - nsfont.font_width(box->style, " ", 1, &space_width)) + nsfont.font_width(&fstyle, " ", 1, &space_width)) width += space_width; if (r->inited) { |