<?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-cairo-font-options-t">
<refmeta>
<refentrytitle role="top_of_page" id="cairo-cairo-font-options-t.top_of_page">cairo_font_options_t</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  CAIRO Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>cairo_font_options_t</refname>
<refpurpose>How a font should be rendered</refpurpose>
</refnamediv>

<refsynopsisdiv id="cairo-cairo-font-options-t.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>typedef             <link linkend="cairo-font-options-t">cairo_font_options_t</link>;
<link linkend="cairo-font-options-t"><returnvalue>cairo_font_options_t</returnvalue></link> * <link linkend="cairo-font-options-create">cairo_font_options_create</link>        (<parameter><type>void</type></parameter>);
<link linkend="cairo-font-options-t"><returnvalue>cairo_font_options_t</returnvalue></link> * <link linkend="cairo-font-options-copy">cairo_font_options_copy</link>          (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *original</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="cairo-font-options-destroy">cairo_font_options_destroy</link>          (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);
<link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>      <link linkend="cairo-font-options-status">cairo_font_options_status</link>           (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="cairo-font-options-merge">cairo_font_options_merge</link>            (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *other</parameter>);
unsigned <link linkend="long"><returnvalue>long</returnvalue></link>       <link linkend="cairo-font-options-hash">cairo_font_options_hash</link>             (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);
<link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>        <link linkend="cairo-font-options-equal">cairo_font_options_equal</link>            (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *other</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="cairo-font-options-set-antialias">cairo_font_options_set_antialias</link>    (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-antialias-t"><type>cairo_antialias_t</type></link> antialias</parameter>);
<link linkend="cairo-antialias-t"><returnvalue>cairo_antialias_t</returnvalue></link>   <link linkend="cairo-font-options-get-antialias">cairo_font_options_get_antialias</link>    (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);
enum                <link linkend="cairo-subpixel-order-t">cairo_subpixel_order_t</link>;
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="cairo-font-options-set-subpixel-order">cairo_font_options_set_subpixel_order</link>
                                                        (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-subpixel-order-t"><type>cairo_subpixel_order_t</type></link> subpixel_order</parameter>);
<link linkend="cairo-subpixel-order-t"><returnvalue>cairo_subpixel_order_t</returnvalue></link>  <link linkend="cairo-font-options-get-subpixel-order">cairo_font_options_get_subpixel_order</link>
                                                        (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);
enum                <link linkend="cairo-hint-style-t">cairo_hint_style_t</link>;
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="cairo-font-options-set-hint-style">cairo_font_options_set_hint_style</link>   (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-hint-style-t"><type>cairo_hint_style_t</type></link> hint_style</parameter>);
<link linkend="cairo-hint-style-t"><returnvalue>cairo_hint_style_t</returnvalue></link>  <link linkend="cairo-font-options-get-hint-style">cairo_font_options_get_hint_style</link>   (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);
enum                <link linkend="cairo-hint-metrics-t">cairo_hint_metrics_t</link>;
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="cairo-font-options-set-hint-metrics">cairo_font_options_set_hint_metrics</link> (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-hint-metrics-t"><type>cairo_hint_metrics_t</type></link> hint_metrics</parameter>);
<link linkend="cairo-hint-metrics-t"><returnvalue>cairo_hint_metrics_t</returnvalue></link>  <link linkend="cairo-font-options-get-hint-metrics">cairo_font_options_get_hint_metrics</link>
                                                        (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);
</synopsis>
</refsynopsisdiv>

<refsect1 id="cairo-cairo-font-options-t.description" role="desc">
<title role="desc.title">Description</title>
<para>
The font options specify how fonts should be rendered.  Most of the 
time the font options implied by a surface are just right and do not 
need any changes, but for pixel-based targets tweaking font options 
may result in superior output on a particular display.
</para>
</refsect1>
<refsect1 id="cairo-cairo-font-options-t.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="cairo-font-options-t" role="typedef">
<title>cairo_font_options_t</title>
<indexterm zone="cairo-font-options-t"><primary sortas="font_options_t">cairo_font_options_t</primary></indexterm>
<programlisting>typedef struct _cairo_font_options cairo_font_options_t;
</programlisting>
<para>
An opaque structure holding all options that are used when
rendering fonts.
</para>
<para>
Individual features of a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> can be set or
accessed using functions named
cairo_font_options_set_<emphasis>feature_name</emphasis> and
cairo_font_options_get_<emphasis>feature_name</emphasis>, like
<link linkend="cairo-font-options-set-antialias"><function>cairo_font_options_set_antialias()</function></link> and
<link linkend="cairo-font-options-get-antialias"><function>cairo_font_options_get_antialias()</function></link>.
</para>
<para>
New features may be added to a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> in the
future.  For this reason, <link linkend="cairo-font-options-copy"><function>cairo_font_options_copy()</function></link>,
<link linkend="cairo-font-options-equal"><function>cairo_font_options_equal()</function></link>, <link linkend="cairo-font-options-merge"><function>cairo_font_options_merge()</function></link>, and
<link linkend="cairo-font-options-hash"><function>cairo_font_options_hash()</function></link> should be used to copy, check
for equality, merge, or compute a hash value of
<link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> objects.
</para></refsect2>
<refsect2 id="cairo-font-options-create" role="function">
<title>cairo_font_options_create ()</title>
<indexterm zone="cairo-font-options-create"><primary sortas="font_options_create">cairo_font_options_create</primary></indexterm>
<programlisting><link linkend="cairo-font-options-t"><returnvalue>cairo_font_options_t</returnvalue></link> * cairo_font_options_create        (<parameter><type>void</type></parameter>);</programlisting>
<para>
Allocates a new font options object with all options initialized
 to default values.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly allocated <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>. Free with
  <link linkend="cairo-font-options-destroy"><function>cairo_font_options_destroy()</function></link>. This function always returns a
  valid pointer; if memory cannot be allocated, then a special
  error object is returned where all operations on the object do nothing.
  You can check for this with <link linkend="cairo-font-options-status"><function>cairo_font_options_status()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-copy" role="function">
<title>cairo_font_options_copy ()</title>
<indexterm zone="cairo-font-options-copy"><primary sortas="font_options_copy">cairo_font_options_copy</primary></indexterm>
<programlisting><link linkend="cairo-font-options-t"><returnvalue>cairo_font_options_t</returnvalue></link> * cairo_font_options_copy          (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *original</parameter>);</programlisting>
<para>
Allocates a new font options object copying the option values from
 <parameter>original</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>original</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly allocated <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>. Free with
  <link linkend="cairo-font-options-destroy"><function>cairo_font_options_destroy()</function></link>. This function always returns a
  valid pointer; if memory cannot be allocated, then a special
  error object is returned where all operations on the object do nothing.
  You can check for this with <link linkend="cairo-font-options-status"><function>cairo_font_options_status()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-destroy" role="function">
<title>cairo_font_options_destroy ()</title>
<indexterm zone="cairo-font-options-destroy"><primary sortas="font_options_destroy">cairo_font_options_destroy</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                cairo_font_options_destroy          (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);</programlisting>
<para>
Destroys a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> object created with
<link linkend="cairo-font-options-create"><function>cairo_font_options_create()</function></link> or <link linkend="cairo-font-options-copy"><function>cairo_font_options_copy()</function></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-status" role="function">
<title>cairo_font_options_status ()</title>
<indexterm zone="cairo-font-options-status"><primary sortas="font_options_status">cairo_font_options_status</primary></indexterm>
<programlisting><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>      cairo_font_options_status           (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);</programlisting>
<para>
Checks whether an error has previously occurred for this
font options object
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-merge" role="function">
<title>cairo_font_options_merge ()</title>
<indexterm zone="cairo-font-options-merge"><primary sortas="font_options_merge">cairo_font_options_merge</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                cairo_font_options_merge            (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *other</parameter>);</programlisting>
<para>
Merges non-default options from <parameter>other</parameter> into <parameter>options</parameter>, replacing
existing values. This operation can be thought of as somewhat
similar to compositing <parameter>other</parameter> onto <parameter>options</parameter> with the operation
of <link linkend="CAIRO-OPERATION-OVER:CAPS"><literal>CAIRO_OPERATION_OVER</literal></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>other</parameter>&#160;:</term>
<listitem><simpara>another <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-hash" role="function">
<title>cairo_font_options_hash ()</title>
<indexterm zone="cairo-font-options-hash"><primary sortas="font_options_hash">cairo_font_options_hash</primary></indexterm>
<programlisting>unsigned <link linkend="long"><returnvalue>long</returnvalue></link>       cairo_font_options_hash             (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);</programlisting>
<para>
Compute a hash for the font options object; this value will
be useful when storing an object containing a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
in a hash table.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the hash value for the font options object.
  The return value can be cast to a 32-bit type if a
  32-bit hash value is needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-equal" role="function">
<title>cairo_font_options_equal ()</title>
<indexterm zone="cairo-font-options-equal"><primary sortas="font_options_equal">cairo_font_options_equal</primary></indexterm>
<programlisting><link linkend="cairo-bool-t"><returnvalue>cairo_bool_t</returnvalue></link>        cairo_font_options_equal            (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *other</parameter>);</programlisting>
<para>
Compares two font options objects for equality.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>other</parameter>&#160;:</term>
<listitem><simpara>another <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if all fields of the two font options objects match.
Note that this function will return <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if either object is in
error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-set-antialias" role="function">
<title>cairo_font_options_set_antialias ()</title>
<indexterm zone="cairo-font-options-set-antialias"><primary sortas="font_options_set_antialias">cairo_font_options_set_antialias</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                cairo_font_options_set_antialias    (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-antialias-t"><type>cairo_antialias_t</type></link> antialias</parameter>);</programlisting>
<para>
Sets the antialiasing mode for the font options object. This
specifies the type of antialiasing to do when rendering text.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>antialias</parameter>&#160;:</term>
<listitem><simpara>the new antialiasing mode
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-get-antialias" role="function">
<title>cairo_font_options_get_antialias ()</title>
<indexterm zone="cairo-font-options-get-antialias"><primary sortas="font_options_get_antialias">cairo_font_options_get_antialias</primary></indexterm>
<programlisting><link linkend="cairo-antialias-t"><returnvalue>cairo_antialias_t</returnvalue></link>   cairo_font_options_get_antialias    (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);</programlisting>
<para>
Gets the antialiasing mode for the font options object.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the antialiasing mode
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-subpixel-order-t" role="enum">
<title>enum cairo_subpixel_order_t</title>
<indexterm zone="cairo-subpixel-order-t"><primary sortas="subpixel_order_t">cairo_subpixel_order_t</primary></indexterm>
<programlisting>typedef enum _cairo_subpixel_order {
    CAIRO_SUBPIXEL_ORDER_DEFAULT,
    CAIRO_SUBPIXEL_ORDER_RGB,
    CAIRO_SUBPIXEL_ORDER_BGR,
    CAIRO_SUBPIXEL_ORDER_VRGB,
    CAIRO_SUBPIXEL_ORDER_VBGR
} cairo_subpixel_order_t;
</programlisting>
<para>
The subpixel order specifies the order of color elements within
each pixel on the display device when rendering with an
antialiasing mode of <link linkend="CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><literal>CAIRO_ANTIALIAS_SUBPIXEL</literal></link>.
</para><variablelist role="enum">
<varlistentry id="CAIRO-SUBPIXEL-ORDER-DEFAULT:CAPS" role="constant">
<term><literal>CAIRO_SUBPIXEL_ORDER_DEFAULT</literal></term>
<listitem><simpara>Use the default subpixel order for
  for the target device
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-SUBPIXEL-ORDER-RGB:CAPS" role="constant">
<term><literal>CAIRO_SUBPIXEL_ORDER_RGB</literal></term>
<listitem><simpara>Subpixel elements are arranged horizontally
  with red at the left
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-SUBPIXEL-ORDER-BGR:CAPS" role="constant">
<term><literal>CAIRO_SUBPIXEL_ORDER_BGR</literal></term>
<listitem><simpara>Subpixel elements are arranged horizontally
  with blue at the left
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-SUBPIXEL-ORDER-VRGB:CAPS" role="constant">
<term><literal>CAIRO_SUBPIXEL_ORDER_VRGB</literal></term>
<listitem><simpara>Subpixel elements are arranged vertically
  with red at the top
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-SUBPIXEL-ORDER-VBGR:CAPS" role="constant">
<term><literal>CAIRO_SUBPIXEL_ORDER_VBGR</literal></term>
<listitem><simpara>Subpixel elements are arranged vertically
  with blue at the top
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-set-subpixel-order" role="function">
<title>cairo_font_options_set_subpixel_order ()</title>
<indexterm zone="cairo-font-options-set-subpixel-order"><primary sortas="font_options_set_subpixel_order">cairo_font_options_set_subpixel_order</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                cairo_font_options_set_subpixel_order
                                                        (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-subpixel-order-t"><type>cairo_subpixel_order_t</type></link> subpixel_order</parameter>);</programlisting>
<para>
Sets the subpixel order for the font options object. The subpixel
order specifies the order of color elements within each pixel on
the display device when rendering with an antialiasing mode of
<link linkend="CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><literal>CAIRO_ANTIALIAS_SUBPIXEL</literal></link>. See the documentation for
<link linkend="cairo-subpixel-order-t"><type>cairo_subpixel_order_t</type></link> for full details.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>subpixel_order</parameter>&#160;:</term>
<listitem><simpara>the new subpixel order
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-get-subpixel-order" role="function">
<title>cairo_font_options_get_subpixel_order ()</title>
<indexterm zone="cairo-font-options-get-subpixel-order"><primary sortas="font_options_get_subpixel_order">cairo_font_options_get_subpixel_order</primary></indexterm>
<programlisting><link linkend="cairo-subpixel-order-t"><returnvalue>cairo_subpixel_order_t</returnvalue></link>  cairo_font_options_get_subpixel_order
                                                        (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);</programlisting>
<para>
Gets the subpixel order for the font options object.
See the documentation for <link linkend="cairo-subpixel-order-t"><type>cairo_subpixel_order_t</type></link> for full details.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the subpixel order for the font options object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-hint-style-t" role="enum">
<title>enum cairo_hint_style_t</title>
<indexterm zone="cairo-hint-style-t"><primary sortas="hint_style_t">cairo_hint_style_t</primary></indexterm>
<programlisting>typedef enum _cairo_hint_style {
    CAIRO_HINT_STYLE_DEFAULT,
    CAIRO_HINT_STYLE_NONE,
    CAIRO_HINT_STYLE_SLIGHT,
    CAIRO_HINT_STYLE_MEDIUM,
    CAIRO_HINT_STYLE_FULL
} cairo_hint_style_t;
</programlisting>
<para>
Specifies the type of hinting to do on font outlines. Hinting
is the process of fitting outlines to the pixel grid in order
to improve the appearance of the result. Since hinting outlines
involves distorting them, it also reduces the faithfulness
to the original outline shapes. Not all of the outline hinting
styles are supported by all font backends.
</para>
<para>
New entries may be added in future versions.
</para><variablelist role="enum">
<varlistentry id="CAIRO-HINT-STYLE-DEFAULT:CAPS" role="constant">
<term><literal>CAIRO_HINT_STYLE_DEFAULT</literal></term>
<listitem><simpara>Use the default hint style for
  font backend and target device
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-HINT-STYLE-NONE:CAPS" role="constant">
<term><literal>CAIRO_HINT_STYLE_NONE</literal></term>
<listitem><simpara>Do not hint outlines
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-HINT-STYLE-SLIGHT:CAPS" role="constant">
<term><literal>CAIRO_HINT_STYLE_SLIGHT</literal></term>
<listitem><simpara>Hint outlines slightly to improve
  contrast while retaining good fidelity to the original
  shapes.
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-HINT-STYLE-MEDIUM:CAPS" role="constant">
<term><literal>CAIRO_HINT_STYLE_MEDIUM</literal></term>
<listitem><simpara>Hint outlines with medium strength
  giving a compromise between fidelity to the original shapes
  and contrast
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-HINT-STYLE-FULL:CAPS" role="constant">
<term><literal>CAIRO_HINT_STYLE_FULL</literal></term>
<listitem><simpara>Hint outlines to maximize contrast
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-set-hint-style" role="function">
<title>cairo_font_options_set_hint_style ()</title>
<indexterm zone="cairo-font-options-set-hint-style"><primary sortas="font_options_set_hint_style">cairo_font_options_set_hint_style</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                cairo_font_options_set_hint_style   (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-hint-style-t"><type>cairo_hint_style_t</type></link> hint_style</parameter>);</programlisting>
<para>
Sets the hint style for font outlines for the font options object.
This controls whether to fit font outlines to the pixel grid,
and if so, whether to optimize for fidelity or contrast.
See the documentation for <link linkend="cairo-hint-style-t"><type>cairo_hint_style_t</type></link> for full details.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hint_style</parameter>&#160;:</term>
<listitem><simpara>the new hint style
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-get-hint-style" role="function">
<title>cairo_font_options_get_hint_style ()</title>
<indexterm zone="cairo-font-options-get-hint-style"><primary sortas="font_options_get_hint_style">cairo_font_options_get_hint_style</primary></indexterm>
<programlisting><link linkend="cairo-hint-style-t"><returnvalue>cairo_hint_style_t</returnvalue></link>  cairo_font_options_get_hint_style   (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);</programlisting>
<para>
Gets the hint style for font outlines for the font options object.
See the documentation for <link linkend="cairo-hint-style-t"><type>cairo_hint_style_t</type></link> for full details.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the hint style for the font options object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-hint-metrics-t" role="enum">
<title>enum cairo_hint_metrics_t</title>
<indexterm zone="cairo-hint-metrics-t"><primary sortas="hint_metrics_t">cairo_hint_metrics_t</primary></indexterm>
<programlisting>typedef enum _cairo_hint_metrics {
    CAIRO_HINT_METRICS_DEFAULT,
    CAIRO_HINT_METRICS_OFF,
    CAIRO_HINT_METRICS_ON
} cairo_hint_metrics_t;
</programlisting>
<para>
Specifies whether to hint font metrics; hinting font metrics
means quantizing them so that they are integer values in
device space. Doing this improves the consistency of
letter and line spacing, however it also means that text
will be laid out differently at different zoom factors.
</para><variablelist role="enum">
<varlistentry id="CAIRO-HINT-METRICS-DEFAULT:CAPS" role="constant">
<term><literal>CAIRO_HINT_METRICS_DEFAULT</literal></term>
<listitem><simpara>Hint metrics in the default
 manner for the font backend and target device
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-HINT-METRICS-OFF:CAPS" role="constant">
<term><literal>CAIRO_HINT_METRICS_OFF</literal></term>
<listitem><simpara>Do not hint font metrics
</simpara></listitem>
</varlistentry>
<varlistentry id="CAIRO-HINT-METRICS-ON:CAPS" role="constant">
<term><literal>CAIRO_HINT_METRICS_ON</literal></term>
<listitem><simpara>Hint font metrics
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-set-hint-metrics" role="function">
<title>cairo_font_options_set_hint_metrics ()</title>
<indexterm zone="cairo-font-options-set-hint-metrics"><primary sortas="font_options_set_hint_metrics">cairo_font_options_set_hint_metrics</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                cairo_font_options_set_hint_metrics (<parameter><link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>,
                                                         <parameter><link linkend="cairo-hint-metrics-t"><type>cairo_hint_metrics_t</type></link> hint_metrics</parameter>);</programlisting>
<para>
Sets the metrics hinting mode for the font options object. This
controls whether metrics are quantized to integer values in
device units.
See the documentation for <link linkend="cairo-hint-metrics-t"><type>cairo_hint_metrics_t</type></link> for full details.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hint_metrics</parameter>&#160;:</term>
<listitem><simpara>the new metrics hinting mode
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cairo-font-options-get-hint-metrics" role="function">
<title>cairo_font_options_get_hint_metrics ()</title>
<indexterm zone="cairo-font-options-get-hint-metrics"><primary sortas="font_options_get_hint_metrics">cairo_font_options_get_hint_metrics</primary></indexterm>
<programlisting><link linkend="cairo-hint-metrics-t"><returnvalue>cairo_hint_metrics_t</returnvalue></link>  cairo_font_options_get_hint_metrics
                                                        (<parameter>const <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link> *options</parameter>);</programlisting>
<para>
Gets the metrics hinting mode for the font options object.
See the documentation for <link linkend="cairo-hint-metrics-t"><type>cairo_hint_metrics_t</type></link> for full details.
</para><variablelist role="params">
<varlistentry><term><parameter>options</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="cairo-font-options-t"><type>cairo_font_options_t</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the metrics hinting mode for the font options object
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="cairo-cairo-font-options-t.see-also">
<title>See Also</title>
<link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link>
</refsect1>

</refentry>
