GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pango Font Color Incorrect

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
ryanchayward



Joined: 17 Apr 2008
Posts: 2

PostPosted: Thu Aug 21, 2008 7:40 pm    Post subject: Pango Font Color Incorrect Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP