|
|
| Author |
Message |
|
|
roberthuff@rcn.com Familiar Face
Joined: 06 Aug 2008 Posts: 21
|
Posted: Wed Aug 20, 2008 2:04 pm Post subject: working with text and fonts |
|
|
1) If I don't like the default font, I can use GtkFontSelection and friends to get a new one.
If I do like the default font ... how do I find out what it is?
2) given a font - either as a string or as a font descriptor - and a string, how do I figure out the height and width in pixels? I'm guessing it involves pango, but pango_? I have no idea. |
|
| Back to top |
|
 |
Mk27 GTK+ Geek
Joined: 07 Aug 2008 Posts: 70 Location: NYC
|
Posted: Sun Aug 24, 2008 1:06 am Post subject: |
|
|
Declare a new font:
PangoFontDescription *Nfont = pango_font_description_from_string("lucida bold italic 12");
apply the font to a widget:
gtk_widget_modify_font(Nwidget,Nfont);
pango_font_description_free(Nfont);
works fine for me. |
|
| Back to top |
|
 |
roberthuff@rcn.com Familiar Face
Joined: 06 Aug 2008 Posts: 21
|
Posted: Sun Aug 24, 2008 2:28 am Post subject: |
|
|
| Mk27 wrote: | Declare a new font:
PangoFontDescription *Nfont = pango_font_description_from_string("lucida bold italic 12");
apply the font to a widget:
gtk_widget_modify_font(Nwidget,Nfont);
pango_font_description_free(Nfont);
works fine for me. |
Thank you for the response, but it doesn't actually answer either of the questions. |
|
| Back to top |
|
 |
|