2003-06-30 16:44:03 +04:00
|
|
|
/*
|
2006-11-27 18:35:18 +03:00
|
|
|
* This file is part of NetSurf, http://netsurf-browser.org/
|
2003-06-30 16:44:03 +04:00
|
|
|
* Licensed under the GNU General Public License,
|
|
|
|
* http://www.opensource.org/licenses/gpl-license
|
|
|
|
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
|
2005-02-20 16:18:21 +03:00
|
|
|
* Copyright 2005 James Bursa <bursa@users.sourceforge.net>
|
2004-07-06 00:19:52 +04:00
|
|
|
* Copyright 2004 John Tytgat <John.Tytgat@aaug.net>
|
2002-09-11 18:24:02 +04:00
|
|
|
*/
|
|
|
|
|
2005-02-20 16:18:21 +03:00
|
|
|
/** \file
|
|
|
|
* Font handling (interface).
|
|
|
|
*
|
|
|
|
* These functions provide font related services. They all work on UTF-8 strings
|
|
|
|
* with lengths given.
|
|
|
|
*
|
|
|
|
* Note that an interface to painting is not defined here. Painting is
|
|
|
|
* redirected through platform-dependent plotters anyway, so there is no gain in
|
|
|
|
* abstracting it here.
|
|
|
|
*/
|
|
|
|
|
2004-06-03 01:09:14 +04:00
|
|
|
#ifndef _NETSURF_RENDER_FONT_H_
|
|
|
|
#define _NETSURF_RENDER_FONT_H_
|
2002-09-11 18:24:02 +04:00
|
|
|
|
2005-02-20 16:18:21 +03:00
|
|
|
#include <stdbool.h>
|
2004-08-14 16:57:02 +04:00
|
|
|
#include <stddef.h>
|
2005-02-20 16:18:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
struct css_style;
|
|
|
|
|
|
|
|
|
|
|
|
bool nsfont_width(const struct css_style *style,
|
|
|
|
const char *string, size_t length,
|
|
|
|
int *width);
|
|
|
|
bool nsfont_position_in_string(const struct css_style *style,
|
|
|
|
const char *string, size_t length,
|
|
|
|
int x, size_t *char_offset, int *actual_x);
|
|
|
|
bool nsfont_split(const struct css_style *style,
|
|
|
|
const char *string, size_t length,
|
|
|
|
int x, size_t *char_offset, int *actual_x);
|
|
|
|
|
2002-09-11 18:24:02 +04:00
|
|
|
#endif
|