Skip to main content

FontResolver

Trait FontResolver 

Source
pub trait FontResolver {
    // Required method
    fn metrics(&self, key: FontKey) -> &dyn FontMetrics;
}
Expand description

lightweight-pdf-layout’s only dependency on fonts: given a FontKey, hand back metrics. Implemented by the facade crate, which bridges to lightweight-pdf-fonts::FontData (ADR-010).

Required Methods§

Source

fn metrics(&self, key: FontKey) -> &dyn FontMetrics

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§