diff options
-rw-r--r-- | src/layout.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/layout.c b/src/layout.c index ae7a5e8..cef270d 100644 --- a/src/layout.c +++ b/src/layout.c @@ -56,6 +56,7 @@ static void layout_subframe(struct frame *fr, double w, double h, double child_w, child_h; double offs_x, offs_y; PangoFontDescription *fontdesc; + PangoRectangle extents; child = fr->rendering_order[i]; @@ -89,6 +90,10 @@ static void layout_subframe(struct frame *fr, double w, double h, pango_layout_set_font_description(child->pl, fontdesc); pango_font_description_free(fontdesc); + pango_layout_get_extents(child->pl, NULL, &extents); + child_w = extents.width / PANGO_SCALE; + child_h = extents.height / PANGO_SCALE; + /* Now, apply the minimum size if given */ if ( child->lop.min_w > 0.0 ) { if ( child_w < child->lop.min_w ) { |