⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
doc
/
libgtk-3-dev
/
gtk3
/
View File Name :
GtkFontChooser.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GtkFontChooser: GTK+ 3 Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="GTK+ 3 Reference Manual"> <link rel="up" href="SelectorWidgets.html" title="Selector Widgets and Dialogs"> <link rel="prev" href="GtkFileFilter.html" title="GtkFileFilter"> <link rel="next" href="GtkFontButton.html" title="GtkFontButton"> <meta name="generator" content="GTK-Doc V1.32 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </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="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> <a href="#GtkFontChooser.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> <a href="#GtkFontChooser.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites"> <span class="dim">|</span> <a href="#GtkFontChooser.prerequisites" class="shortcut">Prerequisites</a></span><span id="nav_implementations"> <span class="dim">|</span> <a href="#GtkFontChooser.implementations" class="shortcut">Known Implementations</a></span><span id="nav_properties"> <span class="dim">|</span> <a href="#GtkFontChooser.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span> <a href="#GtkFontChooser.signals" class="shortcut">Signals</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="SelectorWidgets.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="GtkFileFilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="GtkFontButton.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="GtkFontChooser"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="GtkFontChooser.top_of_page"></a>GtkFontChooser</span></h2> <p>GtkFontChooser — Interface implemented by widgets displaying fonts</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="GtkFontChooser.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily-struct"><span class="returnvalue">PangoFontFamily</span></a> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-family" title="gtk_font_chooser_get_font_family ()">gtk_font_chooser_get_font_family</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace-struct"><span class="returnvalue">PangoFontFace</span></a> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-face" title="gtk_font_chooser_get_font_face ()">gtk_font_chooser_get_font_face</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-size" title="gtk_font_chooser_get_font_size ()">gtk_font_chooser_get_font_size</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font" title="gtk_font_chooser_get_font ()">gtk_font_chooser_get_font</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font" title="gtk_font_chooser_set_font ()">gtk_font_chooser_set_font</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="returnvalue">PangoFontDescription</span></a> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-desc" title="gtk_font_chooser_get_font_desc ()">gtk_font_chooser_get_font_desc</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font-desc" title="gtk_font_chooser_set_font_desc ()">gtk_font_chooser_set_font_desc</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-preview-text" title="gtk_font_chooser_get_preview_text ()">gtk_font_chooser_get_preview_text</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-preview-text" title="gtk_font_chooser_set_preview_text ()">gtk_font_chooser_set_preview_text</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-show-preview-entry" title="gtk_font_chooser_get_show_preview_entry ()">gtk_font_chooser_get_show_preview_entry</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-show-preview-entry" title="gtk_font_chooser_set_show_preview_entry ()">gtk_font_chooser_set_show_preview_entry</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> </td> <td class="function_name"> <span class="c_punctuation">(</span><a class="link" href="GtkFontChooser.html#GtkFontFilterFunc" title="GtkFontFilterFunc ()">*GtkFontFilterFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-filter-func" title="gtk_font_chooser_set_filter_func ()">gtk_font_chooser_set_filter_func</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font-map" title="gtk_font_chooser_set_font_map ()">gtk_font_chooser_set_font_map</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontMap-struct"><span class="returnvalue">PangoFontMap</span></a> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-map" title="gtk_font_chooser_get_font_map ()">gtk_font_chooser_get_font_map</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-level" title="gtk_font_chooser_set_level ()">gtk_font_chooser_set_level</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">GtkFontChooserLevel</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-level" title="gtk_font_chooser_get_level ()">gtk_font_chooser_get_level</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">char</span> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-features" title="gtk_font_chooser_get_font_features ()">gtk_font_chooser_get_font_features</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-language" title="gtk_font_chooser_set_language ()">gtk_font_chooser_set_language</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">char</span> * </td> <td class="function_name"> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-language" title="gtk_font_chooser_get_language ()">gtk_font_chooser_get_language</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GtkFontChooser.properties"></a><h2>Properties</h2> <div class="informaltable"><table class="informaltable" border="0"> <colgroup> <col width="150px" class="properties_type"> <col width="300px" class="properties_name"> <col width="200px" class="properties_flags"> </colgroup> <tbody> <tr> <td class="property_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td> <td class="property_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser--font" title="The “font” property">font</a></td> <td class="property_flags">Read / Write</td> </tr> <tr> <td class="property_type"> <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="type">PangoFontDescription</span></a> *</td> <td class="property_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser--font-desc" title="The “font-desc” property">font-desc</a></td> <td class="property_flags">Read / Write</td> </tr> <tr> <td class="property_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td> <td class="property_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser--font-features" title="The “font-features” property">font-features</a></td> <td class="property_flags">Read</td> </tr> <tr> <td class="property_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td> <td class="property_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser--language" title="The “language” property">language</a></td> <td class="property_flags">Read / Write</td> </tr> <tr> <td class="property_type"><span class="type">GtkFontChooserLevel</span></td> <td class="property_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser--level" title="The “level” property">level</a></td> <td class="property_flags">Read / Write</td> </tr> <tr> <td class="property_type"> <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td> <td class="property_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser--preview-text" title="The “preview-text” property">preview-text</a></td> <td class="property_flags">Read / Write</td> </tr> <tr> <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> <td class="property_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser--show-preview-entry" title="The “show-preview-entry” property">show-preview-entry</a></td> <td class="property_flags">Read / Write</td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GtkFontChooser.signals"></a><h2>Signals</h2> <div class="informaltable"><table class="informaltable" border="0"> <colgroup> <col width="150px" class="signal_proto_type"> <col width="300px" class="signal_proto_name"> <col width="200px" class="signal_proto_flags"> </colgroup> <tbody><tr> <td class="signal_type"><span class="returnvalue">void</span></td> <td class="signal_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser-font-activated" title="The “font-activated” signal">font-activated</a></td> <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td> </tr></tbody> </table></div> </div> <div class="refsect1"> <a name="GtkFontChooser.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="other_proto_type"> <col class="other_proto_name"> </colgroup> <tbody><tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="GtkFontChooser.html#GtkFontChooser-struct" title="GtkFontChooser">GtkFontChooser</a></td> </tr></tbody> </table></div> </div> <div class="refsect1"> <a name="GtkFontChooser.object-hierarchy"></a><h2>Object Hierarchy</h2> <pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a> <span class="lineart">╰──</span> GtkFontChooser </pre> </div> <div class="refsect1"> <a name="GtkFontChooser.prerequisites"></a><h2>Prerequisites</h2> <p> GtkFontChooser requires <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>.</p> </div> <div class="refsect1"> <a name="GtkFontChooser.implementations"></a><h2>Known Implementations</h2> <p> GtkFontChooser is implemented by <a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a>, <a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog">GtkFontChooserDialog</a> and <a class="link" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget">GtkFontChooserWidget</a>.</p> </div> <div class="refsect1"> <a name="GtkFontChooser.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gtk/gtk.h> </pre> </div> <div class="refsect1"> <a name="GtkFontChooser.description"></a><h2>Description</h2> <p><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> is an interface that can be implemented by widgets displaying the list of fonts. In GTK+, the main objects that implement this interface are <a class="link" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget"><span class="type">GtkFontChooserWidget</span></a>, <a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog"><span class="type">GtkFontChooserDialog</span></a> and <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a>. The GtkFontChooser interface has been introducted in GTK+ 3.2.</p> </div> <div class="refsect1"> <a name="GtkFontChooser.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="gtk-font-chooser-get-font-family"></a><h3>gtk_font_chooser_get_font_family ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily-struct"><span class="returnvalue">PangoFontFamily</span></a> * gtk_font_chooser_get_font_family (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily-struct"><span class="type">PangoFontFamily</span></a> representing the selected font family. Font families are a collection of font faces.</p> <p>If the selected font is not installed, returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-font-family.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-font-family.returns"></a><h4>Returns</h4> <p>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily-struct"><span class="type">PangoFontFamily</span></a> representing the selected font family, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned object is owned by <em class="parameter"><code>fontchooser</code></em> and must not be modified or freed. </p> <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-font-face"></a><h3>gtk_font_chooser_get_font_face ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace-struct"><span class="returnvalue">PangoFontFace</span></a> * gtk_font_chooser_get_font_face (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace-struct"><span class="type">PangoFontFace</span></a> representing the selected font group details (i.e. family, slant, weight, width, etc).</p> <p>If the selected font is not installed, returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-font-face.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-font-face.returns"></a><h4>Returns</h4> <p>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace-struct"><span class="type">PangoFontFace</span></a> representing the selected font group details, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned object is owned by <em class="parameter"><code>fontchooser</code></em> and must not be modified or freed. </p> <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-font-size"></a><h3>gtk_font_chooser_get_font_size ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gtk_font_chooser_get_font_size (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>The selected font size.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-font-size.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-font-size.returns"></a><h4>Returns</h4> <p> A n integer representing the selected font size, or -1 if no font size is selected.</p> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-font"></a><h3>gtk_font_chooser_get_font ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gtk_font_chooser_get_font (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the currently-selected font name.</p> <p>Note that this can be a different string than what you set with <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font" title="gtk_font_chooser_set_font ()"><code class="function">gtk_font_chooser_set_font()</code></a>, as the font chooser widget may normalize font names and thus return a string with a different structure. For example, “Helvetica Italic Bold 12” could be normalized to “Helvetica Bold Italic 12”.</p> <p>Use <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#pango-font-description-equal"><code class="function">pango_font_description_equal()</code></a> if you want to compare two font descriptions.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-font.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-font.returns"></a><h4>Returns</h4> <p>A string with the name of the current font, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no font is selected. You must free this string with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p> <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-font"></a><h3>gtk_font_chooser_set_font ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_font (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname</code></em>);</pre> <p>Sets the currently-selected font.</p> <div class="refsect3"> <a name="gtk-font-chooser-set-font.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>fontname</p></td> <td class="parameter_description"><p>a font name like “Helvetica 12” or “Times Bold 18”</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-font-desc"></a><h3>gtk_font_chooser_get_font_desc ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="returnvalue">PangoFontDescription</span></a> * gtk_font_chooser_get_font_desc (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the currently-selected font.</p> <p>Note that this can be a different string than what you set with <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font" title="gtk_font_chooser_set_font ()"><code class="function">gtk_font_chooser_set_font()</code></a>, as the font chooser widget may normalize font names and thus return a string with a different structure. For example, “Helvetica Italic Bold 12” could be normalized to “Helvetica Bold Italic 12”.</p> <p>Use <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#pango-font-description-equal"><code class="function">pango_font_description_equal()</code></a> if you want to compare two font descriptions.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-font-desc.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-font-desc.returns"></a><h4>Returns</h4> <p>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="type">PangoFontDescription</span></a> for the current font, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no font is selected. </p> <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-font-desc"></a><h3>gtk_font_chooser_set_font_desc ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_font_desc (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="type">PangoFontDescription</span></a> *font_desc</code></em>);</pre> <p>Sets the currently-selected font from <em class="parameter"><code>font_desc</code></em> .</p> <div class="refsect3"> <a name="gtk-font-chooser-set-font-desc.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>font_desc</p></td> <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="type">PangoFontDescription</span></a></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-preview-text"></a><h3>gtk_font_chooser_get_preview_text ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gtk_font_chooser_get_preview_text (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the text displayed in the preview area.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-preview-text.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-preview-text.returns"></a><h4>Returns</h4> <p>the text displayed in the preview area. </p> <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-preview-text"></a><h3>gtk_font_chooser_set_preview_text ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_preview_text (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>);</pre> <p>Sets the text displayed in the preview area. The <em class="parameter"><code>text</code></em> is used to show how the selected font looks.</p> <div class="refsect3"> <a name="gtk-font-chooser-set-preview-text.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>text</p></td> <td class="parameter_description"><p>the text to display in the preview area. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-show-preview-entry"></a><h3>gtk_font_chooser_get_show_preview_entry ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_font_chooser_get_show_preview_entry (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Returns whether the preview entry is shown or not.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-show-preview-entry.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-show-preview-entry.returns"></a><h4>Returns</h4> <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the preview entry is shown or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is hidden.</p> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-show-preview-entry"></a><h3>gtk_font_chooser_set_show_preview_entry ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_show_preview_entry (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_preview_entry</code></em>);</pre> <p>Shows or hides the editable preview entry.</p> <div class="refsect3"> <a name="gtk-font-chooser-set-show-preview-entry.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>show_preview_entry</p></td> <td class="parameter_description"><p>whether to show the editable preview entry or not</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="GtkFontFilterFunc"></a><h3>GtkFontFilterFunc ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <span class="c_punctuation">(</span>*GtkFontFilterFunc<span class="c_punctuation">)</span> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily-struct"><span class="type">PangoFontFamily</span></a> *family</code></em>, <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace-struct"><span class="type">PangoFontFace</span></a> *face</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre> <p>The type of function that is used for deciding what fonts get shown in a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>. See <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-filter-func" title="gtk_font_chooser_set_filter_func ()"><code class="function">gtk_font_chooser_set_filter_func()</code></a>.</p> <div class="refsect3"> <a name="GtkFontFilterFunc.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>family</p></td> <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily-struct"><span class="type">PangoFontFamily</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>face</p></td> <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace-struct"><span class="type">PangoFontFace</span></a> belonging to <em class="parameter"><code>family</code></em> </p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>data</p></td> <td class="parameter_description"><p>user data passed to <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-filter-func" title="gtk_font_chooser_set_filter_func ()"><code class="function">gtk_font_chooser_set_filter_func()</code></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="GtkFontFilterFunc.returns"></a><h4>Returns</h4> <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the font should be displayed</p> </div> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-filter-func"></a><h3>gtk_font_chooser_set_filter_func ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_filter_func (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code><a class="link" href="GtkFontChooser.html#GtkFontFilterFunc" title="GtkFontFilterFunc ()"><span class="type">GtkFontFilterFunc</span></a> filter</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre> <p>Adds a filter function that decides which fonts to display in the font chooser.</p> <div class="refsect3"> <a name="gtk-font-chooser-set-filter-func.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>filter</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html#GtkFontFilterFunc" title="GtkFontFilterFunc ()"><span class="type">GtkFontFilterFunc</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>data to pass to <em class="parameter"><code>filter</code></em> </p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>destroy</p></td> <td class="parameter_description"><p>function to call to free <em class="parameter"><code>data</code></em> when it is no longer needed</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-2.html#api-index-3.2">3.2</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-font-map"></a><h3>gtk_font_chooser_set_font_map ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_font_map (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontMap-struct"><span class="type">PangoFontMap</span></a> *fontmap</code></em>);</pre> <p>Sets a custom font map to use for this font chooser widget. A custom font map can be used to present application-specific fonts instead of or in addition to the normal system fonts.</p> <div class="informalexample"> <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="listing_lines" align="right"><pre>1 2 3 4 5 6 7 8 9 10</pre></td> <td class="listing_code"><pre class="programlisting"><span class="n">FcConfig</span> <span class="o">*</span><span class="n">config</span><span class="p">;</span> <span class="n">PangoFontMap</span> <span class="o">*</span><span class="n">fontmap</span><span class="p">;</span> <span class="n">config</span> <span class="o">=</span> <span class="n">FcInitLoadConfigAndFonts</span> <span class="p">();</span> <span class="n">FcConfigAppFontAddFile</span> <span class="p">(</span><span class="n">config</span><span class="p">,</span> <span class="n">my_app_font_file</span><span class="p">);</span> <span class="n">fontmap</span> <span class="o">=</span> <span class="n">pango_cairo_font_map_new_for_font_type</span> <span class="p">(</span><span class="n">CAIRO_FONT_TYPE_FT</span><span class="p">);</span> <span class="n">pango_fc_font_map_set_config</span> <span class="p">(</span><span class="n">PANGO_FC_FONT_MAP</span> <span class="p">(</span><span class="n">fontmap</span><span class="p">),</span> <span class="n">config</span><span class="p">);</span> <span class="n">gtk_font_chooser_set_font_map</span> <span class="p">(</span><span class="n">font_chooser</span><span class="p">,</span> <span class="n">fontmap</span><span class="p">);</span></pre></td> </tr> </tbody> </table> </div> <p></p> <p>Note that other GTK+ widgets will only be able to use the application-specific font if it is present in the font map they use:</p> <div class="informalexample"> <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="listing_lines" align="right"><pre>1 2</pre></td> <td class="listing_code"><pre class="programlisting"><span class="n">context</span> <span class="o">=</span> <span class="n">gtk_widget_get_pango_context</span> <span class="p">(</span><span class="n">label</span><span class="p">);</span> <span class="n">pango_context_set_font_map</span> <span class="p">(</span><span class="n">context</span><span class="p">,</span> <span class="n">fontmap</span><span class="p">);</span></pre></td> </tr> </tbody> </table> </div> <p></p> <div class="refsect3"> <a name="gtk-font-chooser-set-font-map.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>fontmap</p></td> <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontMap-struct"><span class="type">PangoFontMap</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-18.html#api-index-3.18">3.18</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-font-map"></a><h3>gtk_font_chooser_get_font_map ()</h3> <pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontMap-struct"><span class="returnvalue">PangoFontMap</span></a> * gtk_font_chooser_get_font_map (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the custom font map of this font chooser widget, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it does not have one.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-font-map.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-font-map.returns"></a><h4>Returns</h4> <p>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontMap-struct"><span class="type">PangoFontMap</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p> <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-3-18.html#api-index-3.18">3.18</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-level"></a><h3>gtk_font_chooser_set_level ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_level (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code><span class="type">GtkFontChooserLevel</span> level</code></em>);</pre> <p>Sets the desired level of granularity for selecting fonts.</p> <div class="refsect3"> <a name="gtk-font-chooser-set-level.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>level</p></td> <td class="parameter_description"><p>the desired level of granularity</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-24.html#api-index-3.24">3.24</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-level"></a><h3>gtk_font_chooser_get_level ()</h3> <pre class="programlisting"><span class="returnvalue">GtkFontChooserLevel</span> gtk_font_chooser_get_level (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Returns the current level of granularity for selecting fonts.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-level.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-level.returns"></a><h4>Returns</h4> <p> the current granularity level</p> </div> <p class="since">Since: <a class="link" href="api-index-3-24.html#api-index-3.24">3.24</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-font-features"></a><h3>gtk_font_chooser_get_font_features ()</h3> <pre class="programlisting"><span class="returnvalue">char</span> * gtk_font_chooser_get_font_features (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the currently-selected font features.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-font-features.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-font-features.returns"></a><h4>Returns</h4> <p> the currently selected font features</p> </div> <p class="since">Since: <a class="link" href="api-index-3-24.html#api-index-3.24">3.24</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-set-language"></a><h3>gtk_font_chooser_set_language ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_language (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>, <em class="parameter"><code>const <span class="type">char</span> *language</code></em>);</pre> <p>Sets the language to use for font features.</p> <div class="refsect3"> <a name="gtk-font-chooser-set-language.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>language</p></td> <td class="parameter_description"><p>a language</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-3-24.html#api-index-3.24">3.24</a></p> </div> <hr> <div class="refsect2"> <a name="gtk-font-chooser-get-language"></a><h3>gtk_font_chooser_get_language ()</h3> <pre class="programlisting"><span class="returnvalue">char</span> * gtk_font_chooser_get_language (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre> <p>Gets the language that is used for font features.</p> <div class="refsect3"> <a name="gtk-font-chooser-get-language.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>fontchooser</p></td> <td class="parameter_description"><p>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="gtk-font-chooser-get-language.returns"></a><h4>Returns</h4> <p> the currently selected language</p> </div> <p class="since">Since: <a class="link" href="api-index-3-24.html#api-index-3.24">3.24</a></p> </div> </div> <div class="refsect1"> <a name="GtkFontChooser.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GtkFontChooser-struct"></a><h3>GtkFontChooser</h3> <pre class="programlisting">typedef struct _GtkFontChooser GtkFontChooser;</pre> </div> </div> <div class="refsect1"> <a name="GtkFontChooser.property-details"></a><h2>Property Details</h2> <div class="refsect2"> <a name="GtkFontChooser--font"></a><h3>The <code class="literal">“font”</code> property</h3> <pre class="programlisting"> “font” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> <p>The font description as a string, e.g. "Sans Italic 12".</p> <p>Owner: GtkFontChooser</p> <p>Flags: Read / Write</p> <p>Default value: "Sans 10"</p> </div> <hr> <div class="refsect2"> <a name="GtkFontChooser--font-desc"></a><h3>The <code class="literal">“font-desc”</code> property</h3> <pre class="programlisting"> “font-desc” <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="type">PangoFontDescription</span></a> *</pre> <p>The font description as a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription-struct"><span class="type">PangoFontDescription</span></a>.</p> <p>Owner: GtkFontChooser</p> <p>Flags: Read / Write</p> </div> <hr> <div class="refsect2"> <a name="GtkFontChooser--font-features"></a><h3>The <code class="literal">“font-features”</code> property</h3> <pre class="programlisting"> “font-features” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> <p>The selected font features, in a format that is compatible with CSS and with Pango attributes.</p> <p>Owner: GtkFontChooser</p> <p>Flags: Read</p> <p>Default value: ""</p> <p class="since">Since: 3.22.30</p> </div> <hr> <div class="refsect2"> <a name="GtkFontChooser--language"></a><h3>The <code class="literal">“language”</code> property</h3> <pre class="programlisting"> “language” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> <p>The language for which the <a class="link" href="GtkFontChooser.html#GtkFontChooser--font-features" title="The “font-features” property"><span class="type">“font-features”</span></a> were selected, in a format that is compatible with CSS and with Pango attributes.</p> <p>Owner: GtkFontChooser</p> <p>Flags: Read / Write</p> <p>Default value: ""</p> <p class="since">Since: 3.22.30</p> </div> <hr> <div class="refsect2"> <a name="GtkFontChooser--level"></a><h3>The <code class="literal">“level”</code> property</h3> <pre class="programlisting"> “level” <span class="type">GtkFontChooserLevel</span></pre> <p>The level of granularity to offer for selecting fonts.</p> <p>Owner: GtkFontChooser</p> <p>Flags: Read / Write</p> <p>Default value: GTK_FONT_CHOOSER_LEVEL_STYLE | GTK_FONT_CHOOSER_LEVEL_SIZE</p> <p class="since">Since: 3.22.30</p> </div> <hr> <div class="refsect2"> <a name="GtkFontChooser--preview-text"></a><h3>The <code class="literal">“preview-text”</code> property</h3> <pre class="programlisting"> “preview-text” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> <p>The string with which to preview the font.</p> <p>Owner: GtkFontChooser</p> <p>Flags: Read / Write</p> <p>Default value: "The quick brown fox jumps over the lazy dog."</p> </div> <hr> <div class="refsect2"> <a name="GtkFontChooser--show-preview-entry"></a><h3>The <code class="literal">“show-preview-entry”</code> property</h3> <pre class="programlisting"> “show-preview-entry” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> <p>Whether to show an entry to change the preview text.</p> <p>Owner: GtkFontChooser</p> <p>Flags: Read / Write</p> <p>Default value: TRUE</p> </div> </div> <div class="refsect1"> <a name="GtkFontChooser.signal-details"></a><h2>Signal Details</h2> <div class="refsect2"> <a name="GtkFontChooser-font-activated"></a><h3>The <code class="literal">“font-activated”</code> signal</h3> <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *self, <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname, <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> <p>Emitted when a font is activated. This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.</p> <div class="refsect3"> <a name="GtkFontChooser-font-activated.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>self</p></td> <td class="parameter_description"><p>the object which received the signal</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>fontname</p></td> <td class="parameter_description"><p>the font name</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p> </div> </div> <div class="refsect1"> <a name="GtkFontChooser.see-also"></a><h2>See Also</h2> <p><a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog"><span class="type">GtkFontChooserDialog</span></a>, <a class="link" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget"><span class="type">GtkFontChooserWidget</span></a>, <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.32</div> </body> </html>