You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: types/scenegraph.d.ts
+74-3
Original file line number
Diff line number
Diff line change
@@ -886,21 +886,92 @@ declare class Text extends GraphicsNode {
886
886
publicflipY: boolean;
887
887
888
888
/**
889
-
* Horizontal alignment: Text.ALIGN_LEFT, ALIGN_CENTER, or ALIGN_RIGHT. This setting affects the layout of multiline text, and it also affects what direction text grows when edited on canvas.
889
+
* **Since:** XD 14
890
+
* Set the font family across all style ranges, or get the font family of the last style range (font family of all the text if one range covers all the text). Plugins should not assume any particular default value for fontFamily.
891
+
*/
892
+
publicfontFamily: string;
893
+
894
+
/**
895
+
* **Since:** XD 14
896
+
* Set the font style across all style ranges, or get the font style of the last style range (font style of all the text if one range covers all the text).
897
+
* @default non-italic normal weight style
898
+
*/
899
+
publicfontStyle: string;
900
+
901
+
/**
902
+
* **Since:** XD 14
903
+
* Font size in document pixels. Set the font size across all style ranges, or get the font size of the last style range (font size of all the text if one range covers all the text). Plugins should not assume any particular default value for fontSize.
904
+
*/
905
+
publicfontSize: number;
906
+
907
+
/**
908
+
* Set the text color across all style ranges, or get the color of the last style range (color of all the text if one range covers all the text). Unlike most other nodes, text only allows a solid color fill - gradients and image fills are not supported.
909
+
* @default null
910
+
*/
911
+
publicfill: Color|null;
912
+
913
+
/**
914
+
* **Since:** XD 14
915
+
* Character spacing in increments of 1/1000th of the fontSize, in addition to the font's default character kerning. May be negative.
916
+
*
917
+
* Set the character spacing across all style ranges, or get the character spacing of the last style range (character spacing of all the text if one range covers all the text).
918
+
* @default 0
919
+
*/
920
+
publiccharSpacing: number;
921
+
922
+
/**
923
+
* **Since:** XD 14
924
+
* Set underline across all style ranges, or get the underline of the last style range (underline of all the text if one range covers all the text).
925
+
* @default false
926
+
*/
927
+
publicunderline: boolean;
928
+
929
+
publicstaticreadonlyALIGN_LEFT: string;
930
+
publicstaticreadonlyALIGN_CENTER: string;
931
+
publicstaticreadonlyALIGN_RIGHT: string;
932
+
933
+
/**
934
+
* Horizontal alignment: Text.ALIGN_LEFT, ALIGN_CENTER, or ALIGN_RIGHT. This setting affects the layout of multiline text, and for point text it also affects how the text is positioned relative to its anchor point (x=0 in local coordinates) and what direction the text grows when edited by the user.
935
+
*
936
+
* Changing textAlign on existing point text will cause it to shift horizontally. To change textAlign while keeping the text in a fixed position, shift the text horizontally (moving its anchor point) to compensate:
* Distance between baselines in multiline text, in document pixels. The special value 0 causes XD to use the default line spacing defined by the font given the current font size & style.
895
949
*
896
950
* This property is not automatically adjusted when fontSize changes, if line spacing is not set to 0, the line spacing will stay fixed while the font size changes, shifting the spacing’s proportional relationship to font size. If the value is 0, then the rendered line spacing will change to match the new font size, since 0 means the spacing is dynamically calculated from the current font settings.
951
+
*
952
+
* @default 0
897
953
*/
898
954
publiclineSpacing: number;
899
955
900
956
/**
901
-
* Null for point text. For area text, specifies the size of the rectangle within which text is wrapped and clipped.
957
+
* **Since:** XD 14
958
+
*
959
+
* Additional distance between paragraphs, in document pixels, added to the lineSpacing amount (soft line breaks in area text are separated only by lineSpacing, while hard line breaks are separated by lineSpacing + paragraphSpacing). Unlike lineSpacing, 0 is not a special value; it just means no added spacing.
960
+
*
961
+
* Similar to {@link lineSpacing}, this property is not automatically adjusted when fontSize changes. The paragraph spacing amount will stay fixed while the font size changes, shifting the spacing's proportional relationship to font size.
962
+
*
963
+
* @default 0
964
+
*/
965
+
publicparagraphSpacing: number;
966
+
967
+
/**
968
+
* `Null` for point text. For area text, specifies the size of the rectangle within which text is wrapped and clipped.
969
+
*
970
+
* Changing point text to area text or vice versa will change the origin / anchor point of the text, thus changing its localBounds, but it will also automatically change the node's transform so its globalBounds and boundsInParent origins remain unchanged.
971
+
*
972
+
* Changing area text to point text will also automatically insert hard line breaks ("\n") into the text to match the previous line wrapping's appearance exactly.
0 commit comments