This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygwin ncurses question


charlie wrote:
> I'm just getting started with ncurses, though I've got a fair amount of
> C/C++ experience. I'm having some problems...specifically I think the
> terminal is representing what should be lines and corners with
> characters...for example here is ACS character screen from ncurses.exe
> (hopefully the characters come out correctly):
> 
>                     Display of the ACS Character Set
> 
[snip]
> 
> I would think that ACS_HLINE :  would be some kind of horizontal line
> instead of an "". Here is the Intro screen from testcurs.exe:
> 
[snip]
> 
> Here I would expect a line around the window instead of the "" and
"3". Is
> this an issue with ncurses on Cygwin, or have I gooned something up? Any
> ideas on where to look for problems? TIA for any ideas you might have...

ACS characters are controlled by the 'acsc=' line in the terminfo.src
file.  Earnie Boyd has accurately transcribed the character codes for the
linedraw characters -- assuming:

1) you are using a font that HAS the linedraw characters; 'WINDOWS ANSI'
fonts do not.  

2) you are using the 'codepage437' encoding OF that font.  TrueType fonts
contain many more than just 256 characters.  However, each font has
mappings that specify which characters are assigned to the 'preferred' 256
positions.

Everybody agrees on char #'s 32 -- 127.  It's 128-255 that are different
from font to font and codepage to codepage and from encoding to
encoding.  And that's where the linedraw characters (sometimes) live.

How to fix?  Well, I don't use bash-in-a-dos-box.  (Doctor, it hurts when
I do this.  "Well, don't do that...")

I use rxvt, with TERM=rxvt-cygwin, and use a special 'sabvga' font in my
Xserver.  This sabvga font is bitmapped (that is, not truetype, so no need
to worry about 'encodings' or 'codepages') and DOES contain the linedraw
characters in the appropriate character positions.

I also use Bubba's native windows rxvt port, and use a specially hacked
truetype font (Lucida Console clone) that uses so-called 'codepage437'
encoding by default.  Then, I set TERM=rxvt-cygwin-native.

It would be nice if you could use this Lucida Console clone in your
DOS-box, but that doesn't always work.  On NT, 'Lucida ConsoleP' shows up
as one of the font choices in the cmd-prompt properties window, and fixes
MOST of the linedraw problems.  Inexplicably, however, OTHER linedraw
characters, which ARE in LuconP, are not used by the DOS-box. (Remember,
LuconP works perfectly in bubba's native rxvt).  On W2K,
LuconP does NOT show up as one of the font choices.

I discussed this at length in this message:
  http://cygwin.com/ml/cygwin/2000-11/msg01329.html

You'll also find links to sabvga, LuconP, and bubba's rxvt port in that
message.

--Chuck








--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]