- cairo_set_source_rgb(cr,
- fgcolor->f_red, fgcolor->f_green, fgcolor->f_blue);
+ /** Set the color for text drawing */
+ style_ctx = gtk_widget_get_style_context(window);
+ gtk_style_context_get_color(style_ctx, GTK_STATE_FLAG_NORMAL, &rgba);
+ cairo_set_source_rgb(cr, rgba.red, rgba.green, rgba.blue);