1/* Pango
2 * pango-coverage.h: Coverage sets for fonts
3 *
4 * Copyright (C) 2000 Red Hat Software
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library 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 GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#ifndef __PANGO_COVERAGE_H__
23#define __PANGO_COVERAGE_H__
24
25#include <glib-object.h>
26
27#include <pango/pango-version-macros.h>
28#include <hb.h>
29
30G_BEGIN_DECLS
31
32/**
33 * PangoCoverage:
34 *
35 * A `PangoCoverage` structure is a map from Unicode characters
36 * to [enum@Pango.CoverageLevel] values.
37 *
38 * It is often necessary in Pango to determine if a particular
39 * font can represent a particular character, and also how well
40 * it can represent that character. The `PangoCoverage` is a data
41 * structure that is used to represent that information. It is an
42 * opaque structure with no public fields.
43 */
44typedef struct _PangoCoverage PangoCoverage;
45
46/**
47 * PangoCoverageLevel:
48 * @PANGO_COVERAGE_NONE: The character is not representable with
49 * the font.
50 * @PANGO_COVERAGE_FALLBACK: The character is represented in a
51 * way that may be comprehensible but is not the correct
52 * graphical form. For instance, a Hangul character represented
53 * as a a sequence of Jamos, or a Latin transliteration of a
54 * Cyrillic word.
55 * @PANGO_COVERAGE_APPROXIMATE: The character is represented as
56 * basically the correct graphical form, but with a stylistic
57 * variant inappropriate for the current script.
58 * @PANGO_COVERAGE_EXACT: The character is represented as the
59 * correct graphical form.
60 *
61 * `PangoCoverageLevel` is used to indicate how well a font can
62 * represent a particular Unicode character for a particular script.
63 *
64 * Since 1.44, only %PANGO_COVERAGE_NONE and %PANGO_COVERAGE_EXACT
65 * will be returned.
66 */
67typedef enum {
68 PANGO_COVERAGE_NONE,
69 PANGO_COVERAGE_FALLBACK,
70 PANGO_COVERAGE_APPROXIMATE,
71 PANGO_COVERAGE_EXACT
72} PangoCoverageLevel;
73
74PANGO_AVAILABLE_IN_ALL
75GType pango_coverage_get_type (void) G_GNUC_CONST;
76
77PANGO_AVAILABLE_IN_ALL
78PangoCoverage * pango_coverage_new (void);
79PANGO_DEPRECATED_IN_1_52_FOR(g_object_ref)
80PangoCoverage * pango_coverage_ref (PangoCoverage *coverage);
81PANGO_DEPRECATED_IN_1_52_FOR(g_object_unref)
82void pango_coverage_unref (PangoCoverage *coverage);
83PANGO_AVAILABLE_IN_ALL
84PangoCoverage * pango_coverage_copy (PangoCoverage *coverage);
85PANGO_AVAILABLE_IN_ALL
86PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage,
87 int index_);
88PANGO_AVAILABLE_IN_ALL
89void pango_coverage_set (PangoCoverage *coverage,
90 int index_,
91 PangoCoverageLevel level);
92PANGO_DEPRECATED_IN_1_44
93void pango_coverage_max (PangoCoverage *coverage,
94 PangoCoverage *other);
95
96PANGO_DEPRECATED_IN_1_44
97void pango_coverage_to_bytes (PangoCoverage *coverage,
98 guchar **bytes,
99 int *n_bytes);
100PANGO_DEPRECATED_IN_1_44
101PangoCoverage *pango_coverage_from_bytes (guchar *bytes,
102 int n_bytes);
103
104G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoCoverage, g_object_unref)
105
106G_END_DECLS
107
108#endif /* __PANGO_COVERAGE_H__ */
109

source code of include/pango-1.0/pango/pango-coverage.h