Re: how to draw a label with a specific font?
- From: Igor Jovanovic <igorj pixelthorn com>
- To: Akos Maroy <darkeye tyrell hu>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: how to draw a label with a specific font?
- Date: Wed, 26 Jan 2005 11:14:57 +0100
On Tue, 2005-01-25 at 22:03 +0100, Akos Maroy wrote:
> Hi,
>
> I'd like to draw Gtk::Label objects with a specific font (Bitstream
> Vera). How would I achieve this? I can't find any aspect in the
> Gtk::Label documentation on how I'd change the font...
It's easy as:
label->modify_font(Pango::FontDescription("Bitstream Vera 10"));
or You can create an object of type Pango::FontDescription with:
Pango::FontDescription pfd;
pfd.set_family("sans 10");
pfd.set_style(Pango::STYLE_ITALIC);
and after that
label->modify_font(pfd);
You should read the Pango namespace reference manual.
--
Igor Jovanovic <igorj pixelthorn com>
PixelThorn Studios
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]