pub struct CssContext {
pub font_name: String,
pub src: String,
pub codepoints: HashMap<String, String>,
}Expand description
Guaranteed fields supplied to a cssContext callback. Additional keys from
user-supplied templateOptions are merged into the same object at runtime,
so the JS-side type widens this with an open-ended index signature.
Fields§
§font_name: StringName of the generated font, mirroring the fontName option.
src: StringPre-rendered value for the CSS @font-face src: descriptor — a
comma-separated list of url(...) format(...) entries derived from the
configured types, order, and cssFontsUrl.
codepoints: HashMap<String, String>Map from glyph name to its assigned codepoint as a hex-encoded string
(e.g. "add" -> "f101"), suitable for use inside CSS content
declarations like content: "\f101".
Trait Implementations§
Source§impl Clone for CssContext
impl Clone for CssContext
Source§fn clone(&self) -> CssContext
fn clone(&self) -> CssContext
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 CssContext
impl RefUnwindSafe for CssContext
impl Send for CssContext
impl Sync for CssContext
impl Unpin for CssContext
impl UnsafeUnpin for CssContext
impl UnwindSafe for CssContext
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<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>
Converts
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>
Converts
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
Convert this type into
T, using the provided data to resolve any offsets.