On Mon, 27 Feb 2006 19:59:02 +0200 "A.J. Venter" <[EMAIL PROTECTED]> wrote:
> On Monday 27 February 2006 18:51, Mattias Gaertner wrote: > > font_desc:=pango_font_description_from_string(PChar(PangoDescStr)); > > gtk_widget_modify_font(AWidget,font_desc); > > pango_font_description_free(font_desc); > > Right my patch is ALL BUT complete, one thing is missing though, > This code FAILS is tfont.name is set to Default, I need to CATCH that and > give it a SANE default font name in that case, > what should I use ? > Ideally it should be whatever lazarus normally uses. Make this: ... whatever gtk2 uses. I just tested: 'default 29' works here. Maybe you can use Style:=gtk_widget_get_style(AWidget); if Style<>nil then begin font_desc:=Style^.font_desc; end; Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives