pub struct TlfFont {
pub multicolor: bool,
/* private fields */
}Available on crate feature
tlf-parser only.Expand description
Parsed TLF font.
Glyphs are keyed by Unicode codepoint (u32) — same shape as the FLF
parser’s [crate::figfont::FIGfont::glyphs] so downstream renderers can
treat the two interchangeably once a TLF is loaded.
Fields§
§multicolor: booltrue when any glyph carried an inline color/style marker.
Implementations§
Source§impl TlfFont
impl TlfFont
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<TlfFont, FigletError>
pub fn from_bytes(bytes: &[u8]) -> Result<TlfFont, FigletError>
Parse a TLF font from raw bytes.
Validates the tlf2a magic at byte 0, delegates numeric-header
parsing to [crate::header::parse_header_line] (sharing FR-028 O(1)
error-cost contract with the FLF parser), then walks the glyph table.
Both tlf2a and tlf2a$ extended-metadata header forms are accepted
per research.md §TLF Font Format.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TlfFont
impl RefUnwindSafe for TlfFont
impl Send for TlfFont
impl Sync for TlfFont
impl Unpin for TlfFont
impl UnsafeUnpin for TlfFont
impl UnwindSafe for TlfFont
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