After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680680 - PangoLayout.set_font_description doesn't accept Pango.FontDescription as attribute
PangoLayout.set_font_description doesn't accept Pango.FontDescription as attr...
Status: RESOLVED INVALID
Product: pango
Classification: Platform
Component: cairo
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-27 01:16 UTC by Manuel Kaufmann
Modified: 2012-07-27 13:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Manuel Kaufmann 2012-07-27 01:16:47 UTC
Hello,

I'm using Python with Gtk3, Cairo and Pango on my application and I found this issue (the activity[1] was written in gtk2, cairo and pango).

I'm getting this error when I try to set the "PangoFontDescription" and I don't know why.

  (Epdb) fd
  <PangoFontDescription at 0x2bbb8f0>
  (Epdb) pango_layout.set_font_description()
  *** TypeError: Required argument 'desc' (pos 1) not found
  (Epdb) pango_layout
  <pango.Layout object at 0x2b5dc30 (PangoLayout at 0x2ab2430)>
  (Epdb)

Hope this bug report helps. See you and thanks,


[1] http://git.sugarlabs.org/typing-turtle
Comment 1 Manuel Kaufmann 2012-07-27 12:43:15 UTC
Sorry, I pasted the wrong chunk of code. Here is the correct one:

  (Epdb) fd = Pango.FontDescription('Monospace')
  (Epdb) fd.set_size(10 * Pango.SCALE)
  (Epdb) pango_layout.set_font_description(fd)
  *** TypeError: desc should be a PangoFontDescription or None
  (Epdb) fd
  <PangoFontDescription at 0x2a67060>
  (Epdb) pango_layout
  <pango.Layout object at 0x2a13a00 (PangoLayout at 0x2964b70)>
  (Epdb)
Comment 2 Manuel Kaufmann 2012-07-27 13:08:28 UTC
My apologies. It was my fault. I found that there was an "import pangocairo" in one of the files and it seems it was generating a conflict with the "from gi.repository import PangoCairo"