Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Console programming in C
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Luke Bradshaw  
View profile  
 More options Apr 23 2002, 2:10 pm
Newsgroups: alt.os.linux.mandrake
From: "Luke Bradshaw" <cookiemons...@biscuitshop99.freeserve.co.uk>
Date: Tue, 23 Apr 2002 19:11:40 +0100
Local: Tues, Apr 23 2002 2:11 pm
Subject: Console programming in C
Hi,

i'm writing an application that runs in the console, does anyone know if
there are any functions for changing the font/colours in the console
display?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David  
View profile  
 More options Apr 23 2002, 3:15 pm
Newsgroups: alt.os.linux.mandrake
From: David <NOSPAMfili...@videotron.ca>
Date: Tue, 23 Apr 2002 15:11:30 -0400
Local: Tues, Apr 23 2002 3:11 pm
Subject: Re: Console programming in C

Luke Bradshaw wrote:

> Hi,

> i'm writing an application that runs in the console, does anyone know if
> there are any functions for changing the font/colours in the console
> display?

Not in the C language itself.  They are separate libraries (ncurses is one)
that exist for doing this.

--
Linux counter #195143
(Remove the words 'NOSPAM' from email address to reply.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gomez  
View profile  
 More options Apr 23 2002, 3:19 pm
Newsgroups: alt.os.linux.mandrake
From: Gomez <go...@adams.com>
Date: Tue, 23 Apr 2002 15:17:58 -0400
Local: Tues, Apr 23 2002 3:17 pm
Subject: Re: Console programming in C

Luke Bradshaw wrote:

> Hi,

> i'm writing an application that runs in the console, does anyone know if
> there are any functions for changing the font/colours in the console
> display?

man ncurses for help in using the console routines. Install ncurses from
the rpm out on rpmfind or off a distro disk. I have used the O'Reily
curses book for branded UNIX programming and ncurses is -supposed- to be
compatible.

Hope this helps.

G.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Silvan  
View profile  
 More options Apr 24 2002, 11:43 am
Newsgroups: alt.os.linux.mandrake
From: Silvan <sil...@windows-sucks.com>
Date: Wed, 24 Apr 2002 11:39:55 -0400
Local: Wed, Apr 24 2002 11:39 am
Subject: Re: Console programming in C

David wrote:
> Luke Bradshaw wrote:

>> Hi,

>> i'm writing an application that runs in the console, does anyone know if
>> there are any functions for changing the font/colours in the console
>> display?

> Not in the C language itself.  They are separate libraries (ncurses is
> one) that exist for doing this.

In any case, I _doubt_ you'll be able to change the font unless you
specifically interact with whatever xterm or tty your code is running on.  
I could be wrong, but changing the font the text displays with is beyond
the scope of most console stuff.  You print to standard out, and the
terminal deals with putting it on the screen.  You could go to hardware and
force a video mode change, maybe, or you could interact with Konsole or
something, but there's no simple way to just change the on-screen font from
a console app.

For colors, everything there is terminal dependant as well.  You can do it
with ANSI color codes, but they will look bad on a terminal that can't
display them.  You'd need to read the TERM environment variable and format
your output accordingly.  Probably the easy thing to do here is play with
some libary that already takes care of details like this, and just print
out using the library's print function.

I haven't played here.  I'm sort of combining my user side knowledge of how
Linux stuff works with my DOS knowledge of console programming.  The
hardware is the same though, and I can say there's not much you can do from
a DOS program to change the on-screen font without going into the hardware,
and even then the choice is limited.  Linux can't be that different, though
getty or whatever may already know how to get into the hardware, and that
whole framebuffer concept has potential I haven't even really considered.  
I suppose you _could_ change the font used on the framebuffer, but I've
never seen a console Linux program that did that...

--
Michael McIntyre  zone 6b in SW VA
Silvan Pagan
umount /mnt/windows;mke2fs /dev/hde1;tune2fs -j /dev/hde1
www.geocities.com/Paris/Rue/5407/index.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »