Re: Changing the font in single menuitems



Sebastian Zerbe wrote:

Hi,
I'm trying to write an application for
computing minimal distinctive
features of natural classes (as you
can see this is related to phonology).
Therefore I need to change the font
used by single menu items to xipa.
I tried it with some code like this:
-------- cut ----------
for (i = 0; i < 28; i++) {
    buf[0] = obstruents[i];
    buf[1] = '\0';

    menuitems = gtk_menu_item_new_with_label(buf);

    ipastyle = gtk_widget_get_style(menuitems);
    ipastyle->font = gdk_font_load(IPAFONT);
    gtk_widget_set_style(menuitems, ipastyle);

    gtk_menu_append(GTK_MENU(menu), menuitems);
    gtk_widget_show(menuitems);
}
-------- cut ----------

But this changes the font of the
whole application.

Does anybody know a way to
change font for single widgets
(beside text widgets where this
problem seems solvable)?

BTW I'm using gtk Version
1.2.10 (latest deb package
from ximian).

Any ideas or do I have to use
PNG's of the phonetic symbols
(might be a good approach as
well)?

Best Regards,
Sebastian Zerbe



with rc file (you can find in gtk tutorial, but in the examples there
are some programming errors) you can change the font of a determinate
widget, but I don´t know if it works with menuitems.
Good Luck!




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