Enum buffer_graphics_lib::text::TextSize
source · pub enum TextSize {
Small,
Normal,
Large,
}
Expand description
TextSize is used to set the size and positioning in pixels of text
Variants§
Implementations§
source§impl TextSize
impl TextSize
pub fn measure(&self, text: &str, wrapping: WrappingStrategy) -> (usize, usize)
sourcepub const fn get_spacing(&self) -> usize
pub const fn get_spacing(&self) -> usize
Returns the spacing between letters in pixels
pub const fn get_px_ascii(&self, code: u8) -> &[bool]
sourcepub const fn px_to_cols(&self, px: usize) -> usize
pub const fn px_to_cols(&self, px: usize) -> usize
Converts pixels to columns