diff options
author | James Bursa <james@netsurf-browser.org> | 2003-06-21 13:18:00 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-06-21 13:18:00 +0000 |
commit | 94073c9bf642727d41a50c278d03a2b2f4af60ee (patch) | |
tree | 18395e80cb5f3984844f88819354d9ed5064794c /debug/fontd.h | |
parent | 0c0ff3c59631d0968c888279195ea40d4a7fd824 (diff) | |
download | netsurf-94073c9bf642727d41a50c278d03a2b2f4af60ee.tar.gz netsurf-94073c9bf642727d41a50c278d03a2b2f4af60ee.tar.bz2 |
[project @ 2003-06-21 13:18:00 by bursa]
Add debug command line build.
svn path=/import/netsurf/; revision=181
Diffstat (limited to 'debug/fontd.h')
-rw-r--r-- | debug/fontd.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/debug/fontd.h b/debug/fontd.h new file mode 100644 index 000000000..e63af6de6 --- /dev/null +++ b/debug/fontd.h @@ -0,0 +1,45 @@ +/** + * $Id: fontd.h,v 1.1 2003/06/21 13:18:00 bursa Exp $ + */ + +#ifndef _NETSURF_RISCOS_FONT_H_ +#define _NETSURF_RISCOS_FONT_H_ + +/** + * structures and typedefs + */ + +#include "netsurf/css/css.h" + +typedef unsigned int font_id; + +#define FONT_FAMILIES 1 +#define FONT_BOLD 2 +#define FONT_SLANTED 1 + +/* a font_set is just a linked list of font_data for each face for now */ +struct font_set { + struct font_data *font[FONT_FAMILIES * 4]; +}; + +struct font_data { + unsigned int size; + unsigned int space_width; + struct font_data *next; +}; + +/** + * interface + */ + +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, + unsigned int length, unsigned long x, int* char_offset, int* pixel_offset); + +struct font_set *font_new_set(void); +struct font_data *font_open(struct font_set *set, struct css_style *style); +void font_free_set(struct font_set *set); +char * font_split(struct font_data *data, const char * text, unsigned int length, + unsigned int width, unsigned int *used_width); + +#endif |