rolled a "real" linux console font.

svn path=/trunk/kdebase/konsole/; revision=11858
wilder-portage
Lars Doelle 28 years ago
parent ddf3ca7a99
commit ee182220d8
  1. 50
      README.linux.console
  2. BIN
      other/linux8x16.pcf.gz
  3. 40
      other/makefont.c
  4. 2
      src/TEScreen.C
  5. 4
      src/main.C
  6. 13
      tests/Makefile

@ -5,43 +5,47 @@ look as pleasant as the original.
Konsole has lately improved it's support for the linux console. Konsole has lately improved it's support for the linux console.
Especially using the new session mechanism makes running the 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 Simple choose "Linux console" from the "New" menu (or click the
right mouse button while holding down the control key). right mouse button while holding down the control key).
To get proper support of graphic characters, you need a VGA font To get proper support of graphic characters, you need a linux console
being installed, too. If a VGA font is not installed on your system, font being installed. Proceed as follows:
you may like to use the one supplied in the konsole/other directory.
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 (For some strange reason i had to restart my X server too, to make
mkfontdir /usr/X11R6/lib/X11/fonts/misc 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 Depending on the application, you might need to switch to dark
background, too, for the best results. (Konsole does this background, for the best results. (Konsole does this automatically
automatically for you when you select the linux console as for you when you select the linux console as suggested above).
suggested above).
Please note that those applications may not react properly on Please note that those applications may not react properly on
changing the window size. Often they ignore it completely or changing the window size. Often they ignore it completely or
behave strange in other ways. I even saw one application dying behave strange in other ways. I even saw one application dying
from the shock of noticing that the linux console has simply from the shock of noticing that the linux console has simply
changed it's size (Debian's dselect). Since the Linux console changed it's size (Debian's dselect). Since the Linux console
can definitely be resized (not only when running the popular can be resized, this behavior is to be considered a bug of
frame buffer console), this behavior is to be considered a bug these applications, i cannot help it.
within these applications.
Mouse-aware application will most probably not recognize
Mouse handling in mc is known not to work when run with TERM=linux mouse events (especially mc) since they might try to get
in an xterminal, because of a bug in mc itself. In general, mouse these events from gpm instead from the console.
aware applications might create further trouble because the mouse
is handled differently within the linux console (which uses gpm) The linux console can some funny quirks with special graphic
and X11. As soon as konsole has matured a little more, i'll try characters and i haven't yet managed to teach Konsole all of
to get in contact with the authors of the mouse handling for the them. In rare cases, they might display differently. Affected
linux console and will try to find out if making a copy/paste between to my knowlegde are especially non-VT100 extentions taken from
X11 and gpm is really impossible. The mouse material in the ncurses the AT&T 4410v1, these are arrow symbols, a full block and a
is in need of some upgrade also, basically for the same reasons. 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 Anyway, try

Binary file not shown.

@ -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 (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; 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 if (pound && c == '#') c = 0xa3; // pound sign

@ -51,7 +51,7 @@
#define WITH_VGA #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() TEDemo::TEDemo(char* args[]) : KTMainWindow()
{ {
@ -180,7 +180,7 @@ void TEDemo::makeMenu()
m_font->insertItem( i18n("&Huge"), 5); m_font->insertItem( i18n("&Huge"), 5);
#ifdef WITH_VGA #ifdef WITH_VGA
m_font->insertSeparator(); m_font->insertSeparator();
m_font->insertItem( i18n("&VGA"), 6); m_font->insertItem( i18n("&Linux"), 6);
#endif #endif
#ifdef ANY_FONT #ifdef ANY_FONT
m_font->insertSeparator(); m_font->insertSeparator();

@ -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
Loading…
Cancel
Save