win32: use ms default fonts for menus and such... need a pango expert



Hi List!

I'm interested, using the default win32 fonts for all menus and such, as this will look much more familiar to win32 users, than the GTK defaults.

Allin Cottrell has written code to do exactly this, see:

http://www.ecn.wfu.edu/~cottrell/gtk_win32/#winfont

The code works fine in it's GTK1 version, but the GTK2 version fails (at least on my Win XP machine),
although Allin reported that it works on his systems (Win 98 and XP) ok.

code excerpt from the function try_to_get_windows_font():

pfd = pango_font_description_from_string("MS Shell Dlg");
w = gtk_label_new(NULL);
pc = gtk_widget_get_pango_context(w);
pfont = pango_context_load_font(pc, pfd);

When calling this, pfont is NULL.

Allin give me the hint, that this indicates, that pango doesn't know the "MS Shell Dlg" font.

Does someone have an idea, how to solve this?

Regards, ULFL




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