ryanchayward
Joined: 17 Apr 2008 Posts: 2
|
Posted: Thu Aug 21, 2008 7:40 pm Post subject: Pango Font Color Incorrect |
|
|
I am having an issue when using Pango to specify the font to use in a widget (label, textview, etc). Essentially if I specify a font ("Courier 10") then the initial color of the text will be incorrect from what I specify it to be. If I click on the text however, or if like a menu box appears over it and goes away, then the text will redraw itself to the correct color. But if I redraw the window (minimize->restore, or in code tell it to redraw) the color goes back to the incorrect color. Also the color it chooses changes every time you start the application.
I have tried several different ways to specify the font color (resource files, tags, markup text, etc), but no matter the method as soon as I use "font" "Courier 10" or "font_desc=Times New Roman 10", etc. in any of these locations the initial/redraw color no longer is correct.
Example Code Line :
cmdlinelabel = gtk_label_new("test");
gtk_label_set_markup(GTK_LABEL(cmdlinelabel), "<span foreground=\"blue\" font_desc=\"Courier 10\">Courier 10 Blue text</span>");
Note: I honestly don't believe it is my code as I was able to get the same response with gimp. If I create a resource file with a font specified for the widgets and tell gimp to use this resource it has the same color error.
Has anyone seen this? I've tried different versions of pango/gtk, but no luck there.
Thank you |
|