diff options
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/layer/text.rs (renamed from graphics/src/layer/text.rs) | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/graphics/src/layer/text.rs b/wgpu/src/layer/text.rs index 74f7a676..ba1bdca8 100644 --- a/graphics/src/layer/text.rs +++ b/wgpu/src/layer/text.rs @@ -1,4 +1,6 @@ -use crate::{alignment, Font, Rectangle}; +use crate::core::alignment; +use crate::core::text; +use crate::core::{Color, Font, Rectangle}; /// A paragraph of text. #[derive(Debug, Clone, Copy)] @@ -10,11 +12,14 @@ pub struct Text<'a> { pub bounds: Rectangle, /// The color of the [`Text`], in __linear RGB_. - pub color: [f32; 4], + pub color: Color, - /// The size of the [`Text`]. + /// The size of the [`Text`] in logical pixels. pub size: f32, + /// The line height of the [`Text`]. + pub line_height: text::LineHeight, + /// The font of the [`Text`]. pub font: Font, @@ -23,4 +28,7 @@ pub struct Text<'a> { /// The vertical alignment of the [`Text`]. pub vertical_alignment: alignment::Vertical, + + /// The shaping strategy of the text. + pub shaping: text::Shaping, } |