1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

[Textbox] When estimating height, set correct font first.

fixes: #1247
This commit is contained in:
Dave Davenport 2020-12-27 21:25:06 +01:00
parent 2e18133667
commit af6752c35d

View file

@ -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 );