Git init
[external/pango1.0.git] / docs / html / PangoEngineShape.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>PangoEngineShape</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7 <link rel="home" href="index.html" title="Pango Reference Manual">
8 <link rel="up" href="lowlevel.html" title="Low Level Functionality">
9 <link rel="prev" href="PangoEngineLang.html" title="PangoEngineLang">
10 <link rel="next" href="pango-Modules.html" title="Modules">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
14 <link rel="chapter" href="rendering.html" title="Rendering with Pango">
15 <link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
16 <link rel="chapter" href="tools.html" title="Pango Tools">
17 <link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy">
18 <link rel="index" href="index-all.html" title="Index">
19 <link rel="index" href="index-deprecated.html" title="Index of deprecated symbols">
20 <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
21 <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
22 <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
23 <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
24 <link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10">
25 <link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12">
26 <link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14">
27 <link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16">
28 <link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18">
29 <link rel="index" href="index-1.20.html" title="Index of new symbols in 1.20">
30 <link rel="index" href="index-1.22.html" title="Index of new symbols in 1.22">
31 <link rel="index" href="index-1.24.html" title="Index of new symbols in 1.24">
32 <link rel="index" href="index-1.26.html" title="Index of new symbols in 1.26">
33 </head>
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
36 <tr valign="middle">
37 <td><a accesskey="p" href="PangoEngineLang.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">Pango Reference Manual</th>
41 <td><a accesskey="n" href="pango-Modules.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
42 </tr>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#PangoEngineShape.synopsis" class="shortcut">Top</a>
45                  | 
46                 <a href="#PangoEngineShape.description" class="shortcut">Description</a>
47                  | 
48                 <a href="#PangoEngineShape.object-hierarchy" class="shortcut">Object Hierarchy</a>
49 </td></tr>
50 </table>
51 <div class="refentry" lang="en">
52 <a name="PangoEngineShape"></a><div class="titlepage"></div>
53 <div class="refnamediv"><table width="100%"><tr>
54 <td valign="top">
55 <h2><span class="refentrytitle"><a name="PangoEngineShape.top_of_page"></a>PangoEngineShape</span></h2>
56 <p>PangoEngineShape — Rendering-system dependent script engines</p>
57 </td>
58 <td valign="top" align="right"></td>
59 </tr></table></div>
60 <div class="refsect1" lang="en">
61 <a name="PangoEngineShape.stability-level"></a><h2>Stability Level</h2>
62 Unstable, unless otherwise indicated
63 </div>
64 <div class="refsynopsisdiv">
65 <a name="PangoEngineShape.synopsis"></a><h2>Synopsis</h2>
66 <pre class="synopsis">
67                     <a class="link" href="PangoEngineShape.html#PangoEngineShape-struct" title="PangoEngineShape">PangoEngineShape</a>;
68                     <a class="link" href="PangoEngineShape.html#PangoEngineShapeClass" title="PangoEngineShapeClass">PangoEngineShapeClass</a>;
69 #define             <a class="link" href="PangoEngineShape.html#PANGO-ENGINE-TYPE-SHAPE--CAPS" title="PANGO_ENGINE_TYPE_SHAPE">PANGO_ENGINE_TYPE_SHAPE</a>
70 #define             <a class="link" href="PangoEngineShape.html#PANGO-ENGINE-SHAPE-DEFINE-TYPE--CAPS" title="PANGO_ENGINE_SHAPE_DEFINE_TYPE()">PANGO_ENGINE_SHAPE_DEFINE_TYPE</a>      (name, prefix, class_init, instance_init)
71 </pre>
72 </div>
73 <div class="refsect1" lang="en">
74 <a name="PangoEngineShape.object-hierarchy"></a><h2>Object Hierarchy</h2>
75 <pre class="synopsis">
76   <a
77 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
78 >GObject</a>
79    +----<a class="link" href="pango-Engines.html#PangoEngine">PangoEngine</a>
80          +----PangoEngineShape
81 </pre>
82 </div>
83 <div class="refsect1" lang="en">
84 <a name="PangoEngineShape.description"></a><h2>Description</h2>
85 <p>
86 The <em class="firstterm">shape engines</em> are rendering-system dependent
87 engines that convert character strings into glyph strings.
88 These engines are used in <a class="link" href="pango-Text-Processing.html#pango-shape" title="pango_shape ()"><code class="function">pango_shape()</code></a>.
89 </p>
90 </div>
91 <div class="refsect1" lang="en">
92 <a name="PangoEngineShape.details"></a><h2>Details</h2>
93 <div class="refsect2" lang="en">
94 <a name="PangoEngineShape-struct"></a><h3>PangoEngineShape</h3>
95 <pre class="programlisting">typedef struct _PangoEngineShape PangoEngineShape;</pre>
96 <p>
97 The <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a> class is implemented by engines that
98 customize the rendering-system dependent part of the
99 Pango pipeline for a particular script or language.
100 A <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a> implementation is then specific to both
101 a particular rendering system or group of rendering systems
102 and to a particular script. For instance, there is one
103 <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a> implementation to handle shaping Arabic
104 for Fontconfig-based backends.</p>
105 <p>
106 </p>
107 </div>
108 <hr>
109 <div class="refsect2" lang="en">
110 <a name="PangoEngineShapeClass"></a><h3>PangoEngineShapeClass</h3>
111 <pre class="programlisting">typedef struct {
112   void (*script_shape) (PangoEngineShape *engine,
113                         PangoFont        *font,
114                         const char       *text,
115                         int               length,
116                         const PangoAnalysis *analysis,
117                         PangoGlyphString *glyphs);
118   PangoCoverageLevel (*covers)   (PangoEngineShape *engine,
119                                   PangoFont        *font,
120                                   PangoLanguage    *language,
121                                   gunichar          wc);
122 } PangoEngineShapeClass;
123 </pre>
124 <p>
125 Class structure for <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a></p>
126 <p>
127 </p>
128 <div class="variablelist"><table border="0">
129 <col align="left" valign="top">
130 <tbody>
131 <tr>
132 <td><p><span class="term"><em class="structfield"><code>script_shape</code></em> ()</span></p></td>
133 <td> Given a font, a piece of text, and a <a class="link" href="pango-Text-Processing.html#PangoAnalysis" title="PangoAnalysis"><span class="type">PangoAnalysis</span></a>
134   structure, converts characters to glyphs and positions the
135   resulting glyphs. The results are stored in the <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>
136   that is passed in. (The implementation should resize it
137   appropriately using <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-set-size" title="pango_glyph_string_set_size ()"><code class="function">pango_glyph_string_set_size()</code></a>). All fields
138   of the <em class="parameter"><code>log_clusters</code></em> and <em class="parameter"><code>glyphs</code></em> array must be filled in, with
139   the exception that Pango will automatically generate
140   <code class="literal">glyphs-&gt;glyphs[i].attr.is_cluster_start</code>
141   using the <em class="parameter"><code>log_clusters</code></em> array. Each input character must occur in one
142   of the output logical clusters;
143   if no rendering is desired for a character, this may involve
144   inserting glyphs with the <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a> ID <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-EMPTY--CAPS" title="PANGO_GLYPH_EMPTY"><span class="type">PANGO_GLYPH_EMPTY</span></a>, which
145   is guaranteed never to render. If the shaping fails for any reason,
146   the shaper should return with an empty (zero-size) glyph string.
147   If the shaper has not set the size on the glyph string yet, simply
148   returning signals the failure too.
149 </td>
150 </tr>
151 <tr>
152 <td><p><span class="term"><em class="structfield"><code>covers</code></em> ()</span></p></td>
153 <td> Returns the characters that this engine can cover
154   with a given font for a given language. If not overridden, the default
155   implementation simply returns the coverage information for the
156   font itself unmodified.
157 </td>
158 </tr>
159 </tbody>
160 </table></div>
161 </div>
162 <hr>
163 <div class="refsect2" lang="en">
164 <a name="PANGO-ENGINE-TYPE-SHAPE--CAPS"></a><h3>PANGO_ENGINE_TYPE_SHAPE</h3>
165 <pre class="programlisting">#define PANGO_ENGINE_TYPE_SHAPE "PangoEngineShape"
166 </pre>
167 <p>
168 A string constant defining the engine type
169 for shaping engines.
170 These engines derive from <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a>.
171 </p>
172 </div>
173 <hr>
174 <div class="refsect2" lang="en">
175 <a name="PANGO-ENGINE-SHAPE-DEFINE-TYPE--CAPS"></a><h3>PANGO_ENGINE_SHAPE_DEFINE_TYPE()</h3>
176 <pre class="programlisting">#define             PANGO_ENGINE_SHAPE_DEFINE_TYPE(name, prefix, class_init, instance_init)</pre>
177 <p>
178 Outputs the necessary code for GObject type registration for a
179 <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a> class defined in a module. Two static symbols
180 are defined.
181 </p>
182 <p>
183 </p>
184 <pre class="programlisting">
185  static GType <em class="replaceable"><code>prefix</code></em>_type;
186  static void <em class="replaceable"><code>prefix</code></em>_register_type (GTypeModule module);
187 </pre>
188 <p>
189 </p>
190 <p>
191 The <code class="function"><em class="replaceable"><code>prefix</code></em>, <code class="function">_register_type()</code></code>
192 function should be called in your <a class="link" href="pango-Engines.html#script-engine-init" title="script_engine_init ()"><code class="function">script_engine_init()</code></a> function for
193 each type that your module implements, and then your <a class="link" href="pango-Engines.html#script-engine-create" title="script_engine_create ()"><code class="function">script_engine_create()</code></a>
194 function can create instances of the object as follows:
195 </p>
196 <p>
197 </p>
198 <div class="informalexample"><pre class="programlisting">
199  PangoEngine *engine = g_object_new (<em class="replaceable"><code>prefix</code></em>_type, NULL);
200 </pre></div>
201 <p>
202 </p>
203 <div class="variablelist"><table border="0">
204 <col align="left" valign="top">
205 <tbody>
206 <tr>
207 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
208 <td> Name of the the type to register (for example:, <code class="literal">ArabicEngineFc</code>
209 </td>
210 </tr>
211 <tr>
212 <td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
213 <td> Prefix for symbols that will be defined (for example:, <code class="literal">arabic_engine_fc</code>
214 </td>
215 </tr>
216 <tr>
217 <td><p><span class="term"><em class="parameter"><code>class_init</code></em> :</span></p></td>
218 <td> Class initialization function for the new type, or <a
219 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
220 ><code class="literal">NULL</code></a>
221 </td>
222 </tr>
223 <tr>
224 <td><p><span class="term"><em class="parameter"><code>instance_init</code></em> :</span></p></td>
225 <td> Instance initialization function for the new type, or <a
226 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
227 ><code class="literal">NULL</code></a>
228 </td>
229 </tr>
230 </tbody>
231 </table></div>
232 </div>
233 </div>
234 </div>
235 <div class="footer">
236 <hr>
237           Generated by GTK-Doc V1.11</div>
238 </body>
239 </html>