|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21585/root/usr/share/gtk-doc/html/gdk/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Fonts</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Visuals.html" title="Visuals">
<link rel="next" href="gdk-Cursors.html" title="Cursors">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="reference.html" title="API Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Visuals.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-Cursors.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3000514" class="shortcut">Top</a>
 | 
<a href="#id3001481" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-Fonts"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3000514"></a><span class="refentrytitle">Fonts</span>
</h2>
<p>Fonts — Loading and manipulating fonts</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <gdk/gdk.h>
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>;
enum <a href="gdk-Fonts.html#GdkFontType">GdkFontType</a>;
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>* <a href="gdk-Fonts.html#gdk-font-load">gdk_font_load</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *font_name);
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>* <a href="gdk-Fonts.html#gdk-font-load-for-display">gdk_font_load_for_display</a> (<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *font_name);
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>* <a href="gdk-Fonts.html#gdk-fontset-load">gdk_fontset_load</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *fontset_name);
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>* <a href="gdk-Fonts.html#gdk-fontset-load-for-display">gdk_fontset_load_for_display</a> (<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *fontset_name);
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>* <a href="gdk-Fonts.html#gdk-font-from-description">gdk_font_from_description</a> (<a
href="../pango/pango-Fonts.html#PangoFontDescription"
>PangoFontDescription</a> *font_desc);
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>* <a href="gdk-Fonts.html#gdk-font-from-description-for-display">gdk_font_from_description_for_display</a>
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
<a
href="../pango/pango-Fonts.html#PangoFontDescription"
>PangoFontDescription</a> *font_desc);
<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a>* <a href="gdk-Fonts.html#gdk-font-get-display">gdk_font_get_display</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);
<a href="gdk-Fonts.html#GdkFont">GdkFont</a>* <a href="gdk-Fonts.html#gdk-font-ref">gdk_font_ref</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);
void <a href="gdk-Fonts.html#gdk-font-unref">gdk_font_unref</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-font-id">gdk_font_id</a> (const <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gdk-Fonts.html#gdk-font-equal">gdk_font_equal</a> (const <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *fonta,
const <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *fontb);
void <a href="gdk-Fonts.html#gdk-string-extents">gdk_string_extents</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *lbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *rbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *ascent,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *descent);
void <a href="gdk-Fonts.html#gdk-text-extents">gdk_text_extents</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *lbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *rbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *ascent,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *descent);
void <a href="gdk-Fonts.html#gdk-text-extents-wc">gdk_text_extents_wc</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *lbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *rbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *ascent,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *descent);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-string-width">gdk_string_width</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-text-width">gdk_text_width</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-text-width-wc">gdk_text_width_wc</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-char-width">gdk_char_width</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> character);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-char-width-wc">gdk_char_width_wc</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> character);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-string-measure">gdk_string_measure</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-text-measure">gdk_text_measure</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-char-measure">gdk_char_measure</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> character);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-string-height">gdk_string_height</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-text-height">gdk_text_height</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-char-height">gdk_char_height</a> (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> character);
typedef <a href="gdk-Fonts.html#GdkWChar">GdkWChar</a>;
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gdk-Fonts.html#gdk-wcstombs">gdk_wcstombs</a> (const <a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *src);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Fonts.html#gdk-mbstowcs">gdk_mbstowcs</a> (<a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *dest,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *src,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> dest_max);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3001481"></a><h2>Description</h2>
<p>
The <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a> data type represents a font for drawing on
the screen. These functions provide support for
loading fonts, and also for determining the dimensions
of characters and strings when drawn with a particular
font.
</p>
<p>
Fonts in X are specified by a
<em class="firstterm">X Logical Font Description</em>.
The following description is considerably simplified.
For definitive information about XLFD's see the
X reference documentation. A X Logical Font Description (XLFD)
consists of a sequence of fields separated (and surrounded by) '-'
characters. For example, Adobe Helvetica Bold 12 pt, has the
full description:
</p>
<div class="informalexample"><pre class="programlisting">
"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
</pre></div>
<p>
</p>
<p>
The fields in the XLFD are:
</p>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td>Foundry</td>
<td>the company or organization where the font originated.</td>
</tr>
<tr>
<td>Family</td>
<td>the font family (a group of related font designs).</td>
</tr>
<tr>
<td>Weight</td>
<td>A name for the font's typographic weight
For example, 'bold' or 'medium').</td>
</tr>
<tr>
<td>Slant</td>
<td>The slant of the font. Common values are 'R' for Roman,
'I' for italoc, and 'O' for oblique.</td>
</tr>
<tr>
<td>Set Width</td>
<td>A name for the width of the font. For example,
'normal' or 'condensed'.</td>
</tr>
<tr>
<td>Add Style</td>
<td>Additional information to distinguish a font from
other fonts of the same family.</td>
</tr>
<tr>
<td>Pixel Size</td>
<td>The body size of the font in pixels.</td>
</tr>
<tr>
<td>Point Size</td>
<td>The body size of the font in 10ths of a point.
(A <em class="firstterm">point</em> is 1/72.27 inch) </td>
</tr>
<tr>
<td>Resolution X</td>
<td>The horizontal resolution that the font was designed for.</td>
</tr>
<tr>
<td>Resolution Y</td>
<td>The vertical resolution that the font was designed for .</td>
</tr>
<tr>
<td>Spacing</td>
<td>The type of spacing for the font - can be 'p' for proportional,
'm' for monospaced or 'c' for charcell.</td>
</tr>
<tr>
<td>Average Width</td>
<td>The average width of a glyph in the font. For monospaced
and charcell fonts, all glyphs in the font have this width</td>
</tr>
<tr>
<td>Charset Registry</td>
<td>The registration authority that owns the encoding for
the font. Together with the Charset Encoding field, this
defines the character set for the font.</td>
</tr>
<tr>
<td>Charset Encoding</td>
<td>An identifier for the particular character set encoding.</td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
When specifying a font via a X logical Font Description,
'*' can be used as a wildcard to match any portion of
the XLFD. For instance, the above example could
also be specified as
</p>
<div class="informalexample"><pre class="programlisting">
"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
</pre></div>
<p>
It is generally a good idea to use wildcards for any
portion of the XLFD that your program does not care
about specifically, since that will improve the
chances of finding a matching font.
</p>
<p>
A <em class="firstterm">fontset</em> is a list of fonts
that is used for drawing international text that may
contain characters from a number of different character
sets. It is represented by a list of XLFD's.
</p>
<p>
The font for a given character set is determined by going
through the list of XLFD's in order. For each one, if
the registry and and encoding fields match the desired
character set, then that font is used, otherwise if
the XLFD contains wild-cards for the registry and encoding
fields, the registry and encoding for the desired character
set are substituted in and a lookup is done. If a match is found
that font is used. Otherwise, processing continues
on to the next font in the list.
</p>
<p>
The functions for determining the metrics of a string
come in several varieties that can take a number
of forms of string input:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">8-bit string</span></td>
<td><p>
When using functions like <a href="gdk-Fonts.html#gdk-string-width"><code class="function">gdk_string_width()</code></a> that
take a <span class="type">gchar *</span>, if the font is of type
<a href="gdk-Fonts.html#GDK-FONT-FONT:CAPS"><code class="literal">GDK_FONT_FONT</code></a> and is an 8-bit font, then each
<span class="type">gchar</span> indexes the glyphs in the font directly.
</p></td>
</tr>
<tr>
<td>
<span class="term">16-bit string</span></td>
<td><p>
For functions taking a <span class="type">gchar *</span>, if the
font is of type <a href="gdk-Fonts.html#GDK-FONT-FONT:CAPS"><code class="literal">GDK_FONT_FONT</code></a>, and is a 16-bit
font, then the <span class="type">gchar *</span> argument is
interpreted as a <span class="type">guint16 *</span> cast to
a <span class="type">gchar *</span> and each <span class="type">guint16</span>
indexes the glyphs in the font directly.
</p></td>
</tr>
<tr>
<td>
<span class="term">Multibyte string</span></td>
<td><p>
For functions taking a <span class="type">gchar *</span>, if the
font is of type <a href="gdk-Fonts.html#GDK-FONT-FONTSET:CAPS"><code class="literal">GDK_FONT_FONTSET</code></a>, then the input
string is interpreted as a <em class="firstterm">multibyte</em>
encoded according to the current locale. (A multibyte
string is one in which each character may consist
of one or more bytes, with different lengths for different
characters in the string). They can be converted to and
from wide character strings (see below) using
<a href="gdk-Fonts.html#gdk-wcstombs"><code class="function">gdk_wcstombs()</code></a> and <a href="gdk-Fonts.html#gdk-mbstowcs"><code class="function">gdk_mbstowcs()</code></a>.) The string will
be rendered using one or more different fonts from
the fontset.
</p></td>
</tr>
<tr>
<td>
<span class="term">Wide character string</span></td>
<td><p>
For a number of the text-measuring functions, GDK
provides a variant (such as <a href="gdk-Fonts.html#gdk-text-width-wc"><code class="function">gdk_text_width_wc()</code></a>) which
takes a <span class="type">GdkWChar *</span> instead of a
<span class="type">gchar *</span>. The input is then taken to
be a wide character string in the encoding of the
current locale. (A wide character string is a string
in which each character consists of several bytes,
and the width of each character in the string is
constant.)
</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
GDK provides functions to determine a number of different
measurements (metrics) for a given string. (Need diagram
here).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">ascent</span></td>
<td><p>
The vertical distance from the origin of the drawing
opereration to the top of the drawn character.
</p></td>
</tr>
<tr>
<td>
<span class="term">descent</span></td>
<td><p>
The vertical distance from the origin of the drawing
opereration to the bottom of the drawn character.
</p></td>
</tr>
<tr>
<td>
<span class="term">left bearing</span></td>
<td><p>
The horizontal distance from the origin of the drawing
operation to the left-most part of the drawn character.
</p></td>
</tr>
<tr>
<td>
<span class="term">right bearing</span></td>
<td><p>
The horizontal distance from the origin of the drawing
operation to the right-most part of the drawn character.
</p></td>
</tr>
<tr>
<td>
<span class="term">width bearing</span></td>
<td><p>
The horizontal distance from the origin of the drawing
operation to the correct origin for drawing another
string to follow the current one. Depending on the
font, this could be greater than or less than the
right bearing.
</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3002020"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3002030"></a><h3>
<a name="GdkFont"></a>GdkFont</h3>
<a class="indexterm" name="id3002045"></a><pre class="programlisting">typedef struct {
GdkFontType type;
gint ascent;
gint descent;
} GdkFont;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GdkFont</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
The <span class="structname">GdkFont</span> structure represents a font or fontset. It
contains the following public fields. A new <span class="structname">GdkFont</span>
structure is returned by <a href="gdk-Fonts.html#gdk-font-load"><code class="function">gdk_font_load()</code></a> or <a href="gdk-Fonts.html#gdk-fontset-load"><code class="function">gdk_fontset_load()</code></a>,
and is reference counted with <a href="gdk-Fonts.html#gdk-font-ref"><code class="function">gdk_font_ref()</code></a> and <a href="gdk-Fonts.html#gdk-font-unref"><code class="function">gdk_font_unref()</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="gdk-Fonts.html#GdkFontType">GdkFontType</a> <em class="structfield"><code>type</code></em>;</span></td>
<td>a value of type <a href="gdk-Fonts.html#GdkFontType"><span class="type">GdkFontType</span></a> which indicates
whether this font is a single font or a fontset.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>ascent</code></em>;</span></td>
<td>the maximum distance that the font, when drawn,
ascends above the baseline.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>descent</code></em>;</span></td>
<td>the maximum distance that the font, when drawn,
descends below the baseline.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3002202"></a><h3>
<a name="GdkFontType"></a>enum GdkFontType</h3>
<a class="indexterm" name="id3002217"></a><pre class="programlisting">typedef enum
{
GDK_FONT_FONT,
GDK_FONT_FONTSET
} GdkFontType;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GdkFontType</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Indicates the type of a font. The possible values
are currently:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-FONT-FONT:CAPS"></a><code class="literal">GDK_FONT_FONT</code></span></td>
<td>the font is a single font.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-FONT-FONTSET:CAPS"></a><code class="literal">GDK_FONT_FONTSET</code></span></td>
<td>the font is a fontset.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3002295"></a><h3>
<a name="gdk-font-load"></a>gdk_font_load ()</h3>
<a class="indexterm" name="id3002310"></a><pre class="programlisting"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>* gdk_font_load (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *font_name);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_load</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a font.
</p>
<p>
The font may be newly loaded or looked up the font in a cache.
You should make no assumptions about the initial reference count.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_name</code></em> :</span></td>
<td> a XLFD describing the font to load.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the font could not be loaded.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3002407"></a><h3>
<a name="gdk-font-load-for-display"></a>gdk_font_load_for_display ()</h3>
<a class="indexterm" name="id3002423"></a><a class="indexterm" name="id3002431"></a><pre class="programlisting"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>* gdk_font_load_for_display (<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *font_name);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_load_for_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a font for use on <em class="parameter"><code>display</code></em>.
</p>
<p>
The font may be newly loaded or looked up the font in a cache.
You should make no assumptions about the initial reference count.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em> :</span></td>
<td> a <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_name</code></em> :</span></td>
<td> a XLFD describing the font to load.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the font could not be loaded.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3002565"></a><h3>
<a name="gdk-fontset-load"></a>gdk_fontset_load ()</h3>
<a class="indexterm" name="id3002581"></a><pre class="programlisting"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>* gdk_fontset_load (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *fontset_name);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_fontset_load</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a fontset.
</p>
<p>
The fontset may be newly loaded or looked up in a cache.
You should make no assumptions about the initial reference count.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fontset_name</code></em> :</span></td>
<td> a comma-separated list of XLFDs describing
the component fonts of the fontset to load.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the fontset could not be loaded.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3002679"></a><h3>
<a name="gdk-fontset-load-for-display"></a>gdk_fontset_load_for_display ()</h3>
<a class="indexterm" name="id3002695"></a><a class="indexterm" name="id3002704"></a><pre class="programlisting"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>* gdk_fontset_load_for_display (<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *fontset_name);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_fontset_load_for_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a fontset for use on <em class="parameter"><code>display</code></em>.
</p>
<p>
The fontset may be newly loaded or looked up in a cache.
You should make no assumptions about the initial reference count.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em> :</span></td>
<td> a <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>fontset_name</code></em> :</span></td>
<td> a comma-separated list of XLFDs describing
the component fonts of the fontset to load.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the fontset could not be loaded.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3002840"></a><h3>
<a name="gdk-font-from-description"></a>gdk_font_from_description ()</h3>
<a class="indexterm" name="id3002856"></a><pre class="programlisting"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>* gdk_font_from_description (<a
href="../pango/pango-Fonts.html#PangoFontDescription"
>PangoFontDescription</a> *font_desc);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_from_description</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Load a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a> based on a Pango font description. This font will
only be an approximation of the Pango font, and
internationalization will not be handled correctly. This function
should only be used for legacy code that cannot be easily converted
to use Pango. Using Pango directly will produce better results.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_desc</code></em> :</span></td>
<td> a <a
href="../pango/pango-Fonts.html#PangoFontDescription"
><span class="type">PangoFontDescription</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly loaded font, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the font
cannot be loaded.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3002961"></a><h3>
<a name="gdk-font-from-description-for-display"></a>gdk_font_from_description_for_display ()</h3>
<a class="indexterm" name="id3002977"></a><a class="indexterm" name="id3002986"></a><pre class="programlisting"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>* gdk_font_from_description_for_display
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
<a
href="../pango/pango-Fonts.html#PangoFontDescription"
>PangoFontDescription</a> *font_desc);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_from_description_for_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Loads a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a> based on a Pango font description for use on <em class="parameter"><code>display</code></em>.
This font will only be an approximation of the Pango font, and
internationalization will not be handled correctly. This function
should only be used for legacy code that cannot be easily converted
to use Pango. Using Pango directly will produce better results.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em> :</span></td>
<td> a <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_desc</code></em> :</span></td>
<td> a <a
href="../pango/pango-Fonts.html#PangoFontDescription"
><span class="type">PangoFontDescription</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly loaded font, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the font
cannot be loaded.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3003130"></a><h3>
<a name="gdk-font-get-display"></a>gdk_font_get_display ()</h3>
<a class="indexterm" name="id3003146"></a><a class="indexterm" name="id3003154"></a><pre class="programlisting"><a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a>* gdk_font_get_display (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_get_display</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Returns the <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> for <em class="parameter"><code>font</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> the <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the corresponding <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3003259"></a><h3>
<a name="gdk-font-ref"></a>gdk_font_ref ()</h3>
<a class="indexterm" name="id3003274"></a><pre class="programlisting"><a href="gdk-Fonts.html#GdkFont">GdkFont</a>* gdk_font_ref (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_ref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Increases the reference count of a font by one.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <em class="parameter"><code>font</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3003360"></a><h3>
<a name="gdk-font-unref"></a>gdk_font_unref ()</h3>
<a class="indexterm" name="id3003375"></a><pre class="programlisting">void gdk_font_unref (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_unref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Decreases the reference count of a font by one.
If the result is zero, destroys the font.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3003446"></a><h3>
<a name="gdk-font-id"></a>gdk_font_id ()</h3>
<a class="indexterm" name="id3003461"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_font_id (const <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_id</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Returns the X Font ID for the given font.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the numeric X Font ID
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3003542"></a><h3>
<a name="gdk-font-equal"></a>gdk_font_equal ()</h3>
<a class="indexterm" name="id3003556"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gdk_font_equal (const <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *fonta,
const <a href="gdk-Fonts.html#GdkFont">GdkFont</a> *fontb);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_font_equal</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Compares two fonts for equality. Single fonts compare equal
if they have the same X font ID. This operation does
not currently work correctly for fontsets.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fonta</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>fontb</code></em> :</span></td>
<td> another <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the fonts are equal.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3003678"></a><h3>
<a name="gdk-string-extents"></a>gdk_string_extents ()</h3>
<a class="indexterm" name="id3003694"></a><pre class="programlisting">void gdk_string_extents (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *lbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *rbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *ascent,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *descent);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_extents</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the metrics of a nul-terminated string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td> the nul-terminated string to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>lbearing</code></em> :</span></td>
<td> the left bearing of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rbearing</code></em> :</span></td>
<td> the right bearing of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
<td> the width of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ascent</code></em> :</span></td>
<td> the ascent of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>descent</code></em> :</span></td>
<td> the descent of the string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3003895"></a><h3>
<a name="gdk-text-extents"></a>gdk_text_extents ()</h3>
<a class="indexterm" name="id3003910"></a><pre class="programlisting">void gdk_text_extents (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *lbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *rbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *ascent,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *descent);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_extents</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the metrics of a string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to measure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text_length</code></em> :</span></td>
<td> the length of the text in bytes. (If the
font is a 16-bit font, this is twice the length
of the text in characters.)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>lbearing</code></em> :</span></td>
<td> the left bearing of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rbearing</code></em> :</span></td>
<td> the right bearing of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
<td> the width of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ascent</code></em> :</span></td>
<td> the ascent of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>descent</code></em> :</span></td>
<td> the descent of the string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3004135"></a><h3>
<a name="gdk-text-extents-wc"></a>gdk_text_extents_wc ()</h3>
<a class="indexterm" name="id3004150"></a><pre class="programlisting">void gdk_text_extents_wc (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *lbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *rbearing,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *ascent,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *descent);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_extents_wc</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the metrics of a string of wide characters.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text_length</code></em> :</span></td>
<td> the length of the text in character.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>lbearing</code></em> :</span></td>
<td> the left bearing of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>rbearing</code></em> :</span></td>
<td> the right bearing of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
<td> the width of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ascent</code></em> :</span></td>
<td> the ascent of the string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>descent</code></em> :</span></td>
<td> the descent of the string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3004373"></a><h3>
<a name="gdk-string-width"></a>gdk_string_width ()</h3>
<a class="indexterm" name="id3004388"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_string_width (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_width</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a nul-terminated string.
(The distance from the origin of the string to the
point where the next string in a sequence of strings
should be drawn)</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td> the nul-terminated string to measure
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the width of the string in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3004494"></a><h3>
<a name="gdk-text-width"></a>gdk_text_width ()</h3>
<a class="indexterm" name="id3004509"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_width (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_width</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a given string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text_length</code></em> :</span></td>
<td> the length of the text in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the width of the string in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3004634"></a><h3>
<a name="gdk-text-width-wc"></a>gdk_text_width_wc ()</h3>
<a class="indexterm" name="id3004649"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_width_wc (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_width_wc</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a given wide-character string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text_length</code></em> :</span></td>
<td> the length of the text in characters.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the width of the string in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3004774"></a><h3>
<a name="gdk-char-width"></a>gdk_char_width ()</h3>
<a class="indexterm" name="id3004790"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_char_width (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> character);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_width</code> is deprecated and should not be used in newly-written code. Use <a href="gdk-Fonts.html#gdk-text-extents"><code class="function">gdk_text_extents()</code></a> instead.</p>
</div>
<p>
Determines the width of a given character.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>character</code></em> :</span></td>
<td> the character to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the width of the character in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3004904"></a><h3>
<a name="gdk-char-width-wc"></a>gdk_char_width_wc ()</h3>
<a class="indexterm" name="id3004919"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_char_width_wc (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> character);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_width_wc</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the width of a given wide character. (Encoded
in the wide-character encoding of the current locale).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>character</code></em> :</span></td>
<td> the character to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the width of the character in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005023"></a><h3>
<a name="gdk-string-measure"></a>gdk_string_measure ()</h3>
<a class="indexterm" name="id3005039"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_string_measure (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_measure</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the distance from the origin to the rightmost
portion of a nul-terminated string when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.
See <a href="gdk-Fonts.html#gdk-string-width"><code class="function">gdk_string_width()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td> the nul-terminated string to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the right bearing of the string in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005155"></a><h3>
<a name="gdk-text-measure"></a>gdk_text_measure ()</h3>
<a class="indexterm" name="id3005170"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_measure (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_measure</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the distance from the origin to the rightmost
portion of a string when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.
See <a href="gdk-Fonts.html#gdk-text-width"><code class="function">gdk_text_width()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text_length</code></em> :</span></td>
<td> the length of the text in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the right bearing of the string in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005308"></a><h3>
<a name="gdk-char-measure"></a>gdk_char_measure ()</h3>
<a class="indexterm" name="id3005323"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_char_measure (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> character);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_measure</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the distance from the origin to the rightmost
portion of a character when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>character</code></em> :</span></td>
<td> the character to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the right bearing of the character in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005429"></a><h3>
<a name="gdk-string-height"></a>gdk_string_height ()</h3>
<a class="indexterm" name="id3005445"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_string_height (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_string_height</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the total height of a given nul-terminated
string. This value is not generally useful, because you
cannot determine how this total height will be drawn in
relation to the baseline. See <a href="gdk-Fonts.html#gdk-string-extents"><code class="function">gdk_string_extents()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td> the nul-terminated string to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the height of the string in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005560"></a><h3>
<a name="gdk-text-height"></a>gdk_text_height ()</h3>
<a class="indexterm" name="id3005576"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_height (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> text_length);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_text_height</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Determines the total height of a given string.
This value is not generally useful, because you cannot
determine how this total height will be drawn in
relation to the baseline. See <a href="gdk-Fonts.html#gdk-text-extents"><code class="function">gdk_text_extents()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text_length</code></em> :</span></td>
<td> the length of the text in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the height of the string in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005713"></a><h3>
<a name="gdk-char-height"></a>gdk_char_height ()</h3>
<a class="indexterm" name="id3005729"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_char_height (<a href="gdk-Fonts.html#GdkFont">GdkFont</a> *font,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> character);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_char_height</code> is deprecated and should not be used in newly-written code. Use <a href="gdk-Fonts.html#gdk-text-extents"><code class="function">gdk_text_extents()</code></a> instead.</p>
</div>
<p>
Determines the total height of a given character.
This value is not generally useful, because you cannot
determine how this total height will be drawn in
relation to the baseline. See <a href="gdk-Fonts.html#gdk-text-extents"><code class="function">gdk_text_extents()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font</code></em> :</span></td>
<td> a <a href="gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>character</code></em> :</span></td>
<td> the character to measure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the height of the character in pixels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005855"></a><h3>
<a name="GdkWChar"></a>GdkWChar</h3>
<a class="indexterm" name="id3005868"></a><pre class="programlisting">typedef guint32 GdkWChar;
</pre>
<p>
Specifies a wide character type, used to represent character codes.
This is needed since some native languages have character sets which have
more than 256 characters (Japanese and Chinese, for example).
</p>
<p>
Wide character values between 0 and 127 are always identical in meaning to
the ASCII character codes. The wide character value 0 is often used to
terminate strings of wide characters in a similar way to normal strings
using the char type.
</p>
<p>
An alternative to wide characters is multi-byte characters, which extend
normal char strings to cope with larger character sets. As the name suggests,
multi-byte characters use a different number of bytes to store different
character codes. For example codes 0-127 (i.e. the ASCII codes) often
use just one byte of memory, while other codes may use 2, 3 or even 4 bytes.
Multi-byte characters have the advantage that they can often be used in an
application with little change, since strings are still represented as arrays
of char values. However multi-byte strings are much easier to manipulate since
the character are all of the same size.
</p>
<p>
Applications typically use wide characters to represent character codes
internally, and multi-byte strings when saving the characters to a file.
The <a href="gdk-Fonts.html#gdk-wcstombs"><code class="function">gdk_wcstombs()</code></a> and <a href="gdk-Fonts.html#gdk-mbstowcs"><code class="function">gdk_mbstowcs()</code></a> functions can be used to convert from
one representation to the other.
</p>
<p>
See the 'Extended Characters' section of the GNU C Library Reference Manual
for more detailed information on wide and multi-byte characters.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3005942"></a><h3>
<a name="gdk-wcstombs"></a>gdk_wcstombs ()</h3>
<a class="indexterm" name="id3005957"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gdk_wcstombs (const <a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *src);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_wcstombs</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Converts a wide character string to a multi-byte string.
(The function name comes from an acronym of 'Wide Character String TO
Multi-Byte String').</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>src</code></em> :</span></td>
<td> a wide character string.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the multi-byte string corresponding to <em class="parameter"><code>src</code></em>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the
conversion failed. The returned string should be freed with <a
href="../glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a> when no
longer needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3006061"></a><h3>
<a name="gdk-mbstowcs"></a>gdk_mbstowcs ()</h3>
<a class="indexterm" name="id3006076"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_mbstowcs (<a href="gdk-Fonts.html#GdkWChar">GdkWChar</a> *dest,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *src,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> dest_max);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_mbstowcs</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Converts a multi-byte string to a wide character string.
(The function name comes from an acronym of 'Multi-Byte String TO Wide
Character String').</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>dest</code></em> :</span></td>
<td> the space to place the converted wide character string into.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>src</code></em> :</span></td>
<td> the multi-byte string to convert, which must be nul-terminated.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dest_max</code></em> :</span></td>
<td> the maximum number of wide characters to place in <em class="parameter"><code>dest</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the number of wide characters written into <em class="parameter"><code>dest</code></em>, or -1 if
the conversion failed.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>