| ▲ | wonger_ 5 hours ago | |||||||
Great breakdown and visuals. Most ASCII filters do not account for glyph shape. It reminds me of how chafa uses an 8x8 bitmap for each glyph: https://github.com/hpjansson/chafa/blob/master/chafa/interna... There's a lot of nitty gritty concerns I haven't dug into: how to make it fast, how to handle colorspaces, or like the author mentions, how to exaggerate contrast for certain scenes. But I think 99% of the time, it will be hard to beat chafa. Such a good library. EDIT - a gallery of (Unicode-heavy) examples, in case you haven't seen chafa yet: https://hpjansson.org/chafa/gallery/ | ||||||||
| ▲ | smusamashah 2 hours ago | parent | next [-] | |||||||
But the chafa gallery isn't showing off ascii text rendering. Are there examples that use ascii text? | ||||||||
| ||||||||
| ▲ | fwipsy 2 hours ago | parent | prev | next [-] | |||||||
Aha! The 8x8 bitmap approach is the one I used back in college. I was using a fixed font, so I just converted each character to a 64-bit integer and then used popcnt to compare with an 8x8 tile from the image. I wonder whether this approach results in meaningfully different image results from the original post? e.g. focusing on directionality rather than bitmap match might result in more legible large shapes, but fine noise may not be reproduced as faithfully. | ||||||||
| ▲ | keepamovin 3 hours ago | parent | prev [-] | |||||||
my favorite ascii glyphs are the classic IBM Code Page 437: https://int10h.org/oldschool-pc-fonts/fontlist/ and damn that article is so cool, what a rabbithole. | ||||||||