ncurses - change font size

ncurses - change font size

am 10.03.2006 23:22:01 von skuwka

Hello
How to chande font size in ncurses library??

Wojtek (form Poland)

Re: ncurses - change font size

am 11.03.2006 00:44:25 von bonomi

In article <1142029321.145382.208940@i39g2000cwa.googlegroups.com>,
wrote:
>Hello
>How to chande font size in ncurses library??
>
>Wojtek (form Poland)
>

Curses and cousins are designed to use character sets that are built into
the display device itself. addressing is only to the levelof the character,
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.

Re: ncurses - change font size

am 11.03.2006 01:06:37 von skuwka

Thx for answer

Re: ncurses - change font size

am 11.03.2006 03:21:13 von Keith Thompson

bonomi@host122.r-bonomi.com (Robert Bonomi) writes:
> In article <1142029321.145382.208940@i39g2000cwa.googlegroups.com>,
> wrote:
>>Hello
>>How to chande font size in ncurses library??
>
> Curses and cousins are designed to use character sets that are built into
> the display device itself. addressing is only to the levelof the character,
> 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
San Diego Supercomputer Center <*>
We must do something. This is something. Therefore, we must do this.

Re: ncurses - change font size

am 11.03.2006 17:40:01 von Thomas Dickey

Keith Thompson wrote:

> 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.

man resizeterm notes

If ncurses is configured to supply its own SIGWINCH handler, the
resizeterm function ungetch's a KEY_RESIZE which will be read on the
next call to getch. This is used to alert an application that the
screen size has changed, and that it should repaint special features
such as pads that cannot be done automatically.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net