Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-18 10:28:15

0001 /* Pango
0002  * pango-coverage.h: Coverage sets for fonts
0003  *
0004  * Copyright (C) 2000 Red Hat Software
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public
0017  * License along with this library; if not, write to the
0018  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0019  * Boston, MA 02111-1307, USA.
0020  */
0021 
0022 #ifndef __PANGO_COVERAGE_H__
0023 #define __PANGO_COVERAGE_H__
0024 
0025 #include <glib-object.h>
0026 
0027 #include <pango/pango-version-macros.h>
0028 #include <hb.h>
0029 
0030 G_BEGIN_DECLS
0031 
0032 /**
0033  * PangoCoverage:
0034  *
0035  * A `PangoCoverage` structure is a map from Unicode characters
0036  * to [enum@Pango.CoverageLevel] values.
0037  *
0038  * It is often necessary in Pango to determine if a particular
0039  * font can represent a particular character, and also how well
0040  * it can represent that character. The `PangoCoverage` is a data
0041  * structure that is used to represent that information. It is an
0042  * opaque structure with no public fields.
0043  */
0044 typedef struct _PangoCoverage PangoCoverage;
0045 
0046 /**
0047  * PangoCoverageLevel:
0048  * @PANGO_COVERAGE_NONE: The character is not representable with
0049  *   the font.
0050  * @PANGO_COVERAGE_FALLBACK: The character is represented in a
0051  *   way that may be comprehensible but is not the correct
0052  *   graphical form. For instance, a Hangul character represented
0053  *   as a a sequence of Jamos, or a Latin transliteration of a
0054  *   Cyrillic word.
0055  * @PANGO_COVERAGE_APPROXIMATE: The character is represented as
0056  *   basically the correct graphical form, but with a stylistic
0057  *   variant inappropriate for the current script.
0058  * @PANGO_COVERAGE_EXACT: The character is represented as the
0059  *   correct graphical form.
0060  *
0061  * `PangoCoverageLevel` is used to indicate how well a font can
0062  * represent a particular Unicode character for a particular script.
0063  *
0064  * Since 1.44, only %PANGO_COVERAGE_NONE and %PANGO_COVERAGE_EXACT
0065  * will be returned.
0066  */
0067 typedef enum {
0068   PANGO_COVERAGE_NONE,
0069   PANGO_COVERAGE_FALLBACK,
0070   PANGO_COVERAGE_APPROXIMATE,
0071   PANGO_COVERAGE_EXACT
0072 } PangoCoverageLevel;
0073 
0074 PANGO_AVAILABLE_IN_ALL
0075 GType pango_coverage_get_type (void) G_GNUC_CONST;
0076 
0077 PANGO_AVAILABLE_IN_ALL
0078 PangoCoverage *    pango_coverage_new     (void);
0079 PANGO_DEPRECATED_IN_1_52_FOR(g_object_ref)
0080 PangoCoverage *    pango_coverage_ref     (PangoCoverage      *coverage);
0081 PANGO_DEPRECATED_IN_1_52_FOR(g_object_unref)
0082 void               pango_coverage_unref   (PangoCoverage      *coverage);
0083 PANGO_AVAILABLE_IN_ALL
0084 PangoCoverage *    pango_coverage_copy    (PangoCoverage      *coverage);
0085 PANGO_AVAILABLE_IN_ALL
0086 PangoCoverageLevel pango_coverage_get     (PangoCoverage      *coverage,
0087                        int                 index_);
0088 PANGO_AVAILABLE_IN_ALL
0089 void               pango_coverage_set     (PangoCoverage      *coverage,
0090                        int                 index_,
0091                        PangoCoverageLevel  level);
0092 PANGO_DEPRECATED_IN_1_44
0093 void               pango_coverage_max     (PangoCoverage      *coverage,
0094                        PangoCoverage      *other);
0095 
0096 PANGO_DEPRECATED_IN_1_44
0097 void           pango_coverage_to_bytes   (PangoCoverage  *coverage,
0098                       guchar        **bytes,
0099                       int            *n_bytes);
0100 PANGO_DEPRECATED_IN_1_44
0101 PangoCoverage *pango_coverage_from_bytes (guchar         *bytes,
0102                       int             n_bytes);
0103 
0104 G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoCoverage, g_object_unref)
0105 
0106 G_END_DECLS
0107 
0108 #endif /* __PANGO_COVERAGE_H__ */