NetSurf
font.h
Go to the documentation of this file.
1/*
2 * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/** \file riscos/font.h
20 * RISC OS font interface.
21 */
22
23#ifndef _NETSURF_RISCOS_FONT_H_
24#define _NETSURF_RISCOS_FONT_H_
25
26#include <rufl.h>
27
28struct plot_font_style;
30
31/** desktop font, size and style being used */
32extern char ro_gui_desktop_font_family[];
34extern rufl_style ro_gui_desktop_font_style;
35
36void nsfont_init(void);
37bool nsfont_exists(const char *font_family);
38const char *nsfont_fallback_font(void);
39bool nsfont_paint(const struct plot_font_style *fstyle, const char *string,
40 size_t length, int x, int y);
41void nsfont_read_style(const struct plot_font_style *fstyle,
42 const char **font_family, unsigned int *font_size,
43 rufl_style *font_style);
45
46#endif
bool nsfont_paint(const plot_font_style_t *fstyle, const char *string, size_t length, int x, int y)
Render a string.
Definition: font.cpp:312
void nsfont_read_style(const struct plot_font_style *fstyle, const char **font_family, unsigned int *font_size, rufl_style *font_style)
void nsfont_init(void)
Initialize font handling.
Definition: font.c:116
char ro_gui_desktop_font_family[]
desktop font, size and style being used
Definition: font.c:45
void ro_gui_wimp_get_desktop_font(void)
Retrieve the current desktop font family, size and style from the WindowManager in a form suitable fo...
Definition: font.c:607
rufl_style ro_gui_desktop_font_style
Definition: font.c:47
const char * nsfont_fallback_font(void)
Retrieve the fallback font name.
Definition: font.c:165
int ro_gui_desktop_font_size
Definition: font.c:46
bool nsfont_exists(const char *font_family)
Check if a font family is available.
Definition: font.c:199
struct gui_layout_table * riscos_layout_table
Definition: font.c:622
Font style for plotting.
Definition: plot_style.h:111