You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
3.4 KiB

  1. /* Pango
  2. * pango-font.h: Font handling
  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. #ifndef __PANGO_FONTMAP_H__
  22. #define __PANGO_FONTMAP_H__
  23. #include <pango/pango-font.h>
  24. #include <pango/pango-fontset.h>
  25. G_BEGIN_DECLS
  26. #define PANGO_TYPE_FONT_MAP (pango_font_map_get_type ())
  27. #define PANGO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_MAP, PangoFontMap))
  28. #define PANGO_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_MAP))
  29. typedef struct _PangoContext PangoContext;
  30. GType pango_font_map_get_type (void) G_GNUC_CONST;
  31. PangoContext * pango_font_map_create_context (PangoFontMap *fontmap);
  32. PangoFont * pango_font_map_load_font (PangoFontMap *fontmap,
  33. PangoContext *context,
  34. const PangoFontDescription *desc);
  35. PangoFontset *pango_font_map_load_fontset (PangoFontMap *fontmap,
  36. PangoContext *context,
  37. const PangoFontDescription *desc,
  38. PangoLanguage *language);
  39. void pango_font_map_list_families (PangoFontMap *fontmap,
  40. PangoFontFamily ***families,
  41. int *n_families);
  42. #ifdef PANGO_ENABLE_BACKEND
  43. #define PANGO_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
  44. #define PANGO_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP))
  45. #define PANGO_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
  46. typedef struct _PangoFontMapClass PangoFontMapClass;
  47. struct _PangoFontMap
  48. {
  49. GObject parent_instance;
  50. };
  51. struct _PangoFontMapClass
  52. {
  53. GObjectClass parent_class;
  54. /*< public >*/
  55. PangoFont * (*load_font) (PangoFontMap *fontmap,
  56. PangoContext *context,
  57. const PangoFontDescription *desc);
  58. void (*list_families) (PangoFontMap *fontmap,
  59. PangoFontFamily ***families,
  60. int *n_families);
  61. PangoFontset *(*load_fontset) (PangoFontMap *fontmap,
  62. PangoContext *context,
  63. const PangoFontDescription *desc,
  64. PangoLanguage *language);
  65. const char *shape_engine_type;
  66. /*< private >*/
  67. /* Padding for future expansion */
  68. void (*_pango_reserved1) (void);
  69. void (*_pango_reserved2) (void);
  70. void (*_pango_reserved3) (void);
  71. void (*_pango_reserved4) (void);
  72. };
  73. const char *pango_font_map_get_shape_engine_type (PangoFontMap *fontmap);
  74. #endif /* PANGO_ENABLE_BACKEND */
  75. G_END_DECLS
  76. #endif /* __PANGO_FONTMAP_H__ */