skrivan/README.md
2026-09-26 23:37:40 +02:00

1.9 KiB

Skrivañ

This is:

  • a CLI tool to render a subset of a TTF/OTF/AAT font to PNG, and produce a custom-format character-to-positions map;
  • a lightweight crate to load such a map and render text to textures (or just iterate on glyphs and let you do the rendering).

Ideal for making a lightweight 2D game. All the hard work and big dependencies are done before compiling the game. No TTF to include, only an image and a small binary file. Rendering text is simply associating characters to positions on the font texture, like a tilemap. Glyphs can be fed to a vertex shader easily.

Not yet features:

  • alignment (currently only left alignment is supported)
  • wordwrap

Not planned:

  • Smart kerning algorithms, hyphenation, and other LaTeX-grade stuff.
  • Subpixel antialiasing (antialiasing is computed only for the base texture, not when rendering text)

Similar tools already exist, but:

  • the best ones, like harfbuzz, are quite heavy (we use harfbuzz for rendering).
  • the lightest ones are made for embedded or Gameboy.
  • other ones need the TTF at runtime.

Example


Name

"Skrivañ" is the Breton infinitive verb "to write". Pronounce skree.vã, with a nasalized "a".

License

Support me via LiberaPay

GNU AGPL v3, CopyLeft 2026 Pascal Engélibert (why copyleft?)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.