03-11-06 01:47 AM
bonomi@host122.r-bonomi.com (Robert Bonomi) writes:
> In article <1142029321.145382.208940@i39g2000cwa.googlegroups.com>,
> <skuwka@gmail.com> wrote:
>
> Curses and cousins are designed to use character sets that are built into
> the display device itself. addressing is only to the levelof the characte
r,
> all of which are presumed to be of the same height, and width. As such,
> 'font size' is meaningless to curses.
>
> The termcap database has nothing in it for fonts or font sizes. Thus you
> will have to issue your own _terminal dependant_ commands for specifying
> fonts/sizes. *ASSUMING* you have hardware (or emulation software) which
> supports that capability.
>
> WARNING: doing such in the middle of curses output *will* irretreviably
> screw up the display. Doing it _before_ calling initscr() is ok.
It depends on what changing the font size does. Under xterm, for
example, sending certain control sequences will change the font size
and simultaneously change the size of the window, keeping the same
number of rows and columns. This should be transparent to ncurses.
If you do change the dimensions of the window (switching between 80
and 132 columns is a common example), you should be able to deal with
it in ncurses by handling the SIGWINCH signal. Details are left as an
exercise for the ncurses man pages.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
[ Post a follow-up to this message ]
|