Subject: pcvt font display maps
To: None <current-users@NetBSD.ORG>
From: Chris Jones <>
List: current-users
Date: 03/25/1998 11:18:15
Maybe somebody out there is more familiar with VT200 escape sequences
and/or the pcvt driver than I am.

Yesterday, I grabbed a copy of the koi8-r-8x16 font from the FreeBSD ftp
site, and I tried to get it to work on my i386 at home.  FYI, the KOI8-R
fonts have a normal ascii character set below 0x80, a few modifications
from 0x80 to 0xc0, and the cyrillic character set from 0xc0 to 0xff.  I
used fed to verify the correctness of this font.

When I load the font into the first slot, latin characters continue to be
displayed as they should.  However, the cyrillic characters don't show up.
Upon further examination, pcvt was remapping everything above 0xa0, using
the csd_supplemental mapping.  I "fixed" this, by changing pcvt_vtf.c and
pcvt_out.c to set the GR mapping to cse_downloadable on startup and reset,
and the KOI8-R font displayed perfectly.

However, that's not a clean fix, because it changes the mapping of
characters above 0xa0, which (I'm assuming) are likely to be used by other
programs for displaying important non-ascii characters (upside-down !,
chapter sign, Spanish enya, etc.).  So, I'm wondering if there *is* a
clean way to fix this.  (I should add that I think it *does* need to be
fixed, simply because it violates the principle of least surprise.  I
download a font, but by computer won't display it.  That's non-intuitive,

1) I suppose it would be possible to have pcvt use the csd_supplemental
map by default, but to change that if a user loads a font.  However, that
would break applications that use the characters above 0xa0 in the
csd_supplemental map, if you tried to use these applications in 132-column
mode.  (The only way I know of to get 132-column mode to work is by
downloading the appropriate font, and then changing the screen width.)

2) We could add an IOCTL that would tell pcvt to use a "raw" character
mapping.  Then add the appropriate options to scon to make use of this

3) Scrap the whole thing, since the new vga (or wscons) console is coming
in, and it should be able to deal with all this gracefully.  (I think this
option should only be considered if pcvt is going to be removed from the
source tree.)

So, is there something obvious that I'm missing here?  Is there, for
instance, a VT220 escape code that will select the appropriate mapping?

Any helpful ideas would be greatly appreciated.


Chris Jones                            
           Mad scientist in training...
"Is this going to be a stand-up programming session, sir, or another bug hunt?"