GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Choosing the font my application uses.

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
tblue
Familiar Face


Joined: 21 Mar 2007
Posts: 13

PostPosted: Thu May 17, 2007 3:42 pm    Post subject: Choosing the font my application uses. Reply with quote

I am writing a GTK application for an Embedded touch screen terminal.

I want to know how I can setup the global font that my application will use.

For chinese I use one TTF and others for different locales.

Thanks
TBlue.
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 386
Location: Fairfax, Virginia

PostPosted: Thu May 17, 2007 4:05 pm    Post subject: Reply with quote

Setting the default font for an application is usually handled through the themes. You should also use resource files to set it dynamically.
Back to top
tblue
Familiar Face


Joined: 21 Mar 2007
Posts: 13

PostPosted: Thu May 17, 2007 6:08 pm    Post subject: Reply with quote

Thanx,

Support for themes is compiled out on my system. Ill look into the resource files..

/TBlue
Back to top
tblue
Familiar Face


Joined: 21 Mar 2007
Posts: 13

PostPosted: Fri May 18, 2007 9:52 am    Post subject: Example... Reply with quote

Has anyone an example of setting the default font in a resource file.

I am struggling to work out how its done.

Thanks.

TBlue.
Back to top
tblue
Familiar Face


Joined: 21 Mar 2007
Posts: 13

PostPosted: Sun May 20, 2007 3:33 pm    Post subject: Setting global font .. how its done... Reply with quote

In a resource file..

style "force_font" {
font_name = "Sans Italic 18"
}

class "GtkWidget" style "force_font"
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP