summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-12-27 21:25:06 +0100
committerDave Davenport <qball@gmpclient.org>2020-12-27 21:25:06 +0100
commitaf6752c35dd7d4a4b74c2dd2196be26ab11d5fa4 (patch)
tree14d07f53bf1fa1a0312bdf0e052e1ec86c4cce70
parent2e1813366720cc5e59a9454a544f3af71b70dcae (diff)
[Textbox] When estimating height, set correct font first.
fixes: #1247
-rw-r--r--source/widgets/textbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c
index 8e52b327..5134e6aa 100644
--- a/source/widgets/textbox.c
+++ b/source/widgets/textbox.c
@@ -136,6 +136,7 @@ static void textbox_initialize_font ( textbox *tb )
tbfc->metrics = pango_context_get_metrics ( p_context, tbfc->pfd, NULL );
PangoLayout *layout = pango_layout_new ( p_context );
+ pango_layout_set_font_description ( layout, tbfc->pfd );
pango_layout_set_text ( layout, "aAjb", -1 );
PangoRectangle rect;
pango_layout_get_pixel_extents ( layout, NULL, &rect );