Git init
[external/pango1.0.git] / docs / html / pango-Glyph-Storage.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>Glyph Storage</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="pango.html" title="Basic Pango Interfaces">
9 <link rel="prev" href="pango-Text-Processing.html" title="Rendering">
10 <link rel="next" href="pango-Fonts.html" title="Fonts">
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="pango-Text-Processing.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="pango.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-Fonts.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="#pango-Glyph-Storage.synopsis" class="shortcut">Top</a>
45                  | 
46                 <a href="#pango-Glyph-Storage.description" class="shortcut">Description</a>
47 </td></tr>
48 </table>
49 <div class="refentry" lang="en">
50 <a name="pango-Glyph-Storage"></a><div class="titlepage"></div>
51 <div class="refnamediv"><table width="100%"><tr>
52 <td valign="top">
53 <h2><span class="refentrytitle"><a name="pango-Glyph-Storage.top_of_page"></a>Glyph Storage</span></h2>
54 <p>Glyph Storage — Structures for storing information about glyphs</p>
55 </td>
56 <td valign="top" align="right"></td>
57 </tr></table></div>
58 <div class="refsynopsisdiv">
59 <a name="pango-Glyph-Storage.synopsis"></a><h2>Synopsis</h2>
60 <pre class="synopsis">
61 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE">PANGO_SCALE</a>
62 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-PIXELS--CAPS" title="PANGO_PIXELS()">PANGO_PIXELS</a>                        (d)
63 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-PIXELS-FLOOR--CAPS" title="PANGO_PIXELS_FLOOR()">PANGO_PIXELS_FLOOR</a>                  (d)
64 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-PIXELS-CEIL--CAPS" title="PANGO_PIXELS_CEIL()">PANGO_PIXELS_CEIL</a>                   (d)
65 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-UNITS-ROUND--CAPS" title="PANGO_UNITS_ROUND()">PANGO_UNITS_ROUND</a>                   (d)
66 double              <a class="link" href="pango-Glyph-Storage.html#pango-units-to-double" title="pango_units_to_double ()">pango_units_to_double</a>               (int i);
67 int                 <a class="link" href="pango-Glyph-Storage.html#pango-units-from-double" title="pango_units_from_double ()">pango_units_from_double</a>             (double d);
68                     <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a>;
69 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-ASCENT--CAPS" title="PANGO_ASCENT()">PANGO_ASCENT</a>                        (rect)
70 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-DESCENT--CAPS" title="PANGO_DESCENT()">PANGO_DESCENT</a>                       (rect)
71 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-LBEARING--CAPS" title="PANGO_LBEARING()">PANGO_LBEARING</a>                      (rect)
72 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-RBEARING--CAPS" title="PANGO_RBEARING()">PANGO_RBEARING</a>                      (rect)
73 void                <a class="link" href="pango-Glyph-Storage.html#pango-extents-to-pixels" title="pango_extents_to_pixels ()">pango_extents_to_pixels</a>             (<a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *inclusive,
74                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *nearest);
75                     <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a>;
76 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-TYPE-MATRIX--CAPS" title="PANGO_TYPE_MATRIX">PANGO_TYPE_MATRIX</a>
77 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-MATRIX-INIT--CAPS" title="PANGO_MATRIX_INIT">PANGO_MATRIX_INIT</a>
78 <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *       <a class="link" href="pango-Glyph-Storage.html#pango-matrix-copy" title="pango_matrix_copy ()">pango_matrix_copy</a>                   (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);
79 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-free" title="pango_matrix_free ()">pango_matrix_free</a>                   (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);
80 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-translate" title="pango_matrix_translate ()">pango_matrix_translate</a>              (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
81                                                          double tx,
82                                                          double ty);
83 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-scale" title="pango_matrix_scale ()">pango_matrix_scale</a>                  (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
84                                                          double scale_x,
85                                                          double scale_y);
86 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-rotate" title="pango_matrix_rotate ()">pango_matrix_rotate</a>                 (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
87                                                          double degrees);
88 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-concat" title="pango_matrix_concat ()">pango_matrix_concat</a>                 (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
89                                                          const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *new_matrix);
90 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-transform-point" title="pango_matrix_transform_point ()">pango_matrix_transform_point</a>        (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
91                                                          double *x,
92                                                          double *y);
93 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-transform-distance" title="pango_matrix_transform_distance ()">pango_matrix_transform_distance</a>     (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
94                                                          double *dx,
95                                                          double *dy);
96 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-transform-rectangle" title="pango_matrix_transform_rectangle ()">pango_matrix_transform_rectangle</a>    (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
97                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *rect);
98 void                <a class="link" href="pango-Glyph-Storage.html#pango-matrix-transform-pixel-rectangle" title="pango_matrix_transform_pixel_rectangle ()">pango_matrix_transform_pixel_rectangle</a>
99                                                         (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
100                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *rect);
101 double              <a class="link" href="pango-Glyph-Storage.html#pango-matrix-get-font-scale-factor" title="pango_matrix_get_font_scale_factor ()">pango_matrix_get_font_scale_factor</a>  (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);
102 typedef             <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a>;
103 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-EMPTY--CAPS" title="PANGO_GLYPH_EMPTY">PANGO_GLYPH_EMPTY</a>
104 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-INVALID-INPUT--CAPS" title="PANGO_GLYPH_INVALID_INPUT">PANGO_GLYPH_INVALID_INPUT</a>
105 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-UNKNOWN-FLAG--CAPS" title="PANGO_GLYPH_UNKNOWN_FLAG">PANGO_GLYPH_UNKNOWN_FLAG</a>
106 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-GET-UNKNOWN-GLYPH--CAPS" title="PANGO_GET_UNKNOWN_GLYPH()">PANGO_GET_UNKNOWN_GLYPH</a>             (wc)
107                     <a class="link" href="pango-Glyph-Storage.html#PangoGlyphInfo" title="PangoGlyphInfo">PangoGlyphInfo</a>;
108                     <a class="link" href="pango-Glyph-Storage.html#PangoGlyphGeometry" title="PangoGlyphGeometry">PangoGlyphGeometry</a>;
109 typedef             <a class="link" href="pango-Glyph-Storage.html#PangoGlyphUnit" title="PangoGlyphUnit">PangoGlyphUnit</a>;
110                     <a class="link" href="pango-Glyph-Storage.html#PangoGlyphVisAttr" title="PangoGlyphVisAttr">PangoGlyphVisAttr</a>;
111                     <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a>;
112                     <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a>;
113                     <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a>;
114 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-TYPE-GLYPH-STRING--CAPS" title="PANGO_TYPE_GLYPH_STRING">PANGO_TYPE_GLYPH_STRING</a>
115 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *  <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-new" title="pango_glyph_string_new ()">pango_glyph_string_new</a>              (void);
116 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *  <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-copy" title="pango_glyph_string_copy ()">pango_glyph_string_copy</a>             (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *string);
117 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-set-size" title="pango_glyph_string_set_size ()">pango_glyph_string_set_size</a>         (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *string,
118                                                          <a
119 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
120 >gint</a> new_len);
121 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-free" title="pango_glyph_string_free ()">pango_glyph_string_free</a>             (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *string);
122 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-extents" title="pango_glyph_string_extents ()">pango_glyph_string_extents</a>          (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
123                                                          <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
124                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *ink_rect,
125                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *logical_rect);
126 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-extents-range" title="pango_glyph_string_extents_range ()">pango_glyph_string_extents_range</a>    (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
127                                                          int start,
128                                                          int end,
129                                                          <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
130                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *ink_rect,
131                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *logical_rect);
132 int                 <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-get-width" title="pango_glyph_string_get_width ()">pango_glyph_string_get_width</a>        (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs);
133 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-index-to-x" title="pango_glyph_string_index_to_x ()">pango_glyph_string_index_to_x</a>       (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
134                                                          char *text,
135                                                          int length,
136                                                          <a class="link" href="pango-Text-Processing.html#PangoAnalysis" title="PangoAnalysis">PangoAnalysis</a> *analysis,
137                                                          int index_,
138                                                          <a
139 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
140 >gboolean</a> trailing,
141                                                          int *x_pos);
142 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-x-to-index" title="pango_glyph_string_x_to_index ()">pango_glyph_string_x_to_index</a>       (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
143                                                          char *text,
144                                                          int length,
145                                                          <a class="link" href="pango-Text-Processing.html#PangoAnalysis" title="PangoAnalysis">PangoAnalysis</a> *analysis,
146                                                          int x_pos,
147                                                          int *index_,
148                                                          int *trailing);
149 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-get-logical-widths" title="pango_glyph_string_get_logical_widths ()">pango_glyph_string_get_logical_widths</a>
150                                                         (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
151                                                          const char *text,
152                                                          int length,
153                                                          int embedding_level,
154                                                          int *logical_widths);
155 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-TYPE-GLYPH-ITEM--CAPS" title="PANGO_TYPE_GLYPH_ITEM">PANGO_TYPE_GLYPH_ITEM</a>
156 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *    <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-copy" title="pango_glyph_item_copy ()">pango_glyph_item_copy</a>               (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *orig);
157 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-free" title="pango_glyph_item_free ()">pango_glyph_item_free</a>               (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item);
158 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *    <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-split" title="pango_glyph_item_split ()">pango_glyph_item_split</a>              (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *orig,
159                                                          const char *text,
160                                                          int split_index);
161 <a
162 href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"
163 >GSList</a> *            <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-apply-attrs" title="pango_glyph_item_apply_attrs ()">pango_glyph_item_apply_attrs</a>        (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
164                                                          const char *text,
165                                                          <a class="link" href="pango-Text-Attributes.html#PangoAttrList" title="PangoAttrList">PangoAttrList</a> *list);
166 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-letter-space" title="pango_glyph_item_letter_space ()">pango_glyph_item_letter_space</a>       (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
167                                                          const char *text,
168                                                          <a class="link" href="pango-Text-Processing.html#PangoLogAttr" title="PangoLogAttr">PangoLogAttr</a> *log_attrs,
169                                                          int letter_spacing);
170 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-get-logical-widths" title="pango_glyph_item_get_logical_widths ()">pango_glyph_item_get_logical_widths</a> (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
171                                                          const char *text,
172                                                          int *logical_widths);
173 #define             <a class="link" href="pango-Glyph-Storage.html#PANGO-TYPE-GLYPH-ITEM-ITER--CAPS" title="PANGO_TYPE_GLYPH_ITEM_ITER">PANGO_TYPE_GLYPH_ITEM_ITER</a>
174 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> * <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-copy" title="pango_glyph_item_iter_copy ()">pango_glyph_item_iter_copy</a>         (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *orig);
175 void                <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-free" title="pango_glyph_item_iter_free ()">pango_glyph_item_iter_free</a>          (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter);
176 <a
177 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
178 >gboolean</a>            <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-init-start" title="pango_glyph_item_iter_init_start ()">pango_glyph_item_iter_init_start</a>    (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter,
179                                                          <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
180                                                          const char *text);
181 <a
182 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
183 >gboolean</a>            <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-init-end" title="pango_glyph_item_iter_init_end ()">pango_glyph_item_iter_init_end</a>      (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter,
184                                                          <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
185                                                          const char *text);
186 <a
187 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
188 >gboolean</a>            <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-next-cluster" title="pango_glyph_item_iter_next_cluster ()">pango_glyph_item_iter_next_cluster</a>  (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter);
189 <a
190 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
191 >gboolean</a>            <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-prev-cluster" title="pango_glyph_item_iter_prev_cluster ()">pango_glyph_item_iter_prev_cluster</a>  (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter);
192 </pre>
193 </div>
194 <div class="refsect1" lang="en">
195 <a name="pango-Glyph-Storage.description"></a><h2>Description</h2>
196 <p>
197 <a class="link" href="pango-Text-Processing.html#pango-shape" title="pango_shape ()"><code class="function">pango_shape()</code></a> produces a string of glyphs which
198 can be measured or drawn to the screen. The following
199 structures are used to store information about
200 glyphs.
201 </p>
202 </div>
203 <div class="refsect1" lang="en">
204 <a name="pango-Glyph-Storage.details"></a><h2>Details</h2>
205 <div class="refsect2" lang="en">
206 <a name="PANGO-SCALE--CAPS"></a><h3>PANGO_SCALE</h3>
207 <pre class="programlisting">#define PANGO_SCALE 1024
208 </pre>
209 <p>
210 The <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a> macro represents the scale between dimensions used
211 for Pango distances and device units. (The definition of device
212 units is dependent on the output device; it will typically be pixels
213 for a screen, and points for a printer.) <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a> is currently
214 1024, but this may be changed in the future.
215 </p>
216 <p>
217 When setting font sizes, device units are always considered to be
218 points (as in "12 point font"), rather than pixels.
219 </p>
220 </div>
221 <hr>
222 <div class="refsect2" lang="en">
223 <a name="PANGO-PIXELS--CAPS"></a><h3>PANGO_PIXELS()</h3>
224 <pre class="programlisting">#define PANGO_PIXELS(d) (((int)(d) + 512) &gt;&gt; 10)
225 </pre>
226 <p>
227 Converts a dimension to device units by rounding.
228 </p>
229 <div class="variablelist"><table border="0">
230 <col align="left" valign="top">
231 <tbody>
232 <tr>
233 <td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
234 <td>a dimension in Pango units.
235 </td>
236 </tr>
237 <tr>
238 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
239 <td>rounded dimension in device units.
240 </td>
241 </tr>
242 </tbody>
243 </table></div>
244 </div>
245 <hr>
246 <div class="refsect2" lang="en">
247 <a name="PANGO-PIXELS-FLOOR--CAPS"></a><h3>PANGO_PIXELS_FLOOR()</h3>
248 <pre class="programlisting">#define PANGO_PIXELS_FLOOR(d) (((int)(d)) &gt;&gt; 10)
249 </pre>
250 <p>
251 Converts a dimension to device units by flooring.
252 </p>
253 <div class="variablelist"><table border="0">
254 <col align="left" valign="top">
255 <tbody>
256 <tr>
257 <td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
258 <td>a dimension in Pango units.
259 </td>
260 </tr>
261 <tr>
262 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
263 <td>floored dimension in device units.
264 </td>
265 </tr>
266 </tbody>
267 </table></div>
268 <p class="since">Since 1.14</p>
269 </div>
270 <hr>
271 <div class="refsect2" lang="en">
272 <a name="PANGO-PIXELS-CEIL--CAPS"></a><h3>PANGO_PIXELS_CEIL()</h3>
273 <pre class="programlisting">#define PANGO_PIXELS_CEIL(d) (((int)(d) + 1023) &gt;&gt; 10)
274 </pre>
275 <p>
276 Converts a dimension to device units by ceiling.
277 </p>
278 <div class="variablelist"><table border="0">
279 <col align="left" valign="top">
280 <tbody>
281 <tr>
282 <td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
283 <td>a dimension in Pango units.
284 </td>
285 </tr>
286 <tr>
287 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
288 <td>ceiled dimension in device units.
289 </td>
290 </tr>
291 </tbody>
292 </table></div>
293 <p class="since">Since 1.14</p>
294 </div>
295 <hr>
296 <div class="refsect2" lang="en">
297 <a name="PANGO-UNITS-ROUND--CAPS"></a><h3>PANGO_UNITS_ROUND()</h3>
298 <pre class="programlisting">#define             PANGO_UNITS_ROUND(d)</pre>
299 <p>
300 Rounds a dimension to whole device units, but does not
301 convert it to device units.
302 </p>
303 <div class="variablelist"><table border="0">
304 <col align="left" valign="top">
305 <tbody>
306 <tr>
307 <td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
308 <td>a dimension in Pango units.
309 </td>
310 </tr>
311 <tr>
312 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
313 <td>rounded dimension in Pango units.
314 </td>
315 </tr>
316 </tbody>
317 </table></div>
318 <p class="since">Since 1.18</p>
319 </div>
320 <hr>
321 <div class="refsect2" lang="en">
322 <a name="pango-units-to-double"></a><h3>pango_units_to_double ()</h3>
323 <pre class="programlisting">double              pango_units_to_double               (int i);</pre>
324 <p>
325 Converts a number in Pango units to floating-point: divides
326 it by <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a>.</p>
327 <p>
328 </p>
329 <div class="variablelist"><table border="0">
330 <col align="left" valign="top">
331 <tbody>
332 <tr>
333 <td><p><span class="term"><em class="parameter"><code>i</code></em> :</span></p></td>
334 <td> value in Pango units
335 </td>
336 </tr>
337 <tr>
338 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
339 <td> the double value.
340
341 </td>
342 </tr>
343 </tbody>
344 </table></div>
345 <p class="since">Since 1.16</p>
346 </div>
347 <hr>
348 <div class="refsect2" lang="en">
349 <a name="pango-units-from-double"></a><h3>pango_units_from_double ()</h3>
350 <pre class="programlisting">int                 pango_units_from_double             (double d);</pre>
351 <p>
352 Converts a floating-point number to Pango units: multiplies
353 it by <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a> and rounds to nearest integer.</p>
354 <p>
355 </p>
356 <div class="variablelist"><table border="0">
357 <col align="left" valign="top">
358 <tbody>
359 <tr>
360 <td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
361 <td> double floating-point value
362 </td>
363 </tr>
364 <tr>
365 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
366 <td> the value in Pango units.
367
368 </td>
369 </tr>
370 </tbody>
371 </table></div>
372 <p class="since">Since 1.16</p>
373 </div>
374 <hr>
375 <div class="refsect2" lang="en">
376 <a name="PangoRectangle"></a><h3>PangoRectangle</h3>
377 <pre class="programlisting">typedef struct {
378   int x;
379   int y;
380   int width;
381   int height;
382 } PangoRectangle;
383 </pre>
384 <p>
385 The <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a> structure represents a rectangle. It is frequently
386 used to represent the logical or ink extents of a single glyph or section
387 of text. (See, for instance, <a class="link" href="pango-Fonts.html#pango-font-get-glyph-extents" title="pango_font_get_glyph_extents ()"><code class="function">pango_font_get_glyph_extents()</code></a>)
388 </p>
389 <div class="variablelist"><table border="0">
390 <col align="left" valign="top">
391 <tbody>
392 <tr>
393 <td><p><span class="term">int <em class="structfield"><code>x</code></em>;</span></p></td>
394 <td>X coordinate of the left side of the rectangle.
395 </td>
396 </tr>
397 <tr>
398 <td><p><span class="term">int <em class="structfield"><code>y</code></em>;</span></p></td>
399 <td>Y coordinate of the the top side of the rectangle.
400 </td>
401 </tr>
402 <tr>
403 <td><p><span class="term">int <em class="structfield"><code>width</code></em>;</span></p></td>
404 <td>width of the rectangle.
405 </td>
406 </tr>
407 <tr>
408 <td><p><span class="term">int <em class="structfield"><code>height</code></em>;</span></p></td>
409 <td>height of the rectangle.
410 </td>
411 </tr>
412 </tbody>
413 </table></div>
414 </div>
415 <hr>
416 <div class="refsect2" lang="en">
417 <a name="PANGO-ASCENT--CAPS"></a><h3>PANGO_ASCENT()</h3>
418 <pre class="programlisting">#define PANGO_ASCENT(rect) (-(rect).y)
419 </pre>
420 <p>
421 Extracts the <em class="firstterm">ascent</em> from a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
422 representing glyph extents. The ascent is the distance from the
423 baseline to the highest point of the character. This is positive if the
424 glyph ascends above the baseline.
425 </p>
426 <div class="variablelist"><table border="0">
427 <col align="left" valign="top">
428 <tbody><tr>
429 <td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
430 <td>a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
431 </td>
432 </tr></tbody>
433 </table></div>
434 </div>
435 <hr>
436 <div class="refsect2" lang="en">
437 <a name="PANGO-DESCENT--CAPS"></a><h3>PANGO_DESCENT()</h3>
438 <pre class="programlisting">#define PANGO_DESCENT(rect) ((rect).y + (rect).height)
439 </pre>
440 <p>
441 Extracts the <em class="firstterm">descent</em> from a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
442 representing glyph extents. The descent is the distance from the
443 baseline to the lowest point of the character. This is positive if the
444 glyph descends below the baseline.
445 </p>
446 <div class="variablelist"><table border="0">
447 <col align="left" valign="top">
448 <tbody><tr>
449 <td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
450 <td>a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
451 </td>
452 </tr></tbody>
453 </table></div>
454 </div>
455 <hr>
456 <div class="refsect2" lang="en">
457 <a name="PANGO-LBEARING--CAPS"></a><h3>PANGO_LBEARING()</h3>
458 <pre class="programlisting">#define PANGO_LBEARING(rect) ((rect).x)
459 </pre>
460 <p>
461 Extracts the <em class="firstterm">left bearing</em> from a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
462 representing glyph extents. The left bearing is the distance from the
463 horizontal origin to the farthest left point of the character.
464 This is positive for characters drawn completely to the right of the
465 glyph origin.
466 </p>
467 <div class="variablelist"><table border="0">
468 <col align="left" valign="top">
469 <tbody><tr>
470 <td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
471 <td>a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
472 </td>
473 </tr></tbody>
474 </table></div>
475 </div>
476 <hr>
477 <div class="refsect2" lang="en">
478 <a name="PANGO-RBEARING--CAPS"></a><h3>PANGO_RBEARING()</h3>
479 <pre class="programlisting">#define PANGO_RBEARING(rect) ((rect).x + (rect).width)
480 </pre>
481 <p>
482 Extracts the <em class="firstterm">right bearing</em> from a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
483 representing glyph extents. The right bearing is the distance from the
484 horizontal origin to the farthest right point of the character.
485 This is positive except for characters drawn completely to the left of the
486 horizontal origin.
487 </p>
488 <div class="variablelist"><table border="0">
489 <col align="left" valign="top">
490 <tbody><tr>
491 <td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
492 <td>a <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle"><span class="type">PangoRectangle</span></a>
493 </td>
494 </tr></tbody>
495 </table></div>
496 </div>
497 <hr>
498 <div class="refsect2" lang="en">
499 <a name="pango-extents-to-pixels"></a><h3>pango_extents_to_pixels ()</h3>
500 <pre class="programlisting">void                pango_extents_to_pixels             (<a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *inclusive,
501                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *nearest);</pre>
502 <p>
503 Converts extents from Pango units to device units, dividing by the
504 <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a> factor and performing rounding.
505 </p>
506 <p>
507 The <em class="parameter"><code>inclusive</code></em> rectangle is converted by flooring the x/y coordinates and extending
508 width/height, such that the final rectangle completely includes the original
509 rectangle.
510 </p>
511 <p>
512 The <em class="parameter"><code>nearest</code></em> rectangle is converted by rounding the coordinates
513 of the rectangle to the nearest device unit (pixel).
514 </p>
515 <p>
516 The rule to which argument to use is: if you want the resulting device-space
517 rectangle to completely contain the original rectangle, pass it in as <em class="parameter"><code>inclusive</code></em>.
518 If you want two touching-but-not-overlapping rectangles stay
519 touching-but-not-overlapping after rounding to device units, pass them in
520 as <em class="parameter"><code>nearest</code></em>.</p>
521 <p>
522 </p>
523 <div class="variablelist"><table border="0">
524 <col align="left" valign="top">
525 <tbody>
526 <tr>
527 <td><p><span class="term"><em class="parameter"><code>inclusive</code></em> :</span></p></td>
528 <td> rectangle to round to pixels inclusively, or <a
529 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
530 ><code class="literal">NULL</code></a>.
531 </td>
532 </tr>
533 <tr>
534 <td><p><span class="term"><em class="parameter"><code>nearest</code></em> :</span></p></td>
535 <td> rectangle to round to nearest pixels, or <a
536 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
537 ><code class="literal">NULL</code></a>.
538 </td>
539 </tr>
540 </tbody>
541 </table></div>
542 <p class="since">Since 1.16</p>
543 </div>
544 <hr>
545 <div class="refsect2" lang="en">
546 <a name="PangoMatrix"></a><h3>PangoMatrix</h3>
547 <pre class="programlisting">typedef struct {
548   double xx;
549   double xy;
550   double yx;
551   double yy;
552   double x0;
553   double y0;
554 } PangoMatrix;
555 </pre>
556 <p>
557 A structure specifying a transformation between user-space
558 coordinates and device coordinates. The transformation
559 is given by
560 </p>
561 <p>
562 </p>
563 <pre class="programlisting">
564 x_device = x_user * matrix-&gt;xx + y_user * matrix-&gt;xy + matrix-&gt;x0;
565 y_device = x_user * matrix-&gt;yx + y_user * matrix-&gt;yy + matrix-&gt;y0;
566 </pre>
567 <p>
568 </p>
569 <div class="variablelist"><table border="0">
570 <col align="left" valign="top">
571 <tbody>
572 <tr>
573 <td><p><span class="term">double <em class="structfield"><code>xx</code></em>;</span></p></td>
574 <td> 1st component of the transformation matrix
575 </td>
576 </tr>
577 <tr>
578 <td><p><span class="term">double <em class="structfield"><code>xy</code></em>;</span></p></td>
579 <td> 2nd component of the transformation matrix
580 </td>
581 </tr>
582 <tr>
583 <td><p><span class="term">double <em class="structfield"><code>yx</code></em>;</span></p></td>
584 <td> 3rd component of the transformation matrix
585 </td>
586 </tr>
587 <tr>
588 <td><p><span class="term">double <em class="structfield"><code>yy</code></em>;</span></p></td>
589 <td> 4th component of the transformation matrix
590 </td>
591 </tr>
592 <tr>
593 <td><p><span class="term">double <em class="structfield"><code>x0</code></em>;</span></p></td>
594 <td> x translation
595 </td>
596 </tr>
597 <tr>
598 <td><p><span class="term">double <em class="structfield"><code>y0</code></em>;</span></p></td>
599 <td> y translation
600 </td>
601 </tr>
602 </tbody>
603 </table></div>
604 <p class="since">Since 1.6</p>
605 </div>
606 <hr>
607 <div class="refsect2" lang="en">
608 <a name="PANGO-TYPE-MATRIX--CAPS"></a><h3>PANGO_TYPE_MATRIX</h3>
609 <pre class="programlisting">#define PANGO_TYPE_MATRIX (pango_matrix_get_type ())
610 </pre>
611 <p>
612 The GObject type for <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a></p>
613 <p>
614 </p>
615 </div>
616 <hr>
617 <div class="refsect2" lang="en">
618 <a name="PANGO-MATRIX-INIT--CAPS"></a><h3>PANGO_MATRIX_INIT</h3>
619 <pre class="programlisting">#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }
620 </pre>
621 <p>
622 Constant that can be used to initialize a PangoMatrix to
623 the identity transform.
624 </p>
625 <p>
626 </p>
627 <div class="informalexample"><pre class="programlisting">
628 PangoMatrix matrix = PANGO_MATRIX_INIT;
629 pango_matrix_rotate (&amp;matrix, 45.);
630 </pre></div>
631 <p>
632 </p>
633 <p class="since">Since 1.6</p>
634 </div>
635 <hr>
636 <div class="refsect2" lang="en">
637 <a name="pango-matrix-copy"></a><h3>pango_matrix_copy ()</h3>
638 <pre class="programlisting"><a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *       pango_matrix_copy                   (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);</pre>
639 <p>
640 Copies a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>.</p>
641 <p>
642 </p>
643 <div class="variablelist"><table border="0">
644 <col align="left" valign="top">
645 <tbody>
646 <tr>
647 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
648 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, may be <a
649 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
650 ><code class="literal">NULL</code></a>
651 </td>
652 </tr>
653 <tr>
654 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
655 <td> the newly allocated <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, which should
656               be freed with <a class="link" href="pango-Glyph-Storage.html#pango-matrix-free" title="pango_matrix_free ()"><code class="function">pango_matrix_free()</code></a>, or <a
657 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
658 ><code class="literal">NULL</code></a> if
659               <em class="parameter"><code>matrix</code></em> was <a
660 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
661 ><code class="literal">NULL</code></a>.
662
663 </td>
664 </tr>
665 </tbody>
666 </table></div>
667 <p class="since">Since 1.6</p>
668 </div>
669 <hr>
670 <div class="refsect2" lang="en">
671 <a name="pango-matrix-free"></a><h3>pango_matrix_free ()</h3>
672 <pre class="programlisting">void                pango_matrix_free                   (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);</pre>
673 <p>
674 Free a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a> created with <a class="link" href="pango-Glyph-Storage.html#pango-matrix-copy" title="pango_matrix_copy ()"><code class="function">pango_matrix_copy()</code></a>.</p>
675 <p>
676 </p>
677 <div class="variablelist"><table border="0">
678 <col align="left" valign="top">
679 <tbody><tr>
680 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
681 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, may be <a
682 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
683 ><code class="literal">NULL</code></a>
684 </td>
685 </tr></tbody>
686 </table></div>
687 <p class="since">Since 1.6</p>
688 </div>
689 <hr>
690 <div class="refsect2" lang="en">
691 <a name="pango-matrix-translate"></a><h3>pango_matrix_translate ()</h3>
692 <pre class="programlisting">void                pango_matrix_translate              (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
693                                                          double tx,
694                                                          double ty);</pre>
695 <p>
696 Changes the transformation represented by <em class="parameter"><code>matrix</code></em> to be the
697 transformation given by first translating by (<em class="parameter"><code>tx</code></em>, <em class="parameter"><code>ty</code></em>)
698 then applying the original transformation.</p>
699 <p>
700 </p>
701 <div class="variablelist"><table border="0">
702 <col align="left" valign="top">
703 <tbody>
704 <tr>
705 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
706 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>
707 </td>
708 </tr>
709 <tr>
710 <td><p><span class="term"><em class="parameter"><code>tx</code></em> :</span></p></td>
711 <td> amount to translate in the X direction
712 </td>
713 </tr>
714 <tr>
715 <td><p><span class="term"><em class="parameter"><code>ty</code></em> :</span></p></td>
716 <td> amount to translate in the Y direction
717 </td>
718 </tr>
719 </tbody>
720 </table></div>
721 <p class="since">Since 1.6</p>
722 </div>
723 <hr>
724 <div class="refsect2" lang="en">
725 <a name="pango-matrix-scale"></a><h3>pango_matrix_scale ()</h3>
726 <pre class="programlisting">void                pango_matrix_scale                  (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
727                                                          double scale_x,
728                                                          double scale_y);</pre>
729 <p>
730 Changes the transformation represented by <em class="parameter"><code>matrix</code></em> to be the
731 transformation given by first scaling by <em class="parameter"><code>sx</code></em> in the X direction
732 and <em class="parameter"><code>sy</code></em> in the Y direction then applying the original
733 transformation.</p>
734 <p>
735 </p>
736 <div class="variablelist"><table border="0">
737 <col align="left" valign="top">
738 <tbody>
739 <tr>
740 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
741 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>
742 </td>
743 </tr>
744 <tr>
745 <td><p><span class="term"><em class="parameter"><code>scale_x</code></em> :</span></p></td>
746 <td> amount to scale by in X direction
747 </td>
748 </tr>
749 <tr>
750 <td><p><span class="term"><em class="parameter"><code>scale_y</code></em> :</span></p></td>
751 <td> amount to scale by in Y direction
752 </td>
753 </tr>
754 </tbody>
755 </table></div>
756 <p class="since">Since 1.6</p>
757 </div>
758 <hr>
759 <div class="refsect2" lang="en">
760 <a name="pango-matrix-rotate"></a><h3>pango_matrix_rotate ()</h3>
761 <pre class="programlisting">void                pango_matrix_rotate                 (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
762                                                          double degrees);</pre>
763 <p>
764 Changes the transformation represented by <em class="parameter"><code>matrix</code></em> to be the
765 transformation given by first rotating by <em class="parameter"><code>degrees</code></em> degrees
766 counter-clockwise then applying the original transformation.</p>
767 <p>
768 </p>
769 <div class="variablelist"><table border="0">
770 <col align="left" valign="top">
771 <tbody>
772 <tr>
773 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
774 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>
775 </td>
776 </tr>
777 <tr>
778 <td><p><span class="term"><em class="parameter"><code>degrees</code></em> :</span></p></td>
779 <td> degrees to rotate counter-clockwise
780 </td>
781 </tr>
782 </tbody>
783 </table></div>
784 <p class="since">Since 1.6</p>
785 </div>
786 <hr>
787 <div class="refsect2" lang="en">
788 <a name="pango-matrix-concat"></a><h3>pango_matrix_concat ()</h3>
789 <pre class="programlisting">void                pango_matrix_concat                 (<a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
790                                                          const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *new_matrix);</pre>
791 <p>
792 Changes the transformation represented by <em class="parameter"><code>matrix</code></em> to be the
793 transformation given by first applying transformation
794 given by <em class="parameter"><code>new_matrix</code></em> then applying the original transformation.</p>
795 <p>
796 </p>
797 <div class="variablelist"><table border="0">
798 <col align="left" valign="top">
799 <tbody>
800 <tr>
801 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
802 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>
803 </td>
804 </tr>
805 <tr>
806 <td><p><span class="term"><em class="parameter"><code>new_matrix</code></em> :</span></p></td>
807 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>
808 </td>
809 </tr>
810 </tbody>
811 </table></div>
812 <p class="since">Since 1.6</p>
813 </div>
814 <hr>
815 <div class="refsect2" lang="en">
816 <a name="pango-matrix-transform-point"></a><h3>pango_matrix_transform_point ()</h3>
817 <pre class="programlisting">void                pango_matrix_transform_point        (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
818                                                          double *x,
819                                                          double *y);</pre>
820 <p>
821 Transforms the point (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>) by <em class="parameter"><code>matrix</code></em>.</p>
822 <p>
823 </p>
824 <div class="variablelist"><table border="0">
825 <col align="left" valign="top">
826 <tbody>
827 <tr>
828 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
829 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, or <a
830 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
831 ><code class="literal">NULL</code></a>
832 </td>
833 </tr>
834 <tr>
835 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
836 <td> in/out X position
837 </td>
838 </tr>
839 <tr>
840 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
841 <td> in/out Y position
842 </td>
843 </tr>
844 </tbody>
845 </table></div>
846 <p class="since">Since 1.16</p>
847 </div>
848 <hr>
849 <div class="refsect2" lang="en">
850 <a name="pango-matrix-transform-distance"></a><h3>pango_matrix_transform_distance ()</h3>
851 <pre class="programlisting">void                pango_matrix_transform_distance     (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
852                                                          double *dx,
853                                                          double *dy);</pre>
854 <p>
855 Transforms the distance vector (<em class="parameter"><code>dx</code></em>,<em class="parameter"><code>dy</code></em>) by <em class="parameter"><code>matrix</code></em>. This is
856 similar to <a class="link" href="pango-Glyph-Storage.html#pango-matrix-transform-point" title="pango_matrix_transform_point ()"><code class="function">pango_matrix_transform_point()</code></a> except that the translation
857 components of the transformation are ignored. The calculation of
858 the returned vector is as follows:
859 </p>
860 <p>
861 </p>
862 <pre class="programlisting">
863 dx2 = dx1 * xx + dy1 * xy;
864 dy2 = dx1 * yx + dy1 * yy;
865 </pre>
866 <p>
867 </p>
868 <p>
869 Affine transformations are position invariant, so the same vector
870 always transforms to the same vector. If (<em class="parameter"><code>x1</code></em>,<em class="parameter"><code>y1</code></em>) transforms
871 to (<em class="parameter"><code>x2</code></em>,<em class="parameter"><code>y2</code></em>) then (<em class="parameter"><code>x1</code></em>+<em class="parameter"><code>dx1</code></em>,<em class="parameter"><code>y1</code></em>+<em class="parameter"><code>dy1</code></em>) will transform to
872 (<em class="parameter"><code>x1</code></em>+<em class="parameter"><code>dx2</code></em>,<em class="parameter"><code>y1</code></em>+<em class="parameter"><code>dy2</code></em>) for all values of <em class="parameter"><code>x1</code></em> and <em class="parameter"><code>x2</code></em>.</p>
873 <p>
874 </p>
875 <div class="variablelist"><table border="0">
876 <col align="left" valign="top">
877 <tbody>
878 <tr>
879 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
880 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, or <a
881 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
882 ><code class="literal">NULL</code></a>
883 </td>
884 </tr>
885 <tr>
886 <td><p><span class="term"><em class="parameter"><code>dx</code></em> :</span></p></td>
887 <td> in/out X component of a distance vector
888 </td>
889 </tr>
890 <tr>
891 <td><p><span class="term"><em class="parameter"><code>dy</code></em> :</span></p></td>
892 <td> yn/out Y component of a distance vector
893 </td>
894 </tr>
895 </tbody>
896 </table></div>
897 <p class="since">Since 1.16</p>
898 </div>
899 <hr>
900 <div class="refsect2" lang="en">
901 <a name="pango-matrix-transform-rectangle"></a><h3>pango_matrix_transform_rectangle ()</h3>
902 <pre class="programlisting">void                pango_matrix_transform_rectangle    (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
903                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *rect);</pre>
904 <p>
905 First transforms <em class="parameter"><code>rect</code></em> using <em class="parameter"><code>matrix</code></em>, then calculates the bounding box
906 of the transformed rectangle.  The rectangle should be in Pango units.
907 </p>
908 <p>
909 This function is useful for example when you want to draw a rotated
910 <em class="parameter"><code>PangoLayout</code></em> to an image buffer, and want to know how large the image
911 should be and how much you should shift the layout when rendering.
912 </p>
913 <p>
914 If you have a rectangle in device units (pixels), use
915 <a class="link" href="pango-Glyph-Storage.html#pango-matrix-transform-pixel-rectangle" title="pango_matrix_transform_pixel_rectangle ()"><code class="function">pango_matrix_transform_pixel_rectangle()</code></a>.
916 </p>
917 <p>
918 If you have the rectangle in Pango units and want to convert to
919 transformed pixel bounding box, it is more accurate to transform it first
920 (using this function) and pass the result to <a class="link" href="pango-Glyph-Storage.html#pango-extents-to-pixels" title="pango_extents_to_pixels ()"><code class="function">pango_extents_to_pixels()</code></a>,
921 first argument, for an inclusive rounded rectangle.
922 However, there are valid reasons that you may want to convert
923 to pixels first and then transform, for example when the transformed
924 coordinates may overflow in Pango units (large matrix translation for
925 example).</p>
926 <p>
927 </p>
928 <div class="variablelist"><table border="0">
929 <col align="left" valign="top">
930 <tbody>
931 <tr>
932 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
933 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, or <a
934 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
935 ><code class="literal">NULL</code></a>
936 </td>
937 </tr>
938 <tr>
939 <td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
940 <td> in/out bounding box in Pango units, or <a
941 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
942 ><code class="literal">NULL</code></a>
943 </td>
944 </tr>
945 </tbody>
946 </table></div>
947 <p class="since">Since 1.16</p>
948 </div>
949 <hr>
950 <div class="refsect2" lang="en">
951 <a name="pango-matrix-transform-pixel-rectangle"></a><h3>pango_matrix_transform_pixel_rectangle ()</h3>
952 <pre class="programlisting">void                pango_matrix_transform_pixel_rectangle
953                                                         (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix,
954                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *rect);</pre>
955 <p>
956 First transforms the <em class="parameter"><code>rect</code></em> using <em class="parameter"><code>matrix</code></em>, then calculates the bounding box
957 of the transformed rectangle.  The rectangle should be in device units
958 (pixels).
959 </p>
960 <p>
961 This function is useful for example when you want to draw a rotated
962 <em class="parameter"><code>PangoLayout</code></em> to an image buffer, and want to know how large the image
963 should be and how much you should shift the layout when rendering.
964 </p>
965 <p>
966 For better accuracy, you should use <a class="link" href="pango-Glyph-Storage.html#pango-matrix-transform-rectangle" title="pango_matrix_transform_rectangle ()"><code class="function">pango_matrix_transform_rectangle()</code></a> on
967 original rectangle in Pango units and convert to pixels afterward
968 using <a class="link" href="pango-Glyph-Storage.html#pango-extents-to-pixels" title="pango_extents_to_pixels ()"><code class="function">pango_extents_to_pixels()</code></a>'s first argument.</p>
969 <p>
970 </p>
971 <div class="variablelist"><table border="0">
972 <col align="left" valign="top">
973 <tbody>
974 <tr>
975 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
976 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, or <a
977 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
978 ><code class="literal">NULL</code></a>
979 </td>
980 </tr>
981 <tr>
982 <td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
983 <td> in/out bounding box in device units, or <a
984 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
985 ><code class="literal">NULL</code></a>
986 </td>
987 </tr>
988 </tbody>
989 </table></div>
990 <p class="since">Since 1.16</p>
991 </div>
992 <hr>
993 <div class="refsect2" lang="en">
994 <a name="pango-matrix-get-font-scale-factor"></a><h3>pango_matrix_get_font_scale_factor ()</h3>
995 <pre class="programlisting">double              pango_matrix_get_font_scale_factor  (const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);</pre>
996 <p>
997 Returns the scale factor of a matrix on the height of the font.
998 That is, the scale factor in the direction perpendicular to the
999 vector that the X coordinate is mapped to.</p>
1000 <p>
1001 </p>
1002 <div class="variablelist"><table border="0">
1003 <col align="left" valign="top">
1004 <tbody>
1005 <tr>
1006 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
1007 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, may be <a
1008 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1009 ><code class="literal">NULL</code></a>
1010 </td>
1011 </tr>
1012 <tr>
1013 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1014 <td> the scale factor of <em class="parameter"><code>matrix</code></em> on the height of the font,
1015 or 1.0 if <em class="parameter"><code>matrix</code></em> is <a
1016 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1017 ><code class="literal">NULL</code></a>.
1018
1019 </td>
1020 </tr>
1021 </tbody>
1022 </table></div>
1023 <p class="since">Since 1.12</p>
1024 </div>
1025 <hr>
1026 <div class="refsect2" lang="en">
1027 <a name="PangoGlyph"></a><h3>PangoGlyph</h3>
1028 <pre class="programlisting">typedef guint32 PangoGlyph;
1029 </pre>
1030 <p>
1031 A <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a> represents a single glyph in the output form of a string.
1032 </p>
1033 </div>
1034 <hr>
1035 <div class="refsect2" lang="en">
1036 <a name="PANGO-GLYPH-EMPTY--CAPS"></a><h3>PANGO_GLYPH_EMPTY</h3>
1037 <pre class="programlisting">#define PANGO_GLYPH_EMPTY           ((PangoGlyph)0x0FFFFFFF)
1038 </pre>
1039 <p>
1040 The <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-EMPTY--CAPS" title="PANGO_GLYPH_EMPTY"><code class="literal">PANGO_GLYPH_EMPTY</code></a> macro represents a <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a> value that has a
1041 special meaning, which is a zero-width empty glyph.  This is useful for
1042 example in shaper modules, to use as the glyph for various zero-width
1043 Unicode characters (those passing <a class="link" href="pango-Miscellaneous-Utilities.html#pango-is-zero-width" title="pango_is_zero_width ()"><code class="function">pango_is_zero_width()</code></a>).
1044 </p>
1045 </div>
1046 <hr>
1047 <div class="refsect2" lang="en">
1048 <a name="PANGO-GLYPH-INVALID-INPUT--CAPS"></a><h3>PANGO_GLYPH_INVALID_INPUT</h3>
1049 <pre class="programlisting">#define PANGO_GLYPH_INVALID_INPUT   ((PangoGlyph)0xFFFFFFFF)
1050 </pre>
1051 <p>
1052 The <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-EMPTY--CAPS" title="PANGO_GLYPH_EMPTY"><code class="literal">PANGO_GLYPH_EMPTY</code></a> macro represents a <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a> value that has a
1053 special meaning of invalid input.  <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> produces one such glyph
1054 per invalid input UTF-8 byte and such a glyph is rendered as a crossed
1055 box.
1056 Note that this value is defined such that it has the <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-UNKNOWN-FLAG--CAPS" title="PANGO_GLYPH_UNKNOWN_FLAG"><code class="literal">PANGO_GLYPH_UNKNOWN_FLAG</code></a>
1057 on.
1058 </p>
1059 <p class="since">Since 1.20</p>
1060 </div>
1061 <hr>
1062 <div class="refsect2" lang="en">
1063 <a name="PANGO-GLYPH-UNKNOWN-FLAG--CAPS"></a><h3>PANGO_GLYPH_UNKNOWN_FLAG</h3>
1064 <pre class="programlisting">#define PANGO_GLYPH_UNKNOWN_FLAG    ((PangoGlyph)0x10000000)
1065 </pre>
1066 <p>
1067 The <a class="link" href="pango-Glyph-Storage.html#PANGO-GLYPH-UNKNOWN-FLAG--CAPS" title="PANGO_GLYPH_UNKNOWN_FLAG"><code class="literal">PANGO_GLYPH_UNKNOWN_FLAG</code></a> macro is a flag value that can be added to
1068 a <a
1069 href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#gunichar"
1070 ><span class="type">gunichar</span></a> value of a valid Unicode character, to produce a <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a>
1071 value, representing an unknown-character glyph for the respective <a
1072 href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#gunichar"
1073 ><span class="type">gunichar</span></a>.
1074 </p>
1075 </div>
1076 <hr>
1077 <div class="refsect2" lang="en">
1078 <a name="PANGO-GET-UNKNOWN-GLYPH--CAPS"></a><h3>PANGO_GET_UNKNOWN_GLYPH()</h3>
1079 <pre class="programlisting">#define PANGO_GET_UNKNOWN_GLYPH(wc) ((PangoGlyph)(wc)|PANGO_GLYPH_UNKNOWN_FLAG)
1080 </pre>
1081 <p>
1082 Returns a <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph"><span class="type">PangoGlyph</span></a> value that means no glyph was found for <em class="parameter"><code>wc</code></em>.
1083 The way this unknown glyphs are rendered is backend specific.  For example,
1084 a box with the hexadecimal Unicode code-point of the character written in it
1085 is what is done in the most common backends.
1086 </p>
1087 <div class="variablelist"><table border="0">
1088 <col align="left" valign="top">
1089 <tbody><tr>
1090 <td><p><span class="term"><em class="parameter"><code>wc</code></em> :</span></p></td>
1091 <td>a Unicode character
1092 </td>
1093 </tr></tbody>
1094 </table></div>
1095 </div>
1096 <hr>
1097 <div class="refsect2" lang="en">
1098 <a name="PangoGlyphInfo"></a><h3>PangoGlyphInfo</h3>
1099 <pre class="programlisting">typedef struct {
1100   PangoGlyph    glyph;
1101   PangoGlyphGeometry geometry;
1102   PangoGlyphVisAttr  attr;
1103 } PangoGlyphInfo;
1104 </pre>
1105 <p>
1106 The <a class="link" href="pango-Glyph-Storage.html#PangoGlyphInfo" title="PangoGlyphInfo"><span class="type">PangoGlyphInfo</span></a> structure represents a single glyph together with
1107 positioning information and visual attributes.
1108 It contains the following fields.
1109 </p>
1110 <div class="variablelist"><table border="0">
1111 <col align="left" valign="top">
1112 <tbody>
1113 <tr>
1114 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> <em class="structfield"><code>glyph</code></em>;</span></p></td>
1115 <td>the glyph itself.
1116 </td>
1117 </tr>
1118 <tr>
1119 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphGeometry" title="PangoGlyphGeometry">PangoGlyphGeometry</a> <em class="structfield"><code>geometry</code></em>;</span></p></td>
1120 <td>the positional information about the glyph.
1121 </td>
1122 </tr>
1123 <tr>
1124 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphVisAttr" title="PangoGlyphVisAttr">PangoGlyphVisAttr</a> <em class="structfield"><code>attr</code></em>;</span></p></td>
1125 <td>the visual attributes of the glyph.
1126 </td>
1127 </tr>
1128 </tbody>
1129 </table></div>
1130 </div>
1131 <hr>
1132 <div class="refsect2" lang="en">
1133 <a name="PangoGlyphGeometry"></a><h3>PangoGlyphGeometry</h3>
1134 <pre class="programlisting">typedef struct {
1135   PangoGlyphUnit width;
1136   PangoGlyphUnit x_offset;
1137   PangoGlyphUnit y_offset;
1138 } PangoGlyphGeometry;
1139 </pre>
1140 <p>
1141 The <a class="link" href="pango-Glyph-Storage.html#PangoGlyphGeometry" title="PangoGlyphGeometry"><span class="type">PangoGlyphGeometry</span></a> structure contains width and positioning
1142 information for a single glyph.
1143 </p>
1144 <div class="variablelist"><table border="0">
1145 <col align="left" valign="top">
1146 <tbody>
1147 <tr>
1148 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphUnit" title="PangoGlyphUnit">PangoGlyphUnit</a> <em class="structfield"><code>width</code></em>;</span></p></td>
1149 <td>the logical width to use for the the character.
1150 </td>
1151 </tr>
1152 <tr>
1153 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphUnit" title="PangoGlyphUnit">PangoGlyphUnit</a> <em class="structfield"><code>x_offset</code></em>;</span></p></td>
1154 <td>horizontal offset from nominal character position.
1155 </td>
1156 </tr>
1157 <tr>
1158 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphUnit" title="PangoGlyphUnit">PangoGlyphUnit</a> <em class="structfield"><code>y_offset</code></em>;</span></p></td>
1159 <td>vertical offset from nominal character position.
1160 </td>
1161 </tr>
1162 </tbody>
1163 </table></div>
1164 </div>
1165 <hr>
1166 <div class="refsect2" lang="en">
1167 <a name="PangoGlyphUnit"></a><h3>PangoGlyphUnit</h3>
1168 <pre class="programlisting">typedef gint32 PangoGlyphUnit;
1169 </pre>
1170 <p>
1171 The <a class="link" href="pango-Glyph-Storage.html#PangoGlyphUnit" title="PangoGlyphUnit"><span class="type">PangoGlyphUnit</span></a> type is used to store dimensions within
1172 Pango. Dimensions are stored in 1/<a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a> of a device unit.
1173 (A device unit might be a pixel for screen display, or
1174 a point on a printer.) <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a> is currently 1024, and
1175 may change in the future (unlikely though), but you should not
1176 depend on its exact value. The <a class="link" href="pango-Glyph-Storage.html#PANGO-PIXELS--CAPS" title="PANGO_PIXELS()"><code class="function">PANGO_PIXELS()</code></a> macro can be used
1177 to convert from glyph units into device units with correct rounding.
1178 </p>
1179 </div>
1180 <hr>
1181 <div class="refsect2" lang="en">
1182 <a name="PangoGlyphVisAttr"></a><h3>PangoGlyphVisAttr</h3>
1183 <pre class="programlisting">typedef struct {
1184   guint is_cluster_start : 1;
1185 } PangoGlyphVisAttr;
1186 </pre>
1187 <p>
1188 The PangoGlyphVisAttr is used to communicate information between
1189 the shaping phase and the rendering phase.  More attributes may be
1190 added in the future.
1191 </p>
1192 <div class="variablelist"><table border="0">
1193 <col align="left" valign="top">
1194 <tbody><tr>
1195 <td><p><span class="term"><a
1196 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
1197 >guint</a> <em class="structfield"><code>is_cluster_start</code></em> : 1;</span></p></td>
1198 <td>set for the first logical glyph in each cluster. (Clusters
1199                    are stored in visual order, within the cluster, glyphs
1200                    are always ordered in logical order, since visual
1201                    order is meaningless; that is, in Arabic text, accent glyphs
1202                    follow the glyphs for the base character.)
1203 </td>
1204 </tr></tbody>
1205 </table></div>
1206 </div>
1207 <hr>
1208 <div class="refsect2" lang="en">
1209 <a name="PangoGlyphString"></a><h3>PangoGlyphString</h3>
1210 <pre class="programlisting">typedef struct {
1211   gint num_glyphs;
1212
1213   PangoGlyphInfo *glyphs;
1214
1215   /* This is a memory inefficient way of representing the information
1216    * here - each value gives the byte index within the text
1217    * corresponding to the glyph string of the start of the cluster to
1218    * which the glyph belongs.
1219    */
1220   gint *log_clusters;
1221 } PangoGlyphString;
1222 </pre>
1223 <p>
1224 The <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a> structure is used to store strings
1225 of glyphs with geometry and visual attribute information.
1226 The storage for the glyph information is owned
1227 by the structure which simplifies memory management.
1228 </p>
1229 <div class="variablelist"><table border="0">
1230 <col align="left" valign="top">
1231 <tbody>
1232 <tr>
1233 <td><p><span class="term"><a
1234 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1235 >gint</a> <em class="structfield"><code>num_glyphs</code></em>;</span></p></td>
1236 <td>the number of glyphs in the string.
1237 </td>
1238 </tr>
1239 <tr>
1240 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphInfo" title="PangoGlyphInfo">PangoGlyphInfo</a> *<em class="structfield"><code>glyphs</code></em>;</span></p></td>
1241 <td>an array of <a class="link" href="pango-Glyph-Storage.html#PangoGlyphInfo" title="PangoGlyphInfo"><span class="type">PangoGlyphInfo</span></a> structures of length <em class="structfield"><code>num_glyphs</code></em>.
1242 </td>
1243 </tr>
1244 <tr>
1245 <td><p><span class="term"><a
1246 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1247 >gint</a> *<em class="structfield"><code>log_clusters</code></em>;</span></p></td>
1248 <td>for each glyph, byte index of the starting character for the
1249 cluster. The indices are relative to the start of the text
1250 corresponding to the PangoGlyphString.
1251 </td>
1252 </tr>
1253 </tbody>
1254 </table></div>
1255 </div>
1256 <hr>
1257 <div class="refsect2" lang="en">
1258 <a name="PangoGlyphItem"></a><h3>PangoGlyphItem</h3>
1259 <pre class="programlisting">typedef struct {
1260   PangoItem        *item;
1261   PangoGlyphString *glyphs;
1262 } PangoGlyphItem;
1263 </pre>
1264 <p>
1265 A <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a> is a pair of a <a class="link" href="pango-Text-Processing.html#PangoItem" title="PangoItem"><span class="type">PangoItem</span></a> and the glyphs
1266 resulting from shaping the text corresponding to an item.
1267 As an example of the usage of <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>, the results
1268 of shaping text with <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> is a list of <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine"><span class="type">PangoLayoutLine</span></a>,
1269 each of which contains a list of <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>.
1270 </p>
1271 <div class="variablelist"><table border="0">
1272 <col align="left" valign="top">
1273 <tbody>
1274 <tr>
1275 <td><p><span class="term"><a class="link" href="pango-Text-Processing.html#PangoItem" title="PangoItem">PangoItem</a> *<em class="structfield"><code>item</code></em>;</span></p></td>
1276 <td>a <a class="link" href="pango-Text-Processing.html#PangoItem" title="PangoItem"><span class="type">PangoItem</span></a> structure that provides information
1277        about a segment of text.
1278 </td>
1279 </tr>
1280 <tr>
1281 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *<em class="structfield"><code>glyphs</code></em>;</span></p></td>
1282 <td>the glyphs obtained by shaping the text
1283          corresponding to <em class="parameter"><code>item</code></em>.
1284 </td>
1285 </tr>
1286 </tbody>
1287 </table></div>
1288 </div>
1289 <hr>
1290 <div class="refsect2" lang="en">
1291 <a name="PangoGlyphItemIter"></a><h3>PangoGlyphItemIter</h3>
1292 <pre class="programlisting">typedef struct {
1293   PangoGlyphItem *glyph_item;
1294   const gchar *text;
1295
1296   int start_glyph;
1297   int start_index;
1298   int start_char;
1299
1300   int end_glyph;
1301   int end_index;
1302   int end_char;
1303 } PangoGlyphItemIter;
1304 </pre>
1305 <p>
1306 A <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> is an iterator over the clusters in a
1307 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>.  The <em class="firstterm">forward direction</em> of the
1308 iterator is the logical direction of text.  That is, with increasing
1309 <em class="parameter"><code>start_index</code></em> and <em class="parameter"><code>start_char</code></em> values.  If <em class="parameter"><code>glyph_item</code></em> is right-to-left
1310 (that is, if <code class="literal"><em class="parameter"><code>glyph_item-&gt;item-&gt;analysis.level</code></em></code> is odd),
1311 then <em class="parameter"><code>start_glyph</code></em> decreases as the iterator moves forward.  Moreover,
1312 in right-to-left cases, <em class="parameter"><code>start_glyph</code></em> is greater than <em class="parameter"><code>end_glyph</code></em>.
1313 An iterator should be initialized using either of
1314 <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-init-start" title="pango_glyph_item_iter_init_start ()"><code class="function">pango_glyph_item_iter_init_start()</code></a> and
1315 <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-init-end" title="pango_glyph_item_iter_init_end ()"><code class="function">pango_glyph_item_iter_init_end()</code></a>, for forward and backward iteration
1316 respectively, and walked over using any desired mixture of
1317 <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-next-cluster" title="pango_glyph_item_iter_next_cluster ()"><code class="function">pango_glyph_item_iter_next_cluster()</code></a> and
1318 <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-prev-cluster" title="pango_glyph_item_iter_prev_cluster ()"><code class="function">pango_glyph_item_iter_prev_cluster()</code></a>.  A common idiom for doing a
1319 forward iteration over the clusters is:
1320 </p>
1321 <pre class="programlisting">
1322 PangoGlyphItemIter cluster_iter;
1323 gboolean have_cluster;
1324 for (have_cluster = pango_glyph_item_iter_init_start (&amp;cluster_iter,
1325                                                       glyph_item, text);
1326      have_cluster;
1327      have_cluster = pango_glyph_item_iter_next_cluster (&amp;cluster_iter))
1328 {
1329   ...
1330 }
1331 </pre>
1332 <p>
1333 Note that <em class="parameter"><code>text</code></em> is the start of the text for layout, which is then
1334 indexed by <code class="literal"><em class="parameter"><code>glyph_item-&gt;item-&gt;offset</code></em></code> to get to the
1335 text of <em class="parameter"><code>glyph_item</code></em>.  The <em class="parameter"><code>start_index</code></em> and <em class="parameter"><code>end_index</code></em> values can directly
1336 index into <em class="parameter"><code>text</code></em>.  The <em class="parameter"><code>start_glyph</code></em>, <em class="parameter"><code>end_glyph</code></em>, <em class="parameter"><code>start_char</code></em>, and <em class="parameter"><code>end_char</code></em>
1337 values however are zero-based for the <em class="parameter"><code>glyph_item</code></em>.  For each cluster, the
1338 item pointed at by the start variables is included in the cluster while
1339 the one pointed at by end variables is not.
1340 None of the members of a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> should be modified manually.
1341 </p>
1342 <div class="variablelist"><table border="0">
1343 <col align="left" valign="top">
1344 <tbody>
1345 <tr>
1346 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *<em class="structfield"><code>glyph_item</code></em>;</span></p></td>
1347 <td>the <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a> this iterator iterates over
1348 </td>
1349 </tr>
1350 <tr>
1351 <td><p><span class="term">const <a
1352 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
1353 >gchar</a> *<em class="structfield"><code>text</code></em>;</span></p></td>
1354 <td>the UTF-8 text that <em class="parameter"><code>glyph_item</code></em> refers to
1355 </td>
1356 </tr>
1357 <tr>
1358 <td><p><span class="term">int <em class="structfield"><code>start_glyph</code></em>;</span></p></td>
1359 <td>starting glyph of the cluster
1360 </td>
1361 </tr>
1362 <tr>
1363 <td><p><span class="term">int <em class="structfield"><code>start_index</code></em>;</span></p></td>
1364 <td>starting text index of the cluster
1365 </td>
1366 </tr>
1367 <tr>
1368 <td><p><span class="term">int <em class="structfield"><code>start_char</code></em>;</span></p></td>
1369 <td>starting number of characters of the cluster
1370 </td>
1371 </tr>
1372 <tr>
1373 <td><p><span class="term">int <em class="structfield"><code>end_glyph</code></em>;</span></p></td>
1374 <td>ending glyph of the cluster
1375 </td>
1376 </tr>
1377 <tr>
1378 <td><p><span class="term">int <em class="structfield"><code>end_index</code></em>;</span></p></td>
1379 <td>ending text index of the cluster
1380 </td>
1381 </tr>
1382 <tr>
1383 <td><p><span class="term">int <em class="structfield"><code>end_char</code></em>;</span></p></td>
1384 <td>ending number of characters of the cluster
1385 </td>
1386 </tr>
1387 </tbody>
1388 </table></div>
1389 <p class="since">Since 1.22</p>
1390 </div>
1391 <hr>
1392 <div class="refsect2" lang="en">
1393 <a name="PANGO-TYPE-GLYPH-STRING--CAPS"></a><h3>PANGO_TYPE_GLYPH_STRING</h3>
1394 <pre class="programlisting">#define PANGO_TYPE_GLYPH_STRING (pango_glyph_string_get_type ())
1395 </pre>
1396 <p>
1397 The <a
1398 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
1399 ><span class="type">GObject</span></a> type for <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>.
1400 </p>
1401 </div>
1402 <hr>
1403 <div class="refsect2" lang="en">
1404 <a name="pango-glyph-string-new"></a><h3>pango_glyph_string_new ()</h3>
1405 <pre class="programlisting"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *  pango_glyph_string_new              (void);</pre>
1406 <p>
1407 Create a new <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>.</p>
1408 <p>
1409 </p>
1410 <div class="variablelist"><table border="0">
1411 <col align="left" valign="top">
1412 <tbody><tr>
1413 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1414 <td> the newly allocated <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>, which
1415               should be freed with <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-free" title="pango_glyph_string_free ()"><code class="function">pango_glyph_string_free()</code></a>.
1416 </td>
1417 </tr></tbody>
1418 </table></div>
1419 </div>
1420 <hr>
1421 <div class="refsect2" lang="en">
1422 <a name="pango-glyph-string-copy"></a><h3>pango_glyph_string_copy ()</h3>
1423 <pre class="programlisting"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *  pango_glyph_string_copy             (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *string);</pre>
1424 <p>
1425 Copy a glyph string and associated storage.</p>
1426 <p>
1427 </p>
1428 <div class="variablelist"><table border="0">
1429 <col align="left" valign="top">
1430 <tbody>
1431 <tr>
1432 <td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1433 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>, may be <a
1434 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1435 ><code class="literal">NULL</code></a>
1436 </td>
1437 </tr>
1438 <tr>
1439 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1440 <td> the newly allocated <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>, which
1441               should be freed with <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-free" title="pango_glyph_string_free ()"><code class="function">pango_glyph_string_free()</code></a>,
1442               or <a
1443 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1444 ><code class="literal">NULL</code></a> if <em class="parameter"><code>string</code></em> was <a
1445 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1446 ><code class="literal">NULL</code></a>.
1447 </td>
1448 </tr>
1449 </tbody>
1450 </table></div>
1451 </div>
1452 <hr>
1453 <div class="refsect2" lang="en">
1454 <a name="pango-glyph-string-set-size"></a><h3>pango_glyph_string_set_size ()</h3>
1455 <pre class="programlisting">void                pango_glyph_string_set_size         (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *string,
1456                                                          <a
1457 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1458 >gint</a> new_len);</pre>
1459 <p>
1460 Resize a glyph string to the given length.</p>
1461 <p>
1462 </p>
1463 <div class="variablelist"><table border="0">
1464 <col align="left" valign="top">
1465 <tbody>
1466 <tr>
1467 <td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1468 <td>    a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>.
1469 </td>
1470 </tr>
1471 <tr>
1472 <td><p><span class="term"><em class="parameter"><code>new_len</code></em> :</span></p></td>
1473 <td>   the new length of the string.
1474 </td>
1475 </tr>
1476 </tbody>
1477 </table></div>
1478 </div>
1479 <hr>
1480 <div class="refsect2" lang="en">
1481 <a name="pango-glyph-string-free"></a><h3>pango_glyph_string_free ()</h3>
1482 <pre class="programlisting">void                pango_glyph_string_free             (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *string);</pre>
1483 <p>
1484 Free a glyph string and associated storage.</p>
1485 <p>
1486 </p>
1487 <div class="variablelist"><table border="0">
1488 <col align="left" valign="top">
1489 <tbody><tr>
1490 <td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
1491 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>, may be <a
1492 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1493 ><code class="literal">NULL</code></a>
1494 </td>
1495 </tr></tbody>
1496 </table></div>
1497 </div>
1498 <hr>
1499 <div class="refsect2" lang="en">
1500 <a name="pango-glyph-string-extents"></a><h3>pango_glyph_string_extents ()</h3>
1501 <pre class="programlisting">void                pango_glyph_string_extents          (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
1502                                                          <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
1503                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *ink_rect,
1504                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *logical_rect);</pre>
1505 <p>
1506 Compute the logical and ink extents of a glyph string. See the documentation
1507 for <a class="link" href="pango-Fonts.html#pango-font-get-glyph-extents" title="pango_font_get_glyph_extents ()"><code class="function">pango_font_get_glyph_extents()</code></a> for details about the interpretation
1508 of the rectangles.</p>
1509 <p>
1510 </p>
1511 <div class="variablelist"><table border="0">
1512 <col align="left" valign="top">
1513 <tbody>
1514 <tr>
1515 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
1516 <td>   a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>
1517 </td>
1518 </tr>
1519 <tr>
1520 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
1521 <td>     a <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>
1522 </td>
1523 </tr>
1524 <tr>
1525 <td><p><span class="term"><em class="parameter"><code>ink_rect</code></em> :</span></p></td>
1526 <td> rectangle used to store the extents of the glyph string as drawn
1527            or <a
1528 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1529 ><code class="literal">NULL</code></a> to indicate that the result is not needed.
1530 </td>
1531 </tr>
1532 <tr>
1533 <td><p><span class="term"><em class="parameter"><code>logical_rect</code></em> :</span></p></td>
1534 <td> rectangle used to store the logical extents of the glyph string
1535            or <a
1536 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1537 ><code class="literal">NULL</code></a> to indicate that the result is not needed.
1538 </td>
1539 </tr>
1540 </tbody>
1541 </table></div>
1542 </div>
1543 <hr>
1544 <div class="refsect2" lang="en">
1545 <a name="pango-glyph-string-extents-range"></a><h3>pango_glyph_string_extents_range ()</h3>
1546 <pre class="programlisting">void                pango_glyph_string_extents_range    (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
1547                                                          int start,
1548                                                          int end,
1549                                                          <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
1550                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *ink_rect,
1551                                                          <a class="link" href="pango-Glyph-Storage.html#PangoRectangle" title="PangoRectangle">PangoRectangle</a> *logical_rect);</pre>
1552 <p>
1553 Computes the extents of a sub-portion of a glyph string. The extents are
1554 relative to the start of the glyph string range (the origin of their
1555 coordinate system is at the start of the range, not at the start of the entire
1556 glyph string).</p>
1557 <p>
1558 </p>
1559 <div class="variablelist"><table border="0">
1560 <col align="left" valign="top">
1561 <tbody>
1562 <tr>
1563 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
1564 <td>   a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>
1565 </td>
1566 </tr>
1567 <tr>
1568 <td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
1569 <td>    start index
1570 </td>
1571 </tr>
1572 <tr>
1573 <td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
1574 <td>      end index (the range is the set of bytes with
1575               indices such that start &lt;= index &lt; end)
1576 </td>
1577 </tr>
1578 <tr>
1579 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
1580 <td>     a <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>
1581 </td>
1582 </tr>
1583 <tr>
1584 <td><p><span class="term"><em class="parameter"><code>ink_rect</code></em> :</span></p></td>
1585 <td> rectangle used to store the extents of the glyph string range as drawn
1586            or <a
1587 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1588 ><code class="literal">NULL</code></a> to indicate that the result is not needed.
1589 </td>
1590 </tr>
1591 <tr>
1592 <td><p><span class="term"><em class="parameter"><code>logical_rect</code></em> :</span></p></td>
1593 <td> rectangle used to store the logical extents of the glyph string range
1594            or <a
1595 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1596 ><code class="literal">NULL</code></a> to indicate that the result is not needed.
1597 </td>
1598 </tr>
1599 </tbody>
1600 </table></div>
1601 </div>
1602 <hr>
1603 <div class="refsect2" lang="en">
1604 <a name="pango-glyph-string-get-width"></a><h3>pango_glyph_string_get_width ()</h3>
1605 <pre class="programlisting">int                 pango_glyph_string_get_width        (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs);</pre>
1606 <p>
1607 Computes the logical width of the glyph string as can also be computed
1608 using <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-extents" title="pango_glyph_string_extents ()"><code class="function">pango_glyph_string_extents()</code></a>.  However, since this only computes the
1609 width, it's much faster.  This is in fact only a convenience function that
1610 computes the sum of geometry.width for each glyph in the <em class="parameter"><code>glyphs</code></em>.</p>
1611 <p>
1612 </p>
1613 <div class="variablelist"><table border="0">
1614 <col align="left" valign="top">
1615 <tbody>
1616 <tr>
1617 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
1618 <td>   a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>
1619 </td>
1620 </tr>
1621 <tr>
1622 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1623 <td> the logical width of the glyph string.
1624
1625 </td>
1626 </tr>
1627 </tbody>
1628 </table></div>
1629 <p class="since">Since 1.14</p>
1630 </div>
1631 <hr>
1632 <div class="refsect2" lang="en">
1633 <a name="pango-glyph-string-index-to-x"></a><h3>pango_glyph_string_index_to_x ()</h3>
1634 <pre class="programlisting">void                pango_glyph_string_index_to_x       (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
1635                                                          char *text,
1636                                                          int length,
1637                                                          <a class="link" href="pango-Text-Processing.html#PangoAnalysis" title="PangoAnalysis">PangoAnalysis</a> *analysis,
1638                                                          int index_,
1639                                                          <a
1640 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
1641 >gboolean</a> trailing,
1642                                                          int *x_pos);</pre>
1643 <p>
1644 Converts from character position to x position. (X position
1645 is measured from the left edge of the run). Character positions
1646 are computed by dividing up each cluster into equal portions.</p>
1647 <p>
1648 </p>
1649 <div class="variablelist"><table border="0">
1650 <col align="left" valign="top">
1651 <tbody>
1652 <tr>
1653 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
1654 <td>    the glyphs return from <a class="link" href="pango-Text-Processing.html#pango-shape" title="pango_shape ()"><code class="function">pango_shape()</code></a>
1655 </td>
1656 </tr>
1657 <tr>
1658 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
1659 <td>      the text for the run
1660 </td>
1661 </tr>
1662 <tr>
1663 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1664 <td>    the number of bytes (not characters) in <em class="parameter"><code>text</code></em>.
1665 </td>
1666 </tr>
1667 <tr>
1668 <td><p><span class="term"><em class="parameter"><code>analysis</code></em> :</span></p></td>
1669 <td>  the analysis information return from <a class="link" href="pango-Text-Processing.html#pango-itemize" title="pango_itemize ()"><code class="function">pango_itemize()</code></a>
1670 </td>
1671 </tr>
1672 <tr>
1673 <td><p><span class="term"><em class="parameter"><code>index_</code></em> :</span></p></td>
1674 <td>    the byte index within <em class="parameter"><code>text</code></em>
1675 </td>
1676 </tr>
1677 <tr>
1678 <td><p><span class="term"><em class="parameter"><code>trailing</code></em> :</span></p></td>
1679 <td>  whether we should compute the result for the beginning (<a
1680 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1681 ><code class="literal">FALSE</code></a>)
1682             or end (<a
1683 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
1684 ><code class="literal">TRUE</code></a>) of the character.
1685 </td>
1686 </tr>
1687 <tr>
1688 <td><p><span class="term"><em class="parameter"><code>x_pos</code></em> :</span></p></td>
1689 <td>     location to store result
1690 </td>
1691 </tr>
1692 </tbody>
1693 </table></div>
1694 </div>
1695 <hr>
1696 <div class="refsect2" lang="en">
1697 <a name="pango-glyph-string-x-to-index"></a><h3>pango_glyph_string_x_to_index ()</h3>
1698 <pre class="programlisting">void                pango_glyph_string_x_to_index       (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
1699                                                          char *text,
1700                                                          int length,
1701                                                          <a class="link" href="pango-Text-Processing.html#PangoAnalysis" title="PangoAnalysis">PangoAnalysis</a> *analysis,
1702                                                          int x_pos,
1703                                                          int *index_,
1704                                                          int *trailing);</pre>
1705 <p>
1706 Convert from x offset to character position. Character positions
1707 are computed by dividing up each cluster into equal portions.
1708 In scripts where positioning within a cluster is not allowed
1709 (such as Thai), the returned value may not be a valid cursor
1710 position; the caller must combine the result with the logical
1711 attributes for the text to compute the valid cursor position.</p>
1712 <p>
1713 </p>
1714 <div class="variablelist"><table border="0">
1715 <col align="left" valign="top">
1716 <tbody>
1717 <tr>
1718 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
1719 <td>    the glyphs returned from <a class="link" href="pango-Text-Processing.html#pango-shape" title="pango_shape ()"><code class="function">pango_shape()</code></a>
1720 </td>
1721 </tr>
1722 <tr>
1723 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
1724 <td>      the text for the run
1725 </td>
1726 </tr>
1727 <tr>
1728 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1729 <td>    the number of bytes (not characters) in text.
1730 </td>
1731 </tr>
1732 <tr>
1733 <td><p><span class="term"><em class="parameter"><code>analysis</code></em> :</span></p></td>
1734 <td>  the analysis information return from <a class="link" href="pango-Text-Processing.html#pango-itemize" title="pango_itemize ()"><code class="function">pango_itemize()</code></a>
1735 </td>
1736 </tr>
1737 <tr>
1738 <td><p><span class="term"><em class="parameter"><code>x_pos</code></em> :</span></p></td>
1739 <td>     the x offset (in Pango units)
1740 </td>
1741 </tr>
1742 <tr>
1743 <td><p><span class="term"><em class="parameter"><code>index_</code></em> :</span></p></td>
1744 <td>    location to store calculated byte index within <em class="parameter"><code>text</code></em>
1745 </td>
1746 </tr>
1747 <tr>
1748 <td><p><span class="term"><em class="parameter"><code>trailing</code></em> :</span></p></td>
1749 <td>  location to store a boolean indicating
1750             whether the user clicked on the leading or trailing
1751             edge of the character.
1752 </td>
1753 </tr>
1754 </tbody>
1755 </table></div>
1756 </div>
1757 <hr>
1758 <div class="refsect2" lang="en">
1759 <a name="pango-glyph-string-get-logical-widths"></a><h3>pango_glyph_string_get_logical_widths ()</h3>
1760 <pre class="programlisting">void                pango_glyph_string_get_logical_widths
1761                                                         (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
1762                                                          const char *text,
1763                                                          int length,
1764                                                          int embedding_level,
1765                                                          int *logical_widths);</pre>
1766 <p>
1767 Given a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a> resulting from <a class="link" href="pango-Text-Processing.html#pango-shape" title="pango_shape ()"><code class="function">pango_shape()</code></a> and the corresponding
1768 text, determine the screen width corresponding to each character. When
1769 multiple characters compose a single cluster, the width of the entire
1770 cluster is divided equally among the characters.
1771 </p>
1772 <p>
1773 See also <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-get-logical-widths" title="pango_glyph_item_get_logical_widths ()"><code class="function">pango_glyph_item_get_logical_widths()</code></a>.</p>
1774 <p>
1775 </p>
1776 <div class="variablelist"><table border="0">
1777 <col align="left" valign="top">
1778 <tbody>
1779 <tr>
1780 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
1781 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>
1782 </td>
1783 </tr>
1784 <tr>
1785 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
1786 <td> the text corresponding to the glyphs
1787 </td>
1788 </tr>
1789 <tr>
1790 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1791 <td> the length of <em class="parameter"><code>text</code></em>, in bytes
1792 </td>
1793 </tr>
1794 <tr>
1795 <td><p><span class="term"><em class="parameter"><code>embedding_level</code></em> :</span></p></td>
1796 <td> the embedding level of the string
1797 </td>
1798 </tr>
1799 <tr>
1800 <td><p><span class="term"><em class="parameter"><code>logical_widths</code></em> :</span></p></td>
1801 <td> an array whose length is the number of characters in
1802                  text (equal to g_utf8_strlen (text, length) unless
1803                  text has NUL bytes)
1804                  to be filled in with the resulting character widths.
1805 </td>
1806 </tr>
1807 </tbody>
1808 </table></div>
1809 </div>
1810 <hr>
1811 <div class="refsect2" lang="en">
1812 <a name="PANGO-TYPE-GLYPH-ITEM--CAPS"></a><h3>PANGO_TYPE_GLYPH_ITEM</h3>
1813 <pre class="programlisting">#define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type ())
1814 </pre>
1815 <p>
1816 The <a
1817 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
1818 ><span class="type">GObject</span></a> type for <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>.
1819 </p>
1820 <p class="since">Since 1.20</p>
1821 </div>
1822 <hr>
1823 <div class="refsect2" lang="en">
1824 <a name="pango-glyph-item-copy"></a><h3>pango_glyph_item_copy ()</h3>
1825 <pre class="programlisting"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *    pango_glyph_item_copy               (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *orig);</pre>
1826 <p>
1827 Make a deep copy of an existing <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a> structure.</p>
1828 <p>
1829 </p>
1830 <div class="variablelist"><table border="0">
1831 <col align="left" valign="top">
1832 <tbody>
1833 <tr>
1834 <td><p><span class="term"><em class="parameter"><code>orig</code></em> :</span></p></td>
1835 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>, may be <a
1836 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1837 ><code class="literal">NULL</code></a>
1838 </td>
1839 </tr>
1840 <tr>
1841 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1842 <td> the newly allocated <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>, which should
1843               be freed with <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-free" title="pango_glyph_item_free ()"><code class="function">pango_glyph_item_free()</code></a>, or <a
1844 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1845 ><code class="literal">NULL</code></a>
1846               if <em class="parameter"><code>orig</code></em> was <a
1847 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1848 ><code class="literal">NULL</code></a>.
1849
1850 </td>
1851 </tr>
1852 </tbody>
1853 </table></div>
1854 <p class="since">Since 1.20</p>
1855 </div>
1856 <hr>
1857 <div class="refsect2" lang="en">
1858 <a name="pango-glyph-item-free"></a><h3>pango_glyph_item_free ()</h3>
1859 <pre class="programlisting">void                pango_glyph_item_free               (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item);</pre>
1860 <p>
1861 Frees a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a> and resources to which it points.</p>
1862 <p>
1863 </p>
1864 <div class="variablelist"><table border="0">
1865 <col align="left" valign="top">
1866 <tbody><tr>
1867 <td><p><span class="term"><em class="parameter"><code>glyph_item</code></em> :</span></p></td>
1868 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>, may be <a
1869 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1870 ><code class="literal">NULL</code></a>
1871 </td>
1872 </tr></tbody>
1873 </table></div>
1874 <p class="since">Since 1.6</p>
1875 </div>
1876 <hr>
1877 <div class="refsect2" lang="en">
1878 <a name="pango-glyph-item-split"></a><h3>pango_glyph_item_split ()</h3>
1879 <pre class="programlisting"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *    pango_glyph_item_split              (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *orig,
1880                                                          const char *text,
1881                                                          int split_index);</pre>
1882 <p>
1883 Modifies <em class="parameter"><code>orig</code></em> to cover only the text after <em class="parameter"><code>split_index</code></em>, and
1884 returns a new item that covers the text before <em class="parameter"><code>split_index</code></em> that
1885 used to be in <em class="parameter"><code>orig</code></em>. You can think of <em class="parameter"><code>split_index</code></em> as the length of
1886 the returned item. <em class="parameter"><code>split_index</code></em> may not be 0, and it may not be
1887 greater than or equal to the length of <em class="parameter"><code>orig</code></em> (that is, there must
1888 be at least one byte assigned to each item, you can't create a
1889 zero-length item).
1890 </p>
1891 <p>
1892 This function is similar in function to <a class="link" href="pango-Text-Processing.html#pango-item-split" title="pango_item_split ()"><code class="function">pango_item_split()</code></a> (and uses
1893 it internally.)</p>
1894 <p>
1895 </p>
1896 <div class="variablelist"><table border="0">
1897 <col align="left" valign="top">
1898 <tbody>
1899 <tr>
1900 <td><p><span class="term"><em class="parameter"><code>orig</code></em> :</span></p></td>
1901 <td> a <a class="link" href="pango-Text-Processing.html#PangoItem" title="PangoItem"><span class="type">PangoItem</span></a>
1902 </td>
1903 </tr>
1904 <tr>
1905 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
1906 <td> text to which positions in <em class="parameter"><code>orig</code></em> apply
1907 </td>
1908 </tr>
1909 <tr>
1910 <td><p><span class="term"><em class="parameter"><code>split_index</code></em> :</span></p></td>
1911 <td> byte index of position to split item, relative to the start of the item
1912 </td>
1913 </tr>
1914 <tr>
1915 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1916 <td> the newly allocated item representing text before
1917               <em class="parameter"><code>split_index</code></em>, which should be freed
1918               with <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-free" title="pango_glyph_item_free ()"><code class="function">pango_glyph_item_free()</code></a>.
1919
1920 </td>
1921 </tr>
1922 </tbody>
1923 </table></div>
1924 <p class="since">Since 1.2</p>
1925 </div>
1926 <hr>
1927 <div class="refsect2" lang="en">
1928 <a name="pango-glyph-item-apply-attrs"></a><h3>pango_glyph_item_apply_attrs ()</h3>
1929 <pre class="programlisting"><a
1930 href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"
1931 >GSList</a> *            pango_glyph_item_apply_attrs        (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
1932                                                          const char *text,
1933                                                          <a class="link" href="pango-Text-Attributes.html#PangoAttrList" title="PangoAttrList">PangoAttrList</a> *list);</pre>
1934 <p>
1935 Splits a shaped item (PangoGlyphItem) into multiple items based
1936 on an attribute list. The idea is that if you have attributes
1937 that don't affect shaping, such as color or underline, to avoid
1938 affecting shaping, you filter them out (<a class="link" href="pango-Text-Attributes.html#pango-attr-list-filter" title="pango_attr_list_filter ()"><code class="function">pango_attr_list_filter()</code></a>),
1939 apply the shaping process and then reapply them to the result using
1940 this function.
1941 </p>
1942 <p>
1943 All attributes that start or end inside a cluster are applied
1944 to that cluster; for instance, if half of a cluster is underlined
1945 and the other-half strikethrough, then the cluster will end
1946 up with both underline and strikethrough attributes. In these
1947 cases, it may happen that item-&gt;extra_attrs for some of the
1948 result items can have multiple attributes of the same type.
1949 </p>
1950 <p>
1951 This function takes ownership of <em class="parameter"><code>glyph_item</code></em>; it will be reused
1952 as one of the elements in the list.</p>
1953 <p>
1954 </p>
1955 <div class="variablelist"><table border="0">
1956 <col align="left" valign="top">
1957 <tbody>
1958 <tr>
1959 <td><p><span class="term"><em class="parameter"><code>glyph_item</code></em> :</span></p></td>
1960 <td> a shaped item
1961 </td>
1962 </tr>
1963 <tr>
1964 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
1965 <td> text that <em class="parameter"><code>list</code></em> applies to
1966 </td>
1967 </tr>
1968 <tr>
1969 <td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
1970 <td> a <a class="link" href="pango-Text-Attributes.html#PangoAttrList" title="PangoAttrList"><span class="type">PangoAttrList</span></a>
1971 </td>
1972 </tr>
1973 <tr>
1974 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1975 <td> a list of glyph items resulting from splitting
1976   <em class="parameter"><code>glyph_item</code></em>. Free the elements using <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-free" title="pango_glyph_item_free ()"><code class="function">pango_glyph_item_free()</code></a>,
1977   the list using <a
1978 href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#g-slist-free"
1979 ><code class="function">g_slist_free()</code></a>.
1980
1981 </td>
1982 </tr>
1983 </tbody>
1984 </table></div>
1985 <p class="since">Since 1.2</p>
1986 </div>
1987 <hr>
1988 <div class="refsect2" lang="en">
1989 <a name="pango-glyph-item-letter-space"></a><h3>pango_glyph_item_letter_space ()</h3>
1990 <pre class="programlisting">void                pango_glyph_item_letter_space       (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
1991                                                          const char *text,
1992                                                          <a class="link" href="pango-Text-Processing.html#PangoLogAttr" title="PangoLogAttr">PangoLogAttr</a> *log_attrs,
1993                                                          int letter_spacing);</pre>
1994 <p>
1995 Adds spacing between the graphemes of <em class="parameter"><code>glyph_item</code></em> to
1996 give the effect of typographic letter spacing.</p>
1997 <p>
1998 </p>
1999 <div class="variablelist"><table border="0">
2000 <col align="left" valign="top">
2001 <tbody>
2002 <tr>
2003 <td><p><span class="term"><em class="parameter"><code>glyph_item</code></em> :</span></p></td>
2004 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>
2005 </td>
2006 </tr>
2007 <tr>
2008 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
2009 <td> text that <em class="parameter"><code>glyph_item</code></em> corresponds to
2010   (glyph_item-&gt;item-&gt;offset is an offset from the
2011    start of <em class="parameter"><code>text</code></em>)
2012 </td>
2013 </tr>
2014 <tr>
2015 <td><p><span class="term"><em class="parameter"><code>log_attrs</code></em> :</span></p></td>
2016 <td> logical attributes for the item (the
2017   first logical attribute refers to the position
2018   before the first character in the item)
2019 </td>
2020 </tr>
2021 <tr>
2022 <td><p><span class="term"><em class="parameter"><code>letter_spacing</code></em> :</span></p></td>
2023 <td> amount of letter spacing to add
2024   in Pango units. May be negative, though too large
2025   negative values will give ugly results.
2026 </td>
2027 </tr>
2028 </tbody>
2029 </table></div>
2030 <p class="since">Since 1.6</p>
2031 </div>
2032 <hr>
2033 <div class="refsect2" lang="en">
2034 <a name="pango-glyph-item-get-logical-widths"></a><h3>pango_glyph_item_get_logical_widths ()</h3>
2035 <pre class="programlisting">void                pango_glyph_item_get_logical_widths (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
2036                                                          const char *text,
2037                                                          int *logical_widths);</pre>
2038 <p>
2039 Given a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a> and the corresponding
2040 text, determine the screen width corresponding to each character. When
2041 multiple characters compose a single cluster, the width of the entire
2042 cluster is divided equally among the characters.
2043 </p>
2044 <p>
2045 See also <a class="link" href="pango-Glyph-Storage.html#pango-glyph-string-get-logical-widths" title="pango_glyph_string_get_logical_widths ()"><code class="function">pango_glyph_string_get_logical_widths()</code></a>.</p>
2046 <p>
2047 </p>
2048 <div class="variablelist"><table border="0">
2049 <col align="left" valign="top">
2050 <tbody>
2051 <tr>
2052 <td><p><span class="term"><em class="parameter"><code>glyph_item</code></em> :</span></p></td>
2053 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>
2054 </td>
2055 </tr>
2056 <tr>
2057 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
2058 <td> text that <em class="parameter"><code>glyph_item</code></em> corresponds to
2059   (glyph_item-&gt;item-&gt;offset is an offset from the
2060    start of <em class="parameter"><code>text</code></em>)
2061 </td>
2062 </tr>
2063 <tr>
2064 <td><p><span class="term"><em class="parameter"><code>logical_widths</code></em> :</span></p></td>
2065 <td> an array whose length is the number of characters in
2066                  glyph_item (equal to glyph_item-&gt;item-&gt;num_chars)
2067                  to be filled in with the resulting character widths.
2068 </td>
2069 </tr>
2070 </tbody>
2071 </table></div>
2072 <p class="since">Since 1.26</p>
2073 </div>
2074 <hr>
2075 <div class="refsect2" lang="en">
2076 <a name="PANGO-TYPE-GLYPH-ITEM-ITER--CAPS"></a><h3>PANGO_TYPE_GLYPH_ITEM_ITER</h3>
2077 <pre class="programlisting">#define PANGO_TYPE_GLYPH_ITEM_ITER (pango_glyph_item_iter_get_type ())
2078 </pre>
2079 <p>
2080 The <a
2081 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
2082 ><span class="type">GObject</span></a> type for <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>.
2083 </p>
2084 <p class="since">Since 1.22</p>
2085 </div>
2086 <hr>
2087 <div class="refsect2" lang="en">
2088 <a name="pango-glyph-item-iter-copy"></a><h3>pango_glyph_item_iter_copy ()</h3>
2089 <pre class="programlisting"><a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> * pango_glyph_item_iter_copy         (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *orig);</pre>
2090 <p>
2091 Make a shallow copy of an existing <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> structure.</p>
2092 <p>
2093 </p>
2094 <div class="variablelist"><table border="0">
2095 <col align="left" valign="top">
2096 <tbody>
2097 <tr>
2098 <td><p><span class="term"><em class="parameter"><code>orig</code></em> :</span></p></td>
2099 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>, may be <a
2100 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
2101 ><code class="literal">NULL</code></a>
2102 </td>
2103 </tr>
2104 <tr>
2105 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2106 <td> the newly allocated <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>, which should
2107               be freed with <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-free" title="pango_glyph_item_iter_free ()"><code class="function">pango_glyph_item_iter_free()</code></a>, or <a
2108 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
2109 ><code class="literal">NULL</code></a>
2110               if <em class="parameter"><code>orig</code></em> was <a
2111 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
2112 ><code class="literal">NULL</code></a>.
2113
2114 </td>
2115 </tr>
2116 </tbody>
2117 </table></div>
2118 <p class="since">Since 1.22</p>
2119 </div>
2120 <hr>
2121 <div class="refsect2" lang="en">
2122 <a name="pango-glyph-item-iter-free"></a><h3>pango_glyph_item_iter_free ()</h3>
2123 <pre class="programlisting">void                pango_glyph_item_iter_free          (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter);</pre>
2124 <p>
2125 Frees a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> created by <a class="link" href="pango-Glyph-Storage.html#pango-glyph-item-iter-copy" title="pango_glyph_item_iter_copy ()"><code class="function">pango_glyph_item_iter_copy()</code></a>.</p>
2126 <p>
2127 </p>
2128 <div class="variablelist"><table border="0">
2129 <col align="left" valign="top">
2130 <tbody><tr>
2131 <td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
2132 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>, may be <a
2133 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
2134 ><code class="literal">NULL</code></a>
2135 </td>
2136 </tr></tbody>
2137 </table></div>
2138 <p class="since">Since 1.22</p>
2139 </div>
2140 <hr>
2141 <div class="refsect2" lang="en">
2142 <a name="pango-glyph-item-iter-init-start"></a><h3>pango_glyph_item_iter_init_start ()</h3>
2143 <pre class="programlisting"><a
2144 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
2145 >gboolean</a>            pango_glyph_item_iter_init_start    (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter,
2146                                                          <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
2147                                                          const char *text);</pre>
2148 <p>
2149 Initializes a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> structure to point to the
2150 first cluster in a glyph item.
2151 See <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> for details of cluster orders.</p>
2152 <p>
2153 </p>
2154 <div class="variablelist"><table border="0">
2155 <col align="left" valign="top">
2156 <tbody>
2157 <tr>
2158 <td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
2159 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>
2160 </td>
2161 </tr>
2162 <tr>
2163 <td><p><span class="term"><em class="parameter"><code>glyph_item</code></em> :</span></p></td>
2164 <td> the glyph item to iterate over
2165 </td>
2166 </tr>
2167 <tr>
2168 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
2169 <td> text corresponding to the glyph item
2170 </td>
2171 </tr>
2172 <tr>
2173 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2174 <td> <a
2175 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
2176 ><code class="literal">FALSE</code></a> if there are no clusters in the glyph item
2177
2178 </td>
2179 </tr>
2180 </tbody>
2181 </table></div>
2182 <p class="since">Since 1.22</p>
2183 </div>
2184 <hr>
2185 <div class="refsect2" lang="en">
2186 <a name="pango-glyph-item-iter-init-end"></a><h3>pango_glyph_item_iter_init_end ()</h3>
2187 <pre class="programlisting"><a
2188 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
2189 >gboolean</a>            pango_glyph_item_iter_init_end      (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter,
2190                                                          <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
2191                                                          const char *text);</pre>
2192 <p>
2193 Initializes a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> structure to point to the
2194 last cluster in a glyph item.
2195 See <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> for details of cluster orders.</p>
2196 <p>
2197 </p>
2198 <div class="variablelist"><table border="0">
2199 <col align="left" valign="top">
2200 <tbody>
2201 <tr>
2202 <td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
2203 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>
2204 </td>
2205 </tr>
2206 <tr>
2207 <td><p><span class="term"><em class="parameter"><code>glyph_item</code></em> :</span></p></td>
2208 <td> the glyph item to iterate over
2209 </td>
2210 </tr>
2211 <tr>
2212 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
2213 <td> text corresponding to the glyph item
2214 </td>
2215 </tr>
2216 <tr>
2217 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2218 <td> <a
2219 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
2220 ><code class="literal">FALSE</code></a> if there are no clusters in the glyph item
2221
2222 </td>
2223 </tr>
2224 </tbody>
2225 </table></div>
2226 <p class="since">Since 1.22</p>
2227 </div>
2228 <hr>
2229 <div class="refsect2" lang="en">
2230 <a name="pango-glyph-item-iter-next-cluster"></a><h3>pango_glyph_item_iter_next_cluster ()</h3>
2231 <pre class="programlisting"><a
2232 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
2233 >gboolean</a>            pango_glyph_item_iter_next_cluster  (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter);</pre>
2234 <p>
2235 Advances the iterator to the next cluster in the glyph item.
2236 See <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> for details of cluster orders.</p>
2237 <p>
2238 </p>
2239 <div class="variablelist"><table border="0">
2240 <col align="left" valign="top">
2241 <tbody>
2242 <tr>
2243 <td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
2244 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>
2245 </td>
2246 </tr>
2247 <tr>
2248 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2249 <td> <a
2250 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
2251 ><code class="literal">TRUE</code></a> if the iterator was advanced, <a
2252 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
2253 ><code class="literal">FALSE</code></a> if we were already on the
2254  last cluster.
2255
2256 </td>
2257 </tr>
2258 </tbody>
2259 </table></div>
2260 <p class="since">Since 1.22</p>
2261 </div>
2262 <hr>
2263 <div class="refsect2" lang="en">
2264 <a name="pango-glyph-item-iter-prev-cluster"></a><h3>pango_glyph_item_iter_prev_cluster ()</h3>
2265 <pre class="programlisting"><a
2266 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
2267 >gboolean</a>            pango_glyph_item_iter_prev_cluster  (<a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter">PangoGlyphItemIter</a> *iter);</pre>
2268 <p>
2269 Moves the iterator to the preceding cluster in the glyph item.
2270 See <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a> for details of cluster orders.</p>
2271 <p>
2272 </p>
2273 <div class="variablelist"><table border="0">
2274 <col align="left" valign="top">
2275 <tbody>
2276 <tr>
2277 <td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
2278 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItemIter" title="PangoGlyphItemIter"><span class="type">PangoGlyphItemIter</span></a>
2279 </td>
2280 </tr>
2281 <tr>
2282 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2283 <td> <a
2284 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
2285 ><code class="literal">TRUE</code></a> if the iterator was moved, <a
2286 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
2287 ><code class="literal">FALSE</code></a> if we were already on the
2288  first cluster.
2289
2290 </td>
2291 </tr>
2292 </tbody>
2293 </table></div>
2294 <p class="since">Since 1.22</p>
2295 </div>
2296 </div>
2297 </div>
2298 <div class="footer">
2299 <hr>
2300           Generated by GTK-Doc V1.11</div>
2301 </body>
2302 </html>