4 * Copyright (C) 1999 Red Hat Software
5 * Copyright (C) 2000 Tor Lillqvist
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef __PANGOFT2_PRIVATE_H__
24 #define __PANGOFT2_PRIVATE_H__
26 #include <pango/pangoft2.h>
27 #include <pango/pangofc-fontmap.h>
28 #include <pango/pango-renderer.h>
29 #include <fontconfig/fontconfig.h>
32 /*#define DEBUGGING 1*/
34 #if defined(DEBUGGING) && DEBUGGING
36 #define PING(printlist) \
37 (g_print ("%s:%d ", __PRETTY_FUNCTION__, __LINE__), \
41 #define PING(printlist) \
42 (g_print ("%s:%d ", __FILE__, __LINE__), \
46 #else /* !DEBUGGING */
47 #define PING(printlist)
50 typedef struct _PangoFT2Font PangoFT2Font;
51 typedef struct _PangoFT2GlyphInfo PangoFT2GlyphInfo;
52 typedef struct _PangoFT2Renderer PangoFT2Renderer;
63 GSList *metrics_by_lang;
65 GHashTable *glyph_info;
66 GDestroyNotify glyph_cache_destroy;
69 struct _PangoFT2GlyphInfo
71 PangoRectangle logical_rect;
72 PangoRectangle ink_rect;
76 #define PANGO_TYPE_FT2_FONT (pango_ft2_font_get_type ())
77 #define PANGO_FT2_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT, PangoFT2Font))
78 #define PANGO_FT2_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_FONT))
80 GType pango_ft2_font_get_type (void) G_GNUC_CONST;
82 PangoFT2Font * _pango_ft2_font_new (PangoFT2FontMap *ft2fontmap,
84 FT_Library _pango_ft2_font_map_get_library (PangoFontMap *fontmap);
85 const char *_pango_ft2_ft_strerror (FT_Error error);
86 void _pango_ft2_font_map_default_substitute (PangoFcFontMap *fcfontmap,
89 void *_pango_ft2_font_get_cache_glyph_data (PangoFont *font,
91 void _pango_ft2_font_set_cache_glyph_data (PangoFont *font,
94 void _pango_ft2_font_set_glyph_cache_destroy (PangoFont *font,
95 GDestroyNotify destroy_notify);
97 void _pango_ft2_draw_rect (FT_Bitmap *bitmap,
98 const PangoMatrix *matrix,
103 void _pango_ft2_draw_error_underline (FT_Bitmap *bitmap,
104 const PangoMatrix *matrix,
110 #define PANGO_TYPE_FT2_RENDERER (pango_ft2_renderer_get_type())
111 #define PANGO_FT2_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_RENDERER, PangoFT2Renderer))
112 #define PANGO_IS_FT2_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_RENDERER))
114 GType pango_ft2_renderer_get_type (void) G_GNUC_CONST;
116 PangoRenderer *_pango_ft2_font_map_get_renderer (PangoFT2FontMap *ft2fontmap);
118 #endif /* __PANGOFT2_PRIVATE_H__ */