pub struct FontInfo { /* private fields */ }
Expand description
A font to be fed to the ImGui atlas.
Implementations§
Source§impl FontInfo
impl FontInfo
Sourcepub fn new(ttf: impl Into<Cow<'static, [u8]>>, size: f32) -> FontInfo
pub fn new(ttf: impl Into<Cow<'static, [u8]>>, size: f32) -> FontInfo
Creates a new FontInfo
from a TTF content and a font size.
Sourcepub fn default_font(size: f32) -> FontInfo
pub fn default_font(size: f32) -> FontInfo
Creates a FontInfo
using the embedded default Dear ImGui font, with the given font size.
The default size of the default font is 13.0.
Sourcepub fn add_char_range(self, range: RangeInclusive<char>) -> Self
pub fn add_char_range(self, range: RangeInclusive<char>) -> Self
Adds the given char range to this font info.
If the range list is empty, it is as if '\u{20}'..='\u{ff}'
, that is the “ISO-8859-1”
table. But if you call this function for a font, then it will not be added by default, you
should add it yourself.
Auto Trait Implementations§
impl Freeze for FontInfo
impl RefUnwindSafe for FontInfo
impl Send for FontInfo
impl Sync for FontInfo
impl Unpin for FontInfo
impl UnwindSafe for FontInfo
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