text_typeset/layout/
line.rs1use std::ops::Range;
2
3use crate::shaping::run::ShapedRun;
4
5pub struct LayoutLine {
6 pub runs: Vec<PositionedRun>,
7 pub y: f32,
9 pub ascent: f32,
10 pub descent: f32,
11 pub leading: f32,
12 pub line_height: f32,
14 pub width: f32,
16 pub char_range: Range<usize>,
18}
19
20pub struct PositionedRun {
21 pub shaped_run: ShapedRun,
22 pub x: f32,
24 pub decorations: RunDecorations,
26}
27
28#[derive(Clone, Copy, Debug, Default)]
30pub struct RunDecorations {
31 pub underline: bool,
32 pub overline: bool,
33 pub strikeout: bool,
34 pub is_link: bool,
35}