Re: Default font question



Thanks Daniel, that works properly.

Regards,
-andrew

Daniel Elstner wrote:

The best way to access the default font, and also to keep track of it in
case the user changes that setting while your app is running, would be
something like this:

MyWindow::on_style_changed(const Glib::RefPtr<Gtk::Style>& previous_style)
{
 Gtk::Window::on_style_changed(previous_style);
 app_font_ = get_pango_context()->get_font_description();
}

This assumes that MyWindow is your toplevel window class derived from
Gtk::Window, and that you didn't assign a custom font to it.





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