replaced textw function with pango_layout_get_pixel_size