Merge pull request #116088 from sockeye-d/docs/font-ascent-descent

Fix Font's documentation for `ascent`/`get_descent`
This commit is contained in:
Thaddeus Crews 2026-02-10 10:34:37 -06:00
commit da0250c0f0
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -133,7 +133,7 @@
<return type="float" />
<param index="0" name="font_size" type="int" default="16" />
<description>
Returns the average font ascent (number of pixels above the baseline).
Returns the maximum font ascent (number of pixels above the baseline) of this font and all fallback fonts.
[b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line).
</description>
</method>
@ -150,7 +150,7 @@
<return type="float" />
<param index="0" name="font_size" type="int" default="16" />
<description>
Returns the average font descent (number of pixels below the baseline).
Returns the maximum font descent (number of pixels below the baseline) of this font and all fallback fonts.
[b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
</description>
</method>