Mercurial > dwindows
comparison gtk/dw.c @ 233:f2435b378aed
We should use the logical_rect not the ink_rect when querying the font
extents using Pango.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 05 Feb 2003 08:37:57 +0000 |
parents | bd06f8d123f0 |
children | efa724294b5f |
comparison
equal
deleted
inserted
replaced
232:4e91b3c42e05 | 233:f2435b378aed |
---|---|
4971 if(layout) | 4971 if(layout) |
4972 { | 4972 { |
4973 PangoRectangle rect; | 4973 PangoRectangle rect; |
4974 | 4974 |
4975 pango_layout_set_font_description(layout, font); | 4975 pango_layout_set_font_description(layout, font); |
4976 pango_layout_set_text(layout, text, strlen(text)); | 4976 pango_layout_set_text(layout, text, -1); |
4977 pango_layout_get_pixel_extents(layout, &rect, NULL); | 4977 pango_layout_get_pixel_extents(layout, NULL, &rect); |
4978 | 4978 |
4979 if(width) | 4979 if(width) |
4980 *width = rect.width; | 4980 *width = rect.width; |
4981 if(height) | 4981 if(height) |
4982 *height = rect.height; | 4982 *height = rect.height; |