:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextParagraph.xml. .. _class_TextParagraph: TextParagraph ============= **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Holds a paragraph of text. .. rst-class:: classref-introduction-group Description ----------- Abstraction over :ref:`TextServer` for handling a single paragraph of text. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | |bitfield|\[:ref:`LineBreakFlag`\] | :ref:`break_flags` | ``3`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`custom_punctuation` | ``""`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`Direction` | :ref:`direction` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | |bitfield|\[:ref:`JustificationFlag`\] | :ref:`justification_flags` | ``163`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`line_spacing` | ``0.0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`max_lines_visible` | ``-1`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`Orientation` | :ref:`orientation` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`preserve_control` | ``false`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`preserve_invalid` | ``true`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`width` | ``-1.0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`add_object`\ (\ key\: :ref:`Variant`, size\: :ref:`Vector2`, inline_align\: :ref:`InlineAlignment` = 5, length\: :ref:`int` = 1, baseline\: :ref:`float` = 0.0\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`add_string`\ (\ text\: :ref:`String`, font\: :ref:`Font`, font_size\: :ref:`int`, language\: :ref:`String` = "", meta\: :ref:`Variant` = null\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear`\ (\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_dropcap`\ (\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw`\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, color\: :ref:`Color` = Color(1, 1, 1, 1), dc_color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_dropcap`\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_dropcap_outline`\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, outline_size\: :ref:`int` = 1, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_line`\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, line\: :ref:`int`, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_line_outline`\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, line\: :ref:`int`, outline_size\: :ref:`int` = 1, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_outline`\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, outline_size\: :ref:`int` = 1, color\: :ref:`Color` = Color(1, 1, 1, 1), dc_color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_dropcap_lines`\ (\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_dropcap_rid`\ (\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_dropcap_size`\ (\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_line_ascent`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_line_count`\ (\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_line_descent`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_line_object_rect`\ (\ line\: :ref:`int`, key\: :ref:`Variant`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_line_objects`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`get_line_range`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_line_rid`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_line_size`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_line_underline_position`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_line_underline_thickness`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_line_width`\ (\ line\: :ref:`int`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_non_wrapped_size`\ (\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_size`\ (\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hit_test`\ (\ coords\: :ref:`Vector2`\ ) |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`resize_object`\ (\ key\: :ref:`Variant`, size\: :ref:`Vector2`, inline_align\: :ref:`InlineAlignment` = 5, baseline\: :ref:`float` = 0.0\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bidi_override`\ (\ override\: :ref:`Array`\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`set_dropcap`\ (\ text\: :ref:`String`, font\: :ref:`Font`, font_size\: :ref:`int`, dropcap_margins\: :ref:`Rect2` = Rect2(0, 0, 0, 0), language\: :ref:`String` = ""\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`tab_align`\ (\ tab_stops\: :ref:`PackedFloat32Array`\ ) | +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextParagraph_property_alignment: .. rst-class:: classref-property :ref:`HorizontalAlignment` **alignment** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) - :ref:`HorizontalAlignment` **get_alignment**\ (\ ) Paragraph horizontal alignment. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_break_flags: .. rst-class:: classref-property |bitfield|\[:ref:`LineBreakFlag`\] **break_flags** = ``3`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_break_flags**\ (\ value\: |bitfield|\[:ref:`LineBreakFlag`\]\ ) - |bitfield|\[:ref:`LineBreakFlag`\] **get_break_flags**\ (\ ) Line breaking rules. For more info see :ref:`TextServer`. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_custom_punctuation: .. rst-class:: classref-property :ref:`String` **custom_punctuation** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_custom_punctuation**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_custom_punctuation**\ (\ ) Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_direction: .. rst-class:: classref-property :ref:`Direction` **direction** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_direction**\ (\ value\: :ref:`Direction`\ ) - :ref:`Direction` **get_direction**\ (\ ) Text writing direction. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_ellipsis_char: .. rst-class:: classref-property :ref:`String` **ellipsis_char** = ``"…"`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_ellipsis_char**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_ellipsis_char**\ (\ ) Ellipsis character used for text clipping. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_justification_flags: .. rst-class:: classref-property |bitfield|\[:ref:`JustificationFlag`\] **justification_flags** = ``163`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag`\]\ ) - |bitfield|\[:ref:`JustificationFlag`\] **get_justification_flags**\ (\ ) Line fill alignment rules. See :ref:`JustificationFlag` for more information. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_line_spacing: .. rst-class:: classref-property :ref:`float` **line_spacing** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_line_spacing**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_line_spacing**\ (\ ) Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_max_lines_visible: .. rst-class:: classref-property :ref:`int` **max_lines_visible** = ``-1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_max_lines_visible**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_max_lines_visible**\ (\ ) Limits the lines of text shown. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_orientation: .. rst-class:: classref-property :ref:`Orientation` **orientation** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_orientation**\ (\ value\: :ref:`Orientation`\ ) - :ref:`Orientation` **get_orientation**\ (\ ) Text orientation. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_preserve_control: .. rst-class:: classref-property :ref:`bool` **preserve_control** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_preserve_control**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_preserve_control**\ (\ ) If set to ``true`` text will display control characters. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_preserve_invalid: .. rst-class:: classref-property :ref:`bool` **preserve_invalid** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_preserve_invalid**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_preserve_invalid**\ (\ ) If set to ``true`` text will display invalid characters. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_text_overrun_behavior: .. rst-class:: classref-property :ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior`\ ) - :ref:`OverrunBehavior` **get_text_overrun_behavior**\ (\ ) Sets the clipping behavior when the text exceeds the paragraph's set width. See :ref:`OverrunBehavior` for a description of all modes. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_property_width: .. rst-class:: classref-property :ref:`float` **width** = ``-1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_width**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_width**\ (\ ) Paragraph width. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TextParagraph_method_add_object: .. rst-class:: classref-method :ref:`bool` **add_object**\ (\ key\: :ref:`Variant`, size\: :ref:`Vector2`, inline_align\: :ref:`InlineAlignment` = 5, length\: :ref:`int` = 1, baseline\: :ref:`float` = 0.0\ ) :ref:`🔗` Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_add_string: .. rst-class:: classref-method :ref:`bool` **add_string**\ (\ text\: :ref:`String`, font\: :ref:`Font`, font_size\: :ref:`int`, language\: :ref:`String` = "", meta\: :ref:`Variant` = null\ ) :ref:`🔗` Adds text span and font to draw it. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_clear: .. rst-class:: classref-method |void| **clear**\ (\ ) :ref:`🔗` Clears text paragraph (removes text and inline objects). .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_clear_dropcap: .. rst-class:: classref-method |void| **clear_dropcap**\ (\ ) :ref:`🔗` Removes dropcap. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_draw: .. rst-class:: classref-method |void| **draw**\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, color\: :ref:`Color` = Color(1, 1, 1, 1), dc_color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draw all lines of the text and drop cap into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_draw_dropcap: .. rst-class:: classref-method |void| **draw_dropcap**\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draw drop cap into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_draw_dropcap_outline: .. rst-class:: classref-method |void| **draw_dropcap_outline**\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, outline_size\: :ref:`int` = 1, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draw drop cap outline into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_draw_line: .. rst-class:: classref-method |void| **draw_line**\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, line\: :ref:`int`, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draw single line of text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_draw_line_outline: .. rst-class:: classref-method |void| **draw_line_outline**\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, line\: :ref:`int`, outline_size\: :ref:`int` = 1, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draw outline of the single line of text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_draw_outline: .. rst-class:: classref-method |void| **draw_outline**\ (\ canvas\: :ref:`RID`, pos\: :ref:`Vector2`, outline_size\: :ref:`int` = 1, color\: :ref:`Color` = Color(1, 1, 1, 1), dc_color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_dropcap_lines: .. rst-class:: classref-method :ref:`int` **get_dropcap_lines**\ (\ ) |const| :ref:`🔗` Returns number of lines used by dropcap. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_dropcap_rid: .. rst-class:: classref-method :ref:`RID` **get_dropcap_rid**\ (\ ) |const| :ref:`🔗` Returns drop cap text buffer RID. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_dropcap_size: .. rst-class:: classref-method :ref:`Vector2` **get_dropcap_size**\ (\ ) |const| :ref:`🔗` Returns drop cap bounding box size. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_ascent: .. rst-class:: classref-method :ref:`float` **get_line_ascent**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_count: .. rst-class:: classref-method :ref:`int` **get_line_count**\ (\ ) |const| :ref:`🔗` Returns number of lines in the paragraph. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_descent: .. rst-class:: classref-method :ref:`float` **get_line_descent**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_object_rect: .. rst-class:: classref-method :ref:`Rect2` **get_line_object_rect**\ (\ line\: :ref:`int`, key\: :ref:`Variant`\ ) |const| :ref:`🔗` Returns bounding rectangle of the inline object. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_objects: .. rst-class:: classref-method :ref:`Array` **get_line_objects**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns array of inline objects in the line. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_range: .. rst-class:: classref-method :ref:`Vector2i` **get_line_range**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns character range of the line. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_rid: .. rst-class:: classref-method :ref:`RID` **get_line_rid**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns TextServer line buffer RID. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_size: .. rst-class:: classref-method :ref:`Vector2` **get_line_size**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns size of the bounding box of the line of text. Returned size is rounded up. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_underline_position: .. rst-class:: classref-method :ref:`float` **get_line_underline_position**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns pixel offset of the underline below the baseline. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_underline_thickness: .. rst-class:: classref-method :ref:`float` **get_line_underline_thickness**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns thickness of the underline. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_line_width: .. rst-class:: classref-method :ref:`float` **get_line_width**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns width (for horizontal layout) or height (for vertical) of the line of text. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_non_wrapped_size: .. rst-class:: classref-method :ref:`Vector2` **get_non_wrapped_size**\ (\ ) |const| :ref:`🔗` Returns the size of the bounding box of the paragraph, without line breaks. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_rid: .. rst-class:: classref-method :ref:`RID` **get_rid**\ (\ ) |const| :ref:`🔗` Returns TextServer full string buffer RID. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_get_size: .. rst-class:: classref-method :ref:`Vector2` **get_size**\ (\ ) |const| :ref:`🔗` Returns the size of the bounding box of the paragraph. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_hit_test: .. rst-class:: classref-method :ref:`int` **hit_test**\ (\ coords\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns caret character offset at the specified coordinates. This function always returns a valid position. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_resize_object: .. rst-class:: classref-method :ref:`bool` **resize_object**\ (\ key\: :ref:`Variant`, size\: :ref:`Vector2`, inline_align\: :ref:`InlineAlignment` = 5, baseline\: :ref:`float` = 0.0\ ) :ref:`🔗` Sets new size and alignment of embedded object. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_set_bidi_override: .. rst-class:: classref-method |void| **set_bidi_override**\ (\ override\: :ref:`Array`\ ) :ref:`🔗` Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_set_dropcap: .. rst-class:: classref-method :ref:`bool` **set_dropcap**\ (\ text\: :ref:`String`, font\: :ref:`Font`, font_size\: :ref:`int`, dropcap_margins\: :ref:`Rect2` = Rect2(0, 0, 0, 0), language\: :ref:`String` = ""\ ) :ref:`🔗` Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. .. rst-class:: classref-item-separator ---- .. _class_TextParagraph_method_tab_align: .. rst-class:: classref-method |void| **tab_align**\ (\ tab_stops\: :ref:`PackedFloat32Array`\ ) :ref:`🔗` Aligns paragraph to the given tab-stops. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`