Pixelfont
████
█   █   █               ███     ██               █
█   █       █   █  ███    █    █  █  ███  █ ██  █████
████  ███    █ █  █   █   █    █    █   █ ██  █  █
█       █     █   █████   █   ███   █   █ █   █  █
█       █    █ █  █       █    █    █   █ █   █  █
█      ███  █   █  ████   ███  █     ███  █   █   ██
⡖⠒⡄⠄⡀⠀⡀⢀⡀⢠⠀⡔⠢⠀⣀⠀⡀⡀⢀⣆
⡏⠉⠀⡇⡨⠪⡀⢗⣊⠸⡀⡏⠁⠸⣀⠇⡏⢸⠀⢇
When you want a font, but are kinda lazy.
Installation
- 
Add the dependency to your
shard.yml:dependencies: pixelfont: github: sleepinginsomniac/pixelfont - 
Run
shards install 
Usage
require "pixelfont"
font = Pixelfont::Font.new
font.draw("Hello, World!") do |px, py, on|
  my_screen[px, py] = RGB.new(0, 0, 0) if on
end
Cli
shards build --release
# Write text as an array of characters
./bin/pixelfont -i fonts/pixel-5x7.txt display "Hello, World!"
# Write text as braille dots
./bin/pixelfont -i fonts/pixel-5x7.txt dots "Hello, World!"
# Export as binary
./bin/pixelfont -i fonts/pixel-5x7.txt export -o pixel-5x7.pxf -f binary
# Get the bytes for embeding
./bin/pixelfont -i fonts/pixel-5x7.txt embed
Contributing
- Fork it (https://github.com/sleepinginsomniac/pixelfont/fork)
 - Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
 
Contributors
- Alex Clink - creator and maintainer