Re: Get the default font in Gtk3
- From: Rafał Mużyło <galtgendo o2 pl>
- To: gtk-app-devel-list gnome org
- Subject: Re: Get the default font in Gtk3
- Date: Wed, 28 Mar 2018 23:02:46 +0200
On Wed, Mar 28, 2018 at 08:20:21PM +0200, rastersoft wrote:
Hi all:
I want to paint in a Cairo canvas some letters, and I want to use the
default tipografy and size from Gtk to give it coherence with all the
buttons and so on, no matter if the user changes it. So the question is:
how can I get it?
You don't.
No, you seriously don't.
Unless you want to do something fancy, all you need to do would be (in
"draw" handler):
layout = gtk_widget_get_pango_layout(widget)
...
...work on the layout (via pango API)...
...
pango_cairo_show_layout(cr, layout)
g_object_unref(layout)
That should cover much of normal text display on a widget.
pango_cairo_layout_path should cover most of the rest.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]