LinuxQuestions.org
Visit Jeremy's Blog.
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 01-06-2009, 07:01 AM   #1
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Rep: Reputation: 15
change the font size


Hi,

I'm doing a bash script.
I would like to show some words in the terminal with printf o with echo that have more size than the normal size.

How could I do this with bash??

Many thanks!
 
Old 01-06-2009, 08:24 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

You can't increase the font size as fas as I'm aware - the controlling terminal app (or indeed hardware terminal) controls the size and typeface. You can do bold, though:

http://unstableme.blogspot.com/2008/...ting-text.html

Dave
 
Old 01-14-2009, 03:05 AM   #3
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ilikejam View Post
Hi.

You can't increase the font size as fas as I'm aware - the controlling terminal app (or indeed hardware terminal) controls the size and typeface. You can do bold, though:

http://unstableme.blogspot.com/2008/...ting-text.html

Dave
Hi,
Finally I could change the font size in bash.

string="xxxx yyy xxx zzzzZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ lllllllllllllllllllzzzzzzzyy dslfjskdf sksksk sdfsdf sd 324234234 x.x.x.x.sdfjslfs 24 234l232423423 xxxxxxxxxxxxxxxyyyy yyyyyyyyyyyyyyy"
F_VDOBLE="\033#6"
printf "${F_VDOBLE}$string"

The problem that I have is that this command only puts the first line with wide font, the next lines have normal font. What can I do to put all the text with wide font if the string have more of one line?

Any help?

Many thanks

--------------------------------------------------------------------------------
Last edited by davidtuti; 3 Minutes Ago at 03:58 AM..
 
Old 01-14-2009, 05:05 AM   #4
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 66

Rep: Reputation: 17
Quote:
Originally Posted by mierdatuti View Post
Hi,
Finally I could change the font size in bash.

string="xxxx yyy xxx zzzzZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ lllllllllllllllllllzzzzzzzyy dslfjskdf sksksk sdfsdf sd 324234234 x.x.x.x.sdfjslfs 24 234l232423423 xxxxxxxxxxxxxxxyyyy yyyyyyyyyyyyyyy"
F_VDOBLE="\033#6"
printf "${F_VDOBLE}$string"
I'm sorry I can't help you to make it persistent, but I'm curious about your solution. I thought ilikejam was right, indeed in a text mode terminal and in an xterm your script simply prints text in normal font. But I tested it in roxterm and in it's parent terminal it printed:
Code:
(roxterm:2065): Vte-WARNING **: No handler for control sequence `double-width' defined.
What kind of terminal are you using?
 
Old 01-14-2009, 05:25 AM   #5
irey
Member
 
Registered: Jun 2008
Location: Torino, Italy
Posts: 66

Rep: Reputation: 17
I asked google about your solution and it pointed me here:
http://vt100.net/docs/vt100-ug/chapter3.html

It appears that double width is specific to the line where you printed the control sequence. What you can do is using an alternate print function, let's call it printw:
Code:
printw() {
        # The $* special variable means all parameters
	printf "\033#6$*"
}

#This line should be printed in double width.
printw "Hello, world!"
But I'm still curious about the terminal type that you used to see double width in action...

Last edited by irey; 01-14-2009 at 05:28 AM.
 
Old 01-14-2009, 05:30 AM   #6
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by irey View Post
I'm sorry I can't help you to make it persistent, but I'm curious about your solution. I thought ilikejam was right, indeed in a text mode terminal and in an xterm your script simply prints text in normal font. But I tested it in roxterm and in it's parent terminal it printed:
Code:
(roxterm:2065): Vte-WARNING **: No handler for control sequence `double-width' defined.
What kind of terminal are you using?

Thanks for your help. I'm using kubuntu and the terminal that I use is Konsole.

Thanks
 
Old 01-14-2009, 10:11 AM   #7
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
FYI, also works in PuTTY.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I need a way to change the font size in Thunderbird royeo Linux - Newbie 15 11-06-2009 12:10 AM
Don't know how to change font size in Linux vsandilya Linux - Newbie 1 01-28-2008 02:28 PM
How to change font color and font size in terminal ? wlaw Linux - Newbie 3 05-15-2007 08:57 PM
how 2 change font size OF chromedit? OpenMacNews Linux - Software 0 08-29-2005 10:55 AM
Where i can change the X font size dr_doom Linux - Software 0 04-09-2004 12:17 PM

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

All times are GMT -5. The time now is 11:03 PM.

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