fontanyl
Version, currently master branch1 version
- master branchlatestDec 16, 2018
github.com/coderobe/fontanyl
bitmap font parser lib
0 stars
0 dependents
License: AGPLv3
Installation
# Add this to your shard.yml
dependencies:
fontanyl:
github: coderobe/fontanyl
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.27.0- License
- AGPLv3
- Author
- Robin Broda
Dependencies
This version declares no dependencies.
README
fontanyl
bitmap font parser
Details
Currently supported formats
- BDF
Known missing features
- Vertical alignment (i.e. overhang) (rendering)
Installation
- Add the dependency to your
shard.yml:
dependencies:
fontanyl:
github: fliegermarzipan/fontanyl
- Run
shards install
Usage
require "fontanyl"
def render(bitmap)
# The generated bitmap is an array of lines-of-text
bitmap.each do |line|
# Each text line contains several Y-scanlines
# as an Array(Bool) bitmap
line.each { |e| puts e.map { |i| i ? '#' : ' ' }.join }
end
end
# Load BDF font from file
font = Fontanyl::BDF.new("font.bdf")
# Generate bitmap of string using loaded font
# and pass it to our render() function that maps the bits
# to ascii-art text
render font.get_bitmap("Hello, World")
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/fliegermarzipan/fontanyl/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
- Robin Broda - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Dec 16, 2018
- Crystal
0.27.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/coderobe/fontanyl
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1