From 0974cf15f61d5fcbf5c8a519c332073703f7755c Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sat, 30 Jan 2021 22:22:40 +1030 Subject: [PATCH] Documentation: Correct CanvasItem.draw_string position description. Also add height warnings to Font.get_char_size and Font.get_string_size --- doc/classes/CanvasItem.xml | 2 +- doc/classes/Font.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 376fb542dc5..23c6bb66888 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -297,7 +297,7 @@ - Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. [b]Example using the default project font:[/b] [codeblock] # If using this method in a script that redraws constantly, move the diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index a3a2a09a4a7..e031931532e 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -65,7 +65,7 @@ - Returns the size of a character, optionally taking kerning into account if the next character is provided. + Returns the size of a character, optionally taking kerning into account if the next character is provided. Note that the height returned is the font height (see [method get_height]) and has no relation to the glyph height. @@ -88,7 +88,7 @@ - Returns the size of a string, taking kerning and advance into account. + Returns the size of a string, taking kerning and advance into account. Note that the height returned is the font height (see [method get_height]) and has no relation to the string.