2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* 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 Phil Mellor <monkeyson@users.sourceforge.net>
|
|
|
|
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
|
2002-09-11 18:24:02 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETSURF_RISCOS_FONT_H_
|
|
|
|
#define _NETSURF_RISCOS_FONT_H_
|
|
|
|
|
2003-04-04 19:19:32 +04:00
|
|
|
#include "netsurf/css/css.h"
|
2002-10-08 15:15:29 +04:00
|
|
|
|
2002-09-27 01:38:33 +04:00
|
|
|
struct font_data {
|
2003-07-18 03:01:02 +04:00
|
|
|
int handle;
|
2002-09-27 01:38:33 +04:00
|
|
|
unsigned int size;
|
2002-12-27 20:28:19 +03:00
|
|
|
unsigned int space_width;
|
2002-09-27 01:38:33 +04:00
|
|
|
struct font_data *next;
|
2002-09-11 18:24:02 +04:00
|
|
|
};
|
|
|
|
|
2002-10-08 15:15:29 +04:00
|
|
|
struct font_set *font_new_set(void);
|
2002-09-27 01:38:33 +04:00
|
|
|
struct font_data *font_open(struct font_set *set, struct css_style *style);
|
|
|
|
void font_free_set(struct font_set *set);
|
2003-07-18 03:01:02 +04:00
|
|
|
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);
|
2002-10-12 17:05:16 +04:00
|
|
|
char * font_split(struct font_data *data, const char * text, unsigned int length,
|
|
|
|
unsigned int width, unsigned int *used_width);
|
2002-09-11 18:24:02 +04:00
|
|
|
|
|
|
|
#endif
|