diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-01-20 09:30:42 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-02-02 11:20:44 +0200 |
commit | 215bede6ff494bb371fa610b6d003fe1cb7d1c7d (patch) | |
tree | 4b531c4e67fe29d4510fa99c624cf15661081a62 /doc | |
parent | 050908626f64c0c984e078055215c8b5f6231ce3 (diff) |
[TextServer] Add function to change font, font size, and OpenType features without invalidating line break points, justification points, or recreating shaped text buffer.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/TextLine.xml | 1 | ||||
-rw-r--r-- | doc/classes/TextParagraph.xml | 1 | ||||
-rw-r--r-- | doc/classes/TextServer.xml | 27 | ||||
-rw-r--r-- | doc/classes/TextServerExtension.xml | 27 |
4 files changed, 56 insertions, 0 deletions
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index bf1abf86ae..7bfc7eed7e 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -26,6 +26,7 @@ <argument index="2" name="size" type="int" /> <argument index="3" name="opentype_features" type="Dictionary" default="{}" /> <argument index="4" name="language" type="String" default="""" /> + <argument index="5" name="meta" type="Variant" default="null" /> <description> Adds text span and font to draw it. </description> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index 3d3c0dd6ff..acf3dcd43b 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -26,6 +26,7 @@ <argument index="2" name="size" type="int" /> <argument index="3" name="opentype_features" type="Dictionary" default="{}" /> <argument index="4" name="language" type="String" default="""" /> + <argument index="5" name="meta" type="Variant" default="null" /> <description> Adds text span and font to draw it. </description> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 61024ef0c8..9025e4ff2a 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -896,6 +896,32 @@ [b]Note:[/b] This function is used by during project export, to include TextServer database. </description> </method> + <method name="shaped_get_span_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="shaped" type="RID" /> + <description> + Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object]. + </description> + </method> + <method name="shaped_get_span_meta" qualifiers="const"> + <return type="Variant" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="index" type="int" /> + <description> + Returns text span metadata. + </description> + </method> + <method name="shaped_set_span_update_font"> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="index" type="int" /> + <argument index="2" name="fonts" type="Array" /> + <argument index="3" name="size" type="int" /> + <argument index="4" name="opentype_features" type="Dictionary" default="{}" /> + <description> + Changes text span font, font size and OpenType features, without changing the text. + </description> + </method> <method name="shaped_text_add_object"> <return type="bool" /> <argument index="0" name="shaped" type="RID" /> @@ -915,6 +941,7 @@ <argument index="3" name="size" type="int" /> <argument index="4" name="opentype_features" type="Dictionary" default="{}" /> <argument index="5" name="language" type="String" default="""" /> + <argument index="6" name="meta" type="Variant" default="null" /> <description> Adds text span and font to draw it to the text buffer. </description> diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index 8b4825026d..5967340f8c 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -904,6 +904,32 @@ [b]Note:[/b] This function is used by during project export, to include TextServer database. </description> </method> + <method name="_shaped_get_span_count" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="shaped" type="RID" /> + <description> + Returns number of text spans added using [method _shaped_text_add_string] or [method _shaped_text_add_object]. + </description> + </method> + <method name="_shaped_get_span_meta" qualifiers="virtual const"> + <return type="Variant" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="index" type="int" /> + <description> + Returns text span metadata. + </description> + </method> + <method name="_shaped_set_span_update_font" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="index" type="int" /> + <argument index="2" name="fonts" type="Array" /> + <argument index="3" name="size" type="int" /> + <argument index="4" name="opentype_features" type="Dictionary" /> + <description> + Changes text span font, font size and OpenType features, without changing the text. + </description> + </method> <method name="_shaped_text_add_object" qualifiers="virtual"> <return type="bool" /> <argument index="0" name="shaped" type="RID" /> @@ -923,6 +949,7 @@ <argument index="3" name="size" type="int" /> <argument index="4" name="opentype_features" type="Dictionary" /> <argument index="5" name="language" type="String" /> + <argument index="6" name="meta" type="Variant" /> <description> Adds text span and font to draw it to the text buffer. </description> |