use compact_str::CompactString;
#[derive(Debug, Clone)]
pub struct Word {
pub text: CompactString,
pub x0: f32,
pub x1: f32,
pub top: f32,
pub bottom: f32,
pub char_range: std::ops::Range<usize>,
}
#[derive(Debug, Clone)]
pub struct WordOptions {
pub x_tolerance: f32,
pub y_tolerance: f32,
pub x_tolerance_ratio: Option<f32>,
pub keep_blank_chars: bool,
pub use_text_flow: bool,
pub expand_ligatures: bool,
}
impl Default for WordOptions {
fn default() -> Self {
Self {
x_tolerance: 3.0,
y_tolerance: 3.0,
x_tolerance_ratio: None,
keep_blank_chars: false,
use_text_flow: false,
expand_ligatures: false,
}
}
}