1. Console colour behaviour change in Linux
- Posted by ChrisB (moderator) Oct 23, 2010
- 1403 views
Hi
This is probably going to be one of the worst bug reports ever.
It only happens on certain consoles, specifically Puppy Linux consoles, Ubuntu consoles, and putty consoles are unaffected.
At some point in the recent past either the binaries have been updated, or the includes have been updated to affect the behaviour of displaying characters to consoles.
These particular consoles can no longer display characters where the background is highlighted. Highlighted / bold characters are displayed as they should, but only if the background is not highlighted. Previous to this if I asked for a highlighted background colour, then I got the non highlighted colour, for instance YELLOW would be displayed as BROWN for the background, though YELLOW characters would display as YELLOW.
I cannot tell you which build where the change happened, as I have updated several times (currently using 3416), and the problem went unnoticed until I released a program update. I remember at some point in the past (a couple of years or so ago) a similar problem was created by changing the method characters were displayed, and the solution was to revert to the previous method of displaying characters.
Having these bold colours is useful, but would it be possible to have a switch to turn off the 'new' behaviour programmatically?
Chris
2. Re: Console colour behaviour change in Linux
- Posted by DerekParnell (admin) Oct 23, 2010
- 1404 views
This is probably going to be one of the worst bug reports ever.
Maybe ... I've read it three times now and I'm still not certain what the issues are.
It only happens on certain consoles, specifically Puppy Linux consoles, Ubuntu consoles, and putty consoles are unaffected.
Ok, Puppy not working, but Ubuntu is ok and putty is ok. Have I got that right?
At some point in the recent past either the binaries have been updated, or the includes have been updated to affect the behaviour of displaying characters to consoles.
Yes, I think I did that change ... it was a long time ago.
These particular consoles can no longer display characters where the background is highlighted. Highlighted / bold characters are displayed as they should, but only if the background is not highlighted. Previous to this if I asked for a highlighted background colour, then I got the non highlighted colour, for instance YELLOW would be displayed as BROWN for the background, though YELLOW characters would display as YELLOW.
Are you saying that whatever color the background is, if it is a highlight color then any text, regardless of the text color, on it is not displayed?
Or are you saying that if the background color is a highlight color and the text color is the same highlight color then the text can't be seen. And the old behaviour was that if a highlight color was used on the background that instead of showing it correctly, it showed the equivalent un-highlighted color.
I cannot tell you which build where the change happened, as I have updated several times (currently using 3416), and the problem went unnoticed until I released a program update. I remember at some point in the past (a couple of years or so ago) a similar problem was created by changing the method characters were displayed, and the solution was to revert to the previous method of displaying characters.
It goes back a long way; maybe six months ago or more.
Having these bold colours is useful, but would it be possible to have a switch to turn off the 'new' behaviour programmatically?
So, you'd like a way to go back to the previous incorrect behaviour.
Why don't you just fix your application to ensure that the background and text colour are never the same.
3. Re: Console colour behaviour change in Linux
- Posted by DerekParnell (admin) Oct 23, 2010
- 1385 views
Having these bold colours is useful, but would it be possible to have a switch to turn off the 'new' behaviour programmatically?
I've worked out a simple way of doing this. I'm testing it now and will upload it tomorrow if all goes well.
4. Re: Console colour behaviour change in Linux
- Posted by ChrisB (moderator) Oct 23, 2010
- 1374 views
Hi
Thanks Derek, thought you might.
Just to clarify, it only happened on some consoles, and when you used a highlight, or BRIGHT_ background colour, ALL foreground characters, whatever the colour, became invisible.
I also had started on fixing my application, to request non highlighted background colours for 'incompatible' consoles, while allowing the 'new' background colours for 'compatible' consoles.
Thanks
Chris
5. Re: Console colour behaviour change in Linux
- Posted by DerekParnell (admin) Oct 23, 2010
- 1385 views
Just to clarify, it only happened on some consoles, and when you used a highlight, or BRIGHT_ background colour, ALL foreground characters, whatever the colour, became invisible.
I see. So its not a bug in Euphoria but a feature of some unix implementations.
I'll write up the ticket as a feature request then.
6. Re: Console colour behaviour change in Linux
- Posted by DerekParnell (admin) Oct 23, 2010
- 1407 views
- Last edited Oct 29, 2010
svn:3554 now contains the function console_colors() in std/graphics.e, which can be used to set up your specific color code values for the console your application is running on. In other words, if you need the background color called YELLOW to actually use the BROWN value, you can use this function to do that.
7. Re: Console colour behaviour change in Linux
- Posted by ChrisB (moderator) Oct 24, 2010
- 1311 views
- Last edited Oct 29, 2010
svn:3554 now contains the function console_colors() in std/graphics.e, which can be used to set up your specific color code values for the console your application is running on. In other words, if you need the background color called YELLOW to actually use the BROWN value, you can use this function to do that.
Thanks Derek.
Chris