Ardour  9.0-pre0-582-g084a23a80d
gdkfont.h
Go to the documentation of this file.
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
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.
8  *
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.
13  *
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.
18  */
19 
20 /*
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/.
25  */
26 
27 #if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION)
28 
29 #ifndef __GDK_FONT_H__
30 #define __GDK_FONT_H__
31 
32 #include <gdk/gdktypes.h>
33 #include <pango/pango.h>
34 
35 G_BEGIN_DECLS
36 
37 #define GDK_TYPE_FONT gdk_font_get_type ()
38 
39 /* Types of font.
40  * GDK_FONT_FONT: the font is an XFontStruct.
41  * GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
42  */
43 typedef enum
44 {
48 
49 struct _GdkFont
50 {
52  gint ascent;
53  gint descent;
54 };
55 
56 GType gdk_font_get_type (void) G_GNUC_CONST;
57 
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);
63 
65  const gchar *font_name);
67  const gchar *fontset_name);
69  PangoFontDescription *font_desc);
70 
71 #ifndef GDK_DISABLE_DEPRECATED
72 
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);
77 #endif
78 
80  const gchar *string);
81 gint gdk_text_width (GdkFont *font,
82  const gchar *text,
83  gint text_length);
85  const GdkWChar *text,
86  gint text_length);
87 gint gdk_char_width (GdkFont *font,
88  gchar character);
90  GdkWChar character);
92  const gchar *string);
94  const gchar *text,
95  gint text_length);
97  gchar character);
99  const gchar *string);
101  const gchar *text,
102  gint text_length);
104  gchar character);
105 
107  const gchar *text,
108  gint text_length,
109  gint *lbearing,
110  gint *rbearing,
111  gint *width,
112  gint *ascent,
113  gint *descent);
115  const GdkWChar *text,
116  gint text_length,
117  gint *lbearing,
118  gint *rbearing,
119  gint *width,
120  gint *ascent,
121  gint *descent);
123  const gchar *string,
124  gint *lbearing,
125  gint *rbearing,
126  gint *width,
127  gint *ascent,
128  gint *descent);
129 
131 
132 #endif /* GDK_DISABLE_DEPRECATED */
133 
134 G_END_DECLS
135 
136 #endif /* __GDK_FONT_H__ */
137 
138 #endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION || GTK_COMPILATION */
GdkDisplay * gdk_font_get_display(GdkFont *font)
void gdk_font_unref(GdkFont *font)
GdkFontType
Definition: gdkfont.h:44
@ GDK_FONT_FONT
Definition: gdkfont.h:45
@ GDK_FONT_FONTSET
Definition: gdkfont.h:46
gint gdk_text_width(GdkFont *font, const gchar *text, gint text_length)
void gdk_text_extents_wc(GdkFont *font, const GdkWChar *text, gint text_length, gint *lbearing, gint *rbearing, gint *width, gint *ascent, gint *descent)
void gdk_text_extents(GdkFont *font, const gchar *text, gint text_length, gint *lbearing, gint *rbearing, gint *width, gint *ascent, gint *descent)
GdkFont * gdk_font_from_description(PangoFontDescription *font_desc)
gint gdk_text_height(GdkFont *font, const gchar *text, gint text_length)
GdkFont * gdk_font_load_for_display(GdkDisplay *display, const gchar *font_name)
gint gdk_string_width(GdkFont *font, const gchar *string)
gint gdk_string_measure(GdkFont *font, const gchar *string)
GdkFont * gdk_fontset_load_for_display(GdkDisplay *display, const gchar *fontset_name)
GdkFont * gdk_fontset_load(const gchar *fontset_name)
gint gdk_font_id(const GdkFont *font)
void gdk_string_extents(GdkFont *font, const gchar *string, gint *lbearing, gint *rbearing, gint *width, gint *ascent, gint *descent)
gboolean gdk_font_equal(const GdkFont *fonta, const GdkFont *fontb)
gint gdk_char_width_wc(GdkFont *font, GdkWChar character)
gint gdk_string_height(GdkFont *font, const gchar *string)
gint gdk_text_width_wc(GdkFont *font, const GdkWChar *text, gint text_length)
GdkFont * gdk_font_from_description_for_display(GdkDisplay *display, PangoFontDescription *font_desc)
gint gdk_char_width(GdkFont *font, gchar character)
gint gdk_char_measure(GdkFont *font, gchar character)
gint gdk_text_measure(GdkFont *font, const gchar *text, gint text_length)
GdkFont * gdk_font_ref(GdkFont *font)
gint gdk_char_height(GdkFont *font, gchar character)
GdkFont * gdk_font_load(const gchar *font_name)
GType gdk_font_get_type(void) G_GNUC_CONST
guint32 GdkWChar
Definition: gdktypes.h:78
GdkFontType type
Definition: gdkfont.h:51
gint descent
Definition: gdkfont.h:53
gint ascent
Definition: gdkfont.h:52
gint width
Definition: xcursors.h:1