+ /* * * set up the layout * * */
+
+ text = g_strdup(t->string);
+
+ if (t->shortcut) {
+ gchar *i;
+ gchar *lowertext;
+
+ lowertext = g_utf8_strdown(text, -1);
+ i = g_utf8_strchr(lowertext, -1, t->shortcut);
+ if (i != NULL) {
+ PangoAttribute *a;
+
+ a = pango_attr_underline_new(PANGO_UNDERLINE_LOW);
+ a->start_index = i - lowertext;
+ a->end_index = i - lowertext +
+ g_unichar_to_utf8(t->shortcut, NULL);
+
+ attrs = pango_attr_list_new();
+ pango_attr_list_insert(attrs, a);
+ }
+ g_free(lowertext);
+ }
+
+ pango_layout_set_text(t->font->layout, text, -1);