4 * Copyright (C) 1999, 2004 Red Hat, Inc.
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.
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.
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.
22 #ifndef __PANGOCAIRO_H__
23 #define __PANGOCAIRO_H__
25 #include <pango/pango.h>
33 * #PangoCairoFont is an interface exported by fonts for
34 * use with Cairo. The actual type of the font will depend
35 * on the particular font technology Cairo was compiled to use.
39 typedef struct _PangoCairoFont PangoCairoFont;
40 #define PANGO_TYPE_CAIRO_FONT (pango_cairo_font_get_type ())
41 #define PANGO_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT, PangoCairoFont))
42 #define PANGO_IS_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT))
47 * #PangoCairoFontMap is an interface exported by font maps for
48 * use with Cairo. The actual type of the font map will depend
49 * on the particular font technology Cairo was compiled to use.
53 typedef struct _PangoCairoFontMap PangoCairoFontMap;
54 #define PANGO_TYPE_CAIRO_FONT_MAP (pango_cairo_font_map_get_type ())
55 #define PANGO_CAIRO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT_MAP, PangoCairoFontMap))
56 #define PANGO_IS_CAIRO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT_MAP))
58 typedef void (* PangoCairoShapeRendererFunc) (cairo_t *cr,
66 GType pango_cairo_font_map_get_type (void) G_GNUC_CONST;
68 PangoFontMap *pango_cairo_font_map_new (void);
69 PangoFontMap *pango_cairo_font_map_new_for_font_type (cairo_font_type_t fonttype);
70 PangoFontMap *pango_cairo_font_map_get_default (void);
71 void pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap);
72 cairo_font_type_t pango_cairo_font_map_get_font_type (PangoCairoFontMap *fontmap);
74 void pango_cairo_font_map_set_resolution (PangoCairoFontMap *fontmap,
76 double pango_cairo_font_map_get_resolution (PangoCairoFontMap *fontmap);
77 #ifndef PANGO_DISABLE_DEPRECATED
78 PangoContext *pango_cairo_font_map_create_context (PangoCairoFontMap *fontmap);
84 GType pango_cairo_font_get_type (void) G_GNUC_CONST;
86 cairo_scaled_font_t *pango_cairo_font_get_scaled_font (PangoCairoFont *font);
88 /* Update a Pango context for the current state of a cairo context
90 void pango_cairo_update_context (cairo_t *cr,
91 PangoContext *context);
93 void pango_cairo_context_set_font_options (PangoContext *context,
94 const cairo_font_options_t *options);
95 const cairo_font_options_t *pango_cairo_context_get_font_options (PangoContext *context);
97 void pango_cairo_context_set_resolution (PangoContext *context,
99 double pango_cairo_context_get_resolution (PangoContext *context);
101 void pango_cairo_context_set_shape_renderer (PangoContext *context,
102 PangoCairoShapeRendererFunc func,
104 GDestroyNotify dnotify);
105 PangoCairoShapeRendererFunc pango_cairo_context_get_shape_renderer (PangoContext *context,
110 PangoContext *pango_cairo_create_context (cairo_t *cr);
111 PangoLayout *pango_cairo_create_layout (cairo_t *cr);
112 void pango_cairo_update_layout (cairo_t *cr,
113 PangoLayout *layout);
118 void pango_cairo_show_glyph_string (cairo_t *cr,
120 PangoGlyphString *glyphs);
121 void pango_cairo_show_glyph_item (cairo_t *cr,
123 PangoGlyphItem *glyph_item);
124 void pango_cairo_show_layout_line (cairo_t *cr,
125 PangoLayoutLine *line);
126 void pango_cairo_show_layout (cairo_t *cr,
127 PangoLayout *layout);
129 void pango_cairo_show_error_underline (cairo_t *cr,
136 * Rendering to a path
138 void pango_cairo_glyph_string_path (cairo_t *cr,
140 PangoGlyphString *glyphs);
141 void pango_cairo_layout_line_path (cairo_t *cr,
142 PangoLayoutLine *line);
143 void pango_cairo_layout_path (cairo_t *cr,
144 PangoLayout *layout);
146 void pango_cairo_error_underline_path (cairo_t *cr,
154 #endif /* __PANGOCAIRO_H__ */