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: README.md
+12-1
Original file line number
Diff line number
Diff line change
@@ -152,6 +152,7 @@ The `settings` table can contain the following values:
152
152
*`shadow` (vector4) - The default shadow color of text. Will be transparent if not specified.
153
153
*`outline` (vector4) - The default outline color of text. Will be transparent if not specified.
154
154
*`align` (hash) - One of `richtext.ALIGN_LEFT`, `richtext.ALIGN_CENTER`, `richtext.ALIGN_RIGHT` and `richtext.ALIGN_JUSTIFY`. Defaults to `richtext.ALIGN_LEFT`. Defines how the words of a line of text are positioned in relation the provided `position`. Width must be specified for `richtext.ALIGN_JUSTIFY`.
155
+
*`valign` (hash) - One of `richtext.VALIGN_TOP`, `richtext.VALIGN_MIDDLE` and `richtext.VALIGN_BOTTOM`. Defaults to `richtext.VALIGN_TOP`. Defines how the words of a line of text are positioned vertically on the line.
155
156
*`line_spacing` (number) - Value to multiply line height with. Set to a value lower than 1.0 to reduce space between lines and a value higher than 1.0 to increase space between lines. Defaults to 1.0.
156
157
*`paragraph_spacing` (number) - Space to leave after lines with where `<p>` tags end. Relative to the line height. Defaults to 0.5 lines.
157
158
*`image_pixel_grid_snap` (boolean) - Set to true to position image on full pixels (positions rounded to nearest integer) to avoid effects of anti-aliasing. Defaults to false.
@@ -280,10 +281,20 @@ Center text. The words of a line are centered on the specified position (see `ri
280
281
### richtext.ALIGN_RIGHT
281
282
Right-align text. The words of a line ends at the specified position (see `richtext.create` settings above).
282
283
283
-
### richtext.ALIGN_JUSTIFT
284
+
### richtext.ALIGN_JUSTIFY
284
285
Justify text. The words of a line start at the specified position and are spaced such that the last character of the last word ends at the right edge of the line bounds (see `richtext.create` settings above).
285
286
286
287
288
+
### richtext.VALIGN_TOP
289
+
Vertically align the words on a line so that the top of the words on the line align.
290
+
291
+
### richtext.VALIGN_MIDDLE
292
+
Vertically align the words on a line so that the middle of the words on the line align.
293
+
294
+
### richtext.VALIGN_BOTTOM
295
+
Vertically align the words on a line so that the bottom of the words on the line align.
296
+
297
+
287
298
# Credits
288
299
* Smiley icons in example app from [Flaticons](https://www.flaticon.com/packs/smileys-3)
289
300
* UTF8 decoding from [utf8.lua](https://github.com/Stepets/utf8.lua)
0 commit comments