Debian Codegraph @

doc/classes/TextServer.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="TextServer" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A server interface for font management and text rendering.
5 </brief_description>
6 <description>
7 [TextServer] is the API backend for managing fonts and rendering text.
8 [b]Note:[/b] This is a low-level API, consider using [TextLine], [TextParagraph], and [Font] classes instead.
9 This is an abstract class, so to get the currently active [TextServer] instance, use the following code:
10 [codeblocks]
11 [gdscript]
12 var ts = TextServerManager.get_primary_interface()
13 [/gdscript]
14 [csharp]
15 var ts = TextServerManager.GetPrimaryInterface();
16 [/csharp]
17 [/codeblocks]
18 </description>
19 <tutorials>
20 </tutorials>
21 <methods>
22 <method name="create_font">
23 <return type="RID" />
24 <description>
25 Creates a new, empty font cache entry resource. To free the resulting resource, use the [method free_rid] method.
26 </description>
27 </method>
28 <method name="create_font_linked_variation">
29 <return type="RID" />
30 <param index="0" name="font_rid" type="RID" />
31 <description>
32 Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the [method free_rid] method.
33 </description>
34 </method>
35 <method name="create_shaped_text">
36 <return type="RID" />
37 <param index="0" name="direction" type="int" enum="TextServer.Direction" default="0" />
38 <param index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
39 <description>
40 Creates a new buffer for complex text layout, with the given [param direction] and [param orientation]. To free the resulting buffer, use [method free_rid] method.
41 [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
42 [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
43 </description>
44 </method>
45 <method name="draw_hex_code_box" qualifiers="const">
46 <return type="void" />
47 <param index="0" name="canvas" type="RID" />
48 <param index="1" name="size" type="int" />
49 <param index="2" name="pos" type="Vector2" />
50 <param index="3" name="index" type="int" />
51 <param index="4" name="color" type="Color" />
52 <description>
53 Draws box displaying character hexadecimal code. Used for replacing missing characters.
54 </description>
55 </method>
56 <method name="font_clear_glyphs">
57 <return type="void" />
58 <param index="0" name="font_rid" type="RID" />
59 <param index="1" name="size" type="Vector2i" />
60 <description>
61 Removes all rendered glyph information from the cache entry.
62 [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
63 </description>
64 </method>
65 <method name="font_clear_kerning_map">
66 <return type="void" />
67 <param index="0" name="font_rid" type="RID" />
68 <param index="1" name="size" type="int" />
69 <description>
70 Removes all kerning overrides.
71 </description>
72 </method>
73 <method name="font_clear_size_cache">
74 <return type="void" />
75 <param index="0" name="font_rid" type="RID" />
76 <description>
77 Removes all font sizes from the cache entry.
78 </description>
79 </method>
80 <method name="font_clear_system_fallback_cache">
81 <return type="void" />
82 <description>
83 Frees all automatically loaded system fonts.
84 </description>
85 </method>
86 <method name="font_clear_textures">
87 <return type="void" />
88 <param index="0" name="font_rid" type="RID" />
89 <param index="1" name="size" type="Vector2i" />
90 <description>
91 Removes all textures from font cache entry.
92 [b]Note:[/b] This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.
93 </description>
94 </method>
95 <method name="font_draw_glyph" qualifiers="const">
96 <return type="void" />
97 <param index="0" name="font_rid" type="RID" />
98 <param index="1" name="canvas" type="RID" />
99 <param index="2" name="size" type="int" />
100 <param index="3" name="pos" type="Vector2" />
101 <param index="4" name="index" type="int" />
102 <param index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
103 <param index="6" name="oversampling" type="float" default="0.0" />
104 <description>
105 Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size]. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
106 [b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
107 [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
108 </description>
109 </method>
110 <method name="font_draw_glyph_outline" qualifiers="const">
111 <return type="void" />
112 <param index="0" name="font_rid" type="RID" />
113 <param index="1" name="canvas" type="RID" />
114 <param index="2" name="size" type="int" />
115 <param index="3" name="outline_size" type="int" />
116 <param index="4" name="pos" type="Vector2" />
117 <param index="5" name="index" type="int" />
118 <param index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
119 <param index="7" name="oversampling" type="float" default="0.0" />
120 <description>
121 Draws single glyph outline of size [param outline_size] into a canvas item at the position, using [param font_rid] at the size [param size]. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
122 [b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
123 [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
124 </description>
125 </method>
126 <method name="font_get_antialiasing" qualifiers="const">
127 <return type="int" enum="TextServer.FontAntialiasing" />
128 <param index="0" name="font_rid" type="RID" />
129 <description>
130 Returns font anti-aliasing mode.
131 </description>
132 </method>
133 <method name="font_get_ascent" qualifiers="const">
134 <return type="float" />
135 <param index="0" name="font_rid" type="RID" />
136 <param index="1" name="size" type="int" />
137 <description>
138 Returns the font ascent (number of pixels above the baseline).
139 </description>
140 </method>
141 <method name="font_get_baseline_offset" qualifiers="const">
142 <return type="float" />
143 <param index="0" name="font_rid" type="RID" />
144 <description>
145 Returns extra baseline offset (as a fraction of font height).
146 </description>
147 </method>
148 <method name="font_get_char_from_glyph_index" qualifiers="const">
149 <return type="int" />
150 <param index="0" name="font_rid" type="RID" />
151 <param index="1" name="size" type="int" />
152 <param index="2" name="glyph_index" type="int" />
153 <description>
154 Returns character code associated with [param glyph_index], or [code]0[/code] if [param glyph_index] is invalid. See [method font_get_glyph_index].
155 </description>
156 </method>
157 <method name="font_get_descent" qualifiers="const">
158 <return type="float" />
159 <param index="0" name="font_rid" type="RID" />
160 <param index="1" name="size" type="int" />
161 <description>
162 Returns the font descent (number of pixels below the baseline).
163 </description>
164 </method>
165 <method name="font_get_disable_embedded_bitmaps" qualifiers="const">
166 <return type="bool" />
167 <param index="0" name="font_rid" type="RID" />
168 <description>
169 Returns whether the font's embedded bitmap loading is disabled.
170 </description>
171 </method>
172 <method name="font_get_embolden" qualifiers="const">
173 <return type="float" />
174 <param index="0" name="font_rid" type="RID" />
175 <description>
176 Returns font embolden strength.
177 </description>
178 </method>
179 <method name="font_get_face_count" qualifiers="const">
180 <return type="int" />
181 <param index="0" name="font_rid" type="RID" />
182 <description>
183 Returns number of faces in the TrueType / OpenType collection.
184 </description>
185 </method>
186 <method name="font_get_face_index" qualifiers="const">
187 <return type="int" />
188 <param index="0" name="font_rid" type="RID" />
189 <description>
190 Returns an active face index in the TrueType / OpenType collection.
191 </description>
192 </method>
193 <method name="font_get_fixed_size" qualifiers="const">
194 <return type="int" />
195 <param index="0" name="font_rid" type="RID" />
196 <description>
197 Returns bitmap font fixed size.
198 </description>
199 </method>
200 <method name="font_get_fixed_size_scale_mode" qualifiers="const">
201 <return type="int" enum="TextServer.FixedSizeScaleMode" />
202 <param index="0" name="font_rid" type="RID" />
203 <description>
204 Returns bitmap font scaling mode.
205 </description>
206 </method>
207 <method name="font_get_generate_mipmaps" qualifiers="const">
208 <return type="bool" />
209 <param index="0" name="font_rid" type="RID" />
210 <description>
211 Returns [code]true[/code] if font texture mipmap generation is enabled.
212 </description>
213 </method>
214 <method name="font_get_global_oversampling" qualifiers="const" deprecated="Use [Viewport] oversampling, or the [code skip-lint]oversampling[/code] argument of the [code skip-lint]draw_*[/code] methods instead.">
215 <return type="float" />
216 <description>
217 This method does nothing and always returns [code]1.0[/code].
218 </description>
219 </method>
220 <method name="font_get_glyph_advance" qualifiers="const">
221 <return type="Vector2" />
222 <param index="0" name="font_rid" type="RID" />
223 <param index="1" name="size" type="int" />
224 <param index="2" name="glyph" type="int" />
225 <description>
226 Returns glyph advance (offset of the next glyph).
227 [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
228 </description>
229 </method>
230 <method name="font_get_glyph_contours" qualifiers="const">
231 <return type="Dictionary" />
232 <param index="0" name="font" type="RID" />
233 <param index="1" name="size" type="int" />
234 <param index="2" name="index" type="int" />
235 <description>
236 Returns outline contours of the glyph as a [Dictionary] with the following contents:
237 [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
238 [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
239 [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
240 - Two successive [constant CONTOUR_CURVE_TAG_ON] points indicate a line segment.
241 - One [constant CONTOUR_CURVE_TAG_OFF_CONIC] point between two [constant CONTOUR_CURVE_TAG_ON] points indicates a single conic (quadratic) Bézier arc.
242 - Two [constant CONTOUR_CURVE_TAG_OFF_CUBIC] points between two [constant CONTOUR_CURVE_TAG_ON] points indicate a single cubic Bézier arc.
243 - Two successive [constant CONTOUR_CURVE_TAG_OFF_CONIC] points indicate two successive conic (quadratic) Bézier arcs with a virtual [constant CONTOUR_CURVE_TAG_ON] point at their middle.
244 - Each contour is closed. The last point of a contour uses the first point of a contour as its next point, and vice versa. The first point can be [constant CONTOUR_CURVE_TAG_OFF_CONIC] point.
245 </description>
246 </method>
247 <method name="font_get_glyph_index" qualifiers="const">
248 <return type="int" />
249 <param index="0" name="font_rid" type="RID" />
250 <param index="1" name="size" type="int" />
251 <param index="2" name="char" type="int" />
252 <param index="3" name="variation_selector" type="int" />
253 <description>
254 Returns the glyph index of a [param char], optionally modified by the [param variation_selector]. See [method font_get_char_from_glyph_index].
255 </description>
256 </method>
257 <method name="font_get_glyph_list" qualifiers="const">
258 <return type="PackedInt32Array" />
259 <param index="0" name="font_rid" type="RID" />
260 <param index="1" name="size" type="Vector2i" />
261 <description>
262 Returns list of rendered glyphs in the cache entry.
263 </description>
264 </method>
265 <method name="font_get_glyph_offset" qualifiers="const">
266 <return type="Vector2" />
267 <param index="0" name="font_rid" type="RID" />
268 <param index="1" name="size" type="Vector2i" />
269 <param index="2" name="glyph" type="int" />
270 <description>
271 Returns glyph offset from the baseline.
272 </description>
273 </method>
274 <method name="font_get_glyph_size" qualifiers="const">
275 <return type="Vector2" />
276 <param index="0" name="font_rid" type="RID" />
277 <param index="1" name="size" type="Vector2i" />
278 <param index="2" name="glyph" type="int" />
279 <description>
280 Returns size of the glyph.
281 </description>
282 </method>
283 <method name="font_get_glyph_texture_idx" qualifiers="const">
284 <return type="int" />
285 <param index="0" name="font_rid" type="RID" />
286 <param index="1" name="size" type="Vector2i" />
287 <param index="2" name="glyph" type="int" />
288 <description>
289 Returns index of the cache texture containing the glyph.
290 </description>
291 </method>
292 <method name="font_get_glyph_texture_rid" qualifiers="const">
293 <return type="RID" />
294 <param index="0" name="font_rid" type="RID" />
295 <param index="1" name="size" type="Vector2i" />
296 <param index="2" name="glyph" type="int" />
297 <description>
298 Returns resource ID of the cache texture containing the glyph.
299 [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
300 </description>
301 </method>
302 <method name="font_get_glyph_texture_size" qualifiers="const">
303 <return type="Vector2" />
304 <param index="0" name="font_rid" type="RID" />
305 <param index="1" name="size" type="Vector2i" />
306 <param index="2" name="glyph" type="int" />
307 <description>
308 Returns size of the cache texture containing the glyph.
309 [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
310 </description>
311 </method>
312 <method name="font_get_glyph_uv_rect" qualifiers="const">
313 <return type="Rect2" />
314 <param index="0" name="font_rid" type="RID" />
315 <param index="1" name="size" type="Vector2i" />
316 <param index="2" name="glyph" type="int" />
317 <description>
318 Returns rectangle in the cache texture containing the glyph.
319 </description>
320 </method>
321 <method name="font_get_hinting" qualifiers="const">
322 <return type="int" enum="TextServer.Hinting" />
323 <param index="0" name="font_rid" type="RID" />
324 <description>
325 Returns the font hinting mode. Used by dynamic fonts only.
326 </description>
327 </method>
328 <method name="font_get_keep_rounding_remainders" qualifiers="const">
329 <return type="bool" />
330 <param index="0" name="font_rid" type="RID" />
331 <description>
332 Returns glyph position rounding behavior. If set to [code]true[/code], when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.
333 </description>
334 </method>
335 <method name="font_get_kerning" qualifiers="const">
336 <return type="Vector2" />
337 <param index="0" name="font_rid" type="RID" />
338 <param index="1" name="size" type="int" />
339 <param index="2" name="glyph_pair" type="Vector2i" />
340 <description>
341 Returns kerning for the pair of glyphs.
342 </description>
343 </method>
344 <method name="font_get_kerning_list" qualifiers="const">
345 <return type="Vector2i[]" />
346 <param index="0" name="font_rid" type="RID" />
347 <param index="1" name="size" type="int" />
348 <description>
349 Returns list of the kerning overrides.
350 </description>
351 </method>
352 <method name="font_get_language_support_override">
353 <return type="bool" />
354 <param index="0" name="font_rid" type="RID" />
355 <param index="1" name="language" type="String" />
356 <description>
357 Returns [code]true[/code] if support override is enabled for the [param language].
358 </description>
359 </method>
360 <method name="font_get_language_support_overrides">
361 <return type="PackedStringArray" />
362 <param index="0" name="font_rid" type="RID" />
363 <description>
364 Returns list of language support overrides.
365 </description>
366 </method>
367 <method name="font_get_msdf_pixel_range" qualifiers="const">
368 <return type="int" />
369 <param index="0" name="font_rid" type="RID" />
370 <description>
371 Returns the width of the range around the shape between the minimum and maximum representable signed distance.
372 </description>
373 </method>
374 <method name="font_get_msdf_size" qualifiers="const">
375 <return type="int" />
376 <param index="0" name="font_rid" type="RID" />
377 <description>
378 Returns source font size used to generate MSDF textures.
379 </description>
380 </method>
381 <method name="font_get_name" qualifiers="const">
382 <return type="String" />
383 <param index="0" name="font_rid" type="RID" />
384 <description>
385 Returns font family name.
386 </description>
387 </method>
388 <method name="font_get_opentype_feature_overrides" qualifiers="const">
389 <return type="Dictionary" />
390 <param index="0" name="font_rid" type="RID" />
391 <description>
392 Returns font OpenType feature set override.
393 </description>
394 </method>
395 <method name="font_get_ot_name_strings" qualifiers="const">
396 <return type="Dictionary" />
397 <param index="0" name="font_rid" type="RID" />
398 <description>
399 Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).
400 </description>
401 </method>
402 <method name="font_get_oversampling" qualifiers="const">
403 <return type="float" />
404 <param index="0" name="font_rid" type="RID" />
405 <description>
406 Returns oversampling factor override. If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See [member Viewport.oversampling]. This value doesn't override the [code skip-lint]oversampling[/code] parameter of [code skip-lint]draw_*[/code] methods. Used by dynamic fonts only.
407 </description>
408 </method>
409 <method name="font_get_scale" qualifiers="const">
410 <return type="float" />
411 <param index="0" name="font_rid" type="RID" />
412 <param index="1" name="size" type="int" />
413 <description>
414 Returns scaling factor of the color bitmap font.
415 </description>
416 </method>
417 <method name="font_get_script_support_override">
418 <return type="bool" />
419 <param index="0" name="font_rid" type="RID" />
420 <param index="1" name="script" type="String" />
421 <description>
422 Returns [code]true[/code] if support override is enabled for the [param script].
423 </description>
424 </method>
425 <method name="font_get_script_support_overrides">
426 <return type="PackedStringArray" />
427 <param index="0" name="font_rid" type="RID" />
428 <description>
429 Returns list of script support overrides.
430 </description>
431 </method>
432 <method name="font_get_size_cache_info" qualifiers="const">
433 <return type="Dictionary[]" />
434 <param index="0" name="font_rid" type="RID" />
435 <description>
436 Returns font cache information, each entry contains the following fields: [code]Vector2i size_px[/code] - font size in pixels, [code]float viewport_oversampling[/code] - viewport oversampling factor, [code]int glyphs[/code] - number of rendered glyphs, [code]int textures[/code] - number of used textures, [code]int textures_size[/code] - size of texture data in bytes.
437 </description>
438 </method>
439 <method name="font_get_size_cache_list" qualifiers="const">
440 <return type="Vector2i[]" />
441 <param index="0" name="font_rid" type="RID" />
442 <description>
443 Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.
444 </description>
445 </method>
446 <method name="font_get_spacing" qualifiers="const">
447 <return type="int" />
448 <param index="0" name="font_rid" type="RID" />
449 <param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
450 <description>
451 Returns the spacing for [param spacing] in pixels (not relative to the font size).
452 </description>
453 </method>
454 <method name="font_get_stretch" qualifiers="const">
455 <return type="int" />
456 <param index="0" name="font_rid" type="RID" />
457 <description>
458 Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
459 </description>
460 </method>
461 <method name="font_get_style" qualifiers="const">
462 <return type="int" enum="TextServer.FontStyle" is_bitfield="true" />
463 <param index="0" name="font_rid" type="RID" />
464 <description>
465 Returns font style flags.
466 </description>
467 </method>
468 <method name="font_get_style_name" qualifiers="const">
469 <return type="String" />
470 <param index="0" name="font_rid" type="RID" />
471 <description>
472 Returns font style name.
473 </description>
474 </method>
475 <method name="font_get_subpixel_positioning" qualifiers="const">
476 <return type="int" enum="TextServer.SubpixelPositioning" />
477 <param index="0" name="font_rid" type="RID" />
478 <description>
479 Returns font subpixel glyph positioning mode.
480 </description>
481 </method>
482 <method name="font_get_supported_chars" qualifiers="const">
483 <return type="String" />
484 <param index="0" name="font_rid" type="RID" />
485 <description>
486 Returns a string containing all the characters available in the font.
487 </description>
488 </method>
489 <method name="font_get_supported_glyphs" qualifiers="const">
490 <return type="PackedInt32Array" />
491 <param index="0" name="font_rid" type="RID" />
492 <description>
493 Returns an array containing all glyph indices in the font.
494 </description>
495 </method>
496 <method name="font_get_texture_count" qualifiers="const">
497 <return type="int" />
498 <param index="0" name="font_rid" type="RID" />
499 <param index="1" name="size" type="Vector2i" />
500 <description>
501 Returns number of textures used by font cache entry.
502 </description>
503 </method>
504 <method name="font_get_texture_image" qualifiers="const">
505 <return type="Image" />
506 <param index="0" name="font_rid" type="RID" />
507 <param index="1" name="size" type="Vector2i" />
508 <param index="2" name="texture_index" type="int" />
509 <description>
510 Returns font cache texture image data.
511 </description>
512 </method>
513 <method name="font_get_texture_offsets" qualifiers="const">
514 <return type="PackedInt32Array" />
515 <param index="0" name="font_rid" type="RID" />
516 <param index="1" name="size" type="Vector2i" />
517 <param index="2" name="texture_index" type="int" />
518 <description>
519 Returns array containing glyph packing data.
520 </description>
521 </method>
522 <method name="font_get_transform" qualifiers="const">
523 <return type="Transform2D" />
524 <param index="0" name="font_rid" type="RID" />
525 <description>
526 Returns 2D transform applied to the font outlines.
527 </description>
528 </method>
529 <method name="font_get_underline_position" qualifiers="const">
530 <return type="float" />
531 <param index="0" name="font_rid" type="RID" />
532 <param index="1" name="size" type="int" />
533 <description>
534 Returns pixel offset of the underline below the baseline.
535 </description>
536 </method>
537 <method name="font_get_underline_thickness" qualifiers="const">
538 <return type="float" />
539 <param index="0" name="font_rid" type="RID" />
540 <param index="1" name="size" type="int" />
541 <description>
542 Returns thickness of the underline in pixels.
543 </description>
544 </method>
545 <method name="font_get_variation_coordinates" qualifiers="const">
546 <return type="Dictionary" />
547 <param index="0" name="font_rid" type="RID" />
548 <description>
549 Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
550 </description>
551 </method>
552 <method name="font_get_weight" qualifiers="const">
553 <return type="int" />
554 <param index="0" name="font_rid" type="RID" />
555 <description>
556 Returns weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
557 </description>
558 </method>
559 <method name="font_has_char" qualifiers="const">
560 <return type="bool" />
561 <param index="0" name="font_rid" type="RID" />
562 <param index="1" name="char" type="int" />
563 <description>
564 Returns [code]true[/code] if a Unicode [param char] is available in the font.
565 </description>
566 </method>
567 <method name="font_is_allow_system_fallback" qualifiers="const">
568 <return type="bool" />
569 <param index="0" name="font_rid" type="RID" />
570 <description>
571 Returns [code]true[/code] if system fonts can be automatically used as fallbacks.
572 </description>
573 </method>
574 <method name="font_is_force_autohinter" qualifiers="const">
575 <return type="bool" />
576 <param index="0" name="font_rid" type="RID" />
577 <description>
578 Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
579 </description>
580 </method>
581 <method name="font_is_language_supported" qualifiers="const">
582 <return type="bool" />
583 <param index="0" name="font_rid" type="RID" />
584 <param index="1" name="language" type="String" />
585 <description>
586 Returns [code]true[/code] if the font supports the given language (as a [url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
587 </description>
588 </method>
589 <method name="font_is_modulate_color_glyphs" qualifiers="const">
590 <return type="bool" />
591 <param index="0" name="font_rid" type="RID" />
592 <description>
593 Returns [code]true[/code] if color modulation is applied when drawing the font's colored glyphs.
594 </description>
595 </method>
596 <method name="font_is_multichannel_signed_distance_field" qualifiers="const">
597 <return type="bool" />
598 <param index="0" name="font_rid" type="RID" />
599 <description>
600 Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
601 </description>
602 </method>
603 <method name="font_is_script_supported" qualifiers="const">
604 <return type="bool" />
605 <param index="0" name="font_rid" type="RID" />
606 <param index="1" name="script" type="String" />
607 <description>
608 Returns [code]true[/code] if the font supports the given script (as a [url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
609 </description>
610 </method>
611 <method name="font_remove_glyph">
612 <return type="void" />
613 <param index="0" name="font_rid" type="RID" />
614 <param index="1" name="size" type="Vector2i" />
615 <param index="2" name="glyph" type="int" />
616 <description>
617 Removes specified rendered glyph information from the cache entry.
618 [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
619 </description>
620 </method>
621 <method name="font_remove_kerning">
622 <return type="void" />
623 <param index="0" name="font_rid" type="RID" />
624 <param index="1" name="size" type="int" />
625 <param index="2" name="glyph_pair" type="Vector2i" />
626 <description>
627 Removes kerning override for the pair of glyphs.
628 </description>
629 </method>
630 <method name="font_remove_language_support_override">
631 <return type="void" />
632 <param index="0" name="font_rid" type="RID" />
633 <param index="1" name="language" type="String" />
634 <description>
635 Remove language support override.
636 </description>
637 </method>
638 <method name="font_remove_script_support_override">
639 <return type="void" />
640 <param index="0" name="font_rid" type="RID" />
641 <param index="1" name="script" type="String" />
642 <description>
643 Removes script support override.
644 </description>
645 </method>
646 <method name="font_remove_size_cache">
647 <return type="void" />
648 <param index="0" name="font_rid" type="RID" />
649 <param index="1" name="size" type="Vector2i" />
650 <description>
651 Removes specified font size from the cache entry.
652 </description>
653 </method>
654 <method name="font_remove_texture">
655 <return type="void" />
656 <param index="0" name="font_rid" type="RID" />
657 <param index="1" name="size" type="Vector2i" />
658 <param index="2" name="texture_index" type="int" />
659 <description>
660 Removes specified texture from the cache entry.
661 [b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
662 </description>
663 </method>
664 <method name="font_render_glyph">
665 <return type="void" />
666 <param index="0" name="font_rid" type="RID" />
667 <param index="1" name="size" type="Vector2i" />
668 <param index="2" name="index" type="int" />
669 <description>
670 Renders specified glyph to the font cache texture.
671 </description>
672 </method>
673 <method name="font_render_range">
674 <return type="void" />
675 <param index="0" name="font_rid" type="RID" />
676 <param index="1" name="size" type="Vector2i" />
677 <param index="2" name="start" type="int" />
678 <param index="3" name="end" type="int" />
679 <description>
680 Renders the range of characters to the font cache texture.
681 </description>
682 </method>
683 <method name="font_set_allow_system_fallback">
684 <return type="void" />
685 <param index="0" name="font_rid" type="RID" />
686 <param index="1" name="allow_system_fallback" type="bool" />
687 <description>
688 If set to [code]true[/code], system fonts can be automatically used as fallbacks.
689 </description>
690 </method>
691 <method name="font_set_antialiasing">
692 <return type="void" />
693 <param index="0" name="font_rid" type="RID" />
694 <param index="1" name="antialiasing" type="int" enum="TextServer.FontAntialiasing" />
695 <description>
696 Sets font anti-aliasing mode.
697 </description>
698 </method>
699 <method name="font_set_ascent">
700 <return type="void" />
701 <param index="0" name="font_rid" type="RID" />
702 <param index="1" name="size" type="int" />
703 <param index="2" name="ascent" type="float" />
704 <description>
705 Sets the font ascent (number of pixels above the baseline).
706 </description>
707 </method>
708 <method name="font_set_baseline_offset">
709 <return type="void" />
710 <param index="0" name="font_rid" type="RID" />
711 <param index="1" name="baseline_offset" type="float" />
712 <description>
713 Sets extra baseline offset (as a fraction of font height).
714 </description>
715 </method>
716 <method name="font_set_data">
717 <return type="void" />
718 <param index="0" name="font_rid" type="RID" />
719 <param index="1" name="data" type="PackedByteArray" />
720 <description>
721 Sets font source data, e.g contents of the dynamic font source file.
722 </description>
723 </method>
724 <method name="font_set_descent">
725 <return type="void" />
726 <param index="0" name="font_rid" type="RID" />
727 <param index="1" name="size" type="int" />
728 <param index="2" name="descent" type="float" />
729 <description>
730 Sets the font descent (number of pixels below the baseline).
731 </description>
732 </method>
733 <method name="font_set_disable_embedded_bitmaps">
734 <return type="void" />
735 <param index="0" name="font_rid" type="RID" />
736 <param index="1" name="disable_embedded_bitmaps" type="bool" />
737 <description>
738 If set to [code]true[/code], embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).
739 </description>
740 </method>
741 <method name="font_set_embolden">
742 <return type="void" />
743 <param index="0" name="font_rid" type="RID" />
744 <param index="1" name="strength" type="float" />
745 <description>
746 Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
747 </description>
748 </method>
749 <method name="font_set_face_index">
750 <return type="void" />
751 <param index="0" name="font_rid" type="RID" />
752 <param index="1" name="face_index" type="int" />
753 <description>
754 Sets an active face index in the TrueType / OpenType collection.
755 </description>
756 </method>
757 <method name="font_set_fixed_size">
758 <return type="void" />
759 <param index="0" name="font_rid" type="RID" />
760 <param index="1" name="fixed_size" type="int" />
761 <description>
762 Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
763 </description>
764 </method>
765 <method name="font_set_fixed_size_scale_mode">
766 <return type="void" />
767 <param index="0" name="font_rid" type="RID" />
768 <param index="1" name="fixed_size_scale_mode" type="int" enum="TextServer.FixedSizeScaleMode" />
769 <description>
770 Sets bitmap font scaling mode. This property is used only if [code]fixed_size[/code] is greater than zero.
771 </description>
772 </method>
773 <method name="font_set_force_autohinter">
774 <return type="void" />
775 <param index="0" name="font_rid" type="RID" />
776 <param index="1" name="force_autohinter" type="bool" />
777 <description>
778 If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
779 </description>
780 </method>
781 <method name="font_set_generate_mipmaps">
782 <return type="void" />
783 <param index="0" name="font_rid" type="RID" />
784 <param index="1" name="generate_mipmaps" type="bool" />
785 <description>
786 If set to [code]true[/code] font texture mipmap generation is enabled.
787 </description>
788 </method>
789 <method name="font_set_global_oversampling" deprecated="Use [Viewport] oversampling, or the [code skip-lint]oversampling[/code] argument of the [code skip-lint]draw_*[/code] methods instead.">
790 <return type="void" />
791 <param index="0" name="oversampling" type="float" />
792 <description>
793 This method does nothing.
794 </description>
795 </method>
796 <method name="font_set_glyph_advance">
797 <return type="void" />
798 <param index="0" name="font_rid" type="RID" />
799 <param index="1" name="size" type="int" />
800 <param index="2" name="glyph" type="int" />
801 <param index="3" name="advance" type="Vector2" />
802 <description>
803 Sets glyph advance (offset of the next glyph).
804 [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
805 </description>
806 </method>
807 <method name="font_set_glyph_offset">
808 <return type="void" />
809 <param index="0" name="font_rid" type="RID" />
810 <param index="1" name="size" type="Vector2i" />
811 <param index="2" name="glyph" type="int" />
812 <param index="3" name="offset" type="Vector2" />
813 <description>
814 Sets glyph offset from the baseline.
815 </description>
816 </method>
817 <method name="font_set_glyph_size">
818 <return type="void" />
819 <param index="0" name="font_rid" type="RID" />
820 <param index="1" name="size" type="Vector2i" />
821 <param index="2" name="glyph" type="int" />
822 <param index="3" name="gl_size" type="Vector2" />
823 <description>
824 Sets size of the glyph.
825 </description>
826 </method>
827 <method name="font_set_glyph_texture_idx">
828 <return type="void" />
829 <param index="0" name="font_rid" type="RID" />
830 <param index="1" name="size" type="Vector2i" />
831 <param index="2" name="glyph" type="int" />
832 <param index="3" name="texture_idx" type="int" />
833 <description>
834 Sets index of the cache texture containing the glyph.
835 </description>
836 </method>
837 <method name="font_set_glyph_uv_rect">
838 <return type="void" />
839 <param index="0" name="font_rid" type="RID" />
840 <param index="1" name="size" type="Vector2i" />
841 <param index="2" name="glyph" type="int" />
842 <param index="3" name="uv_rect" type="Rect2" />
843 <description>
844 Sets rectangle in the cache texture containing the glyph.
845 </description>
846 </method>
847 <method name="font_set_hinting">
848 <return type="void" />
849 <param index="0" name="font_rid" type="RID" />
850 <param index="1" name="hinting" type="int" enum="TextServer.Hinting" />
851 <description>
852 Sets font hinting mode. Used by dynamic fonts only.
853 </description>
854 </method>
855 <method name="font_set_keep_rounding_remainders">
856 <return type="void" />
857 <param index="0" name="font_rid" type="RID" />
858 <param index="1" name="keep_rounding_remainders" type="bool" />
859 <description>
860 Sets glyph position rounding behavior. If set to [code]true[/code], when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.
861 </description>
862 </method>
863 <method name="font_set_kerning">
864 <return type="void" />
865 <param index="0" name="font_rid" type="RID" />
866 <param index="1" name="size" type="int" />
867 <param index="2" name="glyph_pair" type="Vector2i" />
868 <param index="3" name="kerning" type="Vector2" />
869 <description>
870 Sets kerning for the pair of glyphs.
871 </description>
872 </method>
873 <method name="font_set_language_support_override">
874 <return type="void" />
875 <param index="0" name="font_rid" type="RID" />
876 <param index="1" name="language" type="String" />
877 <param index="2" name="supported" type="bool" />
878 <description>
879 Adds override for [method font_is_language_supported].
880 </description>
881 </method>
882 <method name="font_set_modulate_color_glyphs">
883 <return type="void" />
884 <param index="0" name="font_rid" type="RID" />
885 <param index="1" name="force_autohinter" type="bool" />
886 <description>
887 If set to [code]true[/code], color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.
888 </description>
889 </method>
890 <method name="font_set_msdf_pixel_range">
891 <return type="void" />
892 <param index="0" name="font_rid" type="RID" />
893 <param index="1" name="msdf_pixel_range" type="int" />
894 <description>
895 Sets the width of the range around the shape between the minimum and maximum representable signed distance.
896 </description>
897 </method>
898 <method name="font_set_msdf_size">
899 <return type="void" />
900 <param index="0" name="font_rid" type="RID" />
901 <param index="1" name="msdf_size" type="int" />
902 <description>
903 Sets source font size used to generate MSDF textures.
904 </description>
905 </method>
906 <method name="font_set_multichannel_signed_distance_field">
907 <return type="void" />
908 <param index="0" name="font_rid" type="RID" />
909 <param index="1" name="msdf" type="bool" />
910 <description>
911 If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
912 [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
913 </description>
914 </method>
915 <method name="font_set_name">
916 <return type="void" />
917 <param index="0" name="font_rid" type="RID" />
918 <param index="1" name="name" type="String" />
919 <description>
920 Sets the font family name.
921 </description>
922 </method>
923 <method name="font_set_opentype_feature_overrides">
924 <return type="void" />
925 <param index="0" name="font_rid" type="RID" />
926 <param index="1" name="overrides" type="Dictionary" />
927 <description>
928 Sets font OpenType feature set override.
929 </description>
930 </method>
931 <method name="font_set_oversampling">
932 <return type="void" />
933 <param index="0" name="font_rid" type="RID" />
934 <param index="1" name="oversampling" type="float" />
935 <description>
936 If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See [member Viewport.oversampling]. This value doesn't override the [code skip-lint]oversampling[/code] parameter of [code skip-lint]draw_*[/code] methods. Used by dynamic fonts only.
937 </description>
938 </method>
939 <method name="font_set_scale">
940 <return type="void" />
941 <param index="0" name="font_rid" type="RID" />
942 <param index="1" name="size" type="int" />
943 <param index="2" name="scale" type="float" />
944 <description>
945 Sets scaling factor of the color bitmap font.
946 </description>
947 </method>
948 <method name="font_set_script_support_override">
949 <return type="void" />
950 <param index="0" name="font_rid" type="RID" />
951 <param index="1" name="script" type="String" />
952 <param index="2" name="supported" type="bool" />
953 <description>
954 Adds override for [method font_is_script_supported].
955 </description>
956 </method>
957 <method name="font_set_spacing">
958 <return type="void" />
959 <param index="0" name="font_rid" type="RID" />
960 <param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
961 <param index="2" name="value" type="int" />
962 <description>
963 Sets the spacing for [param spacing] to [param value] in pixels (not relative to the font size).
964 </description>
965 </method>
966 <method name="font_set_stretch">
967 <return type="void" />
968 <param index="0" name="font_rid" type="RID" />
969 <param index="1" name="weight" type="int" />
970 <description>
971 Sets font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
972 [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_transform] instead.
973 </description>
974 </method>
975 <method name="font_set_style">
976 <return type="void" />
977 <param index="0" name="font_rid" type="RID" />
978 <param index="1" name="style" type="int" enum="TextServer.FontStyle" is_bitfield="true" />
979 <description>
980 Sets the font style flags.
981 [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], [method font_set_embolden], or [method font_set_transform] instead.
982 </description>
983 </method>
984 <method name="font_set_style_name">
985 <return type="void" />
986 <param index="0" name="font_rid" type="RID" />
987 <param index="1" name="name" type="String" />
988 <description>
989 Sets the font style name.
990 </description>
991 </method>
992 <method name="font_set_subpixel_positioning">
993 <return type="void" />
994 <param index="0" name="font_rid" type="RID" />
995 <param index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
996 <description>
997 Sets font subpixel glyph positioning mode.
998 </description>
999 </method>
1000 <method name="font_set_texture_image">
1001 <return type="void" />
1002 <param index="0" name="font_rid" type="RID" />
1003 <param index="1" name="size" type="Vector2i" />
1004 <param index="2" name="texture_index" type="int" />
1005 <param index="3" name="image" type="Image" />
1006 <description>
1007 Sets font cache texture image data.
1008 </description>
1009 </method>
1010 <method name="font_set_texture_offsets">
1011 <return type="void" />
1012 <param index="0" name="font_rid" type="RID" />
1013 <param index="1" name="size" type="Vector2i" />
1014 <param index="2" name="texture_index" type="int" />
1015 <param index="3" name="offset" type="PackedInt32Array" />
1016 <description>
1017 Sets array containing glyph packing data.
1018 </description>
1019 </method>
1020 <method name="font_set_transform">
1021 <return type="void" />
1022 <param index="0" name="font_rid" type="RID" />
1023 <param index="1" name="transform" type="Transform2D" />
1024 <description>
1025 Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.
1026 For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
1027 </description>
1028 </method>
1029 <method name="font_set_underline_position">
1030 <return type="void" />
1031 <param index="0" name="font_rid" type="RID" />
1032 <param index="1" name="size" type="int" />
1033 <param index="2" name="underline_position" type="float" />
1034 <description>
1035 Sets pixel offset of the underline below the baseline.
1036 </description>
1037 </method>
1038 <method name="font_set_underline_thickness">
1039 <return type="void" />
1040 <param index="0" name="font_rid" type="RID" />
1041 <param index="1" name="size" type="int" />
1042 <param index="2" name="underline_thickness" type="float" />
1043 <description>
1044 Sets thickness of the underline in pixels.
1045 </description>
1046 </method>
1047 <method name="font_set_variation_coordinates">
1048 <return type="void" />
1049 <param index="0" name="font_rid" type="RID" />
1050 <param index="1" name="variation_coordinates" type="Dictionary" />
1051 <description>
1052 Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
1053 </description>
1054 </method>
1055 <method name="font_set_weight">
1056 <return type="void" />
1057 <param index="0" name="font_rid" type="RID" />
1058 <param index="1" name="weight" type="int" />
1059 <description>
1060 Sets weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
1061 [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_embolden] instead.
1062 </description>
1063 </method>
1064 <method name="font_supported_feature_list" qualifiers="const">
1065 <return type="Dictionary" />
1066 <param index="0" name="font_rid" type="RID" />
1067 <description>
1068 Returns the dictionary of the supported OpenType features.
1069 </description>
1070 </method>
1071 <method name="font_supported_variation_list" qualifiers="const">
1072 <return type="Dictionary" />
1073 <param index="0" name="font_rid" type="RID" />
1074 <description>
1075 Returns the dictionary of the supported OpenType variation coordinates.
1076 </description>
1077 </method>
1078 <method name="format_number" qualifiers="const" deprecated="Use [method TranslationServer.format_number] instead.">
1079 <return type="String" />
1080 <param index="0" name="number" type="String" />
1081 <param index="1" name="language" type="String" default="&quot;&quot;" />
1082 <description>
1083 Converts a number from Western Arabic (0..9) to the numeral system used in the given [param language].
1084 If [param language] is an empty string, the active locale will be used.
1085 </description>
1086 </method>
1087 <method name="free_rid">
1088 <return type="void" />
1089 <param index="0" name="rid" type="RID" />
1090 <description>
1091 Frees an object created by this [TextServer].
1092 </description>
1093 </method>
1094 <method name="get_features" qualifiers="const">
1095 <return type="int" />
1096 <description>
1097 Returns text server features, see [enum Feature].
1098 </description>
1099 </method>
1100 <method name="get_hex_code_box_size" qualifiers="const">
1101 <return type="Vector2" />
1102 <param index="0" name="size" type="int" />
1103 <param index="1" name="index" type="int" />
1104 <description>
1105 Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
1106 </description>
1107 </method>
1108 <method name="get_name" qualifiers="const">
1109 <return type="String" />
1110 <description>
1111 Returns the name of the server interface.
1112 </description>
1113 </method>
1114 <method name="get_support_data" qualifiers="const">
1115 <return type="PackedByteArray" />
1116 <description>
1117 Returns default TextServer database (e.g. ICU break iterators and dictionaries).
1118 </description>
1119 </method>
1120 <method name="get_support_data_filename" qualifiers="const">
1121 <return type="String" />
1122 <description>
1123 Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
1124 </description>
1125 </method>
1126 <method name="get_support_data_info" qualifiers="const">
1127 <return type="String" />
1128 <description>
1129 Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
1130 </description>
1131 </method>
1132 <method name="has">
1133 <return type="bool" />
1134 <param index="0" name="rid" type="RID" />
1135 <description>
1136 Returns [code]true[/code] if [param rid] is valid resource owned by this text server.
1137 </description>
1138 </method>
1139 <method name="has_feature" qualifiers="const">
1140 <return type="bool" />
1141 <param index="0" name="feature" type="int" enum="TextServer.Feature" />
1142 <description>
1143 Returns [code]true[/code] if the server supports a feature.
1144 </description>
1145 </method>
1146 <method name="is_confusable" qualifiers="const">
1147 <return type="int" />
1148 <param index="0" name="string" type="String" />
1149 <param index="1" name="dict" type="PackedStringArray" />
1150 <description>
1151 Returns index of the first string in [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found.
1152 [b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check].
1153 [b]Note:[/b] Always returns [code]-1[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
1154 </description>
1155 </method>
1156 <method name="is_locale_right_to_left" qualifiers="const">
1157 <return type="bool" />
1158 <param index="0" name="locale" type="String" />
1159 <description>
1160 Returns [code]true[/code] if locale is right-to-left.
1161 </description>
1162 </method>
1163 <method name="is_locale_using_support_data" qualifiers="const">
1164 <return type="bool" />
1165 <param index="0" name="locale" type="String" />
1166 <description>
1167 Returns [code]true[/code] if the locale requires text server support data for line/word breaking.
1168 </description>
1169 </method>
1170 <method name="is_valid_identifier" qualifiers="const">
1171 <return type="bool" />
1172 <param index="0" name="string" type="String" />
1173 <description>
1174 Returns [code]true[/code] if [param string] is a valid identifier.
1175 If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must:
1176 - Conform to normalization form C.
1177 - Begin with a Unicode character of class XID_Start or [code]"_"[/code].
1178 - May contain Unicode characters of class XID_Continue in the other positions.
1179 - Use UAX #31 recommended scripts only (mixed scripts are allowed).
1180 If the [constant FEATURE_UNICODE_IDENTIFIERS] feature is not supported, a valid identifier must:
1181 - Begin with a Unicode character of class XID_Start or [code]"_"[/code].
1182 - May contain Unicode characters of class XID_Continue in the other positions.
1183 </description>
1184 </method>
1185 <method name="is_valid_letter" qualifiers="const">
1186 <return type="bool" />
1187 <param index="0" name="unicode" type="int" />
1188 <description>
1189 Returns [code]true[/code] if the given code point is a valid letter, i.e. it belongs to the Unicode category "L".
1190 </description>
1191 </method>
1192 <method name="load_support_data">
1193 <return type="bool" />
1194 <param index="0" name="filename" type="String" />
1195 <description>
1196 Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
1197 [b]Note:[/b] This function should be called before any other TextServer functions used, otherwise it won't have any effect.
1198 </description>
1199 </method>
1200 <method name="name_to_tag" qualifiers="const">
1201 <return type="int" />
1202 <param index="0" name="name" type="String" />
1203 <description>
1204 Converts the given readable name of a feature, variation, script, or language to an OpenType tag.
1205 </description>
1206 </method>
1207 <method name="parse_number" qualifiers="const" deprecated="Use [method TranslationServer.parse_number] instead.">
1208 <return type="String" />
1209 <param index="0" name="number" type="String" />
1210 <param index="1" name="language" type="String" default="&quot;&quot;" />
1211 <description>
1212 Converts [param number] from the numeral system used in the given [param language] to Western Arabic (0..9).
1213 If [param language] is an empty string, the active locale will be used.
1214 </description>
1215 </method>
1216 <method name="parse_structured_text" qualifiers="const">
1217 <return type="Vector3i[]" />
1218 <param index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
1219 <param index="1" name="args" type="Array" />
1220 <param index="2" name="text" type="String" />
1221 <description>
1222 Default implementation of the BiDi algorithm override function.
1223 </description>
1224 </method>
1225 <method name="percent_sign" qualifiers="const" deprecated="Use [method TranslationServer.get_percent_sign] instead.">
1226 <return type="String" />
1227 <param index="0" name="language" type="String" default="&quot;&quot;" />
1228 <description>
1229 Returns the percent sign used in the given [param language].
1230 If [param language] is an empty string, the active locale will be used.
1231 </description>
1232 </method>
1233 <method name="save_support_data" qualifiers="const">
1234 <return type="bool" />
1235 <param index="0" name="filename" type="String" />
1236 <description>
1237 Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
1238 [b]Note:[/b] This function is used by during project export, to include TextServer database.
1239 </description>
1240 </method>
1241 <method name="shaped_get_run_count" qualifiers="const">
1242 <return type="int" />
1243 <param index="0" name="shaped" type="RID" />
1244 <description>
1245 Returns the number of uniform text runs in the buffer.
1246 </description>
1247 </method>
1248 <method name="shaped_get_run_direction" qualifiers="const">
1249 <return type="int" enum="TextServer.Direction" />
1250 <param index="0" name="shaped" type="RID" />
1251 <param index="1" name="index" type="int" />
1252 <description>
1253 Returns the direction of the [param index] text run (in visual order).
1254 </description>
1255 </method>
1256 <method name="shaped_get_run_font_rid" qualifiers="const">
1257 <return type="RID" />
1258 <param index="0" name="shaped" type="RID" />
1259 <param index="1" name="index" type="int" />
1260 <description>
1261 Returns the font RID of the [param index] text run (in visual order).
1262 </description>
1263 </method>
1264 <method name="shaped_get_run_font_size" qualifiers="const">
1265 <return type="int" />
1266 <param index="0" name="shaped" type="RID" />
1267 <param index="1" name="index" type="int" />
1268 <description>
1269 Returns the font size of the [param index] text run (in visual order).
1270 </description>
1271 </method>
1272 <method name="shaped_get_run_glyph_range" qualifiers="const">
1273 <return type="Vector2i" />
1274 <param index="0" name="shaped" type="RID" />
1275 <param index="1" name="index" type="int" />
1276 <description>
1277 Returns the glyph range of the [param index] text run (in visual order).
1278 </description>
1279 </method>
1280 <method name="shaped_get_run_language" qualifiers="const">
1281 <return type="String" />
1282 <param index="0" name="shaped" type="RID" />
1283 <param index="1" name="index" type="int" />
1284 <description>
1285 Returns the language of the [param index] text run (in visual order).
1286 </description>
1287 </method>
1288 <method name="shaped_get_run_object" qualifiers="const">
1289 <return type="Variant" />
1290 <param index="0" name="shaped" type="RID" />
1291 <param index="1" name="index" type="int" />
1292 <description>
1293 Returns the embedded object of the [param index] text run (in visual order).
1294 </description>
1295 </method>
1296 <method name="shaped_get_run_range" qualifiers="const">
1297 <return type="Vector2i" />
1298 <param index="0" name="shaped" type="RID" />
1299 <param index="1" name="index" type="int" />
1300 <description>
1301 Returns the source text range of the [param index] text run (in visual order).
1302 </description>
1303 </method>
1304 <method name="shaped_get_run_text" qualifiers="const">
1305 <return type="String" />
1306 <param index="0" name="shaped" type="RID" />
1307 <param index="1" name="index" type="int" />
1308 <description>
1309 Returns the source text of the [param index] text run (in visual order).
1310 </description>
1311 </method>
1312 <method name="shaped_get_span_count" qualifiers="const">
1313 <return type="int" />
1314 <param index="0" name="shaped" type="RID" />
1315 <description>
1316 Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].
1317 </description>
1318 </method>
1319 <method name="shaped_get_span_embedded_object" qualifiers="const">
1320 <return type="Variant" />
1321 <param index="0" name="shaped" type="RID" />
1322 <param index="1" name="index" type="int" />
1323 <description>
1324 Returns text embedded object key.
1325 </description>
1326 </method>
1327 <method name="shaped_get_span_meta" qualifiers="const">
1328 <return type="Variant" />
1329 <param index="0" name="shaped" type="RID" />
1330 <param index="1" name="index" type="int" />
1331 <description>
1332 Returns text span metadata.
1333 </description>
1334 </method>
1335 <method name="shaped_get_span_object" qualifiers="const">
1336 <return type="Variant" />
1337 <param index="0" name="shaped" type="RID" />
1338 <param index="1" name="index" type="int" />
1339 <description>
1340 Returns the text span embedded object key.
1341 </description>
1342 </method>
1343 <method name="shaped_get_span_text" qualifiers="const">
1344 <return type="String" />
1345 <param index="0" name="shaped" type="RID" />
1346 <param index="1" name="index" type="int" />
1347 <description>
1348 Returns the text span source text.
1349 </description>
1350 </method>
1351 <method name="shaped_get_text" qualifiers="const">
1352 <return type="String" />
1353 <param index="0" name="shaped" type="RID" />
1354 <description>
1355 Returns the text buffer source text, including object replacement characters.
1356 </description>
1357 </method>
1358 <method name="shaped_set_span_update_font">
1359 <return type="void" />
1360 <param index="0" name="shaped" type="RID" />
1361 <param index="1" name="index" type="int" />
1362 <param index="2" name="fonts" type="RID[]" />
1363 <param index="3" name="size" type="int" />
1364 <param index="4" name="opentype_features" type="Dictionary" default="{}" />
1365 <description>
1366 Changes text span font, font size, and OpenType features, without changing the text.
1367 </description>
1368 </method>
1369 <method name="shaped_text_add_object">
1370 <return type="bool" />
1371 <param index="0" name="shaped" type="RID" />
1372 <param index="1" name="key" type="Variant" />
1373 <param index="2" name="size" type="Vector2" />
1374 <param index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
1375 <param index="4" name="length" type="int" default="1" />
1376 <param index="5" name="baseline" type="float" default="0.0" />
1377 <description>
1378 Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
1379 </description>
1380 </method>
1381 <method name="shaped_text_add_string">
1382 <return type="bool" />
1383 <param index="0" name="shaped" type="RID" />
1384 <param index="1" name="text" type="String" />
1385 <param index="2" name="fonts" type="RID[]" />
1386 <param index="3" name="size" type="int" />
1387 <param index="4" name="opentype_features" type="Dictionary" default="{}" />
1388 <param index="5" name="language" type="String" default="&quot;&quot;" />
1389 <param index="6" name="meta" type="Variant" default="null" />
1390 <description>
1391 Adds text span and font to draw it to the text buffer.
1392 </description>
1393 </method>
1394 <method name="shaped_text_clear">
1395 <return type="void" />
1396 <param index="0" name="rid" type="RID" />
1397 <description>
1398 Clears text buffer (removes text and inline objects).
1399 </description>
1400 </method>
1401 <method name="shaped_text_closest_character_pos" qualifiers="const">
1402 <return type="int" />
1403 <param index="0" name="shaped" type="RID" />
1404 <param index="1" name="pos" type="int" />
1405 <description>
1406 Returns composite character position closest to the [param pos].
1407 </description>
1408 </method>
1409 <method name="shaped_text_draw" qualifiers="const">
1410 <return type="void" />
1411 <param index="0" name="shaped" type="RID" />
1412 <param index="1" name="canvas" type="RID" />
1413 <param index="2" name="pos" type="Vector2" />
1414 <param index="3" name="clip_l" type="float" default="-1" />
1415 <param index="4" name="clip_r" type="float" default="-1" />
1416 <param index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
1417 <param index="6" name="oversampling" type="float" default="0.0" />
1418 <description>
1419 Draw shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
1420 [param clip_l] and [param clip_r] are offsets relative to [param pos], going to the right in horizontal layout and downward in vertical layout. If [param clip_l] is not negative, glyphs starting before the offset are clipped. If [param clip_r] is not negative, glyphs ending after the offset are clipped.
1421 </description>
1422 </method>
1423 <method name="shaped_text_draw_outline" qualifiers="const">
1424 <return type="void" />
1425 <param index="0" name="shaped" type="RID" />
1426 <param index="1" name="canvas" type="RID" />
1427 <param index="2" name="pos" type="Vector2" />
1428 <param index="3" name="clip_l" type="float" default="-1" />
1429 <param index="4" name="clip_r" type="float" default="-1" />
1430 <param index="5" name="outline_size" type="int" default="1" />
1431 <param index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
1432 <param index="7" name="oversampling" type="float" default="0.0" />
1433 <description>
1434 Draw the outline of the shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.
1435 [param clip_l] and [param clip_r] are offsets relative to [param pos], going to the right in horizontal layout and downward in vertical layout. If [param clip_l] is not negative, glyphs starting before the offset are clipped. If [param clip_r] is not negative, glyphs ending after the offset are clipped.
1436 </description>
1437 </method>
1438 <method name="shaped_text_duplicate">
1439 <return type="RID" />
1440 <param index="0" name="rid" type="RID" />
1441 <description>
1442 Duplicates shaped text buffer.
1443 </description>
1444 </method>
1445 <method name="shaped_text_fit_to_width">
1446 <return type="float" />
1447 <param index="0" name="shaped" type="RID" />
1448 <param index="1" name="width" type="float" />
1449 <param index="2" name="justification_flags" type="int" enum="TextServer.JustificationFlag" is_bitfield="true" default="3" />
1450 <description>
1451 Adjusts text width to fit to specified width, returns new text width.
1452 </description>
1453 </method>
1454 <method name="shaped_text_get_ascent" qualifiers="const">
1455 <return type="float" />
1456 <param index="0" name="shaped" type="RID" />
1457 <description>
1458 Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
1459 [b]Note:[/b] Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
1460 </description>
1461 </method>
1462 <method name="shaped_text_get_carets" qualifiers="const">
1463 <return type="Dictionary" />
1464 <param index="0" name="shaped" type="RID" />
1465 <param index="1" name="position" type="int" />
1466 <description>
1467 Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.
1468 </description>
1469 </method>
1470 <method name="shaped_text_get_character_breaks" qualifiers="const">
1471 <return type="PackedInt32Array" />
1472 <param index="0" name="shaped" type="RID" />
1473 <description>
1474 Returns array of the composite character boundaries.
1475 </description>
1476 </method>
1477 <method name="shaped_text_get_custom_ellipsis" qualifiers="const">
1478 <return type="int" />
1479 <param index="0" name="shaped" type="RID" />
1480 <description>
1481 Returns ellipsis character used for text clipping.
1482 </description>
1483 </method>
1484 <method name="shaped_text_get_custom_punctuation" qualifiers="const">
1485 <return type="String" />
1486 <param index="0" name="shaped" type="RID" />
1487 <description>
1488 Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
1489 </description>
1490 </method>
1491 <method name="shaped_text_get_descent" qualifiers="const">
1492 <return type="float" />
1493 <param index="0" name="shaped" type="RID" />
1494 <description>
1495 Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
1496 [b]Note:[/b] Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
1497 </description>
1498 </method>
1499 <method name="shaped_text_get_direction" qualifiers="const">
1500 <return type="int" enum="TextServer.Direction" />
1501 <param index="0" name="shaped" type="RID" />
1502 <description>
1503 Returns direction of the text.
1504 </description>
1505 </method>
1506 <method name="shaped_text_get_dominant_direction_in_range" qualifiers="const">
1507 <return type="int" enum="TextServer.Direction" />
1508 <param index="0" name="shaped" type="RID" />
1509 <param index="1" name="start" type="int" />
1510 <param index="2" name="end" type="int" />
1511 <description>
1512 Returns dominant direction of in the range of text.
1513 </description>
1514 </method>
1515 <method name="shaped_text_get_ellipsis_glyph_count" qualifiers="const">
1516 <return type="int" />
1517 <param index="0" name="shaped" type="RID" />
1518 <description>
1519 Returns number of glyphs in the ellipsis.
1520 </description>
1521 </method>
1522 <method name="shaped_text_get_ellipsis_glyphs" qualifiers="const">
1523 <return type="Dictionary[]" />
1524 <param index="0" name="shaped" type="RID" />
1525 <description>
1526 Returns array of the glyphs in the ellipsis.
1527 </description>
1528 </method>
1529 <method name="shaped_text_get_ellipsis_pos" qualifiers="const">
1530 <return type="int" />
1531 <param index="0" name="shaped" type="RID" />
1532 <description>
1533 Returns position of the ellipsis.
1534 </description>
1535 </method>
1536 <method name="shaped_text_get_glyph_count" qualifiers="const">
1537 <return type="int" />
1538 <param index="0" name="shaped" type="RID" />
1539 <description>
1540 Returns number of glyphs in the buffer.
1541 </description>
1542 </method>
1543 <method name="shaped_text_get_glyphs" qualifiers="const">
1544 <return type="Dictionary[]" />
1545 <param index="0" name="shaped" type="RID" />
1546 <description>
1547 Returns an array of glyphs in the visual order.
1548 </description>
1549 </method>
1550 <method name="shaped_text_get_grapheme_bounds" qualifiers="const">
1551 <return type="Vector2" />
1552 <param index="0" name="shaped" type="RID" />
1553 <param index="1" name="pos" type="int" />
1554 <description>
1555 Returns composite character's bounds as offsets from the start of the line.
1556 </description>
1557 </method>
1558 <method name="shaped_text_get_inferred_direction" qualifiers="const">
1559 <return type="int" enum="TextServer.Direction" />
1560 <param index="0" name="shaped" type="RID" />
1561 <description>
1562 Returns direction of the text, inferred by the BiDi algorithm.
1563 </description>
1564 </method>
1565 <method name="shaped_text_get_line_breaks" qualifiers="const">
1566 <return type="PackedInt32Array" />
1567 <param index="0" name="shaped" type="RID" />
1568 <param index="1" name="width" type="float" />
1569 <param index="2" name="start" type="int" default="0" />
1570 <param index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" is_bitfield="true" default="3" />
1571 <description>
1572 Breaks text to the lines and returns character ranges for each line.
1573 </description>
1574 </method>
1575 <method name="shaped_text_get_line_breaks_adv" qualifiers="const">
1576 <return type="PackedInt32Array" />
1577 <param index="0" name="shaped" type="RID" />
1578 <param index="1" name="width" type="PackedFloat32Array" />
1579 <param index="2" name="start" type="int" default="0" />
1580 <param index="3" name="once" type="bool" default="true" />
1581 <param index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" is_bitfield="true" default="3" />
1582 <description>
1583 Breaks text to the lines and columns. Returns character ranges for each segment.
1584 </description>
1585 </method>
1586 <method name="shaped_text_get_object_glyph" qualifiers="const">
1587 <return type="int" />
1588 <param index="0" name="shaped" type="RID" />
1589 <param index="1" name="key" type="Variant" />
1590 <description>
1591 Returns the glyph index of the inline object.
1592 </description>
1593 </method>
1594 <method name="shaped_text_get_object_range" qualifiers="const">
1595 <return type="Vector2i" />
1596 <param index="0" name="shaped" type="RID" />
1597 <param index="1" name="key" type="Variant" />
1598 <description>
1599 Returns the character range of the inline object.
1600 </description>
1601 </method>
1602 <method name="shaped_text_get_object_rect" qualifiers="const">
1603 <return type="Rect2" />
1604 <param index="0" name="shaped" type="RID" />
1605 <param index="1" name="key" type="Variant" />
1606 <description>
1607 Returns bounding rectangle of the inline object.
1608 </description>
1609 </method>
1610 <method name="shaped_text_get_objects" qualifiers="const">
1611 <return type="Array" />
1612 <param index="0" name="shaped" type="RID" />
1613 <description>
1614 Returns array of inline objects.
1615 </description>
1616 </method>
1617 <method name="shaped_text_get_orientation" qualifiers="const">
1618 <return type="int" enum="TextServer.Orientation" />
1619 <param index="0" name="shaped" type="RID" />
1620 <description>
1621 Returns text orientation.
1622 </description>
1623 </method>
1624 <method name="shaped_text_get_parent" qualifiers="const">
1625 <return type="RID" />
1626 <param index="0" name="shaped" type="RID" />
1627 <description>
1628 Returns the parent buffer from which the substring originates.
1629 </description>
1630 </method>
1631 <method name="shaped_text_get_preserve_control" qualifiers="const">
1632 <return type="bool" />
1633 <param index="0" name="shaped" type="RID" />
1634 <description>
1635 Returns [code]true[/code] if text buffer is configured to display control characters.
1636 </description>
1637 </method>
1638 <method name="shaped_text_get_preserve_invalid" qualifiers="const">
1639 <return type="bool" />
1640 <param index="0" name="shaped" type="RID" />
1641 <description>
1642 Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
1643 [b]Note:[/b] If set to [code]false[/code], nothing is displayed in place of invalid characters.
1644 </description>
1645 </method>
1646 <method name="shaped_text_get_range" qualifiers="const">
1647 <return type="Vector2i" />
1648 <param index="0" name="shaped" type="RID" />
1649 <description>
1650 Returns substring buffer character range in the parent buffer.
1651 </description>
1652 </method>
1653 <method name="shaped_text_get_selection" qualifiers="const">
1654 <return type="PackedVector2Array" />
1655 <param index="0" name="shaped" type="RID" />
1656 <param index="1" name="start" type="int" />
1657 <param index="2" name="end" type="int" />
1658 <description>
1659 Returns selection rectangles for the specified character range.
1660 </description>
1661 </method>
1662 <method name="shaped_text_get_size" qualifiers="const">
1663 <return type="Vector2" />
1664 <param index="0" name="shaped" type="RID" />
1665 <description>
1666 Returns size of the text.
1667 </description>
1668 </method>
1669 <method name="shaped_text_get_spacing" qualifiers="const">
1670 <return type="int" />
1671 <param index="0" name="shaped" type="RID" />
1672 <param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
1673 <description>
1674 Returns extra spacing added between glyphs or lines in pixels.
1675 </description>
1676 </method>
1677 <method name="shaped_text_get_trim_pos" qualifiers="const">
1678 <return type="int" />
1679 <param index="0" name="shaped" type="RID" />
1680 <description>
1681 Returns the position of the overrun trim.
1682 </description>
1683 </method>
1684 <method name="shaped_text_get_underline_position" qualifiers="const">
1685 <return type="float" />
1686 <param index="0" name="shaped" type="RID" />
1687 <description>
1688 Returns pixel offset of the underline below the baseline.
1689 </description>
1690 </method>
1691 <method name="shaped_text_get_underline_thickness" qualifiers="const">
1692 <return type="float" />
1693 <param index="0" name="shaped" type="RID" />
1694 <description>
1695 Returns thickness of the underline.
1696 </description>
1697 </method>
1698 <method name="shaped_text_get_width" qualifiers="const">
1699 <return type="float" />
1700 <param index="0" name="shaped" type="RID" />
1701 <description>
1702 Returns width (for horizontal layout) or height (for vertical) of the text.
1703 </description>
1704 </method>
1705 <method name="shaped_text_get_word_breaks" qualifiers="const">
1706 <return type="PackedInt32Array" />
1707 <param index="0" name="shaped" type="RID" />
1708 <param index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" is_bitfield="true" default="264" />
1709 <param index="2" name="skip_grapheme_flags" type="int" enum="TextServer.GraphemeFlag" is_bitfield="true" default="4" />
1710 <description>
1711 Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking.
1712 </description>
1713 </method>
1714 <method name="shaped_text_has_object" qualifiers="const">
1715 <return type="bool" />
1716 <param index="0" name="shaped" type="RID" />
1717 <param index="1" name="key" type="Variant" />
1718 <description>
1719 Returns [code]true[/code] if an object with [param key] is embedded in this shaped text buffer.
1720 </description>
1721 </method>
1722 <method name="shaped_text_has_visible_chars" qualifiers="const">
1723 <return type="bool" />
1724 <param index="0" name="shaped" type="RID" />
1725 <description>
1726 Returns [code]true[/code] if text buffer contains any visible characters.
1727 </description>
1728 </method>
1729 <method name="shaped_text_hit_test_grapheme" qualifiers="const">
1730 <return type="int" />
1731 <param index="0" name="shaped" type="RID" />
1732 <param index="1" name="coords" type="float" />
1733 <description>
1734 Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
1735 </description>
1736 </method>
1737 <method name="shaped_text_hit_test_position" qualifiers="const">
1738 <return type="int" />
1739 <param index="0" name="shaped" type="RID" />
1740 <param index="1" name="coords" type="float" />
1741 <description>
1742 Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
1743 </description>
1744 </method>
1745 <method name="shaped_text_is_ready" qualifiers="const">
1746 <return type="bool" />
1747 <param index="0" name="shaped" type="RID" />
1748 <description>
1749 Returns [code]true[/code] if buffer is successfully shaped.
1750 </description>
1751 </method>
1752 <method name="shaped_text_next_character_pos" qualifiers="const">
1753 <return type="int" />
1754 <param index="0" name="shaped" type="RID" />
1755 <param index="1" name="pos" type="int" />
1756 <description>
1757 Returns composite character end position closest to the [param pos].
1758 </description>
1759 </method>
1760 <method name="shaped_text_next_grapheme_pos" qualifiers="const">
1761 <return type="int" />
1762 <param index="0" name="shaped" type="RID" />
1763 <param index="1" name="pos" type="int" />
1764 <description>
1765 Returns grapheme end position closest to the [param pos].
1766 </description>
1767 </method>
1768 <method name="shaped_text_overrun_trim_to_width">
1769 <return type="void" />
1770 <param index="0" name="shaped" type="RID" />
1771 <param index="1" name="width" type="float" default="0" />
1772 <param index="2" name="overrun_trim_flags" type="int" enum="TextServer.TextOverrunFlag" is_bitfield="true" default="0" />
1773 <description>
1774 Trims text if it exceeds the given width.
1775 </description>
1776 </method>
1777 <method name="shaped_text_prev_character_pos" qualifiers="const">
1778 <return type="int" />
1779 <param index="0" name="shaped" type="RID" />
1780 <param index="1" name="pos" type="int" />
1781 <description>
1782 Returns composite character start position closest to the [param pos].
1783 </description>
1784 </method>
1785 <method name="shaped_text_prev_grapheme_pos" qualifiers="const">
1786 <return type="int" />
1787 <param index="0" name="shaped" type="RID" />
1788 <param index="1" name="pos" type="int" />
1789 <description>
1790 Returns grapheme start position closest to the [param pos].
1791 </description>
1792 </method>
1793 <method name="shaped_text_resize_object">
1794 <return type="bool" />
1795 <param index="0" name="shaped" type="RID" />
1796 <param index="1" name="key" type="Variant" />
1797 <param index="2" name="size" type="Vector2" />
1798 <param index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
1799 <param index="4" name="baseline" type="float" default="0.0" />
1800 <description>
1801 Sets new size and alignment of embedded object.
1802 </description>
1803 </method>
1804 <method name="shaped_text_set_bidi_override">
1805 <return type="void" />
1806 <param index="0" name="shaped" type="RID" />
1807 <param index="1" name="override" type="Array" />
1808 <description>
1809 Overrides BiDi for the structured text.
1810 Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
1811 </description>
1812 </method>
1813 <method name="shaped_text_set_custom_ellipsis">
1814 <return type="void" />
1815 <param index="0" name="shaped" type="RID" />
1816 <param index="1" name="char" type="int" />
1817 <description>
1818 Sets ellipsis character used for text clipping.
1819 </description>
1820 </method>
1821 <method name="shaped_text_set_custom_punctuation">
1822 <return type="void" />
1823 <param index="0" name="shaped" type="RID" />
1824 <param index="1" name="punct" type="String" />
1825 <description>
1826 Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
1827 </description>
1828 </method>
1829 <method name="shaped_text_set_direction">
1830 <return type="void" />
1831 <param index="0" name="shaped" type="RID" />
1832 <param index="1" name="direction" type="int" enum="TextServer.Direction" default="0" />
1833 <description>
1834 Sets desired text direction. If set to [constant DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale.
1835 [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
1836 </description>
1837 </method>
1838 <method name="shaped_text_set_orientation">
1839 <return type="void" />
1840 <param index="0" name="shaped" type="RID" />
1841 <param index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
1842 <description>
1843 Sets desired text orientation.
1844 [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
1845 </description>
1846 </method>
1847 <method name="shaped_text_set_preserve_control">
1848 <return type="void" />
1849 <param index="0" name="shaped" type="RID" />
1850 <param index="1" name="enabled" type="bool" />
1851 <description>
1852 If set to [code]true[/code] text buffer will display control characters.
1853 </description>
1854 </method>
1855 <method name="shaped_text_set_preserve_invalid">
1856 <return type="void" />
1857 <param index="0" name="shaped" type="RID" />
1858 <param index="1" name="enabled" type="bool" />
1859 <description>
1860 If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
1861 </description>
1862 </method>
1863 <method name="shaped_text_set_spacing">
1864 <return type="void" />
1865 <param index="0" name="shaped" type="RID" />
1866 <param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
1867 <param index="2" name="value" type="int" />
1868 <description>
1869 Sets extra spacing added between glyphs or lines in pixels.
1870 </description>
1871 </method>
1872 <method name="shaped_text_shape">
1873 <return type="bool" />
1874 <param index="0" name="shaped" type="RID" />
1875 <description>
1876 Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
1877 [b]Note:[/b] It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
1878 </description>
1879 </method>
1880 <method name="shaped_text_sort_logical">
1881 <return type="Dictionary[]" />
1882 <param index="0" name="shaped" type="RID" />
1883 <description>
1884 Returns text glyphs in the logical order.
1885 </description>
1886 </method>
1887 <method name="shaped_text_substr" qualifiers="const">
1888 <return type="RID" />
1889 <param index="0" name="shaped" type="RID" />
1890 <param index="1" name="start" type="int" />
1891 <param index="2" name="length" type="int" />
1892 <description>
1893 Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).
1894 </description>
1895 </method>
1896 <method name="shaped_text_tab_align">
1897 <return type="float" />
1898 <param index="0" name="shaped" type="RID" />
1899 <param index="1" name="tab_stops" type="PackedFloat32Array" />
1900 <description>
1901 Aligns shaped text to the given tab-stops.
1902 </description>
1903 </method>
1904 <method name="spoof_check" qualifiers="const">
1905 <return type="bool" />
1906 <param index="0" name="string" type="String" />
1907 <description>
1908 Returns [code]true[/code] if [param string] is likely to be an attempt at confusing the reader.
1909 [b]Note:[/b] Always returns [code]false[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
1910 </description>
1911 </method>
1912 <method name="string_get_character_breaks" qualifiers="const">
1913 <return type="PackedInt32Array" />
1914 <param index="0" name="string" type="String" />
1915 <param index="1" name="language" type="String" default="&quot;&quot;" />
1916 <description>
1917 Returns array of the composite character boundaries.
1918 [codeblock]
1919 var ts = TextServerManager.get_primary_interface()
1920 print(ts.string_get_character_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
1921 [/codeblock]
1922 </description>
1923 </method>
1924 <method name="string_get_word_breaks" qualifiers="const">
1925 <return type="PackedInt32Array" />
1926 <param index="0" name="string" type="String" />
1927 <param index="1" name="language" type="String" default="&quot;&quot;" />
1928 <param index="2" name="chars_per_line" type="int" default="0" />
1929 <description>
1930 Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even.
1931 When [param chars_per_line] is greater than zero, line break boundaries are returned instead.
1932 [codeblock]
1933 var ts = TextServerManager.get_primary_interface()
1934 # Corresponds to the substrings "The", "Godot", "Engine", and "4".
1935 print(ts.string_get_word_breaks("The Godot Engine, 4")) # Prints [0, 3, 4, 9, 10, 16, 18, 19]
1936 # Corresponds to the substrings "The", "Godot", "Engin", and "e, 4".
1937 print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # Prints [0, 3, 4, 9, 10, 15, 15, 19]
1938 # Corresponds to the substrings "The Godot" and "Engine, 4".
1939 print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # Prints [0, 9, 10, 19]
1940 [/codeblock]
1941 </description>
1942 </method>
1943 <method name="string_to_lower" qualifiers="const">
1944 <return type="String" />
1945 <param index="0" name="string" type="String" />
1946 <param index="1" name="language" type="String" default="&quot;&quot;" />
1947 <description>
1948 Returns the string converted to [code]lowercase[/code].
1949 [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
1950 [b]Note:[/b] The result may be longer or shorter than the original.
1951 </description>
1952 </method>
1953 <method name="string_to_title" qualifiers="const">
1954 <return type="String" />
1955 <param index="0" name="string" type="String" />
1956 <param index="1" name="language" type="String" default="&quot;&quot;" />
1957 <description>
1958 Returns the string converted to [code]Title Case[/code].
1959 [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
1960 [b]Note:[/b] The result may be longer or shorter than the original.
1961 </description>
1962 </method>
1963 <method name="string_to_upper" qualifiers="const">
1964 <return type="String" />
1965 <param index="0" name="string" type="String" />
1966 <param index="1" name="language" type="String" default="&quot;&quot;" />
1967 <description>
1968 Returns the string converted to [code]UPPERCASE[/code].
1969 [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
1970 [b]Note:[/b] The result may be longer or shorter than the original.
1971 </description>
1972 </method>
1973 <method name="strip_diacritics" qualifiers="const">
1974 <return type="String" />
1975 <param index="0" name="string" type="String" />
1976 <description>
1977 Strips diacritics from the string.
1978 [b]Note:[/b] The result may be longer or shorter than the original.
1979 </description>
1980 </method>
1981 <method name="tag_to_name" qualifiers="const">
1982 <return type="String" />
1983 <param index="0" name="tag" type="int" />
1984 <description>
1985 Converts the given OpenType tag to the readable name of a feature, variation, script, or language.
1986 </description>
1987 </method>
1988 </methods>
1989 <constants>
1990 <constant name="FONT_ANTIALIASING_NONE" value="0" enum="FontAntialiasing">
1991 Font glyphs are rasterized as 1-bit bitmaps.
1992 </constant>
1993 <constant name="FONT_ANTIALIASING_GRAY" value="1" enum="FontAntialiasing">
1994 Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
1995 </constant>
1996 <constant name="FONT_ANTIALIASING_LCD" value="2" enum="FontAntialiasing">
1997 Font glyphs are rasterized for LCD screens.
1998 LCD subpixel layout is determined by the value of the [member ProjectSettings.gui/theme/lcd_subpixel_layout] setting.
1999 LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
2000 </constant>
2001 <constant name="FONT_LCD_SUBPIXEL_LAYOUT_NONE" value="0" enum="FontLCDSubpixelLayout">
2002 Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
2003 </constant>
2004 <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HRGB" value="1" enum="FontLCDSubpixelLayout">
2005 Horizontal RGB subpixel layout.
2006 </constant>
2007 <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HBGR" value="2" enum="FontLCDSubpixelLayout">
2008 Horizontal BGR subpixel layout.
2009 </constant>
2010 <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VRGB" value="3" enum="FontLCDSubpixelLayout">
2011 Vertical RGB subpixel layout.
2012 </constant>
2013 <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VBGR" value="4" enum="FontLCDSubpixelLayout">
2014 Vertical BGR subpixel layout.
2015 </constant>
2016 <constant name="FONT_LCD_SUBPIXEL_LAYOUT_MAX" value="5" enum="FontLCDSubpixelLayout">
2017 Represents the size of the [enum FontLCDSubpixelLayout] enum.
2018 </constant>
2019 <constant name="DIRECTION_AUTO" value="0" enum="Direction">
2020 Text direction is determined based on contents and current locale.
2021 </constant>
2022 <constant name="DIRECTION_LTR" value="1" enum="Direction">
2023 Text is written from left to right.
2024 </constant>
2025 <constant name="DIRECTION_RTL" value="2" enum="Direction">
2026 Text is written from right to left.
2027 </constant>
2028 <constant name="DIRECTION_INHERITED" value="3" enum="Direction">
2029 Text writing direction is the same as base string writing direction. Used for BiDi override only.
2030 </constant>
2031 <constant name="ORIENTATION_HORIZONTAL" value="0" enum="Orientation">
2032 Text is written horizontally.
2033 </constant>
2034 <constant name="ORIENTATION_VERTICAL" value="1" enum="Orientation">
2035 Left to right text is written vertically from top to bottom.
2036 Right to left text is written vertically from bottom to top.
2037 </constant>
2038 <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag" is_bitfield="true">
2039 Do not justify text.
2040 </constant>
2041 <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag" is_bitfield="true">
2042 Justify text by adding and removing kashidas.
2043 </constant>
2044 <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag" is_bitfield="true">
2045 Justify text by changing width of the spaces between the words.
2046 </constant>
2047 <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag" is_bitfield="true">
2048 Remove trailing and leading spaces from the justified text.
2049 </constant>
2050 <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag" is_bitfield="true">
2051 Only apply justification to the part of the text after the last tab.
2052 </constant>
2053 <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag" is_bitfield="true">
2054 Apply justification to the trimmed line with ellipsis.
2055 </constant>
2056 <constant name="JUSTIFICATION_SKIP_LAST_LINE" value="32" enum="JustificationFlag" is_bitfield="true">
2057 Do not apply justification to the last line of the paragraph.
2058 </constant>
2059 <constant name="JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS" value="64" enum="JustificationFlag" is_bitfield="true">
2060 Do not apply justification to the last line of the paragraph with visible characters (takes precedence over [constant JUSTIFICATION_SKIP_LAST_LINE]).
2061 </constant>
2062 <constant name="JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE" value="128" enum="JustificationFlag" is_bitfield="true">
2063 Always apply justification to the paragraphs with a single line ([constant JUSTIFICATION_SKIP_LAST_LINE] and [constant JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS] are ignored).
2064 </constant>
2065 <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
2066 Autowrap is disabled.
2067 </constant>
2068 <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
2069 Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
2070 </constant>
2071 <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
2072 Wraps the text inside the node's bounding rectangle by soft-breaking between words.
2073 </constant>
2074 <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
2075 Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
2076 </constant>
2077 <constant name="BREAK_NONE" value="0" enum="LineBreakFlag" is_bitfield="true">
2078 Do not break the line.
2079 </constant>
2080 <constant name="BREAK_MANDATORY" value="1" enum="LineBreakFlag" is_bitfield="true">
2081 Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]).
2082 </constant>
2083 <constant name="BREAK_WORD_BOUND" value="2" enum="LineBreakFlag" is_bitfield="true">
2084 Break the line between the words.
2085 </constant>
2086 <constant name="BREAK_GRAPHEME_BOUND" value="4" enum="LineBreakFlag" is_bitfield="true">
2087 Break the line between any unconnected graphemes.
2088 </constant>
2089 <constant name="BREAK_ADAPTIVE" value="8" enum="LineBreakFlag" is_bitfield="true">
2090 Should be used only in conjunction with [constant BREAK_WORD_BOUND], break the line between any unconnected graphemes, if it's impossible to break it between the words.
2091 </constant>
2092 <constant name="BREAK_TRIM_EDGE_SPACES" value="16" enum="LineBreakFlag" is_bitfield="true" deprecated="Use [code]BREAK_TRIM_START_EDGE_SPACES | BREAK_TRIM_END_EDGE_SPACES[/code] instead.">
2093 Remove edge spaces from the broken line segments.
2094 </constant>
2095 <constant name="BREAK_TRIM_INDENT" value="32" enum="LineBreakFlag" is_bitfield="true">
2096 Subtract first line indentation width from all lines after the first one.
2097 </constant>
2098 <constant name="BREAK_TRIM_START_EDGE_SPACES" value="64" enum="LineBreakFlag" is_bitfield="true">
2099 Remove spaces and line break characters from the start of broken line segments.
2100 E.g, after line breaking, the second segment of the following text [code]test \n next[/code], is [code]next[/code] if the flag is set, and [code] next[/code] if it is not.
2101 </constant>
2102 <constant name="BREAK_TRIM_END_EDGE_SPACES" value="128" enum="LineBreakFlag" is_bitfield="true">
2103 Remove spaces and line break characters from the end of broken line segments.
2104 E.g, after line breaking, the first segment of the following text [code]test \n next[/code], is [code]test[/code] if the flag is set, and [code]test \n[/code] if it is not.
2105 </constant>
2106 <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
2107 Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text.
2108 [b]Note:[/b] In this mode, trimmed text is not processed at all. It is not accounted for in line breaking and size calculations.
2109 </constant>
2110 <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
2111 Displays glyphs that are mapped to the first [member Label.visible_characters] or [member RichTextLabel.visible_characters] characters from the beginning of the text.
2112 </constant>
2113 <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
2114 Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
2115 </constant>
2116 <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
2117 Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left.
2118 </constant>
2119 <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
2120 Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the right.
2121 </constant>
2122 <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
2123 No text trimming is performed.
2124 </constant>
2125 <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
2126 Trims the text per character.
2127 </constant>
2128 <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
2129 Trims the text per word.
2130 </constant>
2131 <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
2132 Trims the text per character and adds an ellipsis to indicate that parts are hidden if trimmed text is 6 characters or longer.
2133 </constant>
2134 <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
2135 Trims the text per word and adds an ellipsis to indicate that parts are hidden if trimmed text is 6 characters or longer.
2136 </constant>
2137 <constant name="OVERRUN_TRIM_ELLIPSIS_FORCE" value="5" enum="OverrunBehavior">
2138 Trims the text per character and adds an ellipsis to indicate that parts are hidden regardless of trimmed text length.
2139 </constant>
2140 <constant name="OVERRUN_TRIM_WORD_ELLIPSIS_FORCE" value="6" enum="OverrunBehavior">
2141 Trims the text per word and adds an ellipsis to indicate that parts are hidden regardless of trimmed text length.
2142 </constant>
2143 <constant name="OVERRUN_NO_TRIM" value="0" enum="TextOverrunFlag" is_bitfield="true">
2144 No trimming is performed.
2145 </constant>
2146 <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag" is_bitfield="true">
2147 Trims the text when it exceeds the given width.
2148 </constant>
2149 <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag" is_bitfield="true">
2150 Trims the text per word instead of per grapheme.
2151 </constant>
2152 <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag" is_bitfield="true">
2153 Determines whether an ellipsis should be added at the end of the text.
2154 </constant>
2155 <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag" is_bitfield="true">
2156 Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
2157 </constant>
2158 <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag" is_bitfield="true">
2159 Accounts for the text being justified before attempting to trim it (see [enum JustificationFlag]).
2160 </constant>
2161 <constant name="OVERRUN_SHORT_STRING_ELLIPSIS" value="32" enum="TextOverrunFlag" is_bitfield="true">
2162 Determines whether the ellipsis should be added regardless of the string length, otherwise it is added only if the string is 6 characters or longer.
2163 </constant>
2164 <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag" is_bitfield="true">
2165 Grapheme is supported by the font, and can be drawn.
2166 </constant>
2167 <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag" is_bitfield="true">
2168 Grapheme is part of right-to-left or bottom-to-top run.
2169 </constant>
2170 <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag" is_bitfield="true">
2171 Grapheme is not part of source text, it was added by justification process.
2172 </constant>
2173 <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag" is_bitfield="true">
2174 Grapheme is whitespace.
2175 </constant>
2176 <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag" is_bitfield="true">
2177 Grapheme is mandatory break point (e.g. [code]"\n"[/code]).
2178 </constant>
2179 <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag" is_bitfield="true">
2180 Grapheme is optional break point (e.g. space).
2181 </constant>
2182 <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag" is_bitfield="true">
2183 Grapheme is the tabulation character.
2184 </constant>
2185 <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag" is_bitfield="true">
2186 Grapheme is kashida.
2187 </constant>
2188 <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag" is_bitfield="true">
2189 Grapheme is punctuation character.
2190 </constant>
2191 <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag" is_bitfield="true">
2192 Grapheme is underscore character.
2193 </constant>
2194 <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag" is_bitfield="true">
2195 Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
2196 </constant>
2197 <constant name="GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL" value="2048" enum="GraphemeFlag" is_bitfield="true">
2198 It is safe to insert a U+0640 before this grapheme for elongation.
2199 </constant>
2200 <constant name="GRAPHEME_IS_EMBEDDED_OBJECT" value="4096" enum="GraphemeFlag" is_bitfield="true">
2201 Grapheme is an object replacement character for the embedded object.
2202 </constant>
2203 <constant name="GRAPHEME_IS_SOFT_HYPHEN" value="8192" enum="GraphemeFlag" is_bitfield="true">
2204 Grapheme is a soft hyphen.
2205 </constant>
2206 <constant name="HINTING_NONE" value="0" enum="Hinting">
2207 Disables font hinting (smoother but less crisp).
2208 </constant>
2209 <constant name="HINTING_LIGHT" value="1" enum="Hinting">
2210 Use the light font hinting mode.
2211 </constant>
2212 <constant name="HINTING_NORMAL" value="2" enum="Hinting">
2213 Use the default font hinting mode (crisper but less smooth).
2214 [b]Note:[/b] This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
2215 </constant>
2216 <constant name="SUBPIXEL_POSITIONING_DISABLED" value="0" enum="SubpixelPositioning">
2217 Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
2218 </constant>
2219 <constant name="SUBPIXEL_POSITIONING_AUTO" value="1" enum="SubpixelPositioning">
2220 Glyph horizontal position is rounded based on font size.
2221 - To one quarter of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE].
2222 - To one half of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE].
2223 - To the whole pixel size for larger fonts.
2224 </constant>
2225 <constant name="SUBPIXEL_POSITIONING_ONE_HALF" value="2" enum="SubpixelPositioning">
2226 Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
2227 </constant>
2228 <constant name="SUBPIXEL_POSITIONING_ONE_QUARTER" value="3" enum="SubpixelPositioning">
2229 Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
2230 </constant>
2231 <constant name="SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE" value="20" enum="SubpixelPositioning">
2232 Maximum font size which will use "one half of the pixel" subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
2233 </constant>
2234 <constant name="SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE" value="16" enum="SubpixelPositioning">
2235 Maximum font size which will use "one quarter of the pixel" subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
2236 </constant>
2237 <constant name="FEATURE_SIMPLE_LAYOUT" value="1" enum="Feature">
2238 TextServer supports simple text layouts.
2239 </constant>
2240 <constant name="FEATURE_BIDI_LAYOUT" value="2" enum="Feature">
2241 TextServer supports bidirectional text layouts.
2242 </constant>
2243 <constant name="FEATURE_VERTICAL_LAYOUT" value="4" enum="Feature">
2244 TextServer supports vertical layouts.
2245 </constant>
2246 <constant name="FEATURE_SHAPING" value="8" enum="Feature">
2247 TextServer supports complex text shaping.
2248 </constant>
2249 <constant name="FEATURE_KASHIDA_JUSTIFICATION" value="16" enum="Feature">
2250 TextServer supports justification using kashidas.
2251 </constant>
2252 <constant name="FEATURE_BREAK_ITERATORS" value="32" enum="Feature">
2253 TextServer supports complex line/word breaking rules (e.g. dictionary based).
2254 </constant>
2255 <constant name="FEATURE_FONT_BITMAP" value="64" enum="Feature">
2256 TextServer supports loading bitmap fonts.
2257 </constant>
2258 <constant name="FEATURE_FONT_DYNAMIC" value="128" enum="Feature">
2259 TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
2260 </constant>
2261 <constant name="FEATURE_FONT_MSDF" value="256" enum="Feature">
2262 TextServer supports multichannel signed distance field dynamic font rendering.
2263 </constant>
2264 <constant name="FEATURE_FONT_SYSTEM" value="512" enum="Feature">
2265 TextServer supports loading system fonts.
2266 </constant>
2267 <constant name="FEATURE_FONT_VARIABLE" value="1024" enum="Feature">
2268 TextServer supports variable fonts.
2269 </constant>
2270 <constant name="FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION" value="2048" enum="Feature">
2271 TextServer supports locale dependent and context sensitive case conversion.
2272 </constant>
2273 <constant name="FEATURE_USE_SUPPORT_DATA" value="4096" enum="Feature">
2274 TextServer require external data file for some features, see [method load_support_data].
2275 </constant>
2276 <constant name="FEATURE_UNICODE_IDENTIFIERS" value="8192" enum="Feature">
2277 TextServer supports UAX #31 identifier validation, see [method is_valid_identifier].
2278 </constant>
2279 <constant name="FEATURE_UNICODE_SECURITY" value="16384" enum="Feature">
2280 TextServer supports [url=https://unicode.org/reports/tr36/]Unicode Technical Report #36[/url] and [url=https://unicode.org/reports/tr39/]Unicode Technical Standard #39[/url] based spoof detection features.
2281 </constant>
2282 <constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag">
2283 Contour point is on the curve.
2284 </constant>
2285 <constant name="CONTOUR_CURVE_TAG_OFF_CONIC" value="0" enum="ContourPointTag">
2286 Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
2287 </constant>
2288 <constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag">
2289 Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
2290 </constant>
2291 <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
2292 Spacing for each glyph.
2293 </constant>
2294 <constant name="SPACING_SPACE" value="1" enum="SpacingType">
2295 Spacing for the space character.
2296 </constant>
2297 <constant name="SPACING_TOP" value="2" enum="SpacingType">
2298 Spacing at the top of the line.
2299 </constant>
2300 <constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
2301 Spacing at the bottom of the line.
2302 </constant>
2303 <constant name="SPACING_MAX" value="4" enum="SpacingType">
2304 Represents the size of the [enum SpacingType] enum.
2305 </constant>
2306 <constant name="FONT_BOLD" value="1" enum="FontStyle" is_bitfield="true">
2307 Font is bold.
2308 </constant>
2309 <constant name="FONT_ITALIC" value="2" enum="FontStyle" is_bitfield="true">
2310 Font is italic or oblique.
2311 </constant>
2312 <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle" is_bitfield="true">
2313 Font has fixed-width characters (also known as monospace).
2314 </constant>
2315 <constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
2316 Use default Unicode BiDi algorithm.
2317 </constant>
2318 <constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser">
2319 BiDi override for URI.
2320 </constant>
2321 <constant name="STRUCTURED_TEXT_FILE" value="2" enum="StructuredTextParser">
2322 BiDi override for file path.
2323 </constant>
2324 <constant name="STRUCTURED_TEXT_EMAIL" value="3" enum="StructuredTextParser">
2325 BiDi override for email.
2326 </constant>
2327 <constant name="STRUCTURED_TEXT_LIST" value="4" enum="StructuredTextParser">
2328 BiDi override for lists. Structured text options: list separator [String].
2329 </constant>
2330 <constant name="STRUCTURED_TEXT_GDSCRIPT" value="5" enum="StructuredTextParser">
2331 BiDi override for GDScript.
2332 </constant>
2333 <constant name="STRUCTURED_TEXT_CUSTOM" value="6" enum="StructuredTextParser">
2334 User defined structured text BiDi override function.
2335 </constant>
2336 <constant name="FIXED_SIZE_SCALE_DISABLE" value="0" enum="FixedSizeScaleMode">
2337 Bitmap font is not scaled.
2338 </constant>
2339 <constant name="FIXED_SIZE_SCALE_INTEGER_ONLY" value="1" enum="FixedSizeScaleMode">
2340 Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.
2341 </constant>
2342 <constant name="FIXED_SIZE_SCALE_ENABLED" value="2" enum="FixedSizeScaleMode">
2343 Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.
2344 </constant>
2345 </constants>
2346 </class>