Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* Pango
0002  * pango-font.h: Font handling
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_FONTMAP_H__
0023 #define __PANGO_FONTMAP_H__
0024 
0025 #include <pango/pango-types.h>
0026 #include <pango/pango-font.h>
0027 #include <pango/pango-fontset.h>
0028 
0029 G_BEGIN_DECLS
0030 
0031 #define PANGO_TYPE_FONT_MAP              (pango_font_map_get_type ())
0032 #define PANGO_FONT_MAP(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_MAP, PangoFontMap))
0033 #define PANGO_IS_FONT_MAP(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_MAP))
0034 #define PANGO_FONT_MAP_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
0035 #define PANGO_IS_FONT_MAP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP))
0036 #define PANGO_FONT_MAP_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
0037 
0038 typedef struct _PangoFontMapClass PangoFontMapClass;
0039 
0040 /**
0041  * PangoFontMap:
0042  *
0043  * A `PangoFontMap` represents the set of fonts available for a
0044  * particular rendering system.
0045  *
0046  * This is a virtual object with implementations being specific to
0047  * particular rendering systems.
0048  */
0049 struct _PangoFontMap
0050 {
0051   GObject parent_instance;
0052 };
0053 
0054 /**
0055  * PangoFontMapClass:
0056  * @parent_class: parent `GObjectClass`
0057  * @load_font: a function to load a font with a given description. See
0058  * pango_font_map_load_font().
0059  * @list_families: A function to list available font families. See
0060  * pango_font_map_list_families().
0061  * @load_fontset: a function to load a fontset with a given given description
0062  * suitable for a particular language. See pango_font_map_load_fontset().
0063  * @shape_engine_type: the type of rendering-system-dependent engines that
0064  * can handle fonts of this fonts loaded with this fontmap.
0065  * @get_serial: a function to get the serial number of the fontmap.
0066  * See pango_font_map_get_serial().
0067  * @changed: See pango_font_map_changed()
0068  *
0069  * The `PangoFontMapClass` structure holds the virtual functions for
0070  * a particular `PangoFontMap` implementation.
0071  */
0072 struct _PangoFontMapClass
0073 {
0074   GObjectClass parent_class;
0075 
0076   /*< public >*/
0077 
0078   PangoFont *   (*load_font)     (PangoFontMap               *fontmap,
0079                                   PangoContext               *context,
0080                                   const PangoFontDescription *desc);
0081   void          (*list_families) (PangoFontMap               *fontmap,
0082                                   PangoFontFamily          ***families,
0083                                   int                        *n_families);
0084   PangoFontset *(*load_fontset)  (PangoFontMap               *fontmap,
0085                                   PangoContext               *context,
0086                                   const PangoFontDescription *desc,
0087                                   PangoLanguage              *language);
0088 
0089   const char     *shape_engine_type;
0090 
0091   guint         (*get_serial)    (PangoFontMap               *fontmap);
0092   void          (*changed)       (PangoFontMap               *fontmap);
0093 
0094   PangoFontFamily * (*get_family) (PangoFontMap               *fontmap,
0095                                    const char                 *name);
0096 
0097   PangoFontFace *   (*get_face)   (PangoFontMap               *fontmap,
0098                                    PangoFont                  *font);
0099 };
0100 
0101 PANGO_AVAILABLE_IN_ALL
0102 GType         pango_font_map_get_type       (void) G_GNUC_CONST;
0103 PANGO_AVAILABLE_IN_1_22
0104 PangoContext * pango_font_map_create_context (PangoFontMap               *fontmap);
0105 PANGO_AVAILABLE_IN_ALL
0106 PangoFont *   pango_font_map_load_font     (PangoFontMap                 *fontmap,
0107                         PangoContext                 *context,
0108                         const PangoFontDescription   *desc);
0109 PANGO_AVAILABLE_IN_ALL
0110 PangoFontset *pango_font_map_load_fontset  (PangoFontMap                 *fontmap,
0111                         PangoContext                 *context,
0112                         const PangoFontDescription   *desc,
0113                         PangoLanguage                *language);
0114 PANGO_AVAILABLE_IN_ALL
0115 void          pango_font_map_list_families (PangoFontMap                 *fontmap,
0116                         PangoFontFamily            ***families,
0117                         int                          *n_families);
0118 PANGO_AVAILABLE_IN_1_32
0119 guint         pango_font_map_get_serial    (PangoFontMap                 *fontmap);
0120 PANGO_AVAILABLE_IN_1_34
0121 void          pango_font_map_changed       (PangoFontMap                 *fontmap);
0122 
0123 PANGO_AVAILABLE_IN_1_46
0124 PangoFontFamily *pango_font_map_get_family (PangoFontMap                 *fontmap,
0125                                             const char                   *name);
0126 
0127 PANGO_AVAILABLE_IN_1_52
0128 PangoFont *   pango_font_map_reload_font   (PangoFontMap                 *fontmap,
0129                                             PangoFont                    *font,
0130                                             double                        scale,
0131                                             PangoContext                 *context,
0132                                             const char                   *variations);
0133 
0134 
0135 G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoFontMap, g_object_unref)
0136 
0137 G_END_DECLS
0138 
0139 #endif /* __PANGO_FONTMAP_H__ */