pub struct FontResolver { /* private fields */ }Expand description
Font resolution engine.
Implementations§
Source§impl FontResolver
impl FontResolver
Sourcepub fn new(policy: FontPolicy) -> Self
pub fn new(policy: FontPolicy) -> Self
Create a resolver with explicit policy and limits.
Sourcepub fn with_limits(self, limits: FontLimits) -> Self
pub fn with_limits(self, limits: FontLimits) -> Self
Override registration limits.
Sourcepub fn register_epub_fonts<I, F>(
&mut self,
fonts: I,
loader: F,
) -> Result<(), RenderPrepError>
pub fn register_epub_fonts<I, F>( &mut self, fonts: I, loader: F, ) -> Result<(), RenderPrepError>
Register EPUB fonts and validate byte limits via callback.
Sourcepub fn resolve(&self, style: &ComputedTextStyle) -> ResolvedFontFace
pub fn resolve(&self, style: &ComputedTextStyle) -> ResolvedFontFace
Resolve a style request to a concrete face.
Sourcepub fn resolve_with_trace(
&self,
style: &ComputedTextStyle,
) -> FontResolutionTrace
pub fn resolve_with_trace( &self, style: &ComputedTextStyle, ) -> FontResolutionTrace
Resolve with full fallback reasoning.
Sourcepub fn resolve_with_trace_for_text(
&self,
style: &ComputedTextStyle,
text: Option<&str>,
) -> FontResolutionTrace
pub fn resolve_with_trace_for_text( &self, style: &ComputedTextStyle, text: Option<&str>, ) -> FontResolutionTrace
Resolve with full fallback reasoning and optional text context.
Trait Implementations§
Source§impl Clone for FontResolver
impl Clone for FontResolver
Source§fn clone(&self) -> FontResolver
fn clone(&self) -> FontResolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FontResolver
impl RefUnwindSafe for FontResolver
impl Send for FontResolver
impl Sync for FontResolver
impl Unpin for FontResolver
impl UnsafeUnpin for FontResolver
impl UnwindSafe for FontResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more