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 /render/font.h | |
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 'render/font.h')
-rw-r--r-- | render/font.h | 14 |
1 files changed, 8 insertions, 6 deletions
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 <stdbool.h> #include <stddef.h> - -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 |