Crates.io | fecund_font_flounder |
lib.rs | fecund_font_flounder |
version | 0.2.1 |
created_at | 2025-07-01 22:15:36.055584+00 |
updated_at | 2025-08-08 08:04:13.921132+00 |
description | For printing images in the terminal, with fonts |
homepage | |
repository | https://gitlab.com/matra2/fecundfontflounder |
max_upload_size | |
id | 1734160 |
size | 867,735 |
Have you ever wanted to view images in your terminal without using some cheaty, build in, image rendering feature that some terminal have? 'Printing images using only characters' - is that what keeps you up at night?
Well, insomnia no more! Fecund Font Flounder is here to help you with that!
Fecund Font Flounder renders images using the characters present in many fonts, such as braile characters, half block characters or by generating a custom font with set of custom characters that work best for given image.
Image is loaded, processed and then converted into a sequence carefully chosen characters with foreground and background colors.
Such an image can be generated in three ways:
Method | Description | + | - | Emample numbers |
---|---|---|---|---|
Build In Characters | Uses characters present in most fonts. No font generation required | compatible, simple | limited detail | 1, 2 |
Font creation offline | Creates predefined set of characters (font) uppon which images can be rendered. | more detail, many images can be rendered with predefined font | need to install font and use it in terminal, big font file | 3, 4, 5 |
Font creation online | Font is generated specifically to be used for this one image | best detail, small font file | same as above, each image requires its own font | none yet :c |
Here are some images rendered using the example code provided.
Images in eg. subsection 3 can be regenerated using the following command:
cargo run --example=ex3 path_to_your_image
The command above creates a text file runtime/out_image
(and sometimes a font file runtime/out.ttf
).
When the text of this file is printed to the terminal (which uses the generated font file), the image is rendered.
If using the kitty terminal this can be done with the following command:
./print.sh
The half block character '▀' is present in most fonts. Using this one can render an image with roughly square 'pixels'. Similar can be generated with
![]() |
![]() |
---|
These are also ubiquitous. Using them one can render an image with more detail. Similar can be generated with
![]() |
![]() |
---|---|
![]() |
![]() |
To be able to render images with greater detail, one must resort to custom characters. Here we generate a set of custom characters, similar to braile, but instead of 2x3 grid, we use grid of arbitrary size. Additinally, each color of the image is restricted to be one of the colors given by the palette. A dithering effect is also applied.
![]() |
![]() |
---|---|
![]() |
![]() |
Previously, we restricted ourselves to characters that are grid of full and empty cells. But we can go one step further. Every cell can be one of three states: full, empty, or half-filled. The first two states are rendered as before, but a cell in half-filled state is considered as another 2x2 grid, with cells alternating between full and empty. This gives a cool dithering effect.
In this case a palette is also used although a diffedent one.
![]() |
![]() |
---|---|
![]() |
![]() |
Inspired by the Comodore 64. This machine has the unique restriction that every block of 8x8 pixels on the screen must have at most 2 colors.
![]() |
![]() |
---|
MIT OR Apache-2.0