3 TextActor is a basic actor for displaying a text label
5 By default the text actor always uses the natural size of the text, when the text property is set,
6 unless SetSize is called to override the size or size is animated to some other size.
8 Natural size for TextActor is the same as the size returned by dali.font.MeasureText( string )
9 using the font that the TextActor is using.
11 By default {{#crossLink "RenderableActor/setCullFace:method"}}CullFaceMode{{/crossLink}} is set to CullNone to enable the TextActor to be viewed from all angles.
15 var textActor = new dali.TextActor( "Hello world" );
17 // by default an actor is anchored to the top-left of it's parent actor
18 // change it to the middle
19 textActor.parentOrigin = [0.5,0.5,0.5];
21 // scale it up by 4 times in x,y
22 textActor.scale = [ 4, 4, 1 ];
25 dali.stage.add( textActor );
28 ### Example using a font and text options ###
37 var arialFont = new dali.Font( fontInfo );
42 fontDetection: true // default is true
45 var textActor1 = new dali.TextActor( "Hello-world" , textOptions );
47 // this will automatically chose a different font that can display the text
48 var textActor2 = new dali.TextActor( "繁體中文" , textOptions );
51 | Name | Type | Writable | Animatable|
52 |------------------------|------------|--------------|-----------|
53 | text | STRING | ✔ |✘ |
54 | font | STRING | ✔ |✘ |
55 | font-style | STRING | ✔ |✘ |
56 | outline-enable | BOOLEAN | ✔ |✘ |
57 | outline-color | VECTOR4 | ✔ |✘ |
58 | outline-thickness-width| VECTOR2 | ✔ |✘ |
59 | smooth-edge | FLOAT | ✔ |✘ |
60 | glow-enable | BOOLEAN | ✔ |✘ |
61 | glow-color | VECTOR4 | ✔ |✘ |
62 | glow-intensity | FLOAT | ✔ |✘ |
63 | shadow-enable | BOOLEAN | ✔ |✘ |
64 | shadow-color | VECTOR4 | ✔ |✘ |
65 | shadow-offset | VECTOR2 | ✔ |✘ |
66 | italics-angle | FLOAT | ✔ |✘ |
67 | underline | BOOLEAN | ✔ |✘ |
68 | weight | INTEGER | ✔ |✘ |
69 | font-detection-automati| BOOLEAN | ✔ |✘ |
70 | gradient-color | VECTOR4 | ✔ |✘ |
71 | gradient-start-point | VECTOR2 | ✔ |✘ |
72 | gradient-end-point | VECTOR2 | ✔ |✘ |
73 | shadow-size | FLOAT | ✔ |✘ |
74 | text-color | VECTOR4 | ✔ |✘ |
77 @extends RenderableActor