Crate sfl_parser

Source
Expand description

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

§Examples

use sfl_parser::BMFont;

let bmfont = match BMFont::from_path("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).