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: Help/text.md
+25-12Lines changed: 25 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -32,38 +32,51 @@ You can use the `fill` or `extrude` commands to turn these paths into a solid me
32
32
33
33
## Size
34
34
35
-
To adjust the text size, you can use the [scale](transforms.md#relative-transforms) command prior to calling text:
35
+
To adjust the text size, you can use the [size](transforms.md#size) option:
36
36
37
37
```swift
38
-
scale 2// increase text size by 200%
39
-
text "Hello World"
38
+
text {
39
+
size 2// increase text size by 200%
40
+
text "Hello World"
41
+
}
40
42
```
41
43
42
-
Alternatively, for filled or extruded text, you can set the size directly in the shape block using the [size](transforms.md#size) option:
44
+
You can resize the text non-uniformly by passing separate width and height values for the size:
45
+
46
+
```swift
47
+
text {
48
+
size 21.5// set width to 200% and height to 150%
49
+
text "Hello World"
50
+
}
51
+
```
52
+
53
+
Alternatively, for extruded text, you can set the size in the shape block instead, which allows you to also set the depth at the same time:
43
54
44
55
```swift
45
56
extrude {
46
-
size 20.5// 200% sized text, with 50% depth
57
+
size 220.5// 200% sized text, with 50% depth
47
58
text "Hello World"
48
59
}
49
60
```
50
61
51
62
## Position and Orientation
52
63
53
-
To adjust the text position and orientation, use the [translate and rotate](transforms.md#relative-transforms) commands:
64
+
To adjust the text position and orientation, use the [position](transforms.md#position) and [orientation](transforms.md#orientation) commands:
54
65
55
66
```swift
56
-
translate 21// move text 2 units to the right and 1 unit u
57
-
rotate 0.5// rotate by 90 degrees
58
-
text "Hello World"
67
+
text {
68
+
position 21// move text 2 units to the right and 1 unit up
69
+
orientation 0.5// rotate by 90 degrees
70
+
"Hello World"
71
+
}
59
72
```
60
73
61
-
Or for filled or extruded text, you can set the [position](transforms.md#position) and [orientation](transforms.md#orientation) options inside the shape block:
74
+
Or for filled or extruded text, you can set these on the containing shape block instead:
0 commit comments