Struct crossterm_winapi::FontInfo
source · pub struct FontInfo(pub CONSOLE_FONT_INFO);
Expand description
Information about the font.
This wraps
CONSOLE_FONT_INFO
.
Tuple Fields§
§0: CONSOLE_FONT_INFO
Implementations§
source§impl FontInfo
impl FontInfo
sourcepub fn size(&self) -> Size
pub fn size(&self) -> Size
Get the size of the font.
Will take dwFontSize
from the current font info and convert it into a Size
.
Examples found in repository?
examples/screen_buffer.rs (line 25)
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
fn print_screen_buffer_information() -> Result<()> {
let screen_buffer = ScreenBuffer::current()?;
// get console screen buffer information
let csbi = screen_buffer.info()?;
println!("cursor post: {:?}", csbi.cursor_pos());
println!("attributes: {:?}", csbi.attributes());
println!("terminal window dimentions {:?}", csbi.terminal_window());
println!("terminal size {:?}", csbi.terminal_size());
let cfi: FontInfo = screen_buffer.font_info()?;
println!("font size {:?}", cfi.size());
Ok(())
}
Trait Implementations§
Auto Trait Implementations§
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