Comment 14 for bug 355057

Revision history for this message
Stefan Bader (smb) wrote : Re: [Bug 355057] Re: Non-ASCII characters get corrupted in framebuffer console

> No character corruption occurs anymore in my sampletable.txt in tty1 ...
> tty6. Correct characters seem to be displayed all the time. (Well I have
> not double checked every single character with a Unicode table. But
> those characters I happen to know by heart are correct and all other
> look correct to me)

Great to hear.

> However, the characters previously corrupted appear in a different color
> now. While all characters, which worked before are displayed in some
> kind of grey, the "new" characters are displayed in white. Any
> explanation for this? The problem is already mentioned in
> https://bugs.launchpad.net/ubuntu/bugs/303561

> The setfont(8) man page mentions that only 8 instead of 16 can be
> displayed if a font has more than 256 glyphs. But I understand this
> affects the whole console and not only the last 256 glyphs. If this
> understanding is correct, the reason should not be that the "default
> grey" is no longer available, because it is still used for all "have
> always worked" characters.

The man page is correct and it _will_ only affect the last 256 glyphs. In fact
these characters are always using a different colour. This is due to the "old
days" when memory was expensive and engineers squeezed much into little.
Simply said, as you can only encode 256 values into a byte, you are missing a
bit for 512 character fonts. In order not to waste bytes, this bit is taken
from the colour index nibble of the attribute byte. So the lower 256 characters
use the colours with index 0-7 and the upper 256 characters the colours with
index 8-15.
The trick is to mirror the colours indexed by 0-7 to the ones indexed by 8-15.
I would have to look whether this is done in the console driver. It is a bit
hard to see for me as on my LCD this seems to be ntsc (nearly the same colour),
so I never saw that difference.

--

When all other means of communication fail, try words!