libcss
Loading...
Searching...
No Matches
font_face.h
Go to the documentation of this file.
1/*
2 * This file is part of LibCSS.
3 * Licensed under the MIT License,
4 * http://www.opensource.org/licenses/mit-license.php
5 * Copyright 2011 Things Made Out Of Other Things Ltd.
6 * Written by James Montgomerie <jamie@th.ingsmadeoutofotherthin.gs>
7 */
8
9#ifndef libcss_font_face_h_
10#define libcss_font_face_h_
11
12#ifdef __cplusplus
13extern "C"
14{
15#endif
16
17#include <libwapcaplet/libwapcaplet.h>
18
19#include <libcss/errors.h>
20#include <libcss/functypes.h>
21#include <libcss/properties.h>
22#include <libcss/types.h>
23
26
28 /* WOFF (Web Open Font Format); .woff */
30 /* TrueType or OpenType; .ttf, .otf */
32 /* Embedded OpenType; .eot */
34 /* SVG Font; .svg, .svgz */
35
37 /* Format specified, but not recognised */
38
39 /* We don't define CSS_FONT_FACE_SRC_FORMAT_TRUETYPE as might be
40 * expected, because the CSS3 specification
41 * (http://www.w3.org/TR/css3-fonts/, ยง4.3) says:
42 * "Given the overlap in common usage between TrueType and
43 * OpenType, the format hints "truetype" and "opentype" must be
44 * considered as synonymous"
45 * so we compute a hint of 'truetype' to css_font_face_format_opentype.
46 */
48
54
55
57 const css_font_face *font_face,
58 lwc_string **font_family);
59
61 uint32_t *count);
62css_error css_font_face_get_src(const css_font_face *font_face, uint32_t index,
63 const css_font_face_src **src);
64
66 lwc_string **location);
67
69 const css_font_face_src *src);
71
72uint8_t css_font_face_font_style(const css_font_face *font_face);
73uint8_t css_font_face_font_weight(const css_font_face *font_face);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif
css_error
Definition errors.h:18
css_error css_font_face_get_font_family(const css_font_face *font_face, lwc_string **font_family)
Definition font_face.c:111
css_error css_font_face_get_src(const css_font_face *font_face, uint32_t index, const css_font_face_src **src)
Definition font_face.c:171
css_font_face_format
Definition font_face.h:24
@ CSS_FONT_FACE_FORMAT_EMBEDDED_OPENTYPE
Definition font_face.h:31
@ CSS_FONT_FACE_FORMAT_WOFF
Definition font_face.h:27
@ CSS_FONT_FACE_FORMAT_SVG
Definition font_face.h:33
@ CSS_FONT_FACE_FORMAT_UNSPECIFIED
Definition font_face.h:25
@ CSS_FONT_FACE_FORMAT_UNKNOWN
Definition font_face.h:36
@ CSS_FONT_FACE_FORMAT_OPENTYPE
Definition font_face.h:29
css_font_face_location_type
Definition font_face.h:49
@ CSS_FONT_FACE_LOCATION_TYPE_UNSPECIFIED
Definition font_face.h:50
@ CSS_FONT_FACE_LOCATION_TYPE_URI
Definition font_face.h:52
@ CSS_FONT_FACE_LOCATION_TYPE_LOCAL
Definition font_face.h:51
css_font_face_format css_font_face_src_format(const css_font_face_src *src)
Definition font_face.c:223
css_error css_font_face_src_get_location(const css_font_face_src *src, lwc_string **location)
Definition font_face.c:194
css_font_face_location_type css_font_face_src_location_type(const css_font_face_src *src)
Definition font_face.c:211
css_error css_font_face_count_srcs(const css_font_face *font_face, uint32_t *count)
Definition font_face.c:152
uint8_t css_font_face_font_style(const css_font_face *font_face)
Definition font_face.c:128
uint8_t css_font_face_font_weight(const css_font_face *font_face)
Definition font_face.c:139
Definition font_face.h:15
Definition font_face.h:26