forked from metaeducation/ren-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext.r
159 lines (129 loc) · 2.24 KB
/
text.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
REBOL [
System: "REBOL [R3] Language Interpreter and Run-time Environment"
Title: "REBOL Graphics - TEXT commands"
Author: ["Richard Smolak" "Carl Sassenrath"]
Rights: {
Copyright 2012 REBOL Technologies
REBOL is a trademark of REBOL Technologies
Additional code modifications and improvements Copyright 2012 Saphirion AG
}
License: {
Licensed under the Apache License, Version 2.0.
See: http://www.apache.org/licenses/LICENSE-2.0
}
Name: text
Type: extension
Exports: none
Note: "Run make-host-ext.r to convert"
]
;don't change order of already defined words unless you know what you are doing
words: [
aliased
antialiased
vectorial
;font object words
name
style
size
color
offset
space
shadow
;para object words
origin
margin
indent
tabs
wrap?
scroll
align
valign
;para/align values
center
right
left
;para/valign values
middle
top
bottom
;font/style values
bold
italic
underline
;caret object words
caret
highlight-start
highlight-end
]
;temp hack - will be removed later
init-words: command [
words [block!]
]
init-words words
;please alphabetize the order of commands so it easier to lookup things
anti-alias: command [
"Sets aliasing mode."
state [logic!]
]
b: bold: command [
"Sets font BOLD style."
state [logic!]
]
caret: command [
"Sets paragraph attributes."
caret-attributes [object!]
]
center: command [
"Sets text alignment."
]
color: command [
"Sets font color."
font-color [tuple!]
]
drop: command [
"Removes N previous style setting from the stack."
count [integer!]
]
font: command [
"Sets font attributes."
font-attributes [object!]
]
i: italic: command [
"Sets font ITALIC style."
state [logic!]
]
left: command [
"Sets text alignment."
]
nl: newline: command [
"Breaks the text line."
]
para: command [
"Sets paragraph attributes."
para-attributes [object!]
]
right: command [
"Sets text alignment."
]
scroll: command [
"Sets text position."
offset [pair!]
]
shadow: command [
"Enables shadow effect for text."
offset [pair!]
color [tuple!]
spread [integer!]
]
size: command [
"Sets font size."
font-size [integer!]
]
text: command [
"Renders text string."
text [string!]
]
u: underline: command [
"Sets font UNDERLINE style."
state [logic!]
]