Upload tizen 2.0 beta source
[framework/graphics/freetype.git] / docs / reference / ft2-glyph_variants.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>FreeType-2.4.9 API Reference</title>
7 <style type="text/css">
8   body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
9          color: #000000;
10          background: #FFFFFF; }
11
12   p { text-align: justify; }
13   h1 { text-align: center; }
14   li { text-align: justify; }
15   td { padding: 0 0.5em 0 0.5em; }
16   td.left { padding: 0 0.5em 0 0.5em;
17             text-align: left; }
18
19   a:link { color: #0000EF; }
20   a:visited { color: #51188E; }
21   a:hover { color: #FF0000; }
22
23   span.keyword { font-family: monospace;
24                  text-align: left;
25                  white-space: pre;
26                  color: darkblue; }
27
28   pre.colored { color: blue; }
29
30   ul.empty { list-style-type: none; }
31 </style>
32 </head>
33 <body>
34
35 <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
36 <td width="100%"></td>
37 <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
38 <center><h1>FreeType-2.4.9 API Reference</h1></center>
39
40 <center><h1>
41 Glyph Variants
42 </h1></center>
43 <h2>Synopsis</h2>
44 <table align=center cellspacing=5 cellpadding=0 border=0>
45 <tr><td></td><td><a href="#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td></td><td><a href="#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td></tr>
46 <tr><td></td><td><a href="#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td></td><td><a href="#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td></tr>
47 <tr><td></td><td><a href="#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td></td><td></td></tr>
48 </table><br><br>
49
50 <table align=center width="87%"><tr><td>
51 <p>Many CJK characters have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Ideographic Variation Sequences (IVS), consisting of a Unicode base character and one of 240 variant selectors (U+E0100-U+E01EF), instead of further extending the already huge code range for CJK characters.</p>
52 <p>An IVS is registered and unique; for further details please refer to Unicode Technical Report #37, the Ideographic Variation Database. To date (October 2007), the character with the most variants is U+908A, having 8&nbsp;such IVS.</p>
53 <p>Adobe and MS decided to support IVS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variants supported by the font.</p>
54 <p>A variant may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo;. A default variant is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variant is a different glyph.</p>
55 </td></tr></table><br>
56 <table align=center width="75%"><tr><td>
57 <h4><a name="FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></h4>
58 <table align=center width="87%"><tr><td>
59 Defined in FT_FREETYPE_H (freetype/freetype.h).
60 </td></tr></table><br>
61 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
62
63   FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
64   <b>FT_Face_GetCharVariantIndex</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
65                                <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode,
66                                <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
67
68 </pre></table><br>
69 <table align=center width="87%"><tr><td>
70 <p>Return the glyph index of a given character code as modified by the variation selector.</p>
71 </td></tr></table><br>
72 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
73 <p></p>
74 <table cellpadding=3 border=0>
75 <tr valign=top><td><b>face</b></td><td>
76 <p>A handle to the source face object.</p>
77 </td></tr>
78 <tr valign=top><td><b>charcode</b></td><td>
79 <p>The character code point in Unicode.</p>
80 </td></tr>
81 <tr valign=top><td><b>variantSelector</b></td><td>
82 <p>The Unicode code point of the variation selector.</p>
83 </td></tr>
84 </table>
85 </td></tr></table>
86 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
87 <p>The glyph index. 0&nbsp;means either &lsquo;undefined character code&rsquo;, or &lsquo;undefined selector code&rsquo;, or &lsquo;no variation selector cmap subtable&rsquo;, or &lsquo;current CharMap is not Unicode&rsquo;.</p>
88 </td></tr></table>
89 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
90 <p>If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn't always correspond to the internal indices used within the file. This is done to ensure that value&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo;.</p>
91 <p>This function is only meaningful if a) the font has a variation selector cmap sub table, and b) the current charmap has a Unicode encoding.</p>
92 </td></tr></table>
93 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
94 <p>2.3.6</p>
95 </td></tr></table>
96 </td></tr></table>
97 <hr width="75%">
98 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
99 <td width="100%"></td>
100 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
101
102 <table align=center width="75%"><tr><td>
103 <h4><a name="FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></h4>
104 <table align=center width="87%"><tr><td>
105 Defined in FT_FREETYPE_H (freetype/freetype.h).
106 </td></tr></table><br>
107 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
108
109   FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
110   <b>FT_Face_GetCharVariantIsDefault</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
111                                    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode,
112                                    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
113
114 </pre></table><br>
115 <table align=center width="87%"><tr><td>
116 <p>Check whether this variant of this Unicode character is the one to be found in the &lsquo;cmap&rsquo;.</p>
117 </td></tr></table><br>
118 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
119 <p></p>
120 <table cellpadding=3 border=0>
121 <tr valign=top><td><b>face</b></td><td>
122 <p>A handle to the source face object.</p>
123 </td></tr>
124 <tr valign=top><td><b>charcode</b></td><td>
125 <p>The character codepoint in Unicode.</p>
126 </td></tr>
127 <tr valign=top><td><b>variantSelector</b></td><td>
128 <p>The Unicode codepoint of the variation selector.</p>
129 </td></tr>
130 </table>
131 </td></tr></table>
132 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
133 <p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variant.</p>
134 </td></tr></table>
135 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
136 <p>This function is only meaningful if the font has a variation selector cmap subtable.</p>
137 </td></tr></table>
138 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
139 <p>2.3.6</p>
140 </td></tr></table>
141 </td></tr></table>
142 <hr width="75%">
143 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
144 <td width="100%"></td>
145 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
146
147 <table align=center width="75%"><tr><td>
148 <h4><a name="FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></h4>
149 <table align=center width="87%"><tr><td>
150 Defined in FT_FREETYPE_H (freetype/freetype.h).
151 </td></tr></table><br>
152 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
153
154   FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
155   <b>FT_Face_GetVariantSelectors</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
156
157 </pre></table><br>
158 <table align=center width="87%"><tr><td>
159 <p>Return a zero-terminated list of Unicode variant selectors found in the font.</p>
160 </td></tr></table><br>
161 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
162 <p></p>
163 <table cellpadding=3 border=0>
164 <tr valign=top><td><b>face</b></td><td>
165 <p>A handle to the source face object.</p>
166 </td></tr>
167 </table>
168 </td></tr></table>
169 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
170 <p>A pointer to an array of selector code points, or NULL if there is no valid variant selector cmap subtable.</p>
171 </td></tr></table>
172 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
173 <p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
174 </td></tr></table>
175 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
176 <p>2.3.6</p>
177 </td></tr></table>
178 </td></tr></table>
179 <hr width="75%">
180 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
181 <td width="100%"></td>
182 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
183
184 <table align=center width="75%"><tr><td>
185 <h4><a name="FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></h4>
186 <table align=center width="87%"><tr><td>
187 Defined in FT_FREETYPE_H (freetype/freetype.h).
188 </td></tr></table><br>
189 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
190
191   FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
192   <b>FT_Face_GetVariantsOfChar</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
193                              <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode );
194
195 </pre></table><br>
196 <table align=center width="87%"><tr><td>
197 <p>Return a zero-terminated list of Unicode variant selectors found for the specified character code.</p>
198 </td></tr></table><br>
199 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
200 <p></p>
201 <table cellpadding=3 border=0>
202 <tr valign=top><td><b>face</b></td><td>
203 <p>A handle to the source face object.</p>
204 </td></tr>
205 <tr valign=top><td><b>charcode</b></td><td>
206 <p>The character codepoint in Unicode.</p>
207 </td></tr>
208 </table>
209 </td></tr></table>
210 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
211 <p>A pointer to an array of variant selector code points which are active for the given character, or NULL if the corresponding list is empty.</p>
212 </td></tr></table>
213 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
214 <p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
215 </td></tr></table>
216 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
217 <p>2.3.6</p>
218 </td></tr></table>
219 </td></tr></table>
220 <hr width="75%">
221 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
222 <td width="100%"></td>
223 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
224
225 <table align=center width="75%"><tr><td>
226 <h4><a name="FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></h4>
227 <table align=center width="87%"><tr><td>
228 Defined in FT_FREETYPE_H (freetype/freetype.h).
229 </td></tr></table><br>
230 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
231
232   FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
233   <b>FT_Face_GetCharsOfVariant</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
234                              <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
235
236 </pre></table><br>
237 <table align=center width="87%"><tr><td>
238 <p>Return a zero-terminated list of Unicode character codes found for the specified variant selector.</p>
239 </td></tr></table><br>
240 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
241 <p></p>
242 <table cellpadding=3 border=0>
243 <tr valign=top><td><b>face</b></td><td>
244 <p>A handle to the source face object.</p>
245 </td></tr>
246 <tr valign=top><td><b>variantSelector</b></td><td>
247 <p>The variant selector code point in Unicode.</p>
248 </td></tr>
249 </table>
250 </td></tr></table>
251 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
252 <p>A list of all the code points which are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variant selector is invalid.</p>
253 </td></tr></table>
254 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
255 <p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
256 </td></tr></table>
257 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
258 <p>2.3.6</p>
259 </td></tr></table>
260 </td></tr></table>
261 <hr width="75%">
262 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
263 <td width="100%"></td>
264 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
265
266 </body>
267 </html>