Re: Howto retrieve selected font size from GtkFontButton



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...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]