Computer generated text image

fruktbart's picture

I was wondering if there were any solutions to make an image out of a text file. Like an ASCII image, but with real text and variations in font size and weight. Is there any commercial solutions for this, or any scripts for Scriptographer etc?
Example by Herb Lubalin:

aluminum's picture

there are a bunch of tools for this:

http://www.google.com/search?q=ascii+art+generator

Rafe Copeland's picture

Most ASCII generators aren't what you're looking for at all. There's this http://www.typorganism.com/asciiomatic/ one which does generate ASCII images, but can also change the darkness of the letters if you tell it to do it in colour; however it doesn't change the weights or anything. But it's kiiinda close to what you want - perhaps you could put your image through this and then exaggerate parts of it by hand by changing weights and type sizes

-Rafe

Theunis de Jong's picture

That was surprisingly difficult to write. Sampling a picture (a recognizable one, at this very low rez) is easy. So is drawing text at arbitrary sizes -- I'm using the FreeType lib for that. The difficulty came in when I tried to emulate the sizing; FreeType allows that, but it took a bit of fiddling to get it right (sort of).

My program resembles an ASCII art generator, but instead of selecting characters for darkness, it selects one of 5 weights of Myriad, so the 'effective' gray resolution is just 5 levels. I do hope you can recognize the image, though!

Theunis de Jong's picture

And just for completeness, an inverse version of the image! Note the text runs different.

By the way, the text is not broken at whole words -- that's quite a bit more work, although it should be doable --, but it is fully justified.

Rafe Copeland's picture

What's FreeType Theunis? What you've reproduced is exactly what I need for a project I'm doing right now

-Rafe

Theunis de Jong's picture

FreeType is a free programmer's library for C programmers, which enables your program to use just about any font file directly.
I used it for the above samples to get the character metrics (the important part), and to output the raster graphics. But I don't even need it in my Windows version -- that uses your installed fonts in the regular way.

(I posted a pointer to my Window version under a new topic to prevent cross-pollution. That didn't last long ...)

Syndicate content Syndicate content