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§

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

Enums§

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