Re: Russian fontset in gnome-pim/gnomecard/canvas.c

"Sergey I. Panov" <> writes:

> > This is a easy solution to enable fontset, but not a proper one.  For
> > example, some locale needs an ISO8859-2 font with no ISO8859-1 font.
>      What do you mean? 

Hmm..  I'm confused.  Yep, your solution's good also for ISO8859-2

> > I'll remove this hardcoded fontset stuff if noone objects.  Fontset
> > support should be done by gtkrc file.
>   May I ask you to outline the changes you propose.
>  I am asking that because gnomecard written in such a way you can not
> define those fonts in gtkrc file.

I can define thoese fonts.  There is a `dirty hack' for gnomecard-like
programs..  (Please open gnome-libs/libgnomeui/gnome-about.c and
search the string, `dirty hack'.  :)

        cardname_font = gdk_fontset_load (CARDNAME_FONTSET);
	title_font = gdk_fontset_load (TITLE_FONTSET);

The above can be replaced like this:

        style_backup = gtk_style_ref (some_widget->style);

	gtk_widget_set_name (some_widget, "CardName");
        cardname_font = gdk_font_ref (some_widget->style->font);

	gtk_widget_set_name (some_widget, "CardName");
        cardname_font = gdk_font_ref (some_widget->style->font);

	gtk_widget_set_style (some_widget, style_backup);
	gtk_style_unref (style_backup);

Yes, it's ugly and `dirty'.  But surely gtkrc can be used for

Changwoo Ryu

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