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.h>
26
27#include <pango/pango-version-macros.h>
28
29G_BEGIN_DECLS
30
31/**
32 * PangoCoverage:
33 *
34 * The #PangoCoverage structure represents a map from Unicode characters
35 * to #PangoCoverageLevel. It is an opaque structure with no public fields.
36 */
37typedef struct _PangoCoverage PangoCoverage;
38
39/**
40 * PangoCoverageLevel:
41 * @PANGO_COVERAGE_NONE: The character is not representable with the font.
42 * @PANGO_COVERAGE_FALLBACK: The character is represented in a way that may be
43 * comprehensible but is not the correct graphical form.
44 * For instance, a Hangul character represented as a
45 * a sequence of Jamos, or a Latin transliteration of a Cyrillic word.
46 * @PANGO_COVERAGE_APPROXIMATE: The character is represented as basically the correct
47 * graphical form, but with a stylistic variant inappropriate for
48 * the current script.
49 * @PANGO_COVERAGE_EXACT: The character is represented as the correct graphical form.
50 *
51 * Used to indicate how well a font can represent a particular Unicode
52 * character point for a particular script.
53 */
54typedef enum {
55 PANGO_COVERAGE_NONE,
56 PANGO_COVERAGE_FALLBACK,
57 PANGO_COVERAGE_APPROXIMATE,
58 PANGO_COVERAGE_EXACT
59} PangoCoverageLevel;
60
61PANGO_AVAILABLE_IN_ALL
62PangoCoverage * pango_coverage_new (void);
63PANGO_AVAILABLE_IN_ALL
64PangoCoverage * pango_coverage_ref (PangoCoverage *coverage);
65PANGO_AVAILABLE_IN_ALL
66void pango_coverage_unref (PangoCoverage *coverage);
67PANGO_AVAILABLE_IN_ALL
68PangoCoverage * pango_coverage_copy (PangoCoverage *coverage);
69PANGO_AVAILABLE_IN_ALL
70PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage,
71 int index_);
72PANGO_AVAILABLE_IN_ALL
73void pango_coverage_set (PangoCoverage *coverage,
74 int index_,
75 PangoCoverageLevel level);
76PANGO_AVAILABLE_IN_ALL
77void pango_coverage_max (PangoCoverage *coverage,
78 PangoCoverage *other);
79
80PANGO_AVAILABLE_IN_ALL
81void pango_coverage_to_bytes (PangoCoverage *coverage,
82 guchar **bytes,
83 int *n_bytes);
84PANGO_AVAILABLE_IN_ALL
85PangoCoverage *pango_coverage_from_bytes (guchar *bytes,
86 int n_bytes);
87
88G_END_DECLS
89
90#endif /* __PANGO_COVERAGE_H__ */
91