Skip to content

Commit 84768ab

Browse files
committed
Merge pull request godotengine#97514 from bruvzg/font_contour_info
[Docs] Add notes about glyph contour decomposition format.
2 parents 8e6ade8 + e63c858 commit 84768ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/classes/TextServer.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@
229229
[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.
230230
[code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
231231
[code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
232+
- Two successive [constant CONTOUR_CURVE_TAG_ON] points indicate a line segment.
233+
- One [constant CONTOUR_CURVE_TAG_OFF_CONIC] point between two [constant CONTOUR_CURVE_TAG_ON] points indicates a single conic (quadratic) Bézier arc.
234+
- Two [constant CONTOUR_CURVE_TAG_OFF_CUBIC] points between two [constant CONTOUR_CURVE_TAG_ON] points indicate a single cubic Bézier arc.
235+
- Two successive [constant CONTOUR_CURVE_TAG_OFF_CONIC] points indicate two successive conic (quadratic) Bézier arcs with a virtual [constant CONTOUR_CURVE_TAG_ON] point at their middle.
236+
- Each contour is closed. The last point of a contour uses the first point of a contour as its next point, and vice versa. The first point can be [constant CONTOUR_CURVE_TAG_OFF_CONIC] point.
232237
</description>
233238
</method>
234239
<method name="font_get_glyph_index" qualifiers="const">

0 commit comments

Comments
 (0)