- if (ss->loading_sw == 0) /* only do this once, so that the string doesn't move. */
- ss->loading_sw = texture_string_width (ss->texfont, text, &ss->loading_sh);
+ if (ss->loading_sw == 0)
+ {
+ /* only do this once, so that the string doesn't move. */
+ XCharStruct e;
+ texture_string_metrics (ss->texfont, text, &e, 0, 0);
+ ss->loading_sw = e.width;
+ ss->loading_sh = e.ascent + e.descent;
+ }