Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Font question

Status
Not open for further replies.

fabien

Technical User
Sep 25, 2001
299
0
0
AU
Hi!

When I launch my Tcl app on my Sun I get some rather small fonts for the labels buttons menus etc.

How can I set a larger font that applies to all widgets? I could set the fonts using the -font option for each of them but it is painful.


Thanks,
 
Heres what i have done to solve this problem. I created a default file. It looks something like this(only a portion of my real file):

*Label.background: #7DB7BB
*Label.foreground: black
*Label.font: -adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1

*Entry.background: #7DB7BB
*Entry.foreground: black
*Entry.font: -adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1

*Text.background: white
*Text.foreground: black
*Text.font: -adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1

*Listbox.selectmode: extended
*Listbox.background: white
*Listbox.foreground: black
*Listbox.font: -adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1

Then at the top level of the program i have the line:

option readfile $PATH/Environment

Where PATH is the directory of the default file, and Environment is the name of the default file.
Theres nothing special about this file, no funky headers, just follow the format. And, if you still desire a different font, any fonts you declare in the code will take presedence over the fonts defined in your default file.

hope this helps, i wasnt able to find a link for you, sorry
 
Thanks this helps. I tried changing your font to bold instead of normal but the font appeared even smaller, why? Also how to you force it to be black?

THanks!
 
No clue why the bold is making your font smaller. But to change the color of the font you need to set the foreground option
 
Yes it works, but if I have to change all the labels and buttons which is a pain..

Also I noticed that with all the additional options in the begining the app does not come up straight away now is it normal?

 
I found the solution, if I use
option add *font -adobe-helvetica-b*-r*-*--14-*-75-75-*-*-iso8859-1

Then I get a bold font.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top