pub struct Typesetter<L: FontLoader> { /* private fields */ }Expand description
Typesets math fragments against one format, keeping the fonts it loaded across fragments.
Implementations§
Source§impl<L: FontLoader> Typesetter<L>
impl<L: FontLoader> Typesetter<L>
Sourcepub fn new(
format: Format,
fonts: L,
options: Options,
) -> Result<Self, TypesetError>
pub fn new( format: Format, fonts: L, options: Options, ) -> Result<Self, TypesetError>
Rebinds the format’s native fonts through fonts, failing when one cannot be loaded.
Sourcepub fn typeset(
&mut self,
tex: &str,
mode: MathMode,
boxes: &dyn HostBoxes,
) -> Result<Typeset, TypesetError>
pub fn typeset( &mut self, tex: &str, mode: MathMode, boxes: &dyn HostBoxes, ) -> Result<Typeset, TypesetError>
Typesets tex in a sandbox, \hostbox{token} asks boxes for its box.
Sourcepub fn fonts(&self) -> &L
pub fn fonts(&self) -> &L
The font loader, which hosts use to draw the faces a fragment’s runs name.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Drops every cached fragment.
Trait Implementations§
Auto Trait Implementations§
impl<L> !RefUnwindSafe for Typesetter<L>
impl<L> !Send for Typesetter<L>
impl<L> !Sync for Typesetter<L>
impl<L> !UnwindSafe for Typesetter<L>
impl<L> Freeze for Typesetter<L>where
L: Freeze,
impl<L> Unpin for Typesetter<L>where
L: Unpin,
impl<L> UnsafeUnpin for Typesetter<L>where
L: UnsafeUnpin,
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