Re: Setting Font Faces and Sizes




On Jan 6, 2007, at 11:58 AM, Torsten Schoenfeld wrote:

On Sat, 2007-01-06 at 11:36 -0500, muppet wrote:

It looks like you actually got a copy of the font description from
Gtk2::Style::font_desc, which means your changes aren't happening to
the object in place.  Odd.

Yeah.  We're using newSVPangoFontDescription_copy in
Gtk2::Style::font_desc, so we actually hand out a copy. I think that's
not necessary.  Proposed patch attached.

Looks okay, but i'm worried about compatibility. The current code goes back a long, long way. Aside from renumbering the switch statement in Nov '03, there's a bugfix:

Copy the font_desc, not &font_desc
http://gtk2-perl.cvs.sourceforge.net/gtk2-perl/gtk2-perl-xs/Gtk2/xs/ GtkStyle.xs?r1=1.5&r2=1.6

And the use of newSVPangoFontDescription_copy() goes all the way back to version 1.1, imported from the last non-cvs snapshot in April of '03. The comment, "/* FIXME: is it correct to _copy these */" is intact in that first revision, as well. :-/


Not sure. Not sure how to test it for compatibility, either. I can come up with arguments either way as to whether it should or shouldn't hand out a copy...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]