text_typeset/shaping/
run.rs1use std::ops::Range;
2
3use crate::types::FontFaceId;
4
5#[derive(Clone)]
6pub struct ShapedGlyph {
7 pub glyph_id: u16,
8 pub cluster: u32,
9 pub x_advance: f32,
10 pub y_advance: f32,
11 pub x_offset: f32,
12 pub y_offset: f32,
13 pub font_face_id: FontFaceId,
16}
17
18#[derive(Clone)]
19pub struct ShapedRun {
20 pub font_face_id: FontFaceId,
21 pub size_px: f32,
22 pub glyphs: Vec<ShapedGlyph>,
23 pub advance_width: f32,
24 pub text_range: Range<usize>,
25 pub underline_style: crate::types::UnderlineStyle,
27 pub overline: bool,
28 pub strikeout: bool,
29 pub is_link: bool,
30 pub foreground_color: Option<[f32; 4]>,
32 pub underline_color: Option<[f32; 4]>,
34 pub background_color: Option<[f32; 4]>,
36 pub anchor_href: Option<String>,
38 pub tooltip: Option<String>,
40 pub vertical_alignment: crate::types::VerticalAlignment,
42 pub image_name: Option<String>,
44 pub image_height: f32,
46}