GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Sep 22, 2014 6:13 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Choosing the font my application uses.
PostPosted: Thu May 17, 2007 3:42 pm 
Offline
Familiar Face

Joined: Wed Mar 21, 2007 1:02 pm
Posts: 16
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 4:05 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
Setting the default font for an application is usually handled through the themes. You should also use resource files to set it dynamically.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 6:08 pm 
Offline
Familiar Face

Joined: Wed Mar 21, 2007 1:02 pm
Posts: 16
Thanx,

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

/TBlue


Top
 Profile  
 
 Post subject: Example...
PostPosted: Fri May 18, 2007 9:52 am 
Offline
Familiar Face

Joined: Wed Mar 21, 2007 1:02 pm
Posts: 16
Has anyone an example of setting the default font in a resource file.

I am struggling to work out how its done.

Thanks.

TBlue.


Top
 Profile  
 
 Post subject: Setting global font .. how its done...
PostPosted: Sun May 20, 2007 3:33 pm 
Offline
Familiar Face

Joined: Wed Mar 21, 2007 1:02 pm
Posts: 16
In a resource file..

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

class "GtkWidget" style "force_font"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google Adsense [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group