On Mon, Feb 04, 2002 at 03:01:56PM +0300, Alexander Kotelnikov wrote: > >>>>> 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. >
Ah yes. > 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. > As Dominik say this font cache can be useful to prevent unuseful multiple call to XCreateFontSet/XLoadQueryFont. Also, in my machine (with I18N_MB) each use of Style * -*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-* add memory to fvwm2 (around 10kb with a few xterm only) and really I do not think that the problem is a pure fvwm problem (it just seems that XFreeFontSet does not do its job). > 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. > One of my idea is that when fvwm will load a font either font or fontset should be 0 at the end of the loading (font will never be the XFontsOfFontSet of fontset). If fontset is not null the Xmb* functions will be used and if font is not NULL XDrawString/TextWidth will be used (the gc's will be set as needed). I do not see why a line as Style "an-app" -a-funny-font-that-my-locale-dont-have-iso8859-1 should give the "fixed" locale font. If a user add a charset to its font I do not see why we should reject its query (BTW, KDE app bother me because they never use the fonts I specify). Maybe this will does not work, if it is the case this will be easy to change. Olivier -- 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]