A CLI tool used to generate glyph atlases for graphics applications such as GUI, video games and so on to improve performance of these applications.
- Usage
- Prerequisites
- Format the project
- Automatically format the project on change
- Lint the project
- Automatically lint the project on change
- Build the vcpkg dependencies in the project
- Build the project
- Automatically build the project on change
- Test the project
- Automatically test the project on change
- Run the project
font-packer <input-dir-path> <output-dir-path>
input-dir-path
is an input directory path where the directory is located contains a list of TTF font files and a input.toml
file that contains a list of TOML tables called fonts
. Each TOML table in fonts
must include a variable called file_name
which is a relative path to TTF font file, a variable called size
that specify font size in pts, and optionally contains a variable called generate_blur
which is a boolean that specify whether to generate blur glyphs for the associated font.
output-dir-path
is an output directory path where the directory is located contains a generated font atlas file and a glyph reference file in TOML format. Each glyph reference inside the TOML file points to a small area of the texture atlas. That small area is actually an image (rotated or not) which comes from the input directory.
- Windows 11 or Linux
- Visual Studio Code with plugins:
- Better TOML
- CodeLLDB
- EditorConfig for VS Code
- GLSL Lint
- Markdown All in One
- rust-analyzer
- Shader languages support for VS Code
- YAML
- Rust 1.61.0 and later
- rustfmt 1.4.38 and later
- clippy 0.1.60 and later
- cargo-watch 8.1.1 and later
- cargo-vcpkg 0.1.6 and later
cargo fmt
cargo watch -x fmt
cargo clippy --all-features
cargo watch -x "clippy --all-features"
cargo vcpkg build
cargo build
cargo watch -x build
cargo test
cargo watch -x test
cargo run