[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Font for PC graphics characters

cga2000 wrote:

> is there a howto (of sorts) anywhere?

Not AFAIK. But xterm basically understands ansi sequences, so it
should not be difficult to write a filter that would produce the
picture by means of

cat xxxx.ans |filter

You could use either

 -- the special xterm mode which displays box characters
    (something like ESC(O , or something similar, forgot what it

 -- a utf-8 capable xterm

The problem is that not only ansi sequences (for colours and
cursor position) must be interpreted. xterm does this by default.
But also the characters themselves must be translated from PC-DOS
("codepage 437") to the characters understood by your xterm
(iso-8859-1 or utf-8).

As a quick test, I tried some of the ansi art examples in
http://www.acid.org/ftp/aaa-8991.zip on my utf-8 capable xterm,
simply using iconv to convert codepage 437 to utf-8, e.g.:

  iconv -f 437 -t utf-8 tohs.ans

I suppose that if you have a legacy xterm with iso-8859-1
(unfortunately still the default in Debian) it would have to be

  iconv -f 437 -t iso-8859-1 tohs.ans

This gives some idea of what it should look like. It becomes
better when you select reverse video (control-middle click, then
select reverse video). But getting the true glory of ansi art,
including the proper colour scheme, would require a
specially-written filter, I think.

The easiest is to just use the TYPE command in an ms-dos
environment (dosemu) with ansi.sys.

Regards, Jan

Reply to: