mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
rolled a "real" linux console font.
svn path=/trunk/kdebase/konsole/; revision=11858
This commit is contained in:
@@ -5,43 +5,47 @@ look as pleasant as the original.
|
||||
|
||||
Konsole has lately improved it's support for the linux console.
|
||||
Especially using the new session mechanism makes running the
|
||||
linux console under X11 being a snap.
|
||||
linux console under X11 a snap.
|
||||
|
||||
Simple choose "Linux console" from the "New" menu (or click the
|
||||
right mouse button while holding down the control key).
|
||||
|
||||
To get proper support of graphic characters, you need a VGA font
|
||||
being installed, too. If a VGA font is not installed on your system,
|
||||
you may like to use the one supplied in the konsole/other directory.
|
||||
To get proper support of graphic characters, you need a linux console
|
||||
font being installed. Proceed as follows:
|
||||
|
||||
To install the font proceed as follows:
|
||||
cp konsole/other/linux8x16.pcf.gz /usr/X11R6/lib/X11/fonts/misc
|
||||
mkfontdir /usr/X11R6/lib/X11/fonts/misc
|
||||
|
||||
cp konsole/other/vga.pcf.gz /usr/X11R6/lib/X11/fonts/misc
|
||||
mkfontdir /usr/X11R6/lib/X11/fonts/misc
|
||||
(For some strange reason i had to restart my X server too, to make
|
||||
it aware of the new font. Try "xfd -fn linux8x16" to see if the
|
||||
font is available.)
|
||||
|
||||
Depending on the application, you might need to switch to dark
|
||||
background, too, for the best results. (Konsole does this
|
||||
automatically for you when you select the linux console as
|
||||
suggested above).
|
||||
background, for the best results. (Konsole does this automatically
|
||||
for you when you select the linux console as suggested above).
|
||||
|
||||
Please note that those applications may not react properly on
|
||||
changing the window size. Often they ignore it completely or
|
||||
behave strange in other ways. I even saw one application dying
|
||||
from the shock of noticing that the linux console has simply
|
||||
changed it's size (Debian's dselect). Since the Linux console
|
||||
can definitely be resized (not only when running the popular
|
||||
frame buffer console), this behavior is to be considered a bug
|
||||
within these applications.
|
||||
can be resized, this behavior is to be considered a bug of
|
||||
these applications, i cannot help it.
|
||||
|
||||
Mouse handling in mc is known not to work when run with TERM=linux
|
||||
in an xterminal, because of a bug in mc itself. In general, mouse
|
||||
aware applications might create further trouble because the mouse
|
||||
is handled differently within the linux console (which uses gpm)
|
||||
and X11. As soon as konsole has matured a little more, i'll try
|
||||
to get in contact with the authors of the mouse handling for the
|
||||
linux console and will try to find out if making a copy/paste between
|
||||
X11 and gpm is really impossible. The mouse material in the ncurses
|
||||
is in need of some upgrade also, basically for the same reasons.
|
||||
Mouse-aware application will most probably not recognize
|
||||
mouse events (especially mc) since they might try to get
|
||||
these events from gpm instead from the console.
|
||||
|
||||
The linux console can some funny quirks with special graphic
|
||||
characters and i haven't yet managed to teach Konsole all of
|
||||
them. In rare cases, they might display differently. Affected
|
||||
to my knowlegde are especially non-VT100 extentions taken from
|
||||
the AT&T 4410v1, these are arrow symbols, a full block and a
|
||||
checker board. Most other tricks that the linux console is
|
||||
able to do with character sets are eventually not even used
|
||||
in a single instance, so you will hardly be disturbed by
|
||||
konsoles inability to do them. Please accept, that i've just
|
||||
started to support the linux console emulation.
|
||||
|
||||
|
||||
Anyway, try
|
||||
|
||||
BIN
other/linux8x16.pcf.gz
Normal file
BIN
other/linux8x16.pcf.gz
Normal file
Binary file not shown.
40
other/makefont.c
Normal file
40
other/makefont.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
"VGA8x16", 8, 16, fontdata_8x16,
|
||||
|
||||
makes vga font for X11
|
||||
|
||||
use with font specification from /usr/src/linux/drivers/video/font_8x16.c
|
||||
|
||||
usage: makefont > linux8x16.bdf
|
||||
bdftopcf -o linux8x16.pcf linux8x16.bdf
|
||||
gzip linux8x16.pcf
|
||||
*/
|
||||
|
||||
main()
|
||||
{ int i,j;
|
||||
printf("STARTFONT 2.1\n");
|
||||
printf("COMMENT Linux console font 8x16\n");
|
||||
printf("FONT linux8x16\n");
|
||||
printf("SIZE 8 75 75\n");
|
||||
printf("FONTBOUNDINGBOX 8 16 0 -4\n");
|
||||
printf("STARTPROPERTIES 2\n");
|
||||
printf("FONT_DESCENT 4\n");
|
||||
printf("FONT_ASCENT 12\n");
|
||||
printf("ENDPROPERTIES\n");
|
||||
printf("CHARS 256\n");
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
printf("STARTCHAR x%02x\n",i);
|
||||
printf("ENCODING %d\n",i);
|
||||
printf("SWIDTH %d %d\n",0,0);
|
||||
printf("DWIDTH %d %d\n",8,0);
|
||||
printf("BBX %d %d %d %d\n",8,16,0,-4);
|
||||
printf("BITMAP\n");
|
||||
for (j = 0; j < 16; j++)
|
||||
{
|
||||
printf("%02x\n",(unsigned char)fontdata_8x16[16*i+j]);
|
||||
}
|
||||
printf("ENDCHAR x%02x\n",i);
|
||||
}
|
||||
printf("ENDFONT\n");
|
||||
}
|
||||
@@ -718,8 +718,8 @@ void TEScreen::ShowCharacter(unsigned char c)
|
||||
|
||||
if (graphic) // handle graphical character set here
|
||||
{
|
||||
// if (c == '0') c = ' '; else if (c == 'h') c = ' ';
|
||||
if (c >= 0x5f && c <= 0x7e) c = (c == 0x5f) ? 0x7f : c - 0x5f;
|
||||
//FIXME: the linux console knows some non-VT100 chars, too.
|
||||
}
|
||||
if (pound && c == '#') c = 0xa3; // pound sign
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
#define WITH_VGA
|
||||
|
||||
char *fonts[] = {"6x13", "5x7", "6x10", "7x13", "9x15", "10x20", "vga"};
|
||||
char *fonts[] = {"6x13", "5x7", "6x10", "7x13", "9x15", "10x20", "linux8x16"}; //"vga"};
|
||||
|
||||
TEDemo::TEDemo(char* args[]) : KTMainWindow()
|
||||
{
|
||||
@@ -180,7 +180,7 @@ void TEDemo::makeMenu()
|
||||
m_font->insertItem( i18n("&Huge"), 5);
|
||||
#ifdef WITH_VGA
|
||||
m_font->insertSeparator();
|
||||
m_font->insertItem( i18n("&VGA"), 6);
|
||||
m_font->insertItem( i18n("&Linux"), 6);
|
||||
#endif
|
||||
#ifdef ANY_FONT
|
||||
m_font->insertSeparator();
|
||||
|
||||
13
tests/Makefile
Normal file
13
tests/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
CFLAGS = -O
|
||||
OBJS = main.o esc.o
|
||||
|
||||
vttest: $(OBJS)
|
||||
cc $(CFLAGS) -o vttest $(OBJS)
|
||||
|
||||
install: vttest
|
||||
cp vttest.1 /usr/man/man1/vttest.1
|
||||
cp vttest /usr/local/bin/vttest
|
||||
strip /usr/local/bin/vttest
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) vttest foo core lint tags a.out
|
||||
Reference in New Issue
Block a user