MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>cairo_font_face_t</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
<link rel="up" href="Fonts.html" title="Fonts">
<link rel="prev" href="Fonts.html" title="Fonts">
<link rel="next" href="cairo-Scaled-Fonts.html" title="Scaled Fonts">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;Tutorial">
<link rel="part" href="pt02.html" title="Part&#160;II.&#160;Reference">
<link rel="chapter" href="Drawing.html" title="Drawing">
<link rel="chapter" href="Fonts.html" title="Fonts">
<link rel="chapter" href="Surfaces.html" title="Surfaces">
<link rel="chapter" href="Support.html" title="Utilities">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of new symbols in 1.2">
<link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo">
</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="Fonts.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="Fonts.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">Cairo: A Vector Graphics Library</th>
<td><a accesskey="n" href="cairo-Scaled-Fonts.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="#id2566728" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2529186" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="cairo-cairo-font-face-t"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2566728"></a><span class="refentrytitle">cairo_font_face_t</span>
</h2>
<p>cairo_font_face_t &#8212; Base class for fonts</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">



typedef     <a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>;
<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* <a href="cairo-cairo-font-face-t.html#cairo-font-face-reference">cairo_font_face_reference</a>
                                            (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
void        <a href="cairo-cairo-font-face-t.html#cairo-font-face-destroy">cairo_font_face_destroy</a>         (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
<a href="cairo-Error-handling.html#cairo-status-t">cairo_status_t</a> <a href="cairo-cairo-font-face-t.html#cairo-font-face-status">cairo_font_face_status</a>       (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
void*       <a href="cairo-cairo-font-face-t.html#cairo-font-face-get-user-data">cairo_font_face_get_user_data</a>   (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);
<a href="cairo-Error-handling.html#cairo-status-t">cairo_status_t</a> <a href="cairo-cairo-font-face-t.html#cairo-font-face-set-user-data">cairo_font_face_set_user_data</a>
                                            (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
                                             void *user_data,
                                             <a href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);
enum        <a href="cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a>;
<a href="cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> <a href="cairo-cairo-font-face-t.html#cairo-font-face-get-type">cairo_font_face_get_type</a>  (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2529186"></a><h2>Description</h2>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2529202"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2528270"></a><h3>
<a name="cairo-font-face-t"></a>cairo_font_face_t</h3>
<a class="indexterm" name="id2528282"></a><pre class="programlisting">typedef struct _cairo_font_face cairo_font_face_t;
</pre>
<p>
A <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a> specifies all aspects of a font other
than the size or font matrix (a font matrix is used to distort
a font by sheering it or scaling it unequally in the two
directions) . A font face can be set on a <a href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> by using
<a href="cairo-Text.html#cairo-set-font-face"><code class="function">cairo_set_font_face()</code></a>; the size and font matrix are set with
<a href="cairo-Text.html#cairo-set-font-size"><code class="function">cairo_set_font_size()</code></a> and <a href="cairo-Text.html#cairo-set-font-matrix"><code class="function">cairo_set_font_matrix()</code></a>.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2528347"></a><h3>
<a name="cairo-font-face-reference"></a>cairo_font_face_reference ()</h3>
<a class="indexterm" name="id2528358"></a><pre class="programlisting"><a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_font_face_reference
                                            (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
<p>
Increases the reference count on <em class="parameter"><code>font_face</code></em> by one. This prevents
<em class="parameter"><code>font_face</code></em> from being destroyed until a matching call to
<a href="cairo-cairo-font-face-t.html#cairo-font-face-destroy"><code class="function">cairo_font_face_destroy()</code></a> is made.</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_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>, (may be NULL in which case this
function does nothing).
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the referenced <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2588498"></a><h3>
<a name="cairo-font-face-destroy"></a>cairo_font_face_destroy ()</h3>
<a class="indexterm" name="id2588510"></a><pre class="programlisting">void        cairo_font_face_destroy         (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
<p>
Decreases the reference count on <em class="parameter"><code>font_face</code></em> by one. If the result
is zero, then <em class="parameter"><code>font_face</code></em> and all associated resources are freed.
See <a href="cairo-cairo-font-face-t.html#cairo-font-face-reference"><code class="function">cairo_font_face_reference()</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_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2588587"></a><h3>
<a name="cairo-font-face-status"></a>cairo_font_face_status ()</h3>
<a class="indexterm" name="id2588598"></a><pre class="programlisting"><a href="cairo-Error-handling.html#cairo-status-t">cairo_status_t</a> cairo_font_face_status       (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
<p>
Checks whether an error has previously occurred for this
font face</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_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or another error such as
  <a href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2588683"></a><h3>
<a name="cairo-font-face-get-user-data"></a>cairo_font_face_get_user_data ()</h3>
<a class="indexterm" name="id2588694"></a><pre class="programlisting">void*       cairo_font_face_get_user_data   (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre>
<p>
Return user data previously attached to <em class="parameter"><code>font_face</code></em> using the specified
key.  If no user data has been attached with the given key this
function returns <code class="literal">NULL</code>.</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_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></td>
<td> the address of the <a href="cairo-Types.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> the user data was
attached to
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the user data previously attached or <code class="literal">NULL</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543906"></a><h3>
<a name="cairo-font-face-set-user-data"></a>cairo_font_face_set_user_data ()</h3>
<a class="indexterm" name="id2543919"></a><pre class="programlisting"><a href="cairo-Error-handling.html#cairo-status-t">cairo_status_t</a> cairo_font_face_set_user_data
                                            (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
                                             void *user_data,
                                             <a href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre>
<p>
Attach user data to <em class="parameter"><code>font_face</code></em>.  To remove user data from a font face,
call this function with the key that was used to set it and <code class="literal">NULL</code>
for <em class="parameter"><code>data</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_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></td>
<td> the address of a <a href="cairo-Types.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td> the user data to attach to the font face
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>destroy</code></em>&#160;:</span></td>
<td> a <a href="cairo-Types.html#cairo-destroy-func-t"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
font face is destroyed or when new user data is attached using the
same key.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
slot could not be allocated for the user data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2544107"></a><h3>
<a name="cairo-font-type-t"></a>enum cairo_font_type_t</h3>
<a class="indexterm" name="id2544122"></a><pre class="programlisting">typedef enum _cairo_font_type {
    CAIRO_FONT_TYPE_TOY,
    CAIRO_FONT_TYPE_FT,
    CAIRO_FONT_TYPE_WIN32,
    CAIRO_FONT_TYPE_ATSUI
} cairo_font_type_t;
</pre>
<p>
<a href="cairo-cairo-font-face-t.html#cairo-font-type-t"><span class="type">cairo_font_type_t</span></a> is used to describe the type of a given font
face or scaled font. The font types are also known as "font
backends" within cairo.
</p>
<p>
The type of a font face is determined by the function used to
create it, which will generally be of the form
cairo_<span class="emphasis"><em>type</em></span>_font_face_create. The font face type can be queried
with <a href="cairo-cairo-font-face-t.html#cairo-font-face-get-type"><code class="function">cairo_font_face_get_type()</code></a>
</p>
<p>
The various cairo_font_face functions can be used with a font face
of any type.
</p>
<p>
The type of a scaled font is determined by the type of the font
face passed to cairo_scaled_font_create. The scaled font type can
be queried with <a href="cairo-Scaled-Fonts.html#cairo-scaled-font-get-type"><code class="function">cairo_scaled_font_get_type()</code></a>
</p>
<p>
The various cairo_scaled_font functions can be used with scaled
fonts of any type, but some font backends also provide
type-specific functions that must only be called with a scaled font
of the appropriate type. These functions have names that begin with
cairo_<span class="emphasis"><em>type</em></span>_scaled_font such as cairo_ft_scaled_font_lock_face.
</p>
<p>
The behavior of calling a type-specific function with a scaled font
of the wrong type is undefined.
</p>
<p>
New entries may be added in future versions.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="CAIRO-FONT-TYPE-TOY:CAPS"></a><code class="literal">CAIRO_FONT_TYPE_TOY</code></span></td>
<td> The font was created using cairo's toy font api
</td>
</tr>
<tr>
<td>
<span class="term"><a name="CAIRO-FONT-TYPE-FT:CAPS"></a><code class="literal">CAIRO_FONT_TYPE_FT</code></span></td>
<td> The font is of type FreeType
</td>
</tr>
<tr>
<td>
<span class="term"><a name="CAIRO-FONT-TYPE-WIN32:CAPS"></a><code class="literal">CAIRO_FONT_TYPE_WIN32</code></span></td>
<td> The font is of type Win32
</td>
</tr>
<tr>
<td>
<span class="term"><a name="CAIRO-FONT-TYPE-ATSUI:CAPS"></a><code class="literal">CAIRO_FONT_TYPE_ATSUI</code></span></td>
<td> The font is of type ATSUI
</td>
</tr>
</tbody>
</table></div>
<p>Since  1.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2590692"></a><h3>
<a name="cairo-font-face-get-type"></a>cairo_font_face_get_type ()</h3>
<a class="indexterm" name="id2590704"></a><pre class="programlisting"><a href="cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> cairo_font_face_get_type  (<a href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
<p>
This function returns the type of the backend used to create
a font face. See <a href="cairo-cairo-font-face-t.html#cairo-font-type-t"><span class="type">cairo_font_type_t</span></a> for available types.</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_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The type of <em class="parameter"><code>font_face</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  1.2
</p>
</div>
</div>
</div>
</body>
</html>