[PHP-GTK-DEV] Undefined method: PangoFontDescription::free()

[email protected] (Jon Dunlap)
Newsgroups php.gtk.dev
Message-ID <[email protected]>
Hello:

I am using PHP-Gtk2 to develop software to control a motorsports scoreboard. 
I have the most recent versions of every piece of the puzzle (php-gtk2, GTK+
bundle) and am running on WinXP 32-bit.

Upon attempting to use the command $pfd -> free() on a PangoFontDescription
named $pfd, I encounter the error

[17-Jul-2009 10:51:10] PHP Fatal error:  Call to undefined method
PangoFontDescription::free() in D:\Documents and Settings ... on line 58

This command appears in all PHP-Gtk2 references.  Why does it remain
"undefined" to my compiler?  The static pango_font_descriptions_free() is
also undefined, and I cannot ref() or unref() my PangoLayouts, either, even
though they are GObjects.

The need for these commands stems from an object I have defined, "Textbox",
which takes as input a width/height array, some text, a font family, and a
desired maximum font size.  It creates a PangoFontDescription and a
PangoLayout and then resets the size of the PangoFontDescription downward
until the PangoLayout fits inside the width and height specified.  The size
is checked via PangoLayout -> get_pixel_size.  My program crashes after
several hundred resizings; when the resizing is omitted, my program can
create tens of thousands of Textboxes without incident.  I surmise that it
is the font-resize---modify layout---get_pixel_size cycle that is causing
the crash.  

Does anyone have an idea for a more efficient/less memory-intensive
algorithm?  Is there a PHP-Gtk2 command I'm missing?  

Thanks for any assistance you can provide.

Jon
-- 
View this message in context: http://www.nabble.com/Undefined-method%3A--PangoFontDescription%3A%3Afree%28%29-tp24536636p24536636.html
Sent from the Php - GTK - Dev mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.