<refentry id="pango-FreeType-Fonts-and-Rendering">
<refmeta>
<refentrytitle role="top_of_page" id="pango-FreeType-Fonts-and-Rendering.top_of_page">FreeType Fonts and Rendering</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PANGO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>FreeType Fonts and Rendering</refname>
<refpurpose>Functions for shape engines to manipulate FreeType fonts</refpurpose>
</refnamediv>

<refsynopsisdiv id="pango-FreeType-Fonts-and-Rendering.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<anchor id="PangoFT2FontMap"/>
<synopsis>
                    <link linkend="PangoFT2FontMap-struct">PangoFT2FontMap</link>;
#define             <link linkend="PANGO-RENDER-TYPE-FT2--CAPS">PANGO_RENDER_TYPE_FT2</link>
<link linkend="PangoFontMap">PangoFontMap</link> *      <link linkend="pango-ft2-font-map-new">pango_ft2_font_map_new</link>              (void);
<link linkend="void">void</link>                <link linkend="pango-ft2-font-map-set-resolution">pango_ft2_font_map_set_resolution</link>   (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap,
                                                         <link linkend="double">double</link> dpi_x,
                                                         <link linkend="double">double</link> dpi_y);
<link linkend="PangoContext">PangoContext</link> *      <link linkend="pango-ft2-font-map-create-context">pango_ft2_font_map_create_context</link>   (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap);
<link linkend="void">void</link>                (<link linkend="PangoFT2SubstituteFunc">*PangoFT2SubstituteFunc</link>)           (<link linkend="FcPattern">FcPattern</link> *pattern,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link>                <link linkend="pango-ft2-font-map-set-default-substitute">pango_ft2_font_map_set_default_substitute</link>
                                                        (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap,
                                                         <link linkend="PangoFT2SubstituteFunc">PangoFT2SubstituteFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> notify);
<link linkend="void">void</link>                <link linkend="pango-ft2-font-map-substitute-changed">pango_ft2_font_map_substitute_changed</link>
                                                        (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap);
<link linkend="PangoContext">PangoContext</link> *      <link linkend="pango-ft2-get-context">pango_ft2_get_context</link>               (<link linkend="double">double</link> dpi_x,
                                                         <link linkend="double">double</link> dpi_y);
<link linkend="void">void</link>                <link linkend="pango-ft2-render">pango_ft2_render</link>                    (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y);
<link linkend="void">void</link>                <link linkend="pango-ft2-render-transformed">pango_ft2_render_transformed</link>        (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);
<link linkend="void">void</link>                <link linkend="pango-ft2-render-layout-line">pango_ft2_render_layout_line</link>        (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);
<link linkend="void">void</link>                <link linkend="pango-ft2-render-layout-line-subpixel">pango_ft2_render_layout_line_subpixel</link>
                                                        (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);
<link linkend="void">void</link>                <link linkend="pango-ft2-render-layout">pango_ft2_render_layout</link>             (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);
<link linkend="void">void</link>                <link linkend="pango-ft2-render-layout-subpixel">pango_ft2_render_layout_subpixel</link>    (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);
<link linkend="PangoGlyph">PangoGlyph</link>          <link linkend="pango-ft2-get-unknown-glyph">pango_ft2_get_unknown_glyph</link>         (<link linkend="PangoFont">PangoFont</link> *font);
<link linkend="int">int</link>                 <link linkend="pango-ft2-font-get-kerning">pango_ft2_font_get_kerning</link>          (<link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoGlyph">PangoGlyph</link> left,
                                                         <link linkend="PangoGlyph">PangoGlyph</link> right);
<link linkend="FT-Face">FT_Face</link>             <link linkend="pango-ft2-font-get-face">pango_ft2_font_get_face</link>             (<link linkend="PangoFont">PangoFont</link> *font);
<link linkend="PangoCoverage">PangoCoverage</link> *     <link linkend="pango-ft2-font-get-coverage">pango_ft2_font_get_coverage</link>         (<link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoLanguage">PangoLanguage</link> *language);
<link linkend="PangoFontMap">PangoFontMap</link> *      <link linkend="pango-ft2-font-map-for-display">pango_ft2_font_map_for_display</link>      (void);
<link linkend="void">void</link>                <link linkend="pango-ft2-shutdown-display">pango_ft2_shutdown_display</link>          (void);
</synopsis>
</refsynopsisdiv>

<refsect1 id="pango-FreeType-Fonts-and-Rendering.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="PangoFontMap">PangoFontMap</link>
         +----<link linkend="PangoFcFontMap">PangoFcFontMap</link>
               +----PangoFT2FontMap
</synopsis>
</refsect1>








<refsect1 id="pango-FreeType-Fonts-and-Rendering.description" role="desc">
<title role="desc.title">Description</title>
<para>
The macros and functions in this section are used to access fonts and render
text to bitmaps using the FreeType 2 library.
</para>
</refsect1>

<refsect1 id="pango-FreeType-Fonts-and-Rendering.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="PangoFT2FontMap-struct" role="struct">
<title>PangoFT2FontMap</title>
<indexterm zone="PangoFT2FontMap-struct"><primary sortas="PangoFT2FontMap">PangoFT2FontMap</primary></indexterm><programlisting>typedef struct _PangoFT2FontMap PangoFT2FontMap;</programlisting>
<para>
The <link linkend="PangoFT2FontMap"><type>PangoFT2FontMap</type></link> is the <link linkend="PangoFontMap"><type>PangoFontMap</type></link> implementation for FreeType fonts.
</para></refsect2>
<refsect2 id="PANGO-RENDER-TYPE-FT2--CAPS" role="macro" condition="deprecated:">
<title>PANGO_RENDER_TYPE_FT2</title>
<indexterm zone="PANGO-RENDER-TYPE-FT2--CAPS" role="deprecated"><primary sortas="PANGO_RENDER_TYPE_FT2">PANGO_RENDER_TYPE_FT2</primary></indexterm><programlisting>#define PANGO_RENDER_TYPE_FT2 "PangoRenderFT2"
</programlisting>
<warning><para><literal>PANGO_RENDER_TYPE_FT2</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
A string constant that was used to identify shape engines that work
with the FreeType backend. See <link linkend="PANGO-RENDER-TYPE-FC--CAPS"><literal>PANGO_RENDER_TYPE_FC</literal></link> for the replacement.
</para></refsect2>
<refsect2 id="pango-ft2-font-map-new" role="function" condition="since:1.2">
<title>pango_ft2_font_map_new ()</title>
<indexterm zone="pango-ft2-font-map-new" role="1.2"><primary sortas="pango_ft2_font_map_new">pango_ft2_font_map_new</primary></indexterm><programlisting><link linkend="PangoFontMap">PangoFontMap</link> *      pango_ft2_font_map_new              (void);</programlisting>
<para>
Create a new <link linkend="PangoFT2FontMap"><type>PangoFT2FontMap</type></link> object; a fontmap is used
to cache information about available fonts, and holds
certain global parameters such as the resolution and
the default substitute function (see
<link linkend="pango-ft2-font-map-set-default-substitute"><function>pango_ft2_font_map_set_default_substitute()</function></link>).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly created fontmap object. Unref
with <link linkend="g-object-unref"><function>g_object_unref()</function></link> when you are finished with it.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.2</para></refsect2>
<refsect2 id="pango-ft2-font-map-set-resolution" role="function" condition="since:1.2">
<title>pango_ft2_font_map_set_resolution ()</title>
<indexterm zone="pango-ft2-font-map-set-resolution" role="1.2"><primary sortas="pango_ft2_font_map_set_resolution">pango_ft2_font_map_set_resolution</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_font_map_set_resolution   (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap,
                                                         <link linkend="double">double</link> dpi_x,
                                                         <link linkend="double">double</link> dpi_y);</programlisting>
<para>
Sets the horizontal and vertical resolutions for the fontmap.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>fontmap</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFT2Fontmap"><type>PangoFT2Fontmap</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dpi_x</parameter>&#160;:</term>
<listitem><simpara> dots per inch in the X direction
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dpi_y</parameter>&#160;:</term>
<listitem><simpara> dots per inch in the Y direction
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.2</para></refsect2>
<refsect2 id="pango-ft2-font-map-create-context" role="function" condition="deprecated:1.22: Use pango_font_map_create_context() instead.|since:1.2">
<title>pango_ft2_font_map_create_context ()</title>
<indexterm zone="pango-ft2-font-map-create-context" role="deprecated"><primary sortas="pango_ft2_font_map_create_context">pango_ft2_font_map_create_context</primary></indexterm><indexterm zone="pango-ft2-font-map-create-context" role="1.2"><primary sortas="pango_ft2_font_map_create_context">pango_ft2_font_map_create_context</primary></indexterm><programlisting><link linkend="PangoContext">PangoContext</link> *      pango_ft2_font_map_create_context   (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap);</programlisting>
<warning><para><literal>pango_ft2_font_map_create_context</literal> has been deprecated since version 1.22 and should not be used in newly-written code. Use <link linkend="pango-font-map-create-context"><function>pango_font_map_create_context()</function></link> instead.</para></warning>
<para>
Create a <link linkend="PangoContext"><type>PangoContext</type></link> for the given fontmap.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>fontmap</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFT2Fontmap"><type>PangoFT2Fontmap</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the newly created context; free with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.2</para></refsect2>
<refsect2 id="PangoFT2SubstituteFunc" role="function">
<title>PangoFT2SubstituteFunc ()</title>
<indexterm zone="PangoFT2SubstituteFunc"><primary sortas="PangoFT2SubstituteFunc">PangoFT2SubstituteFunc</primary></indexterm><programlisting><link linkend="void">void</link>                (*PangoFT2SubstituteFunc)           (<link linkend="FcPattern">FcPattern</link> *pattern,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Function type for doing final config tweaking on prepared FcPatterns.
</para><variablelist role="params">
<varlistentry><term><parameter>pattern</parameter>&#160;:</term>
<listitem><simpara>the <type>FcPattern</type> to tweak.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>user data.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-font-map-set-default-substitute" role="function" condition="since:1.2">
<title>pango_ft2_font_map_set_default_substitute ()</title>
<indexterm zone="pango-ft2-font-map-set-default-substitute" role="1.2"><primary sortas="pango_ft2_font_map_set_default_substitute">pango_ft2_font_map_set_default_substitute</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_font_map_set_default_substitute
                                                        (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap,
                                                         <link linkend="PangoFT2SubstituteFunc">PangoFT2SubstituteFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> notify);</programlisting>
<para>
Sets a function that will be called to do final configuration
substitution on a <link linkend="FcPattern"><type>FcPattern</type></link> before it is used to load
the font. This function can be used to do things like set
hinting and antialiasing options.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>fontmap</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFT2FontMap"><type>PangoFT2FontMap</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&#160;:</term>
<listitem><simpara> function to call to to do final config tweaking
       on <link linkend="FcPattern"><type>FcPattern</type></link> objects.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara> data to pass to <parameter>func</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>notify</parameter>&#160;:</term>
<listitem><simpara> function to call when <parameter>data</parameter> is no longer used.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.2</para></refsect2>
<refsect2 id="pango-ft2-font-map-substitute-changed" role="function" condition="since:1.2">
<title>pango_ft2_font_map_substitute_changed ()</title>
<indexterm zone="pango-ft2-font-map-substitute-changed" role="1.2"><primary sortas="pango_ft2_font_map_substitute_changed">pango_ft2_font_map_substitute_changed</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_font_map_substitute_changed
                                                        (<link linkend="PangoFT2FontMap">PangoFT2FontMap</link> *fontmap);</programlisting>
<para>
Call this function any time the results of the
default substitution function set with
<link linkend="pango-ft2-font-map-set-default-substitute"><function>pango_ft2_font_map_set_default_substitute()</function></link> change.
That is, if your substitution function will return different
results for the same input pattern, you must call this function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>fontmap</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFT2Fontmap"><type>PangoFT2Fontmap</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.2</para></refsect2>
<refsect2 id="pango-ft2-get-context" role="function" condition="deprecated:1.22: Use pango_font_map_create_context() instead.">
<title>pango_ft2_get_context ()</title>
<indexterm zone="pango-ft2-get-context" role="deprecated"><primary sortas="pango_ft2_get_context">pango_ft2_get_context</primary></indexterm><programlisting><link linkend="PangoContext">PangoContext</link> *      pango_ft2_get_context               (<link linkend="double">double</link> dpi_x,
                                                         <link linkend="double">double</link> dpi_y);</programlisting>
<warning><para><literal>pango_ft2_get_context</literal> has been deprecated since version 1.22 and should not be used in newly-written code. Use <link linkend="pango-font-map-create-context"><function>pango_font_map_create_context()</function></link> instead.</para></warning>
<para>
Retrieves a <link linkend="PangoContext"><type>PangoContext</type></link> for the default PangoFT2 fontmap
(see <link linkend="pango-ft2-fontmap-get-for-display"><function>pango_ft2_fontmap_get_for_display()</function></link>) and sets the resolution
for the default fontmap to <parameter>dpi_x</parameter> by <parameter>dpi_y</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>dpi_x</parameter>&#160;:</term>
<listitem><simpara>  the horizontal DPI of the target device
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dpi_y</parameter>&#160;:</term>
<listitem><simpara>  the vertical DPI of the target device
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new <link linkend="PangoContext"><type>PangoContext</type></link>

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-render" role="function">
<title>pango_ft2_render ()</title>
<indexterm zone="pango-ft2-render"><primary sortas="pango_ft2_render">pango_ft2_render</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_render                    (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
                                                         <link linkend="gint">gint</link> x,
                                                         <link linkend="gint">gint</link> y);</programlisting>
<para>
Renders a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> onto a FreeType2 bitmap.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>bitmap</parameter>&#160;:</term>
<listitem><simpara>  the FreeType2 bitmap onto which to draw the string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara>    the font in which to draw the string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&#160;:</term>
<listitem><simpara>  the glyph string to draw
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>       the x position of the start of the string (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>       the y position of the baseline (in pixels)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-render-transformed" role="function" condition="since:1.6">
<title>pango_ft2_render_transformed ()</title>
<indexterm zone="pango-ft2-render-transformed" role="1.6"><primary sortas="pango_ft2_render_transformed">pango_ft2_render_transformed</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_render_transformed        (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         const <link linkend="PangoMatrix">PangoMatrix</link> *matrix,
                                                         <link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);</programlisting>
<para>
Renders a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> onto a FreeType2 bitmap, possibly
transforming the layed-out coordinates through a transformation
matrix. Note that the transformation matrix for <parameter>font</parameter> is not
changed, so to produce correct rendering results, the <parameter>font</parameter>
must have been loaded using a <link linkend="PangoContext"><type>PangoContext</type></link> with an identical
transformation matrix to that passed in to this function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>bitmap</parameter>&#160;:</term>
<listitem><simpara>  the FreeType2 bitmap onto which to draw the string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>matrix</parameter>&#160;:</term>
<listitem><simpara>  a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to use an identity transformation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara>    the font in which to draw the string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&#160;:</term>
<listitem><simpara>  the glyph string to draw
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>       the x position of the start of the string (in Pango
          units in user space coordinates)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>       the y position of the baseline (in Pango units
          in user space coordinates)
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.6</para></refsect2>
<refsect2 id="pango-ft2-render-layout-line" role="function">
<title>pango_ft2_render_layout_line ()</title>
<indexterm zone="pango-ft2-render-layout-line"><primary sortas="pango_ft2_render_layout_line">pango_ft2_render_layout_line</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_render_layout_line        (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);</programlisting>
<para>
Render a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link> onto a FreeType2 bitmap</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>bitmap</parameter>&#160;:</term>
<listitem><simpara>    a <type>FT_Bitmap</type> to render the line onto
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>line</parameter>&#160;:</term>
<listitem><simpara>      a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the x position of start of string (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the y position of baseline (in pixels)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-render-layout-line-subpixel" role="function" condition="since:1.6">
<title>pango_ft2_render_layout_line_subpixel ()</title>
<indexterm zone="pango-ft2-render-layout-line-subpixel" role="1.6"><primary sortas="pango_ft2_render_layout_line_subpixel">pango_ft2_render_layout_line_subpixel</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_render_layout_line_subpixel
                                                        (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayoutLine">PangoLayoutLine</link> *line,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);</programlisting>
<para>
Render a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link> onto a FreeType2 bitmap, with he
location specified in fixed-point Pango units rather than
pixels. (Using this will avoid extra inaccuracies from
rounding to integer pixels multiple times, even if the
final glyph positions are integers.)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>bitmap</parameter>&#160;:</term>
<listitem><simpara>    a <type>FT_Bitmap</type> to render the line onto
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>line</parameter>&#160;:</term>
<listitem><simpara>      a <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the x position of start of string (in Pango units)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the y position of baseline (in Pango units)
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.6</para></refsect2>
<refsect2 id="pango-ft2-render-layout" role="function">
<title>pango_ft2_render_layout ()</title>
<indexterm zone="pango-ft2-render-layout"><primary sortas="pango_ft2_render_layout">pango_ft2_render_layout</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_render_layout             (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);</programlisting>
<para>
Render a <link linkend="PangoLayout"><type>PangoLayout</type></link> onto a FreeType2 bitmap</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>bitmap</parameter>&#160;:</term>
<listitem><simpara>    a <type>FT_Bitmap</type> to render the layout onto
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>layout</parameter>&#160;:</term>
<listitem><simpara>    a <link linkend="PangoLayout"><type>PangoLayout</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the X position of the left of the layout (in pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the Y position of the top of the layout (in pixels)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-render-layout-subpixel" role="function" condition="since:1.6">
<title>pango_ft2_render_layout_subpixel ()</title>
<indexterm zone="pango-ft2-render-layout-subpixel" role="1.6"><primary sortas="pango_ft2_render_layout_subpixel">pango_ft2_render_layout_subpixel</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_render_layout_subpixel    (<link linkend="FT-Bitmap">FT_Bitmap</link> *bitmap,
                                                         <link linkend="PangoLayout">PangoLayout</link> *layout,
                                                         <link linkend="int">int</link> x,
                                                         <link linkend="int">int</link> y);</programlisting>
<para>
Render a <link linkend="PangoLayout"><type>PangoLayout</type></link> onto a FreeType2 bitmap, with he
location specified in fixed-point Pango units rather than
pixels. (Using this will avoid extra inaccuracies from
rounding to integer pixels multiple times, even if the
final glyph positions are integers.)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>bitmap</parameter>&#160;:</term>
<listitem><simpara>    a <type>FT_Bitmap</type> to render the layout onto
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>layout</parameter>&#160;:</term>
<listitem><simpara>    a <link linkend="PangoLayout"><type>PangoLayout</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara>         the X position of the left of the layout (in Pango units)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara>         the Y position of the top of the layout (in Pango units)
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.6</para></refsect2>
<refsect2 id="pango-ft2-get-unknown-glyph" role="function" condition="deprecated:">
<title>pango_ft2_get_unknown_glyph ()</title>
<indexterm zone="pango-ft2-get-unknown-glyph" role="deprecated"><primary sortas="pango_ft2_get_unknown_glyph">pango_ft2_get_unknown_glyph</primary></indexterm><programlisting><link linkend="PangoGlyph">PangoGlyph</link>          pango_ft2_get_unknown_glyph         (<link linkend="PangoFont">PangoFont</link> *font);</programlisting>
<warning><para><literal>pango_ft2_get_unknown_glyph</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Return the index of a glyph suitable for drawing unknown characters with
<parameter>font</parameter>, or <link linkend="PANGO-GLYPH-EMPTY--CAPS"><literal>PANGO_GLYPH_EMPTY</literal></link> if no suitable glyph found.
</para>
<para>
If you want to draw an unknown-box for a character that is not covered
by the font,
use <link linkend="PANGO-GET-UNKNOWN-GLYPH--CAPS"><function>PANGO_GET_UNKNOWN_GLYPH()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a glyph index into <parameter>font</parameter>, or <link linkend="PANGO-GLYPH-EMPTY--CAPS"><literal>PANGO_GLYPH_EMPTY</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-font-get-kerning" role="function" condition="deprecated:">
<title>pango_ft2_font_get_kerning ()</title>
<indexterm zone="pango-ft2-font-get-kerning" role="deprecated"><primary sortas="pango_ft2_font_get_kerning">pango_ft2_font_get_kerning</primary></indexterm><programlisting><link linkend="int">int</link>                 pango_ft2_font_get_kerning          (<link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoGlyph">PangoGlyph</link> left,
                                                         <link linkend="PangoGlyph">PangoGlyph</link> right);</programlisting>
<warning><para><literal>pango_ft2_font_get_kerning</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Retrieves kerning information for a combination of two glyphs.
</para>
<para>
Use <link linkend="pango-fc-font-kern-glyphs"><function>pango_fc_font_kern_glyphs()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>left</parameter>&#160;:</term>
<listitem><simpara> the left <link linkend="PangoGlyph"><type>PangoGlyph</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>right</parameter>&#160;:</term>
<listitem><simpara> the right <link linkend="PangoGlyph"><type>PangoGlyph</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The amount of kerning (in Pango units) to apply for
the given combination of glyphs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-font-get-face" role="function" condition="deprecated:">
<title>pango_ft2_font_get_face ()</title>
<indexterm zone="pango-ft2-font-get-face" role="deprecated"><primary sortas="pango_ft2_font_get_face">pango_ft2_font_get_face</primary></indexterm><programlisting><link linkend="FT-Face">FT_Face</link>             pango_ft2_font_get_face             (<link linkend="PangoFont">PangoFont</link> *font);</programlisting>
<warning><para><literal>pango_ft2_font_get_face</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns the native FreeType2 <type>FT_Face</type> structure used for this <link linkend="PangoFont"><type>PangoFont</type></link>.
This may be useful if you want to use FreeType2 functions directly.
</para>
<para>
Use <link linkend="pango-fc-font-lock-face"><function>pango_fc_font_lock_face()</function></link> instead; when you are done with a
face from <link linkend="pango-fc-font-lock-face"><function>pango_fc_font_lock_face()</function></link> you must call
<link linkend="pango-fc-font-unlock-face"><function>pango_fc_font_unlock_face()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a pointer to a <type>FT_Face</type> structure, with the size set correctly,
              or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if <parameter>font</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-font-get-coverage" role="function" condition="deprecated:">
<title>pango_ft2_font_get_coverage ()</title>
<indexterm zone="pango-ft2-font-get-coverage" role="deprecated"><primary sortas="pango_ft2_font_get_coverage">pango_ft2_font_get_coverage</primary></indexterm><programlisting><link linkend="PangoCoverage">PangoCoverage</link> *     pango_ft2_font_get_coverage         (<link linkend="PangoFont">PangoFont</link> *font,
                                                         <link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting>
<warning><para><literal>pango_ft2_font_get_coverage</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Gets the <link linkend="PangoCoverage"><type>PangoCoverage</type></link> for a <link linkend="PangoFT2Font"><type>PangoFT2Font</type></link>. Use
<link linkend="pango-font-get-coverage"><function>pango_font_get_coverage()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFT2Font"><type>PangoFT2Font</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language</parameter>&#160;:</term>
<listitem><simpara> a language tag.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="PangoCoverage"><type>PangoCoverage</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-font-map-for-display" role="function" condition="deprecated:">
<title>pango_ft2_font_map_for_display ()</title>
<indexterm zone="pango-ft2-font-map-for-display" role="deprecated"><primary sortas="pango_ft2_font_map_for_display">pango_ft2_font_map_for_display</primary></indexterm><programlisting><link linkend="PangoFontMap">PangoFontMap</link> *      pango_ft2_font_map_for_display      (void);</programlisting>
<warning><para><literal>pango_ft2_font_map_for_display</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns a <link linkend="PangoFT2FontMap"><type>PangoFT2FontMap</type></link>. This font map is cached and should
not be freed. If the font map is no longer needed, it can
be released with <link linkend="pango-ft2-shutdown-display"><function>pango_ft2_shutdown_display()</function></link>. Use of the
global PangoFT2 fontmap is deprecated; use <link linkend="pango-ft2-font-map-new"><function>pango_ft2_font_map_new()</function></link>
instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="PangoFT2FontMap"><type>PangoFT2FontMap</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pango-ft2-shutdown-display" role="function" condition="deprecated:">
<title>pango_ft2_shutdown_display ()</title>
<indexterm zone="pango-ft2-shutdown-display" role="deprecated"><primary sortas="pango_ft2_shutdown_display">pango_ft2_shutdown_display</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ft2_shutdown_display          (void);</programlisting>
<warning><para><literal>pango_ft2_shutdown_display</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Free the global fontmap. (See <link linkend="pango-ft2-font-map-for-display"><function>pango_ft2_font_map_for_display()</function></link>)
Use of the global PangoFT2 fontmap is deprecated.</para>
<para>
</para></refsect2>

</refsect1>




</refentry>
