XftColor c;
gint mw;
PangoRectangle rect;
- gchar *text;
PangoAttrList* attrs = NULL;
/* center the text vertically
/* * * set up the layout * * */
- text = g_strdup(t->string);
-
if (t->shortcut) {
gchar *i;
gchar *lowertext;
- lowertext = g_utf8_strdown(text, -1);
+ lowertext = g_utf8_strdown(t->string, -1);
i = g_utf8_strchr(lowertext, -1, t->shortcut);
if (i != NULL) {
PangoAttribute *a;
g_free(lowertext);
}
- pango_layout_set_text(t->font->layout, text, -1);
+ pango_layout_set_text(t->font->layout, t->string, -1);
pango_layout_set_width(t->font->layout, w * PANGO_SCALE);
- g_free(text);
-
/* * * end of setting up the layout * * */
pango_layout_get_pixel_extents(t->font->layout, NULL, &rect);