Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underline control codes not supported #1

Closed
glennlunder opened this issue Dec 18, 2021 · 4 comments
Closed

Underline control codes not supported #1

glennlunder opened this issue Dec 18, 2021 · 4 comments

Comments

@glennlunder
Copy link

In the new ansi renderer, what I call "Amiga ansi" - escape codes used in Amiga specific text files are not rendered correctly. Even the Windows commandline does a decent job of this, so perhaps it is possible/relatively easy to implement?

Windows 11 command line:

image

Demozoo currently:

image

Native Amiga:

image

@gasman
Copy link
Contributor

gasman commented Dec 18, 2021

ansilove gives basically the same result as my renderer when run on the file that exists on demozoo...
Banner_JNFuHyo
...so I'm wondering if that copy is corrupt - it's 2343 bytes rather than the 2057 shown in your screenshot.

Banner_JNFuHyo.zip (zipped so that github will accept it)

@glennlunder Can you share your copy here, please?

@glennlunder
Copy link
Author

Banner.zip

@gasman
Copy link
Contributor

gasman commented Dec 19, 2021

OK, so it is indeed the same file I have. The size difference was a red herring - looks like Mac OS added a resource fork when I downloaded it, and the larger size shows in Finder but not on the command line...

@gasman gasman transferred this issue from demozoo/demozoo Dec 20, 2021
@gasman
Copy link
Contributor

gasman commented Dec 20, 2021

Transferred to https://github.com/demozoo/ansipants as this is reproducible outside of Demozoo.

The only thing that's identifiably "weird" about this file (as in, ansipants fails on it when run in 'strict' mode) is the escape sequence right at the start of the file: \x1b[0m\x1b[0 p\x0c\x1b[0m - if https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797#keyboard-strings is correct, \x1b[0 p would be a keyboard reassignment command, but any valid one would have multiple parameters (not just the 0 here). \x0c is a form feed character, and I'm not sure how that's meant to be treated - but in any case, removing these sequences still leaves it rendering correctly in Mac iTerm but broken in ansipants and ansilove, so it seems that's just redundant junk.

Looking closer, everything in the ansipants / ansilove rendering is in the correct place except for the horizontal lines, so I suspect it's using 'underline' control codes to achieve those, and neither ansipants nor ansilove is currently implementing them. And indeed, there are a whole load of \x1b[4m sequences, which is apparently the sequence for enabling underline. So I think that solves the mystery!

@gasman gasman changed the title "amiga ansi" not properly supported Underline control codes not supported Dec 20, 2021
@gasman gasman closed this as completed in cad86ce Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants