Quay lại
· 1 phút đọc
Text decorations
text2d, text3d and widget labels take underlines, strikethroughs, overlines, oblique faces, OpenType features, justified lines and a cut with an ellipsis.
- Dragos Balaur
text2d, text3d and widget labels take the decorations and shaping settings cosmic-text has.

underlineissingleordouble.strikethroughandoverlinedraw a line through or over the glyphs, and each takes a colour of its own.font_styleisnormal,italicoroblique, the upright face slanted.font_stretchpicks among the widths a family ships.font_featuresturns OpenType features on and off:smcpdraws small caps, andliga=0stops ligatures.text_alignaddsleft,rightandjustify, which stretches every full line.truncateends a cut block with an ellipsis atmax_linesormax_height, andtruncate_atputs it at theend,startormiddle.line_break,hinting,tab_widthandshapingset how lines wrap, how outlines snap, where tabs stop and whether complex scripts join.
[nodes.text2d]
text = "Underlined, struck and overlined"
underline = "double"
underline_color = [1.0, 0.3, 0.3, 1.0]
strikethrough = true
overline = true