Re: Howto retrieve selected font size from GtkFontButton
- From: Christian Dywan <christian imendio com>
- To: "Nelson Benítez León" <nbenitezl gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Howto retrieve selected font size from GtkFontButton
- Date: Tue, 2 Dec 2008 14:55:05 +0100
Am Tue, 2 Dec 2008 14:19:49 +0100
schrieb "Nelson Benítez León" <nbenitezl gmail com>:
> 2008/12/2 Christian Dywan <christian imendio com>
>
> > Am Tue, 2 Dec 2008 14:03:01 +0100
> > schrieb "Nelson Benítez León" <nbenitezl gmail com>:
> >
> > > Hi,
> > > Gtkfontbutton provides api to get the name of the selected font,
> > > but not to get the selected font size, so I would appreciate if
> > > you know of some way to get the size, or if that is not possible,
> > > if you will accept a patch to provide that api..
> > >
> > > Thank you
> >
> > Hey,
> >
> > you can convert the font string with
> > pango_font_description_from_string and then obtain the size easily.
> > I would however also think the font button should provide API for
> > that. Ideally it were a GtkFontSelection but unfortunately that's
> > not the case.
>
>
> And, how could I get the font string of the currently selected font
> in the gtkfontbutton? to pass it to
> pango_font_description_from_string later...
gtk_font_button_get_font_name
That returns the font name, as seen in the button, including styles and
size.
Yours,
Christian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]