2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* 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>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
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
|