LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-25-2006, 06:43 PM   #1
mikewelch
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
How do I use fonts in console programs?


I am a linux and C newbie programming a console application that needs to get data from an embedded controller and display it. I would like to display the data in a large font, along with a small-text menu and some other things. I don't need a GUI and would like to avoid loading the entire graphic system if possible. I'm shooting for the smallest installation I can get, since it will have to run off a flash drive. I realize that this question covers a lot of territory, and I'm really looking more for a pointer to some pertinent reading material than a direct answer. Any help will be greatly appreciated.
 
Old 06-26-2006, 02:32 AM   #2
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
I don't think you can use varying fonts in CLI.
 
Old 06-26-2006, 02:33 AM   #3
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
I don't think you can use varying fonts in CLI.
 
Old 06-26-2006, 05:57 AM   #4
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
This isn't exactly what you want, but depending on your tty it does do some things
ANSI escape sequences:

http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html

If your terminal reponds to the clear command, then it "knows" about some of these sequences. stty can enable them as well.
 
Old 06-26-2006, 10:47 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Or use ncurses. It's a library that caters for your type of stuff.
Check with locate ncurses if it's installed on your system.
 
Old 06-29-2006, 07:00 PM   #6
mikewelch
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your replies. It seems that there are some packages out there (SVGAlib, directfb, sdl) that might do what I need. I'll have to read up on them and see what's what. This was easy to do in DOS BASIC 15 years ago. That's progress!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge fonts in console lowpro2k3 Slackware 4 08-02-2005 01:59 PM
How to reset console fonts Manuel-H Linux - Software 9 06-08-2004 10:22 PM
console fonts in RH9 deveraux83 Linux - Distributions 0 08-04-2003 07:56 AM
Any way to convert ttf fonts to linux console fonts? Glockage Linux - Software 7 12-30-2002 06:41 AM
New fonts for console? tunedLow Linux - General 0 06-28-2002 12:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration