Struct tui_big_text::BigText
source · pub struct BigText<'a> { /* private fields */ }Expand description
Displays one or more lines of text using 8x8 pixel characters.
The text is rendered using the font8x8 crate.
Using the pixel_size method, you can also chose, how ‘big’ a pixel should be. Currently a
pixel of the 8x8 font can be represented by one full or half (horizontal/vertical/both)
character cell of the terminal.
§Examples
use ratatui::prelude::*;
use tui_big_text::{BigText, PixelSize};
BigText::builder()
.pixel_size(PixelSize::Full)
.style(Style::new().white())
.lines(vec![
"Hello".red().into(),
"World".blue().into(),
"=====".into(),
])
.build();Renders:
██ ██ ███ ███
██ ██ ██ ██
██ ██ ████ ██ ██ ████
██████ ██ ██ ██ ██ ██ ██
██ ██ ██████ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██
██ ██ ████ ████ ████ ████
██ ██ ███ ███
██ ██ ██ ██
██ ██ ████ ██ ███ ██ ██
██ █ ██ ██ ██ ███ ██ ██ █████
███████ ██ ██ ██ ██ ██ ██ ██
███ ███ ██ ██ ██ ██ ██ ██
██ ██ ████ ████ ████ ███ ██
███ ██ ███ ██ ███ ██ ███ ██ ███ ██
██ ███ ██ ███ ██ ███ ██ ███ ██ ███
Implementations§
source§impl BigText<'static>
impl BigText<'static>
sourcepub fn builder() -> BigTextBuilder<'static>
pub fn builder() -> BigTextBuilder<'static>
Create a new BigTextBuilder to configure a BigText widget.
Trait Implementations§
source§impl<'a> PartialEq for BigText<'a>
impl<'a> PartialEq for BigText<'a>
impl<'a> Eq for BigText<'a>
impl<'a> StructuralPartialEq for BigText<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for BigText<'a>
impl<'a> Send for BigText<'a>
impl<'a> Sync for BigText<'a>
impl<'a> Unpin for BigText<'a>
impl<'a> UnwindSafe for BigText<'a>
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more