cairo-scaled-font.html   [plain text]


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cairo_scaled_font_t</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
<link rel="up" href="cairo-fonts.html" title="Fonts">
<link rel="prev" href="cairo-font-face.html" title="cairo_font_face_t">
<link rel="next" href="cairo-font-options.html" title="cairo_font_options_t">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="cairo-drawing.html" title="Drawing">
<link rel="chapter" href="cairo-fonts.html" title="Fonts">
<link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
<link rel="chapter" href="cairo-support.html" title="Utilities">
<link rel="index" href="index-all.html" title="Index">
<link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
<link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
<link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
<link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
<link rel="appendix" href="language-bindings.html" title="Appendix A. 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="cairo-font-face.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="cairo-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-font-options.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cairo-scaled-font.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#cairo-scaled-font.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="cairo-scaled-font"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cairo-scaled-font.top_of_page"></a>cairo_scaled_font_t</span></h2>
<p>cairo_scaled_font_t — Font face at particular size and options</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="cairo-scaled-font.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
typedef             <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a>;
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> * <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()">cairo_scaled_font_create</a>          (<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
                                                         const <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *font_matrix,
                                                         const <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *ctm,
                                                         const <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> * <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()">cairo_scaled_font_reference</a>       (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()">cairo_scaled_font_destroy</a>           (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a>      <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-status" title="cairo_scaled_font_status ()">cairo_scaled_font_status</a>            (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
                    <a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a>;
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-extents" title="cairo_scaled_font_extents ()">cairo_scaled_font_extents</a>           (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a> *extents);
                    <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a>;
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-text-extents" title="cairo_scaled_font_text_extents ()">cairo_scaled_font_text_extents</a>      (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const char *utf8,
                                                         <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-glyph-extents" title="cairo_scaled_font_glyph_extents ()">cairo_scaled_font_glyph_extents</a>     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
                                                         int num_glyphs,
                                                         <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a>      <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-text-to-glyphs" title="cairo_scaled_font_text_to_glyphs ()">cairo_scaled_font_text_to_glyphs</a>    (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         double x,
                                                         double y,
                                                         const char *utf8,
                                                         int utf8_len,
                                                         <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> **glyphs,
                                                         int *num_glyphs,
                                                         <a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> **clusters,
                                                         int *num_clusters,
                                                         <a class="link" href="cairo-text.html#cairo-text-cluster-flags-t" title="enum cairo_text_cluster_flags_t">cairo_text_cluster_flags_t</a> *cluster_flags);
<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> * <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-font-face" title="cairo_scaled_font_get_font_face ()">cairo_scaled_font_get_font_face</a>     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-font-options" title="cairo_scaled_font_get_font_options ()">cairo_scaled_font_get_font_options</a>  (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-font-matrix" title="cairo_scaled_font_get_font_matrix ()">cairo_scaled_font_get_font_matrix</a>   (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *font_matrix);
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-ctm" title="cairo_scaled_font_get_ctm ()">cairo_scaled_font_get_ctm</a>           (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *ctm);
void                <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-scale-matrix" title="cairo_scaled_font_get_scale_matrix ()">cairo_scaled_font_get_scale_matrix</a>  (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *scale_matrix);
<a class="link" href="cairo-font-face.html#cairo-font-type-t" title="enum cairo_font_type_t">cairo_font_type_t</a>   <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-type" title="cairo_scaled_font_get_type ()">cairo_scaled_font_get_type</a>          (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
unsigned int        <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-reference-count" title="cairo_scaled_font_get_reference_count ()">cairo_scaled_font_get_reference_count</a>
                                                        (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);
<a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a>      <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-set-user-data" title="cairo_scaled_font_set_user_data ()">cairo_scaled_font_set_user_data</a>     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key,
                                                         void *user_data,
                                                         <a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()">cairo_destroy_func_t</a> destroy);
void *              <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-user-data" title="cairo_scaled_font_get_user_data ()">cairo_scaled_font_get_user_data</a>     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="cairo-scaled-font.description"></a><h2>Description</h2>
<p>
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> represents a realization of a font face at a particular
size and transformation and a certain set of font options.
</p>
</div>
<div class="refsect1" lang="en">
<a name="cairo-scaled-font.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-t"></a><h3>cairo_scaled_font_t</h3>
<pre class="programlisting">typedef struct _cairo_scaled_font cairo_scaled_font_t;
</pre>
<p>
A <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> is a font scaled to a particular size and device
resolution. A <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> is most useful for low-level font
usage where a library or application wants to cache a reference
to a scaled font to speed up the computation of metrics.
</p>
<p>
There are various types of scaled fonts, depending on the
<em class="firstterm">font backend</em> they use. The type of a
scaled font can be queried using <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-type" title="cairo_scaled_font_get_type ()"><code class="function">cairo_scaled_font_get_type()</code></a>.
</p>
<p>
Memory management of <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> is done with
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()"><code class="function">cairo_scaled_font_reference()</code></a> and <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()"><code class="function">cairo_scaled_font_destroy()</code></a>.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-create"></a><h3>cairo_scaled_font_create ()</h3>
<pre class="programlisting"><a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> * cairo_scaled_font_create          (<a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> *font_face,
                                                         const <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *font_matrix,
                                                         const <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *ctm,
                                                         const <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
<p>
Creates a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> object from a font face and matrices that
describe the size of the font and the environment in which it will
be used.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>font_face</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>font_matrix</code></em> :</span></p></td>
<td> font space to user space transformation matrix for the
      font. In the simplest case of a N point font, this matrix is
      just a scale by N, but it can also be used to shear the font
      or stretch it unequally along the two axes. See
      <a class="link" href="cairo-text.html#cairo-set-font-matrix" title="cairo_set_font_matrix ()"><code class="function">cairo_set_font_matrix()</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ctm</code></em> :</span></p></td>
<td> user to device transformation matrix with which the font will
      be used.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td> options to use when getting metrics for the font and
          rendering with it.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly created <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>. Destroy with
 <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()"><code class="function">cairo_scaled_font_destroy()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-reference"></a><h3>cairo_scaled_font_reference ()</h3>
<pre class="programlisting"><a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> * cairo_scaled_font_reference       (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Increases the reference count on <em class="parameter"><code>scaled_font</code></em> by one. This prevents
<em class="parameter"><code>scaled_font</code></em> from being destroyed until a matching call to
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()"><code class="function">cairo_scaled_font_destroy()</code></a> is made.
</p>
<p>
The number of references to a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> can be get using
<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-get-reference-count" title="cairo_scaled_font_get_reference_count ()"><code class="function">cairo_scaled_font_get_reference_count()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>, (may be <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> in which case
this function does nothing)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the referenced <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-destroy"></a><h3>cairo_scaled_font_destroy ()</h3>
<pre class="programlisting">void                cairo_scaled_font_destroy           (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Decreases the reference count on <em class="parameter"><code>font</code></em> by one. If the result
is zero, then <em class="parameter"><code>font</code></em> and all associated resources are freed.
See <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()"><code class="function">cairo_scaled_font_reference()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-status"></a><h3>cairo_scaled_font_status ()</h3>
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a>      cairo_scaled_font_status            (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Checks whether an error has previously occurred for this
scaled_font.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS--CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or another error such as
  <a class="link" href="cairo-error-status.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="cairo-font-extents-t"></a><h3>cairo_font_extents_t</h3>
<pre class="programlisting">typedef struct {
    double ascent;
    double descent;
    double height;
    double max_x_advance;
    double max_y_advance;
} cairo_font_extents_t;
</pre>
<p>
The <a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t"><span class="type">cairo_font_extents_t</span></a> structure stores metric information for
a font. Values are given in the current user-space coordinate
system.
</p>
<p>
Because font metrics are in user-space coordinates, they are
mostly, but not entirely, independent of the current transformation
matrix. If you call <code class="literal">cairo_scale(cr, 2.0, 2.0)</code>,
text will be drawn twice as big, but the reported text extents will
not be doubled. They will change slightly due to hinting (so you
can't assume that metrics are independent of the transformation
matrix), but otherwise will remain unchanged.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">double <em class="structfield"><code>ascent</code></em>;</span></p></td>
<td> the distance that the font extends above the baseline.
         Note that this is not always exactly equal to the maximum
         of the extents of all the glyphs in the font, but rather
         is picked to express the font designer's intent as to
         how the font should align with elements above it.
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>descent</code></em>;</span></p></td>
<td> the distance that the font extends below the baseline.
          This value is positive for typical fonts that include
          portions below the baseline. Note that this is not always
          exactly equal to the maximum of the extents of all the
          glyphs in the font, but rather is picked to express the
          font designer's intent as to how the the font should
          align with elements below it.
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>height</code></em>;</span></p></td>
<td> the recommended vertical distance between baselines when
         setting consecutive lines of text with the font. This
         is greater than <em class="parameter"><code>ascent</code></em>+<em class="parameter"><code>descent</code></em> by a
         quantity known as the <em class="firstterm">line spacing</em>
         or <em class="firstterm">external leading</em>. When space
         is at a premium, most fonts can be set with only
         a distance of <em class="parameter"><code>ascent</code></em>+<em class="parameter"><code>descent</code></em> between lines.
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>max_x_advance</code></em>;</span></p></td>
<td> the maximum distance in the X direction that
        the the origin is advanced for any glyph in the font.
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>max_y_advance</code></em>;</span></p></td>
<td> the maximum distance in the Y direction that
        the the origin is advanced for any glyph in the font.
        this will be zero for normal fonts used for horizontal
        writing. (The scripts of East Asia are sometimes written
        vertically.)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-extents"></a><h3>cairo_scaled_font_extents ()</h3>
<pre class="programlisting">void                cairo_scaled_font_extents           (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a> *extents);</pre>
<p>
Gets the metrics for a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-font-extents-t" title="cairo_font_extents_t"><span class="type">cairo_font_extents_t</span></a> which to store the retrieved extents.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-text-extents-t"></a><h3>cairo_text_extents_t</h3>
<pre class="programlisting">typedef struct {
    double x_bearing;
    double y_bearing;
    double width;
    double height;
    double x_advance;
    double y_advance;
} cairo_text_extents_t;
</pre>
<p>
The <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> structure stores the extents of a single
glyph or a string of glyphs in user-space coordinates. Because text
extents are in user-space coordinates, they are mostly, but not
entirely, independent of the current transformation matrix. If you call
<code class="literal">cairo_scale(cr, 2.0, 2.0)</code>, text will
be drawn twice as big, but the reported text extents will not be
doubled. They will change slightly due to hinting (so you can't
assume that metrics are independent of the transformation matrix),
but otherwise will remain unchanged.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">double <em class="structfield"><code>x_bearing</code></em>;</span></p></td>
<td> the horizontal distance from the origin to the
  leftmost part of the glyphs as drawn. Positive if the
  glyphs lie entirely to the right of the origin.
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>y_bearing</code></em>;</span></p></td>
<td> the vertical distance from the origin to the
  topmost part of the glyphs as drawn. Positive only if the
  glyphs lie completely below the origin; will usually be
  negative.
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>width</code></em>;</span></p></td>
<td> width of the glyphs as drawn
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>height</code></em>;</span></p></td>
<td> height of the glyphs as drawn
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>x_advance</code></em>;</span></p></td>
<td>distance to advance in the X direction
   after drawing these glyphs
</td>
</tr>
<tr>
<td><p><span class="term">double <em class="structfield"><code>y_advance</code></em>;</span></p></td>
<td> distance to advance in the Y direction
  after drawing these glyphs. Will typically be zero except
  for vertical text layout as found in East-Asian languages.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-text-extents"></a><h3>cairo_scaled_font_text_extents ()</h3>
<pre class="programlisting">void                cairo_scaled_font_text_extents      (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const char *utf8,
                                                         <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);</pre>
<p>
Gets the extents for a string of text. The extents describe a
user-space rectangle that encloses the "inked" portion of the text
drawn at the origin (0,0) (as it would be drawn by <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>
if the cairo graphics state were set to the same font_face,
font_matrix, ctm, and font_options as <em class="parameter"><code>scaled_font</code></em>).  Additionally,
the x_advance and y_advance values indicate the amount by which the
current point would be advanced by <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.
</p>
<p>
Note that whitespace characters do not directly contribute to the
size of the rectangle (extents.width and extents.height). They do
contribute indirectly by changing the position of non-whitespace
characters. In particular, trailing whitespace characters are
likely to not affect the size of the rectangle, though they will
affect the x_advance and y_advance values.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>utf8</code></em> :</span></p></td>
<td> a NUL-terminated string of text, encoded in UTF-8
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> which to store the retrieved extents.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-glyph-extents"></a><h3>cairo_scaled_font_glyph_extents ()</h3>
<pre class="programlisting">void                cairo_scaled_font_glyph_extents     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> *glyphs,
                                                         int num_glyphs,
                                                         <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a> *extents);</pre>
<p>
Gets the extents for an array of glyphs. The extents describe a
user-space rectangle that encloses the "inked" portion of the
glyphs, (as they would be drawn by <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a> if the cairo
graphics state were set to the same font_face, font_matrix, ctm,
and font_options as <em class="parameter"><code>scaled_font</code></em>).  Additionally, the x_advance and
y_advance values indicate the amount by which the current point
would be advanced by <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>.
</p>
<p>
Note that whitespace glyphs do not contribute to the size of the
rectangle (extents.width and extents.height).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
<td> an array of glyph IDs with X and Y offsets.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
<td> the number of glyphs in the <em class="parameter"><code>glyphs</code></em> array
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> which to store the retrieved extents.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-text-to-glyphs"></a><h3>cairo_scaled_font_text_to_glyphs ()</h3>
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a>      cairo_scaled_font_text_to_glyphs    (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         double x,
                                                         double y,
                                                         const char *utf8,
                                                         int utf8_len,
                                                         <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t">cairo_glyph_t</a> **glyphs,
                                                         int *num_glyphs,
                                                         <a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t">cairo_text_cluster_t</a> **clusters,
                                                         int *num_clusters,
                                                         <a class="link" href="cairo-text.html#cairo-text-cluster-flags-t" title="enum cairo_text_cluster_flags_t">cairo_text_cluster_flags_t</a> *cluster_flags);</pre>
<p>
Converts UTF-8 text to an array of glyphs, optionally with cluster
mapping, that can be used to render later using <em class="parameter"><code>scaled_font</code></em>.
</p>
<p>
If <em class="parameter"><code>glyphs</code></em> initially points to a non-<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> value, that array is used
as a glyph buffer, and <em class="parameter"><code>num_glyphs</code></em> should point to the number of glyph
entries available there.  If the provided glyph array is too short for
the conversion, a new glyph array is allocated using <a class="link" href="cairo-text.html#cairo-glyph-allocate" title="cairo_glyph_allocate ()"><code class="function">cairo_glyph_allocate()</code></a>
and placed in <em class="parameter"><code>glyphs</code></em>.  Upon return, <em class="parameter"><code>num_glyphs</code></em> always contains the
number of generated glyphs.  If the value <em class="parameter"><code>glyphs</code></em> points to has changed
after the call, the user is responsible for freeing the allocated glyph
array using <a class="link" href="cairo-text.html#cairo-glyph-free" title="cairo_glyph_free ()"><code class="function">cairo_glyph_free()</code></a>.  This may happen even if the provided
array was large enough.
</p>
<p>
If <em class="parameter"><code>clusters</code></em> is not <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>, <em class="parameter"><code>num_clusters</code></em> and <em class="parameter"><code>cluster_flags</code></em> should not be <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>,
and cluster mapping will be computed.
The semantics of how cluster array allocation works is similar to the glyph
array.  That is,
if <em class="parameter"><code>clusters</code></em> initially points to a non-<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> value, that array is used
as a cluster buffer, and <em class="parameter"><code>num_clusters</code></em> should point to the number of cluster
entries available there.  If the provided cluster array is too short for
the conversion, a new cluster array is allocated using <a class="link" href="cairo-text.html#cairo-text-cluster-allocate" title="cairo_text_cluster_allocate ()"><code class="function">cairo_text_cluster_allocate()</code></a>
and placed in <em class="parameter"><code>clusters</code></em>.  Upon return, <em class="parameter"><code>num_clusters</code></em> always contains the
number of generated clusters.  If the value <em class="parameter"><code>clusters</code></em> points at has changed
after the call, the user is responsible for freeing the allocated cluster
array using <a class="link" href="cairo-text.html#cairo-text-cluster-free" title="cairo_text_cluster_free ()"><code class="function">cairo_text_cluster_free()</code></a>.  This may happen even if the provided
array was large enough.
</p>
<p>
In the simplest case, <em class="parameter"><code>glyphs</code></em> and <em class="parameter"><code>clusters</code></em> can point to <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> initially
and a suitable array will be allocated.  In code:
</p>
<div class="informalexample"><pre class="programlisting">
cairo_status_t status;

cairo_glyph_t *glyphs = NULL;
int num_glyphs;
cairo_text_cluster_t *clusters = NULL;
int num_clusters;
cairo_text_cluster_flags_t cluster_flags;

status = cairo_scaled_font_text_to_glyphs (scaled_font,
                                           x, y,
                                           utf8, utf8_len,
                                           &amp;glyphs, &amp;num_glyphs,
                                           &amp;clusters, &amp;num_clusters, &amp;cluster_flags);

if (status == CAIRO_STATUS_SUCCESS) {
    cairo_show_text_glyphs (cr,
                            utf8, utf8_len,
                            *glyphs, *num_glyphs,
                            *clusters, *num_clusters, *cluster_flags);

    cairo_glyph_free (*glyphs);
    cairo_text_cluster_free (*clusters);
}
</pre></div>
<p>
</p>
<p>
If no cluster mapping is needed:
</p>
<div class="informalexample"><pre class="programlisting">
cairo_status_t status;

cairo_glyph_t *glyphs = NULL;
int num_glyphs;

status = cairo_scaled_font_text_to_glyphs (scaled_font,
                                           x, y,
                                           utf8, utf8_len,
                                           &amp;glyphs, &amp;num_glyphs,
                                           NULL, NULL,
                                           NULL);

if (status == CAIRO_STATUS_SUCCESS) {
    cairo_show_glyphs (cr, *glyphs, *num_glyphs);
    cairo_glyph_free (*glyphs);
}
</pre></div>
<p>
</p>
<p>
If stack-based glyph and cluster arrays are to be used for small
arrays:
</p>
<div class="informalexample"><pre class="programlisting">
cairo_status_t status;

cairo_glyph_t stack_glyphs[40];
cairo_glyph_t *glyphs = stack_glyphs;
int num_glyphs = sizeof (stack_glyphs) / sizeof (stack_glyphs[0]);
cairo_text_cluster_t stack_clusters[40];
cairo_text_cluster_t *clusters = stack_clusters;
int num_clusters = sizeof (stack_clusters) / sizeof (stack_clusters[0]);
cairo_text_cluster_flags_t cluster_flags;

status = cairo_scaled_font_text_to_glyphs (scaled_font,
                                           x, y,
                                           utf8, utf8_len,
                                           &amp;glyphs, &amp;num_glyphs,
                                           &amp;clusters, &amp;num_clusters, &amp;cluster_flags);

if (status == CAIRO_STATUS_SUCCESS) {
    cairo_show_text_glyphs (cr,
                            utf8, utf8_len,
                            *glyphs, *num_glyphs,
                            *clusters, *num_clusters, *cluster_flags);

    if (glyphs != stack_glyphs)
        cairo_glyph_free (*glyphs);
    if (clusters != stack_clusters)
        cairo_text_cluster_free (*clusters);
}
</pre></div>
<p>
</p>
<p>
For details of how <em class="parameter"><code>clusters</code></em>, <em class="parameter"><code>num_clusters</code></em>, and <em class="parameter"><code>cluster_flags</code></em> map input
UTF-8 text to the output glyphs see <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a>.
</p>
<p>
The output values can be readily passed to <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a>
<a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>, or related functions, assuming that the exact
same <em class="parameter"><code>scaled_font</code></em> is used for the operation.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td> X position to place first glyph
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td> Y position to place first glyph
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>utf8</code></em> :</span></p></td>
<td> a string of text encoded in UTF-8
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>utf8_len</code></em> :</span></p></td>
<td> length of <em class="parameter"><code>utf8</code></em> in bytes, or -1 if it is NUL-terminated
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
<td> pointer to array of glyphs to fill
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_glyphs</code></em> :</span></p></td>
<td> pointer to number of glyphs
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>clusters</code></em> :</span></p></td>
<td> pointer to array of cluster mapping information to fill, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_clusters</code></em> :</span></p></td>
<td> pointer to number of clusters, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cluster_flags</code></em> :</span></p></td>
<td> pointer to location to store cluster flags corresponding to the
                output <em class="parameter"><code>clusters</code></em>, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS--CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> upon success, or an error status
if the input values are wrong or if conversion failed.  If the input
values are correct but the conversion failed, the error status is also
set on <em class="parameter"><code>scaled_font</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.8</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-font-face"></a><h3>cairo_scaled_font_get_font_face ()</h3>
<pre class="programlisting"><a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a> * cairo_scaled_font_get_font_face     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Gets the font face that this scaled font was created for.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The <a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> with which <em class="parameter"><code>scaled_font</code></em> was
created.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-font-options"></a><h3>cairo_scaled_font_get_font_options ()</h3>
<pre class="programlisting">void                cairo_scaled_font_get_font_options  (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t">cairo_font_options_t</a> *options);</pre>
<p>
Stores the font options with which <em class="parameter"><code>scaled_font</code></em> was created into
<em class="parameter"><code>options</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
<td> return value for the font options
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-font-matrix"></a><h3>cairo_scaled_font_get_font_matrix ()</h3>
<pre class="programlisting">void                cairo_scaled_font_get_font_matrix   (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *font_matrix);</pre>
<p>
Stores the font matrix with which <em class="parameter"><code>scaled_font</code></em> was created into
<em class="parameter"><code>matrix</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>font_matrix</code></em> :</span></p></td>
<td> return value for the matrix
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-ctm"></a><h3>cairo_scaled_font_get_ctm ()</h3>
<pre class="programlisting">void                cairo_scaled_font_get_ctm           (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *ctm);</pre>
<p>
Stores the CTM with which <em class="parameter"><code>scaled_font</code></em> was created into <em class="parameter"><code>ctm</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ctm</code></em> :</span></p></td>
<td> return value for the CTM
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-scale-matrix"></a><h3>cairo_scaled_font_get_scale_matrix ()</h3>
<pre class="programlisting">void                cairo_scaled_font_get_scale_matrix  (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         <a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t">cairo_matrix_t</a> *scale_matrix);</pre>
<p>
Stores the scale matrix of <em class="parameter"><code>scaled_font</code></em> into <em class="parameter"><code>matrix</code></em>.
The scale matrix is product of the font matrix and the ctm
associated with the scaled font, and hence is the matrix mapping from
font space to device space.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scale_matrix</code></em> :</span></p></td>
<td> return value for the matrix
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.8</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-type"></a><h3>cairo_scaled_font_get_type ()</h3>
<pre class="programlisting"><a class="link" href="cairo-font-face.html#cairo-font-type-t" title="enum cairo_font_type_t">cairo_font_type_t</a>   cairo_scaled_font_get_type          (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
This function returns the type of the backend used to create
a scaled font. See <a class="link" href="cairo-font-face.html#cairo-font-type-t" title="enum 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><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The type of <em class="parameter"><code>scaled_font</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-reference-count"></a><h3>cairo_scaled_font_get_reference_count ()</h3>
<pre class="programlisting">unsigned int        cairo_scaled_font_get_reference_count
                                                        (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Returns the current reference count of <em class="parameter"><code>scaled_font</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current reference count of <em class="parameter"><code>scaled_font</code></em>.  If the
object is a nil object, 0 will be returned.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-set-user-data"></a><h3>cairo_scaled_font_set_user_data ()</h3>
<pre class="programlisting"><a class="link" href="cairo-error-status.html#cairo-status-t" title="enum cairo_status_t">cairo_status_t</a>      cairo_scaled_font_set_user_data     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key,
                                                         void *user_data,
                                                         <a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()">cairo_destroy_func_t</a> destroy);</pre>
<p>
Attach user data to <em class="parameter"><code>scaled_font</code></em>.  To remove user data from a surface,
call this function with the key that was used to set it and <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
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><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td> the address of a <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="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><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td> the user data to attach to the <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
<a class="link" href="cairo-context.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the
same key.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="cairo-error-status.html#CAIRO-STATUS-SUCCESS--CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-error-status.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>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="cairo-scaled-font-get-user-data"></a><h3>cairo_scaled_font_get_user_data ()</h3>
<pre class="programlisting">void *              cairo_scaled_font_get_user_data     (<a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a> *scaled_font,
                                                         const <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="cairo_user_data_key_t">cairo_user_data_key_t</a> *key);</pre>
<p>
Return user data previously attached to <em class="parameter"><code>scaled_font</code></em> using the
specified key.  If no user data has been attached with the given
key this function returns <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scaled_font</code></em> :</span></p></td>
<td> a <a class="link" href="cairo-scaled-font.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td> the address of the <a class="link" href="cairo-types.html#cairo-user-data-key-t" title="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><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the user data previously attached or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="cairo-scaled-font.see-also"></a><h2>See Also</h2>
<p>
</p>
<div class="itemizedlist"><ul type="disc">
<li><a class="link" href="cairo-font-face.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a></li>
<li><a class="link" href="cairo-matrix.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a></li>
<li><a class="link" href="cairo-font-options.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a></li>
</ul></div>
<p>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>