bug-hurd
[Top][All Lists]
Advanced

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

console update


From: Marcus Brinkmann
Subject: console update
Date: Fri, 30 Aug 2002 05:32:52 +0200
User-agent: Mutt/1.4i

Hi,

Note: this is still under development.  For example, there is no input
driver in the console-console, so don't use it unless you have a remote
login available on which you can run the console-ncurses client.  It's only
for interested developers.  This mail also serves as a status report.

I implemented the dynamic color allocation so that in 512 glyph mode we can
use 8 out of 16 colors at the same time, but which of the 8 is dynamically
selected given the screen content and the last attribute used (that the last
attribute used is included is done so that the attribute doesn't need to be
recalculated all the time.)  If no more color slots are available,
replacement colors are chosen.  The replacement rules guarantee that the
result is readable (eg, different fore- and background color is guaranteed,
if you start out with different ones), and it is attempted to prefer similar
colors.  This is not always possible, but this is only for emergency anyway. 
Normally, 8 colors are sufficient (eg, mutt with a rich color theme uses 6
at the same time, lynx uses 5, etc etc).

Dynamic glyph allocation is implemented but a bit buggy.  I got an assertion
failure here and there.  Also, the video mode is not adapted to the font
size, so that loading a too small font leads to gaps between character rows.
If you don't have a ./vga-system.bdf from where you start the program, it
will use the VGA card font, and you won't see any difference.  You also miss
out most unicode characters of course.  But you will be able to see simple
umlauts and accented characters (see IBM code page 437 for a list, or just
look into display-vga.c), and a few special chars.

If you use the vga-system.bdf included in the tar file, which is the
8x13.bdf font from Marcus Kuhn's Unicode fonts for X
[http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html], then you can use a wide
range of characters.  Just set your local encoding with the --encoding
option on the console server (default is ISO 8859-1) and enjoy.
(Try also the bold and italic font).

Of course, if you use UTF-8 as your local encoding, things really start to
get nice.  I was able to display everything in Kuhn's UTF-8-demo.txt file,
except for the surrogate characters of course (level 2).  Of course, I could
not cat the whole file at once, only bits and pieces selected with head and
tail, because there are so many different glyphs beside each other that I
ran out of glyph slots towards the end.  But I have only used 256 glyphs mode
yet, so I will see how it goes with 512 glyphs at once.

One problem is robustness of conversion, I don't deal with EILSEQ right now. 
That will be fixed soon, and then the output half should be quite usable in
daily routine, with a bit of cleanup in the glyph allocation routine.
Then I can take a closer look at the input driver.

New tar file at
ftp://alpha.gnu.org/gnu/hurd/contrib/marcus/console-console.tar.gz

Thanks,
Marcus


-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus@gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]