diff options
author | James Bursa <james@netsurf-browser.org> | 2002-09-26 21:38:33 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2002-09-26 21:38:33 +0000 |
commit | fcbe2cebae28ef623dceb82ce9501027fea91fb5 (patch) | |
tree | 98c31a34081cc490422bdf6705d94c924a99b724 /riscos/font.h | |
parent | f0fc6ca473ee9532c7a4ce9493ee304de1c6d474 (diff) | |
download | netsurf-fcbe2cebae28ef623dceb82ce9501027fea91fb5.tar.gz netsurf-fcbe2cebae28ef623dceb82ce9501027fea91fb5.tar.bz2 |
[project @ 2002-09-26 21:38:32 by bursa]
New Unicode font handling and rendering code.
svn path=/import/netsurf/; revision=39
Diffstat (limited to 'riscos/font.h')
-rw-r--r-- | riscos/font.h | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/riscos/font.h b/riscos/font.h index ee3e4c2b2..24b5d0f5d 100644 --- a/riscos/font.h +++ b/riscos/font.h @@ -1,5 +1,5 @@ /** - * $Id: font.h,v 1.1 2002/09/11 14:24:02 monkeyson Exp $ + * $Id: font.h,v 1.2 2002/09/26 21:38:33 bursa Exp $ */ #ifndef _NETSURF_RISCOS_FONT_H_ @@ -12,28 +12,31 @@ #include "netsurf/render/css.h" #include "oslib/font.h" -struct font_set; typedef unsigned int font_id; -struct font_split { - unsigned long width; - unsigned long height; - const char * end; + +#define FONT_FAMILIES 1 +#define FONT_CHUNKS 3 +#define FONT_BOLD 2 +#define FONT_SLANTED 1 + +struct font_set; +struct font_data { + font_f handle[FONT_CHUNKS]; + unsigned int size; + struct font_data *next; }; /** * interface */ -struct font_set * font_set_create(void); -font_id font_add(struct font_set * font_set, const char * name, unsigned int weight, - unsigned int size); -void font_set_free(struct font_set * font_set); -struct font_split font_split(struct font_set * font_set, font_id id, const char * text, - unsigned long width, int force); -unsigned long font_width(struct css_style * style, const char * text, unsigned int length); - -font_f riscos_font_css_to_handle(struct css_style* style); +unsigned long font_width(struct font_data *font, const char * text, unsigned int length); +void font_position_in_string(const char* text, struct font_data *font, + int length, int x, int* char_offset, int* pixel_offset); -void font_position_in_string(const char* text, struct css_style* style, int length, int x, int* char_offset, int* pixel_offset); +struct font_set *font_new_set(); +struct font_data *font_open(struct font_set *set, struct css_style *style); +void font_free_set(struct font_set *set); +char *font_utf8_to_string(struct font_data *data, const char *s, unsigned int length); #endif |