text-object: fix width calculation

calculating self->w now takes into consideration the advance of the last
character, which fixes the issue in fonts where a space is only one or
two pixels wide but has a larger advance.