>>>>> On Mon, 4 Feb 2002 08:35:14 +0100 >>>>> "Olivier" == Olivier Chapuis <[EMAIL PROTECTED]> wrote: Olivier> Olivier> The menus code use only XTextWidth and never XmbTextEscapement. Olivier> Are there good reasons to do not use XmbTextEscapement (via some ifdef)?
menus.c includes misc.h where XTextWidth is defined as XmbTextEscapement fo I18N_MB. Olivier> Does a font cache will be useful? Francly speaking, I do not understand, what are you about. May be you do not want to keep mmultiple XFontStructs for, e.g., "fixed"? I am very sure xlibs gives you the same XFontStruct for second and successive queries of already loaded fonts. Olivier> /* As it is now but font loading logic will change */ Olivier> typedef struct FvwmFont Olivier> { Olivier> XFontStruct *font; /* font structure */ Olivier> #ifdef I18N_MB Olivier> XFontSet fontset; /* font set */ Olivier> #endif Olivier> int height; /* height of the font */ Olivier> int y; /* Y coordinate to draw characters */ Olivier> } FvwmFont; I have already proposed # ifndef I18N_MB XFontStruct *font; # endif and I insist on this. Olivier> Olivier> /* Olivier> * Load fontname into ret_font. For I18N_MB: Olivier> * 1) first try to load fontname with XCreateFontSet Olivier> * 2) If this fail try to load fontname with XLoadQueryFont great, and you'll get font absolutely unusable for user, but having ASCII glyphs similar to ones he wanted. Olivier> * 3) If this fail try to load Olivier> * -*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*,\ Olivier> * -*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-* Olivier> * with XCreateFontSet should be second and the last. Olivier> * 4) If this fail try to load "fixed" with XLoadQueryFont Olivier> * Olivier> * For !I18N_MB just do 2) and 4) as now but if a "," separated list Olivier> * of fonts is given try to load each. Olivier> */ Olivier> void FDrawString(Display *dpy, FvwmFont ff, FvwmWinString *fstr, probably, FvwmFont *ff Olivier> unsigned long flags); -- Alexander Kotelnikov Saint-Petersburg, Russia -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]