[Top][All Lists]

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

Re: need little ncurses help

From: Thomas Dickey
Subject: Re: need little ncurses help
Date: Sat, 10 Apr 2004 15:22:45 -0400
User-agent: Mutt/1.5.4i

On Sat, Apr 10, 2004 at 05:43:00PM +0200, nicolas brito wrote:
> Hi
> I would know if (and then how) is it possible to make such a windows :
> http://mapage.noos.fr/hrchallenge/fig27.png
> I have two doubt :
> - the "double" line as window border
> - How to aff a [.] with the "centered" '.' ?

These use specific fonts that aren't generally available.

ncurses doesn't deal with that (fonts).  Essentially (n)curses deals with
the vt100 line-drawing characters using the terminfo capabilities


to switch between normal and "graphic" fonts.  There are #define's in
curses.h which give names to the well-known characters, e.g.,

        #define NCURSES_ACS(c)  (acs_map[(unsigned char)c])
        #define ACS_PLUS        NCURSES_ACS('n') /* large plus or crossover */

If you have a font that contains additional useful graphic characters,
it is possible to just make your own defines for the corresponding mapping.
ncurses stores an A_ALTCHARSET attribute for values in acs_map[], and
switches between normal/graphic character sets as needed when it sees this
attribute set.

Note however, that this only defines a way to refer to one alternate character
set.  terminfo also defines (but I'm not aware that any curses implementation
uses) these, which are analogous to the alternate character set strings listed

       set0_des_seq                  s0ds         s0        Shift to codeset 0
                                                            (EUC set 0, ASCII)
       set1_des_seq                  s1ds         s1        Shift to codeset 1
       set2_des_seq                  s2ds         s2        Shift to codeset 2
       set3_des_seq                  s3ds         s3        Shift to codeset 3
> Thanks a lot and sorry if I annoy you with my newbie question.

This one is asked occasionally (if I find myself answering a useful question
too often, I add it to my faq).

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

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