Crate bmfont_parser

Source
Expand description

A lightweight easy-to-use bitmap font loader and parser for .sfl files.

§Examples

use bmfont_parser::{BMFont, Format};

let bmfont = match BMFont::from_path(&Format::SFL, "examples/fonts/iosevka.sfl") {
    Ok(bmfont) => bmfont,
    Err(_) => panic!("Failed to load iosevka.sfl"),
};

println!("bmfont: {}", bmfont);

Structs§

BMCharacter
Represents a single character in the bitmap font atlas. Contains coordinates, sizes, offsets and advances (everything required to render letters from the atlas).
BMFont
Loaded and parsed struct of an .sfl file (a bitmap font file).
CommonDetails
Some details from the common block
InfoDetails
Some details from the info block
Page
The pages (or textures) of the BMFont

Enums§

Format
Specifies the type of file format which the font file uses.