pub struct PdfOptions {
pub font_size: f64,
pub padding: f64,
pub stroke_width: f64,
pub font_dir: String,
}Expand description
Options controlling PDF output.
If the crate is built without embed-fonts, you must set Self::font_dir to a directory
of KaTeX .ttf files before calling render_to_pdf. Self::default leaves font_dir
empty on purpose so callers do not assume a magic path. With embed-fonts, font_dir is
ignored (glyphs come from ratex-katex-fonts).
Fields§
§font_size: f64User units per em. Default: 40.
padding: f64Padding on all sides, in user units. Default: 10.
stroke_width: f64Stroke width for unfilled paths, in user units. Default: 1.5.
font_dir: StringDirectory containing KaTeX .ttf files. Used only when embed-fonts is disabled;
otherwise ignored.
Trait Implementations§
Source§impl Clone for PdfOptions
impl Clone for PdfOptions
Source§fn clone(&self) -> PdfOptions
fn clone(&self) -> PdfOptions
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 moreSource§impl Debug for PdfOptions
impl Debug for PdfOptions
Auto Trait Implementations§
impl Freeze for PdfOptions
impl RefUnwindSafe for PdfOptions
impl Send for PdfOptions
impl Sync for PdfOptions
impl Unpin for PdfOptions
impl UnsafeUnpin for PdfOptions
impl UnwindSafe for PdfOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.