NetSurf
frontends
windows
font.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008 Vincent Sanders <vince@simtec.co.uk>
3
* Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
4
*
5
* This file is part of NetSurf, http://www.netsurf-browser.org/
6
*
7
* NetSurf is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 2 of the License.
10
*
11
* NetSurf is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
/**
21
* \file
22
* The interface to the win32 font and utf8 handling.
23
*/
24
25
#ifndef NETSURF_WINDOWS_FONT_H
26
#define NETSURF_WINDOWS_FONT_H
27
28
struct
plot_font_style
;
29
30
extern
HWND
font_hwnd
;
31
32
struct
font_desc
{
33
const
char
*
name
;
34
int
width
,
height
;
35
const
char
*
encoding
;
36
};
37
38
extern
struct
gui_layout_table
*
win32_layout_table
;
39
extern
struct
gui_utf8_table
*
win32_utf8_table
;
40
41
/**
42
* convert from utf-8 to win32 font encoding.
43
*
44
* \param[in] font font descriptor
45
* \param[in] string source utf-8 string
46
* \param[in] len The length of the utf-8 data
47
* \param[out] result The reencoded string.
48
*/
49
extern
nserror
utf8_to_font_encoding
(
const
struct
font_desc
* font,
const
char
*
string
,
size_t
len,
char
**
result
);
50
51
/**
52
* generate a win32 font handle from a generic font style
53
*
54
* \param style The font style.
55
* \return The win32 font handle
56
*/
57
HFONT
get_font
(
const
struct
plot_font_style
*style);
58
59
#endif
/* NETSURF_WINDOWS_FONT_H */
60
result
STATIC char result[100]
Definition:
arexx.c:77
nserror
nserror
Enumeration of error codes.
Definition:
errors.h:29
font_hwnd
HWND font_hwnd
Definition:
font.c:39
win32_utf8_table
struct gui_utf8_table * win32_utf8_table
Definition:
font.c:360
utf8_to_font_encoding
nserror utf8_to_font_encoding(const struct font_desc *font, const char *string, size_t len, char **result)
convert from utf-8 to win32 font encoding.
Definition:
font.c:43
get_font
HFONT get_font(const struct plot_font_style *style)
generate a win32 font handle from a generic font style
win32_layout_table
struct gui_layout_table * win32_layout_table
Definition:
font.c:352
font_desc
Definition:
font_freetype.h:42
font_desc::width
int width
Definition:
font_freetype.h:44
font_desc::height
int height
Definition:
font_freetype.h:44
font_desc::name
const char * name
Definition:
font_freetype.h:43
font_desc::encoding
const char * encoding
Definition:
font_freetype.h:45
gui_layout_table
Definition:
layout.h:38
gui_utf8_table
User interface utf8 characterset conversion routines.
Definition:
utf8.h:31
plot_font_style
Font style for plotting.
Definition:
plot_style.h:111
Generated on Fri Nov 15 2024 15:34:02 for NetSurf by
1.9.4