Label
Props
name | description | example |
---|---|---|
font_family | 文字字体 | font_family: dep(crate://self/resources/A.ttf); |
font_size | 文字大小 | font_size: 12.0; |
brightness | 文字亮度 | brightness: 1.5; |
curve | 曲率 | curve: 1.5; |
line_spacing | 文字行间距 | line_spacing: 1.5; |
top_drop | 文字起止高度 | top_drop: 1.5; |
height_factor | 因子 | |
text_wrap | 文字换行方式 | text_wrap: Wrap; |
ignore_newlines | 忽略新行 | ignore_newlines: true; |
combine_spaces | 合并空格 | combine_spaces: true; |
font_scale | 文字缩放 | font_scale: 1.26; |
draw_depth | 文本深度 | draw_depth: 1.5; |
color | 文字颜色 | color: #FFF; |
height | 高度 | height: 16.0; |
width | 宽度 | width: 16.0; |
abs_pos | 定位 | abs_pos: 0.5; |
margin | 外边距 | margin: 8.0; |
padding | 内边距 | padding: 10.0; |
align | 子元素定位 | align: 0.5 0.65; |
text | 文字 | text: "Hello"; |