3 ms·
I was doing some ANSI art stuff a few months ago and made a BDF font of the original DOS 437 codepage font, so I could view BBSes and ANSI art properly in xterm
by there 15y ago
I was doing some ANSI art stuff a few months ago and made a BDF font of the original DOS 437 codepage font, so I could view BBSes and ANSI art properly in xterm. I converted it to TrueType so it would also work in Terminal.app:
https://github.com/jcs/ansiterm https://github.com/jcs/ansiterm
The TrueType version was easily converted to a WOFF font so, after writing an ANSI-escape-code-to-HTML parser, I could render ANSI art in most modern browsers with just normal HTML:
http://jcs.org/tmp/go-east/index.html http://jcs.org/tmp/go-east/index.html
(HTML version on the left, static PNG exported from ACiDDraw on the right)
- atdt 15y agoCool! My first stab at this used an embedded dos @font-face (I think there's a branch in the repo) but I found the canvas text API too limited: it's a huge battle to control things like kerning and aliasing in a way that works across browsers, for example. I really wanted things to be pixel-perfect, so I ultimately decided to dump the actual bitmap font into a hex array and do the rendering myself. I am hoping (perhaps naively) that rendering to a canvas element will inspire people to do creative things. It'd be awesome to combine this with something like three.js and create 3D ANSI art (by interpreting darkness as depth, for example).
- endgame 15y agoI wrote libfake437 (http://libfake437.googlecode.com http://libfake437.googlecode.com) to create this effect in SDL, but your version is cooler and more general. Does it draw the low characters (smiley faces and stuff) correctly?
- there 15y agoYes, it draws every character properly.