<?xml version='1.0' encoding='UTF-8'?> 
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
                "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cairo-Scaled-Fonts">
<refmeta>
<refentrytitle role="top_of_page">cairo_scaled_font_t</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAIRO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>cairo_scaled_font_t</refname>
<refpurpose>Font face at particular size and options</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>



typedef             <link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link>;
<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link>* <link linkend="cairo-scaled-font-create">cairo_scaled_font_create</link>           (<link linkend="cairo-font-face-t">cairo_font_face_t</link> *font_face,
                                                         const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *font_matrix,
                                                         const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *ctm,
                                                         const <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);
<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link>* <link linkend="cairo-scaled-font-reference">cairo_scaled_font_reference</link>        (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);
<link linkend="void">void</link>                <link linkend="cairo-scaled-font-destroy">cairo_scaled_font_destroy</link>           (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);
<link linkend="cairo-status-t">cairo_status_t</link>      <link linkend="cairo-scaled-font-status">cairo_scaled_font_status</link>            (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);
                    <link linkend="cairo-font-extents-t">cairo_font_extents_t</link>;
<link linkend="void">void</link>                <link linkend="cairo-scaled-font-extents">cairo_scaled_font_extents</link>           (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-font-extents-t">cairo_font_extents_t</link> *extents);
                    <link linkend="cairo-text-extents-t">cairo_text_extents_t</link>;
<link linkend="void">void</link>                <link linkend="cairo-scaled-font-text-extents">cairo_scaled_font_text_extents</link>      (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="char">char</link> *utf8,
                                                         <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);
<link linkend="void">void</link>                <link linkend="cairo-scaled-font-glyph-extents">cairo_scaled_font_glyph_extents</link>     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                                         <link linkend="int">int</link> num_glyphs,
                                                         <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);
<link linkend="cairo-font-face-t">cairo_font_face_t</link>*  <link linkend="cairo-scaled-font-get-font-face">cairo_scaled_font_get_font_face</link>     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);
<link linkend="void">void</link>                <link linkend="cairo-scaled-font-get-font-options">cairo_scaled_font_get_font_options</link>  (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);
<link linkend="void">void</link>                <link linkend="cairo-scaled-font-get-font-matrix">cairo_scaled_font_get_font_matrix</link>   (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-matrix-t">cairo_matrix_t</link> *font_matrix);
<link linkend="void">void</link>                <link linkend="cairo-scaled-font-get-ctm">cairo_scaled_font_get_ctm</link>           (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-matrix-t">cairo_matrix_t</link> *ctm);
<link linkend="cairo-font-type-t">cairo_font_type_t</link>   <link linkend="cairo-scaled-font-get-type">cairo_scaled_font_get_type</link>          (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);
unsigned <link linkend="int">int</link>        <link linkend="cairo-scaled-font-get-reference-count">cairo_scaled_font_get_reference_count</link>
                                                        (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);
<link linkend="cairo-status-t">cairo_status_t</link>      <link linkend="cairo-scaled-font-set-user-data">cairo_scaled_font_set_user_data</link>     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="cairo-user-data-key-t">cairo_user_data_key_t</link> *key,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="cairo-destroy-func-t">cairo_destroy_func_t</link> destroy);
<link linkend="void">void</link>*               <link linkend="cairo-scaled-font-get-user-data">cairo_scaled_font_get_user_data</link>     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="cairo-user-data-key-t">cairo_user_data_key_t</link> *key);
</synopsis>
</refsynopsisdiv>









<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
<link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> represents a realization of a font face at a particular
size and transformation and a certain set of font options.
</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="cairo-scaled-font-t" role="typedef"/>cairo_scaled_font_t</title>
<indexterm><primary>cairo_scaled_font_t</primary></indexterm><programlisting>typedef struct _cairo_scaled_font cairo_scaled_font_t;
</programlisting>
<para>
A <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> is a font scaled to a particular size and device
resolution. A <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> 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.
</para>
<para>
There are various types of scaled fonts, depending on the
<firstterm>font backend</firstterm> they use. The type of a
scaled font can be queried using <link linkend="cairo-scaled-font-get-type"><function>cairo_scaled_font_get_type()</function></link>.
</para>
<para>
Memory management of <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> is done with
<link linkend="cairo-scaled-font-reference"><function>cairo_scaled_font_reference()</function></link> and <link linkend="cairo-scaled-font-destroy"><function>cairo_scaled_font_destroy()</function></link>.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-create" role="function"/>cairo_scaled_font_create ()</title>
<indexterm><primary>cairo_scaled_font_create</primary></indexterm><programlisting><link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link>* cairo_scaled_font_create           (<link linkend="cairo-font-face-t">cairo_font_face_t</link> *font_face,
                                                         const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *font_matrix,
                                                         const <link linkend="cairo-matrix-t">cairo_matrix_t</link> *ctm,
                                                         const <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);</programlisting>
<para>
Creates a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> object from a font face and matrices that
describe the size of the font and the environment in which it will
be used.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>font_face</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font_matrix</parameter>&nbsp;:</term>
<listitem><simpara> 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
      <link linkend="cairo-set-font-matrix"><function>cairo_set_font_matrix()</function></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ctm</parameter>&nbsp;:</term>
<listitem><simpara> user to device transformation matrix with which the font will
      be used.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>options</parameter>&nbsp;:</term>
<listitem><simpara> options to use when getting metrics for the font and
          rendering with it. A <link linkend="NULL:CAPS"><literal>NULL</literal></link> pointer will be interpreted as
          meaning the default options.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly created <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>. Destroy with
 <link linkend="cairo-scaled-font-destroy"><function>cairo_scaled_font_destroy()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-reference" role="function"/>cairo_scaled_font_reference ()</title>
<indexterm><primary>cairo_scaled_font_reference</primary></indexterm><programlisting><link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link>* cairo_scaled_font_reference        (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting>
<para>
Increases the reference count on <parameter>scaled_font</parameter> by one. This prevents
<parameter>scaled_font</parameter> from being destroyed until a matching call to
<link linkend="cairo-scaled-font-destroy"><function>cairo_scaled_font_destroy()</function></link> is made.
</para>
<para>
The number of references to a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> can be get using
<link linkend="cairo-scaled-font-get-reference-count"><function>cairo_scaled_font_get_reference_count()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>, (may be <link linkend="NULL:CAPS"><literal>NULL</literal></link> in which case
this function does nothing)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the referenced <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-destroy" role="function"/>cairo_scaled_font_destroy ()</title>
<indexterm><primary>cairo_scaled_font_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                cairo_scaled_font_destroy           (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting>
<para>
Decreases the reference count on <parameter>font</parameter> by one. If the result
is zero, then <parameter>font</parameter> and all associated resources are freed.
See <link linkend="cairo-scaled-font-reference"><function>cairo_scaled_font_reference()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-status" role="function"/>cairo_scaled_font_status ()</title>
<indexterm><primary>cairo_scaled_font_status</primary></indexterm><programlisting><link linkend="cairo-status-t">cairo_status_t</link>      cairo_scaled_font_status            (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting>
<para>
Checks whether an error has previously occurred for this
scaled_font.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or another error such as
  <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-font-extents-t" role="struct"/>cairo_font_extents_t</title>
<indexterm><primary>cairo_font_extents_t</primary></indexterm><programlisting>typedef struct {
    double ascent;
    double descent;
    double height;
    double max_x_advance;
    double max_y_advance;
} cairo_font_extents_t;
</programlisting>
<para>
The <link linkend="cairo-font-extents-t"><type>cairo_font_extents_t</type></link> structure stores metric information for
a font. Values are given in the current user-space coordinate
system.
</para>
<para>
Because font metrics are in user-space coordinates, they are
mostly, but not entirely, independent of the current transformation
matrix. If you call <literal>cairo_scale(cr, 2.0, 2.0)</literal>,
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.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>ascent</structfield>;</term>
<listitem><simpara> 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.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>descent</structfield>;</term>
<listitem><simpara> 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.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>height</structfield>;</term>
<listitem><simpara> the recommended vertical distance between baselines when
         setting consecutive lines of text with the font. This
         is greater than <parameter>ascent</parameter>+<parameter>descent</parameter> by a
         quantity known as the <firstterm>line spacing</firstterm>
         or <firstterm>external leading</firstterm>. When space
         is at a premium, most fonts can be set with only
         a distance of <parameter>ascent</parameter>+<parameter>descent</parameter> between lines.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>max_x_advance</structfield>;</term>
<listitem><simpara> the maximum distance in the X direction that
        the the origin is advanced for any glyph in the font.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>max_y_advance</structfield>;</term>
<listitem><simpara> 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.)
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-extents" role="function"/>cairo_scaled_font_extents ()</title>
<indexterm><primary>cairo_scaled_font_extents</primary></indexterm><programlisting><link linkend="void">void</link>                cairo_scaled_font_extents           (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-font-extents-t">cairo_font_extents_t</link> *extents);</programlisting>
<para>
Gets the metrics for a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-font-extents-t"><type>cairo_font_extents_t</type></link> which to store the retrieved extents.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-text-extents-t" role="struct"/>cairo_text_extents_t</title>
<indexterm><primary>cairo_text_extents_t</primary></indexterm><programlisting>typedef struct {
    double x_bearing;
    double y_bearing;
    double width;
    double height;
    double x_advance;
    double y_advance;
} cairo_text_extents_t;
</programlisting>
<para>
The <link linkend="cairo-text-extents-t"><type>cairo_text_extents_t</type></link> 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
<literal>cairo_scale(cr, 2.0, 2.0)</literal>, 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.</para>
<para>

</para><variablelist role="struct">
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>x_bearing</structfield>;</term>
<listitem><simpara> 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.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>y_bearing</structfield>;</term>
<listitem><simpara> 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.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>width</structfield>;</term>
<listitem><simpara> width of the glyphs as drawn
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>height</structfield>;</term>
<listitem><simpara> height of the glyphs as drawn
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>x_advance</structfield>;</term>
<listitem><simpara>distance to advance in the X direction
   after drawing these glyphs
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>y_advance</structfield>;</term>
<listitem><simpara> 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.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-text-extents" role="function" condition="since:1.2"/>cairo_scaled_font_text_extents ()</title>
<indexterm role="1.2"><primary>cairo_scaled_font_text_extents</primary></indexterm><programlisting><link linkend="void">void</link>                cairo_scaled_font_text_extents      (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="char">char</link> *utf8,
                                                         <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);</programlisting>
<para>
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 <link linkend="cairo-show-text"><function>cairo_show_text()</function></link>
if the cairo graphics state were set to the same font_face,
font_matrix, ctm, and font_options as <parameter>scaled_font</parameter>).  Additionally,
the x_advance and y_advance values indicate the amount by which the
current point would be advanced by <link linkend="cairo-show-text"><function>cairo_show_text()</function></link>.
</para>
<para>
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.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>utf8</parameter>&nbsp;:</term>
<listitem><simpara> a string of text, encoded in UTF-8
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-text-extents-t"><type>cairo_text_extents_t</type></link> which to store the retrieved extents.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-glyph-extents" role="function"/>cairo_scaled_font_glyph_extents ()</title>
<indexterm><primary>cairo_scaled_font_glyph_extents</primary></indexterm><programlisting><link linkend="void">void</link>                cairo_scaled_font_glyph_extents     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs,
                                                         <link linkend="int">int</link> num_glyphs,
                                                         <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);</programlisting>
<para>
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 <link linkend="cairo-show-glyphs"><function>cairo_show_glyphs()</function></link> if the cairo
graphics state were set to the same font_face, font_matrix, ctm,
and font_options as <parameter>scaled_font</parameter>).  Additionally, the x_advance and
y_advance values indicate the amount by which the current point
would be advanced by <link linkend="cairo-show-glyphs"><function>cairo_show_glyphs()</function></link>.
</para>
<para>
Note that whitespace glyphs do not contribute to the size of the
rectangle (extents.width and extents.height).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term>
<listitem><simpara> an array of glyph IDs with X and Y offsets.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_glyphs</parameter>&nbsp;:</term>
<listitem><simpara> the number of glyphs in the <parameter>glyphs</parameter> array
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extents</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-text-extents-t"><type>cairo_text_extents_t</type></link> which to store the retrieved extents.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-get-font-face" role="function" condition="since:1.2"/>cairo_scaled_font_get_font_face ()</title>
<indexterm role="1.2"><primary>cairo_scaled_font_get_font_face</primary></indexterm><programlisting><link linkend="cairo-font-face-t">cairo_font_face_t</link>*  cairo_scaled_font_get_font_face     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting>
<para>
Gets the font face that this scaled font was created for.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The <link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> with which <parameter>scaled_font</parameter> was
created.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-get-font-options" role="function" condition="since:1.2"/>cairo_scaled_font_get_font_options ()</title>
<indexterm role="1.2"><primary>cairo_scaled_font_get_font_options</primary></indexterm><programlisting><link linkend="void">void</link>                cairo_scaled_font_get_font_options  (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);</programlisting>
<para>
Stores the font options with which <parameter>scaled_font</parameter> was created into
<parameter>options</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>options</parameter>&nbsp;:</term>
<listitem><simpara> return value for the font options
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-get-font-matrix" role="function" condition="since:1.2"/>cairo_scaled_font_get_font_matrix ()</title>
<indexterm role="1.2"><primary>cairo_scaled_font_get_font_matrix</primary></indexterm><programlisting><link linkend="void">void</link>                cairo_scaled_font_get_font_matrix   (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-matrix-t">cairo_matrix_t</link> *font_matrix);</programlisting>
<para>
Stores the font matrix with which <parameter>scaled_font</parameter> was created into
<parameter>matrix</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font_matrix</parameter>&nbsp;:</term>
<listitem><simpara> return value for the matrix
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-get-ctm" role="function" condition="since:1.2"/>cairo_scaled_font_get_ctm ()</title>
<indexterm role="1.2"><primary>cairo_scaled_font_get_ctm</primary></indexterm><programlisting><link linkend="void">void</link>                cairo_scaled_font_get_ctm           (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         <link linkend="cairo-matrix-t">cairo_matrix_t</link> *ctm);</programlisting>
<para>
Stores the CTM with which <parameter>scaled_font</parameter> was created into <parameter>ctm</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ctm</parameter>&nbsp;:</term>
<listitem><simpara> return value for the CTM
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-get-type" role="function" condition="since:1.2"/>cairo_scaled_font_get_type ()</title>
<indexterm role="1.2"><primary>cairo_scaled_font_get_type</primary></indexterm><programlisting><link linkend="cairo-font-type-t">cairo_font_type_t</link>   cairo_scaled_font_get_type          (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting>
<para>
This function returns the type of the backend used to create
a scaled font. See <link linkend="cairo-font-type-t"><type>cairo_font_type_t</type></link> for available types.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The type of <parameter>scaled_font</parameter>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-get-reference-count" role="function" condition="since:1.4"/>cairo_scaled_font_get_reference_count ()</title>
<indexterm role="1.4"><primary>cairo_scaled_font_get_reference_count</primary></indexterm><programlisting>unsigned <link linkend="int">int</link>        cairo_scaled_font_get_reference_count
                                                        (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting>
<para>
Returns the current reference count of <parameter>scaled_font</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current reference count of <parameter>scaled_font</parameter>.  If the
object is a nil object, 0 will be returned.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-set-user-data" role="function" condition="since:1.4"/>cairo_scaled_font_set_user_data ()</title>
<indexterm role="1.4"><primary>cairo_scaled_font_set_user_data</primary></indexterm><programlisting><link linkend="cairo-status-t">cairo_status_t</link>      cairo_scaled_font_set_user_data     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="cairo-user-data-key-t">cairo_user_data_key_t</link> *key,
                                                         <link linkend="void">void</link> *user_data,
                                                         <link linkend="cairo-destroy-func-t">cairo_destroy_func_t</link> destroy);</programlisting>
<para>
Attach user data to <parameter>scaled_font</parameter>.  To remove user data from a surface,
call this function with the key that was used to set it and <link linkend="NULL:CAPS"><literal>NULL</literal></link>
for <parameter>data</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara> the address of a <link linkend="cairo-user-data-key-t"><type>cairo_user_data_key_t</type></link> to attach the user data to
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> the user data to attach to the <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destroy</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-destroy-func-t"><type>cairo_destroy_func_t</type></link> which will be called when the
<link linkend="cairo-t"><type>cairo_t</type></link> is destroyed or when new user data is attached using the
same key.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> or <link linkend="CAIRO-STATUS-NO-MEMORY:CAPS"><literal>CAIRO_STATUS_NO_MEMORY</literal></link> if a
slot could not be allocated for the user data.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="cairo-scaled-font-get-user-data" role="function" condition="since:1.4"/>cairo_scaled_font_get_user_data ()</title>
<indexterm role="1.4"><primary>cairo_scaled_font_get_user_data</primary></indexterm><programlisting><link linkend="void">void</link>*               cairo_scaled_font_get_user_data     (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font,
                                                         const <link linkend="cairo-user-data-key-t">cairo_user_data_key_t</link> *key);</programlisting>
<para>
Return user data previously attached to <parameter>scaled_font</parameter> using the
specified key.  If no user data has been attached with the given
key this function returns <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scaled_font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara> the address of the <link linkend="cairo-user-data-key-t"><type>cairo_user_data_key_t</type></link> the user data was
attached to
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the user data previously attached or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<itemizedlist>
<listitem><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link></listitem>
<listitem><link linkend="cairo-matrix-t"><type>cairo_matrix_t</type></link></listitem>
<listitem><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link></listitem>
</itemizedlist>
</para>
</refsect1>


<refsect1><refsect2 /><refsect2 /></refsect1>
</refentry>
