pub struct Look {
pub palette: [Rgb; 256],
pub fonts: [u8; 4],
pub bright_font: bool,
pub bright_plain: bool,
pub blink_font: bool,
pub blink_steady: bool,
pub loaded: Vec<LoadedFont>,
}Expand description
What a BBS can change about how cells are drawn, beyond their own
attributes: CTerm’s palette (OSC 4) and font slots (CSI n;m SP D).
Fields§
§palette: [Rgb; 256]In xterm order: the 16 ANSI colors (black, red, green, …), the 6x6x6 cube and the grays.
fonts: [u8; 4]CTerm font IDs for the normal, bright, blink and bright-blink slots.
bright_font: boolCSI ?31h: bright text is drawn in font slot 1.
bright_plain: boolCSI ?32h: bold does not brighten the color.
blink_font: boolCSI ?34h: blinking text is drawn in font slot 2.
blink_steady: boolCSI ?35h: blink does not make text blink.
loaded: Vec<LoadedFont>Fonts the BBS has loaded (CTerm’s loadable fonts), by slot.
Implementations§
Source§impl Look
impl Look
Sourcepub fn load_font(&mut self, slot: u8, data: &[u8]) -> bool
pub fn load_font(&mut self, slot: u8, data: &[u8]) -> bool
Load a font into a slot: 4096 bytes is 8x16, 3584 8x14, 2048 8x8. False if the slot is a built-in one or the size is none of those.
Sourcepub fn loaded_font(&self, slot: u8) -> Option<LoadedFont>
pub fn loaded_font(&self, slot: u8) -> Option<LoadedFont>
A loaded font, by its slot (the ID CSI n ; slot SP D selects).
pub fn rgb(&self, c: Color) -> Rgb
Trait Implementations§
impl Eq for Look
impl StructuralPartialEq for Look
Auto Trait Implementations§
impl Freeze for Look
impl RefUnwindSafe for Look
impl Send for Look
impl Sync for Look
impl Unpin for Look
impl UnsafeUnpin for Look
impl UnwindSafe for Look
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
Source§impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
Source§fn default_with_context(_: Ctx) -> T
fn default_with_context(_: Ctx) -> T
Creates a default value with the given context.