A Seg, 2003-12-15 �s 17:14, Pier Carteri escreveu:
> Hi to all!
> I'm looking for the possibility to change some properties of a
> gnomePrintFont. More precisely I want to be able to change the color,
> the weight (i.e. normal, bold) and the style (i.e. normal
> oblique/italic). How can I do it?

  You can't change the color of a gnomeprint.Font.  You should change
the color of your gnomeprint.Context instead, with
gnomeprint.Context.setrgbcolor(r,g,b).  r/g/b are floating point values
in range 0-1.0

  To change font, try calling
gnomeprint.font_find_closest_from_weight_slant(family(string),
weight(enum), italic(gboolean), size(float))

  For the weight enumeration, there are FONT_* constants defined in the
gnomeprint module.  help(gnomeprint) might help, if you forgive my
redundancy :)

  Don't forget to take a look at the examples.  They're in CVS (or
here[1]).

  Regards.

[1]
http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=gnome-python/gnome-python/examples/gnomeprint
-- 
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to