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/font.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'render/font.h') diff --git a/render/font.h b/render/font.h index acfd7c727..9a80af329 100644 --- a/render/font.h +++ b/render/font.h @@ -35,23 +35,25 @@ #include #include - -struct css_style; - +#include "css/css.h" +#include "desktop/plot_style.h" struct font_functions { - bool (*font_width)(const struct css_style *style, + bool (*font_width)(const plot_font_style_t *fstyle, const char *string, size_t length, int *width); - bool (*font_position_in_string)(const struct css_style *style, + bool (*font_position_in_string)(const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x); - bool (*font_split)(const struct css_style *style, + bool (*font_split)(const plot_font_style_t *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x); }; extern const struct font_functions nsfont; +void font_plot_style_from_css(const struct css_style *css, + plot_font_style_t *fstyle); + #endif -- cgit v1.2.3