1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION) || defined(GTK_COMPILATION)
29 #ifndef __GDK_FONT_H__
30 #define __GDK_FONT_H__
32 #include <gdk/gdktypes.h>
33 #include <pango/pango-font.h>
37 #define GDK_TYPE_FONT gdk_font_get_type ()
40 * GDK_FONT_FONT: the font is an XFontStruct.
41 * GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
56 GType gdk_font_get_type (void) G_GNUC_CONST;
58 GdkFont* gdk_font_ref (GdkFont *font);
59 void gdk_font_unref (GdkFont *font);
60 gint gdk_font_id (const GdkFont *font);
61 gboolean gdk_font_equal (const GdkFont *fonta,
62 const GdkFont *fontb);
64 GdkFont *gdk_font_load_for_display (GdkDisplay *display,
65 const gchar *font_name);
66 GdkFont *gdk_fontset_load_for_display (GdkDisplay *display,
67 const gchar *fontset_name);
68 GdkFont *gdk_font_from_description_for_display (GdkDisplay *display,
69 PangoFontDescription *font_desc);
71 #ifndef GDK_DISABLE_DEPRECATED
73 #ifndef GDK_MULTIHEAD_SAFE
74 GdkFont* gdk_font_load (const gchar *font_name);
75 GdkFont* gdk_fontset_load (const gchar *fontset_name);
76 GdkFont* gdk_font_from_description (PangoFontDescription *font_desc);
79 gint gdk_string_width (GdkFont *font,
81 gint gdk_text_width (GdkFont *font,
84 gint gdk_text_width_wc (GdkFont *font,
87 gint gdk_char_width (GdkFont *font,
89 gint gdk_char_width_wc (GdkFont *font,
91 gint gdk_string_measure (GdkFont *font,
93 gint gdk_text_measure (GdkFont *font,
96 gint gdk_char_measure (GdkFont *font,
98 gint gdk_string_height (GdkFont *font,
100 gint gdk_text_height (GdkFont *font,
103 gint gdk_char_height (GdkFont *font,
106 void gdk_text_extents (GdkFont *font,
114 void gdk_text_extents_wc (GdkFont *font,
115 const GdkWChar *text,
122 void gdk_string_extents (GdkFont *font,
130 GdkDisplay * gdk_font_get_display (GdkFont *font);
132 #endif /* GDK_DISABLE_DEPRECATED */
136 #endif /* __GDK_FONT_H__ */
138 #endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION || GTK_COMPILATION */