|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/pango/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>PangoFcFontMap</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="Pango Reference Manual">
<link rel="up" href="lowlevel.html" title="Low Level Functionality">
<link rel="prev" href="pango-PangoRenderer.html" title="PangoRenderer">
<link rel="next" href="PangoFcFont.html" title="PangoFcFont">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
<link rel="chapter" href="rendering.html" title="Rendering with Pango">
<link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
<link rel="chapter" href="tools.html" title="Pango Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 1.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 1.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 1.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 1.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 1.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 1.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 1.14">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="pango-PangoRenderer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Pango Reference Manual</th>
<td><a accesskey="n" href="PangoFcFont.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
 | 
<a href="#desc" class="shortcut">Description</a>
 | 
<a href="#object_hierarchy" class="shortcut">Object Hierarchy</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="PangoFcFontMap"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="top_of_page"></a>PangoFcFontMap</span></h2>
<p>PangoFcFontMap — Base fontmap class for Fontconfig-based backends</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
<a href="PangoFcFontMap.html#PangoFcFontMap-struct">PangoFcFontMap</a>;
<a href="PangoFcFontMap.html#PangoFcFontMapClass">PangoFcFontMapClass</a>;
<a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a>* <a href="PangoFcFontMap.html#pango-fc-font-description-from-pattern">pango_fc_font_description_from_pattern</a>
(FcPattern *pattern,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> include_size);
void <a href="PangoFcFontMap.html#pango-fc-font-map-cache-clear">pango_fc_font_map_cache_clear</a> (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);
<a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* <a href="PangoFcFontMap.html#pango-fc-font-map-create-context">pango_fc_font_map_create_context</a>
(<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);
void <a href="PangoFcFontMap.html#pango-fc-font-map-shutdown">pango_fc_font_map_shutdown</a> (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);
void <a href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func">pango_fc_font_map_add_decoder_find_func</a>
(<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap,
<a href="PangoFcFontMap.html#PangoFcDecoderFindFunc">PangoFcDecoderFindFunc</a> findfunc,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data,
<a
href="../glib/glib-Datasets.html#GDestroyNotify"
>GDestroyNotify</a> dnotify);
<a href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a>* (<a href="PangoFcFontMap.html#PangoFcDecoderFindFunc">*PangoFcDecoderFindFunc</a>) (FcPattern *pattern,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="object_hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----<a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>
+----PangoFcFontMap
+----<a href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="desc"></a><h2>Description</h2>
<p>
PangoFcFontMap is a base class for font map implementations using the
FontConfig and FreeType libraries. It is used in the
<a href="pango-Xft-Fonts-and-Rendering.html" title="Xft Fonts and Rendering">Xft</a> and
<a href="pango-FreeType-Fonts-and-Rendering.html" title="FreeType Fonts and Rendering">FreeType</a>
backends shipped with Pango, but can also be used when creating
new backends. Any backend deriving from this base class will
take advantage of the wide range of shapers implemented using
FreeType that come with Pango.
</p>
</div>
<div class="refsect1" lang="en">
<a name="details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2889297"></a><h3>
<a name="PangoFcFontMap-struct"></a>PangoFcFontMap</h3>
<a class="indexterm" name="id2889309"></a><pre class="programlisting">typedef struct _PangoFcFontMap PangoFcFontMap;</pre>
<p>
<a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> is a base class for font map implementations
using the FontConfig and FreeType libraries. To create a new
backend using Fontconfig and FreeType, you derive from this class
and implement a <code class="function">new_font()</code> virtual function that creates an
instance deriving from <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2889358"></a><h3>
<a name="PangoFcFontMapClass"></a>PangoFcFontMapClass</h3>
<a class="indexterm" name="id2889371"></a><pre class="programlisting">typedef struct {
/* Deprecated in favor of context_substitute */
void (*default_substitute) (PangoFcFontMap *fontmap,
FcPattern *pattern);
/* Deprecated in favor of create_font */
PangoFcFont *(*new_font) (PangoFcFontMap *fontmap,
FcPattern *pattern);
double (*get_resolution) (PangoFcFontMap *fcfontmap,
PangoContext *context);
gconstpointer (*context_key_get) (PangoFcFontMap *fcfontmap,
PangoContext *context);
gpointer (*context_key_copy) (PangoFcFontMap *fcfontmap,
gconstpointer key);
void (*context_key_free) (PangoFcFontMap *fcfontmap,
gpointer key);
guint32 (*context_key_hash) (PangoFcFontMap *fcfontmap,
gconstpointer key);
gboolean (*context_key_equal) (PangoFcFontMap *fcfontmap,
gconstpointer key_a,
gconstpointer key_b);
void (*context_substitute) (PangoFcFontMap *fontmap,
PangoContext *context,
FcPattern *pattern);
PangoFcFont *(*create_font) (PangoFcFontMap *fontmap,
PangoContext *context,
const PangoFontDescription *desc,
FcPattern *pattern);
} PangoFcFontMapClass;
</pre>
<p>
Class structure for <a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="structfield"><code>default_substitute</code></em> ()</span></td>
<td> Substitutes in default values for
unspecified fields in a <span class="type">FcPattern</span>. This will be called
prior to creating a font for the pattern. May be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
Deprecated in favor of @<code class="function">context_substitute()</code>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>new_font</code></em> ()</span></td>
<td> Creates a new <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> for the specified
pattern of the appropriate type for this font map. The
<em class="parameter"><code>pattern</code></em> argument must be passed to the "pattern" property
of <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> when you call <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-new"
><code class="function">g_object_new()</code></a>. Deprecated
in favor of @<code class="function">create_font()</code>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>get_resolution</code></em> ()</span></td>
<td> Gets the resolution (the scale factor
between logical and absolute font sizes) that the backend
will use for a particular fontmap and context. <em class="parameter"><code>context</code></em>
may be null.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>context_key_get</code></em> ()</span></td>
<td> Gets an opaque key holding backend
specific options for the context that will affect
fonts created by <code class="function">create_font()</code>. The result must point to
persistant storage owned by the fontmap. This key
is used to index hash tables used to look up fontsets
and fonts.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>context_key_copy</code></em> ()</span></td>
<td> Copies a context key. Pango uses this
to make a persistant copy of the value returned from
<em class="parameter"><code>context_key_get</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>context_key_free</code></em> ()</span></td>
<td> Frees a context key copied with
<em class="parameter"><code>context_key_copy</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>context_key_hash</code></em> ()</span></td>
<td> Gets a hash value for a context key
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>context_key_equal</code></em> ()</span></td>
<td> Compares two context keys for equality.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>context_substitute</code></em> ()</span></td>
<td> Substitutes in default values for
unspecified fields in a <span class="type">FcPattern</span>. This will be called
prior to creating a font for the pattern. May be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="structfield"><code>create_font</code></em> ()</span></td>
<td> Creates a new <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> for the specified
pattern of the appropriate type for this font map using
information from the context that is passed in. The
<em class="parameter"><code>pattern</code></em> argument must be passed to the "pattern" property
of <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> when you call <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-new"
><code class="function">g_object_new()</code></a>. Deprecated
in favor of @<code class="function">create_font()</code>. If <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, <code class="function">new_font()</code> is used.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2889768"></a><h3>
<a name="pango-fc-font-description-from-pattern"></a>pango_fc_font_description_from_pattern ()</h3>
<a class="indexterm" name="id2889785"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a>* pango_fc_font_description_from_pattern
(FcPattern *pattern,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> include_size);</pre>
<p>
Creates a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> that matches the specified
Fontconfig pattern as closely as possible. Many possible Fontconfig
pattern values, such as <code class="literal">FC_RASTERIZER</code> or <code class="literal">FC_DPI</code>, don't make sense in
the context of <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>, so will be ignored.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pattern</code></em> :</span></td>
<td> a <span class="type">FcPattern</span>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>include_size</code></em> :</span></td>
<td> if <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, the pattern will include the size from
the <em class="parameter"><code>pattern</code></em>; otherwise the resulting pattern will be unsized.
(only <code class="literal">FC_SIZE</code> is examined, not <code class="literal">FC_PIXEL_SIZE</code>)
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>. Free with
<a href="pango-Fonts.html#pango-font-description-free"><code class="function">pango_font_description_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2889986"></a><h3>
<a name="pango-fc-font-map-cache-clear"></a>pango_fc_font_map_cache_clear ()</h3>
<a class="indexterm" name="id2890001"></a><pre class="programlisting">void pango_fc_font_map_cache_clear (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre>
<p>
Clear all cached information and fontsets for this font map;
this should be called whenever there is a change in the
output of the <code class="function">default_substitute()</code> virtual function.
</p>
<p>
This function is intended to be used only by backend implementations
deriving from <span class="type">PangoFcFontmap</span>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td>
<td> a <span class="type">PangoFcFontmap</span>
</td>
</tr></tbody>
</table></div>
<p>Since 1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2890093"></a><h3>
<a name="pango-fc-font-map-create-context"></a>pango_fc_font_map_create_context ()</h3>
<a class="indexterm" name="id2890109"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_fc_font_map_create_context
(<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre>
<p>
Creates a new context for this fontmap. This function is intended
only for backend implementations deriving from <span class="type">PangoFcFontmap</span>;
it is possible that a backend will store additional information
needed for correct operation on the <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> after calling
this function.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td>
<td> a <a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2890211"></a><h3>
<a name="pango-fc-font-map-shutdown"></a>pango_fc_font_map_shutdown ()</h3>
<a class="indexterm" name="id2890228"></a><pre class="programlisting">void pango_fc_font_map_shutdown (<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre>
<p>
Clears all cached information for the fontmap and marks
all fonts open for the fontmap as dead. (See the <code class="function">shutdown()</code>
virtual function of PangoFcFont.) This function might be used
by a backend when the underlying windowing system for the font
map exits. This function is only intended to be called from
only for backend implementations deriving from <span class="type">PangoFcFontmap</span>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td>
<td> a <span class="type">PangoFcFontmap</span>
</td>
</tr></tbody>
</table></div>
<p>Since 1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2890315"></a><h3>
<a name="pango-fc-font-map-add-decoder-find-func"></a>pango_fc_font_map_add_decoder_find_func ()</h3>
<a class="indexterm" name="id2890331"></a><pre class="programlisting">void pango_fc_font_map_add_decoder_find_func
(<a href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap,
<a href="PangoFcFontMap.html#PangoFcDecoderFindFunc">PangoFcDecoderFindFunc</a> findfunc,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data,
<a
href="../glib/glib-Datasets.html#GDestroyNotify"
>GDestroyNotify</a> dnotify);</pre>
<p>
This function saves a callback method in the <a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> that
will be called whenever new fonts are created. If the
function returns a <a href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a>, that decoder will be used to
determine both coverage via a <span class="type">FcCharSet</span> and a one-to-one mapping of
characters to glyphs. This will allow applications to have
application-specific encodings for various fonts.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></td>
<td> The <a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> to add this method to.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>findfunc</code></em> :</span></td>
<td> The <a href="PangoFcFontMap.html#PangoFcDecoderFindFunc"><span class="type">PangoFcDecoderFindFunc</span></a> callback function
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td> User data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dnotify</code></em> :</span></td>
<td> A <a
href="../glib/glib-Datasets.html#GDestroyNotify"
><span class="type">GDestroyNotify</span></a> callback that will be called when the
fontmap is finalized and the decoder is released.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.6.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2890511"></a><h3>
<a name="PangoFcDecoderFindFunc"></a>PangoFcDecoderFindFunc ()</h3>
<a class="indexterm" name="id2890524"></a><pre class="programlisting"><a href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a>* (*PangoFcDecoderFindFunc) (FcPattern *pattern,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
Callback function passed to <a href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func"><code class="function">pango_fc_font_map_add_decoder_find_func()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pattern</code></em> :</span></td>
<td> a fully resolved <span class="type">FcPattern</span> specifying the font on the system
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td> user data passed to <a href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func"><code class="function">pango_fc_font_map_add_decoder_find_func()</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new reference to a custom decoder for this pattern,
or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the default decoder handling should be used.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2890652"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a></span></td>
<td><p>The base class for fonts; creating a new
Fontconfig-based backend involves deriving from both
<a href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> and <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>.
</p></td>
</tr></tbody>
</table></div>
<p>
</p>
</div>
</div>
</body>
</html>