diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-03-31 09:28:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 09:28:20 +0200 |
commit | 3096423ddc61c8422722d629da3671c628bf2864 (patch) | |
tree | 9b0ff0aed5f4dd7c07457c288007fede4fe982cb /doc/classes | |
parent | e49f88b3127b43b91515b2b09827b61bae9b5e93 (diff) | |
parent | 0d3fa2a12558d90e7b9cc05f38e8b5c866a2d794 (diff) |
Merge pull request #44289 from bruvzg/ctl_gl_contours
Expose dynamic font vector outlines to the GDScript.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/TextServer.xml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 4a41b68fee..fe63e434c9 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -258,6 +258,22 @@ Returns advance of the glyph. </description> </method> + <method name="font_get_glyph_contours" qualifiers="const"> + <return type="Dictionary"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="size" type="int"> + </argument> + <argument index="2" name="index" type="int"> + </argument> + <description> + Returns outline contours of the glyph in a Dictionary. + [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. + [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour. + [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled. + </description> + </method> <method name="font_get_glyph_index" qualifiers="const"> <return type="int"> </return> @@ -1301,5 +1317,14 @@ <constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature"> TextServer require external data file for some features. </constant> + <constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag"> + Contour point is on the curve. + </constant> + <constant name="CONTOUR_CURVE_TAG_OFF_CONIC" value="0" enum="ContourPointTag"> + Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc. + </constant> + <constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag"> + Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc. + </constant> </constants> </class> |