5 ms·
It's kind of funny that every example the article shows is a screenshot or video. Not a single one was actual ASCII text in the HTML...
by zootboy 2y ago
It's kind of funny that every example the article shows is a screenshot or video. Not a single one was actual ASCII text in the HTML...
- DonHopkins 2y agoDRM
- california-og 2y agoIt's not trivial to display ASCII art as text in html. There's so many ways to mess it up that unless the site is dedicated to ASCII art, a simple image is really preferable.
- Groxx 2y ago<pre> works pretty reliably
- california-og 2y agoFor whitespace and for the simplest ASCII sure, but for anything a bit more complex you might have problems with 1. HTML reserved characters like < > and \. 2. overflowing content 3. displaying ASCII made with special encodings and characters sets, like code page 437 4. displaying nonprintable (control) characters 5. displaying colors 6. text preprocessors messing up the formatting
- pastage 2y agothe Virtual terminal[1] from Asciinema[2] is what I use but that is a lot more difficult than just including a video of it. I got CMS from a very expensive CMS to support Asciinema but it was actually too much effort to be worth it I had to recompile some components make a editor interface etc etc. [1]https://github.com/asciinema/avt https://github.com/asciinema/avt [2]https://docs.asciinema.org/how-it-works/ https://docs.asciinema.org/how-it-works/
- 0xDEADFED5 2y agocheck out my website: https://terminoid.com/discover/ https://terminoid.com/discover/ i still need to add seeking and stuff, but it works. like asciinema but based on xterm.js
- diggan 2y agoMost of those are solved with wrapping it in both <code> and <pre>, and #5 I don't think is even part of "ASCII art" anymore as it wouldn't be just ASCII anymore, but rich-text.
- california-og 2y agoWhat do you mean? Add far as I know <code><pre> doesn't help with any of those? Color is very much a part of ASCII art, if we consider ASCII to mean a broader range of different technologies. Just check the stuff in the article, or the stuff on https://16colo.rs/ https://16colo.rs/ site.
- omolobo 2y ago[dead]
- Groxx 2y agoAaah. None of these fancier ones were loading for me earlier for some reason, all I got was the clearly-mono-spaced one in the header. Yeah, for non-ASCII / more sophisticated stuff, images are kinda the only widely-compatible option without adopting a full terminal emulator worth of javascript.
- pino82 2y agoNone of these points seem to be relevant when it comes to the question about ASCII art as text in html vs image. Most of them feel to be no actual problems at all, but only someone vaguely mentioned some keywords in order to 'find' problems?
- tetris11 2y agoPre differs browser to browser
- diggan 2y agoSure, they might not be pixel-perfect, but if you're doing ASCII art you aren't really aiming for pixel-perfectness anyways, then you'd chose a different medium. It's inherently a medium for the clients to render how they see fit.
- pino82 2y agoCan you tell about some?
- california-og 2y agoCheck my earlier comment https://news.ycombinator.com/item?id=42572483 https://news.ycombinator.com/item?id=42572483
- nenaoki 2y ago4chan's /jp/ has [sjis] bbcode tags for formatting ASCII art consistently with the Mona typeface. No thread up though, and the archive doesn't support the tags.
- ekianjo 2y agoHow is that non trivial? You just need to use a monospace font and control for width
- Retric 2y agoYou also need to preprocess the text to deal with HTML reserved characters like < Getting an individual piece of ASCII art to work is often possible reasonably quickly, but the more examples you want to include the more odd edge cases you find.
- deleted 2y ago[deleted]