rpdfium-doc 7676.6.4

Document-level features for rpdfium
Documentation
// Derived from PDFium's cpvt_wordinfo.h/cpp
// Original: Copyright 2014 The PDFium Authors
// Licensed under BSD-3-Clause / Apache-2.0
// See pdfium-upstream/LICENSE for the original license.

//! Word info — per-character layout record (`CPVT_WordInfo`).
//!
//! Stores per-character metrics computed by the variable text layout engine.

/// Information about a single character (word) in the layout.
///
/// Corresponds to upstream `CPVT_WordInfo`.
#[derive(Debug, Clone)]
pub struct WordInfo {
    /// The Unicode character.
    pub character: char,
    /// Index into the font provider's font list.
    pub font_index: usize,
    /// X position within the line.
    pub position_x: f32,
    /// Width of the character.
    pub width: f32,
}