pub struct Font {
pub meta: FontMeta,
pub line_height: u32,
pub mode: RenderMode,
pub available_styles: StyleFlags,
/* private fields */
}Fields§
§meta: FontMeta§line_height: u32§mode: RenderMode§available_styles: StyleFlagsImplementations§
Source§impl Font
impl Font
pub fn load(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn render<'a>(&'a self, text: &str) -> TextBuilder<'a>
pub fn available_chars(&self) -> impl Iterator<Item = char> + '_
pub fn has_glyph(&self, ch: char) -> bool
pub fn has_style(&self, style: TextStyle) -> bool
pub fn mode(&self) -> RenderMode
pub fn line_height(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Font
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl UnsafeUnpin for Font
impl UnwindSafe for Font
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