1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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">
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>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#PangoEngineShape.synopsis" class="shortcut">Top</a>
46 <a href="#PangoEngineShape.description" class="shortcut">Description</a>
48 <a href="#PangoEngineShape.object-hierarchy" class="shortcut">Object Hierarchy</a>
51 <div class="refentry" lang="en">
52 <a name="PangoEngineShape"></a><div class="titlepage"></div>
53 <div class="refnamediv"><table width="100%"><tr>
55 <h2><span class="refentrytitle"><a name="PangoEngineShape.top_of_page"></a>PangoEngineShape</span></h2>
56 <p>PangoEngineShape — Rendering-system dependent script engines</p>
58 <td valign="top" align="right"></td>
60 <div class="refsect1" lang="en">
61 <a name="PangoEngineShape.stability-level"></a><h2>Stability Level</h2>
62 Unstable, unless otherwise indicated
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)
73 <div class="refsect1" lang="en">
74 <a name="PangoEngineShape.object-hierarchy"></a><h2>Object Hierarchy</h2>
75 <pre class="synopsis">
77 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
79 +----<a class="link" href="pango-Engines.html#PangoEngine">PangoEngine</a>
83 <div class="refsect1" lang="en">
84 <a name="PangoEngineShape.description"></a><h2>Description</h2>
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>.
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>
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>
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,
116 const PangoAnalysis *analysis,
117 PangoGlyphString *glyphs);
118 PangoCoverageLevel (*covers) (PangoEngineShape *engine,
120 PangoLanguage *language,
122 } PangoEngineShapeClass;
125 Class structure for <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a></p>
128 <div class="variablelist"><table border="0">
129 <col align="left" valign="top">
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->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.
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.
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"
168 A string constant defining the engine type
170 These engines derive from <a class="link" href="PangoEngineShape.html" title="PangoEngineShape"><span class="type">PangoEngineShape</span></a>.
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>
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
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);
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:
198 <div class="informalexample"><pre class="programlisting">
199 PangoEngine *engine = g_object_new (<em class="replaceable"><code>prefix</code></em>_type, NULL);
203 <div class="variablelist"><table border="0">
204 <col align="left" valign="top">
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>
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>
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>
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>
237 Generated by GTK-Doc V1.11</div>