pub struct FontDesc { /* private fields */ }
Available on crate feature
codegen
only.Expand description
Describes a font used for code generation
Implementations§
Source§impl FontDesc
impl FontDesc
Sourcepub fn from_font(identifier: &str, font: &Font, skip_categories: bool) -> Self
pub fn from_font(identifier: &str, font: &Font, skip_categories: bool) -> Self
Describe the font from a Font
instance, optionally skipping categories
Sourcepub fn is_single_category(&self) -> bool
pub fn is_single_category(&self) -> bool
Returns true if this font has only one category
Sourcepub fn codegen(&self, extra_impl: Option<TokenStream>) -> TokenStream
pub fn codegen(&self, extra_impl: Option<TokenStream>) -> TokenStream
Generate the code for the font
Optionally, you can inject additional code into the generated font’s impl
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FontDesc
impl RefUnwindSafe for FontDesc
impl Send for FontDesc
impl Sync for FontDesc
impl Unpin for FontDesc
impl UnwindSafe for FontDesc
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