pub trait TextStateFont: Debug {
// Required methods
fn id(&self) -> &str;
fn decode_show_operand(
&self,
operand: &Object,
) -> Result<Vec<DecodedGlyph>, PdfEditError>;
fn advance(&self, cid: u32, font_size: f64) -> f64;
}Expand description
Per-page active font handle used while walking a content stream (§5.2’s visit_text_show).
Implemented by whatever page-font resolver pdf_inspect.rs (lane B1) builds from a page’s
/Resources/Font — distinct from PdfFontResolver (§7.2), which resolves catalog fonts
for composition/embedding, not content-stream decoding.
Required Methods§
Sourcefn id(&self) -> &str
fn id(&self) -> &str
Stable identifier for this font within its page’s resource dictionary, threaded onto every
PositionedGlyph this font produces (font_id).
Sourcefn decode_show_operand(
&self,
operand: &Object,
) -> Result<Vec<DecodedGlyph>, PdfEditError>
fn decode_show_operand( &self, operand: &Object, ) -> Result<Vec<DecodedGlyph>, PdfEditError>
Decode one Tj/TJ string operand into glyphs via this font’s encoding/ToUnicode map.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".