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 Dec 22, 2014 6:23 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: pango_font_description_set_size not working
PostPosted: Tue Nov 08, 2011 5:02 pm 
Offline
Familiar Face

Joined: Mon Oct 31, 2011 11:10 am
Posts: 8
Hi
im trying to set the font size with pango_font_description_set_size, but this has no effekt..


i can set the size (and font) with
Code:
desc = pango_font_description_from_string ("Sans 30");
pango_layout_set_font_description (layout, desc);

pango_font_description_set_size (desc,10);


the set_size has no effekt, font is still 30 px

has anyone an idea why?

regards Frank


Top
 Profile  
 
 Post subject: Re: pango_font_description_set_size not working
PostPosted: Wed Nov 09, 2011 10:25 am 
Offline
Familiar Face

Joined: Mon Oct 31, 2011 11:10 am
Posts: 8
from documentation:
http://developer.gnome.org/pango/stable ... -SIZE:CAPS

i have to multiply with PANGO_SCALE and reassign the font-description to the layout:

Code:
pango_font_description_set_size (desc,10*PANGO_SCALE);
pango_layout_set_font_description (layout, desc);


now it works


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group