pub struct SvgFormatOptions {
pub center_vertically: Option<bool>,
pub font_id: Option<String>,
pub metadata: Option<String>,
pub optimize_output: Option<bool>,
pub preserve_aspect_ratio: Option<bool>,
}Expand description
SVG-format–specific options for the intermediate SVG font and the per-glyph path processing that feeds every other format.
Fields§
§center_vertically: Option<bool>SVG-format override of the top-level centerVertically option. When set,
it wins over the top-level value; centers each glyph vertically inside
the em-square based on its bounding box.
font_id: Option<String>Value of the SVG font’s id attribute. Defaults to fontName when
omitted.
metadata: Option<String>Content embedded inside the generated SVG font’s <metadata> element.
optimize_output: Option<bool>SVG-format override of the top-level optimizeOutput option. When set,
it wins over the top-level value. Path optimization may reduce SVG path
data, but does not guarantee smaller binary font output; compare the
generated sizes for the input set.
preserve_aspect_ratio: Option<bool>SVG-format override of the top-level preserveAspectRatio option. When
set, it wins over the top-level value; preserves the source viewBox
aspect ratio when scaling glyphs into the em-square.
Trait Implementations§
Source§impl Clone for SvgFormatOptions
impl Clone for SvgFormatOptions
Source§impl Default for SvgFormatOptions
impl Default for SvgFormatOptions
Source§impl<'de> Deserialize<'de> for SvgFormatOptions
impl<'de> Deserialize<'de> for SvgFormatOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SvgFormatOptions
impl RefUnwindSafe for SvgFormatOptions
impl Send for SvgFormatOptions
impl Sync for SvgFormatOptions
impl Unpin for SvgFormatOptions
impl UnsafeUnpin for SvgFormatOptions
impl UnwindSafe for SvgFormatOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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
T, using the provided data to resolve any offsets.