The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to make a bold text in vi xzyan UNIX for Dummies Questions & Answers 0 09-02-2006 02:30 PM
write data into a text file in bold format miltony UNIX for Dummies Questions & Answers 1 09-28-2005 08:21 AM
Printing in Bold preetikate UNIX for Dummies Questions & Answers 10 02-25-2004 08:57 AM
Bold the paragraph caprikar Shell Programming and Scripting 3 12-22-2003 06:44 PM
Bold Text? Atama UNIX for Dummies Questions & Answers 4 04-12-2002 10:40 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-24-2005
svh svh is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 17
Bold text

hello,

how do i display the text in the printf statement in bold.

or is there anyway to display the text on the console in bold

thx in advance

svh
  #2 (permalink)  
Old 08-24-2005
Sabari Nath S Sabari Nath S is offline
Registered User
  
 

Join Date: Jul 2005
Location: Chennai
Posts: 46
Hi,

Give a "tput bold" as the statement before ur printf statement
After printf statement if u no longer want the font to be bold , u can revert back to default settings by "tput sgr0"

Check tput manual too ... tput provides a lot of text manipulations like making it bold, blinking, highlitimg, placing the cursor in a particular postion etc.

Thanks,

SNS
  #3 (permalink)  
Old 08-24-2005
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,787
I think he wants to do it inside C. The ANSI escape sequences will do what you want.

Code:
  char ESC=27;
  printf("%c[1m",ESC);  /*- turn on bold */
  printf("%c[0m",ESC); /* turn off bold */


Last edited by jim mcnamara; 08-24-2005 at 11:22 AM..
  #4 (permalink)  
Old 08-29-2005
svh svh is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 17
Bold

thanx both for of for ur reply

thanx a lot

bye take care

svh
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0