Instead of doing this you should use the clutter API (set_ellipsize and set_max_length). See https://people.gnome.org/~gcampagna/docs/Clutter-1.0/Clutter.Text.html.