pub struct DelegateTextMeasurerFactory<F> { /* private fields */ }Expand description
Adapter for renderers that already expose a string/font measurement function.
Implementations§
Source§impl<F> DelegateTextMeasurerFactory<F>
impl<F> DelegateTextMeasurerFactory<F>
pub fn new(measure: F) -> DelegateTextMeasurerFactory<F>
Trait Implementations§
Source§impl<F> IPretextTextMeasurerFactory for DelegateTextMeasurerFactory<F>
impl<F> IPretextTextMeasurerFactory for DelegateTextMeasurerFactory<F>
fn name(&self) -> &str
fn create( &self, font: &str, ) -> Result<Rc<dyn IPretextTextMeasurer>, PretextError>
fn is_supported(&self) -> bool
fn priority(&self) -> i32
Source§fn shaper_factory(&self) -> Option<Rc<dyn IPretextTextShaperFactory>>
fn shaper_factory(&self) -> Option<Rc<dyn IPretextTextShaperFactory>>
A combined backend can supply shaping without a second registration.
Auto Trait Implementations§
impl<F> !Send for DelegateTextMeasurerFactory<F>
impl<F> !Sync for DelegateTextMeasurerFactory<F>
impl<F> Freeze for DelegateTextMeasurerFactory<F>
impl<F> RefUnwindSafe for DelegateTextMeasurerFactory<F>where
Rc<F>: RefUnwindSafe,
impl<F> Unpin for DelegateTextMeasurerFactory<F>
impl<F> UnsafeUnpin for DelegateTextMeasurerFactory<F>where
Rc<F>: UnsafeUnpin,
impl<F> UnwindSafe for DelegateTextMeasurerFactory<F>where
Rc<F>: UnwindSafe,
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