diff options
author | James Bursa <james@netsurf-browser.org> | 2003-07-17 23:01:02 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-07-17 23:01:02 +0000 |
commit | 5031b80b331ddc58fd24f3fe7a85503320cf9689 (patch) | |
tree | 7911bcec2639a026ba6ff4403e6984977a8e5d54 /debug | |
parent | 8bca5444485f4f76f96b8f1f57434afca36cca62 (diff) | |
download | netsurf-5031b80b331ddc58fd24f3fe7a85503320cf9689.tar.gz netsurf-5031b80b331ddc58fd24f3fe7a85503320cf9689.tar.bz2 |
[project @ 2003-07-17 23:01:02 by bursa]
Fix 670947, tidy gui code, move some headers.
svn path=/import/netsurf/; revision=231
Diffstat (limited to 'debug')
-rw-r--r-- | debug/fontd.c | 11 | ||||
-rw-r--r-- | debug/fontd.h | 48 |
2 files changed, 10 insertions, 49 deletions
diff --git a/debug/fontd.c b/debug/fontd.c index 89ae8ed75..f4537c238 100644 --- a/debug/fontd.c +++ b/debug/fontd.c @@ -8,10 +8,19 @@ #include <assert.h> #include <stdio.h> #include "netsurf/css/css.h" -#include "netsurf/debug/fontd.h" +#include "netsurf/render/font.h" #include "netsurf/utils/utils.h" #include "netsurf/utils/log.h" +#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]; +}; + /** * font id = font family * 4 + bold * 2 + slanted * font family: 0 = sans-serif, 1 = serif, ... diff --git a/debug/fontd.h b/debug/fontd.h deleted file mode 100644 index 562e2d69f..000000000 --- a/debug/fontd.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of NetSurf, http://netsurf.sourceforge.net/ - * Licensed under the GNU General Public License, - * http://www.opensource.org/licenses/gpl-license - * Copyright 2003 James Bursa <bursa@users.sourceforge.net> - */ - -#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 |