mirror of
https://github.com/morgant/mlvwm.git
synced 2025-02-16 12:30:25 +00:00
Merge pull request #31 from Hammster/fallback-font-loading
"Added fallback XLFD font name, Removed dead code" by Hans Koch
This commit is contained in:
commit
6bcb838940
@ -46,7 +46,6 @@ XCOMM
|
|||||||
|
|
||||||
#if HasLocale
|
#if HasLocale
|
||||||
Locale_DEFINES = -DUSE_LOCALE
|
Locale_DEFINES = -DUSE_LOCALE
|
||||||
Loacle_INCLUDES =
|
|
||||||
#if defined(FreeBSDArchitecture) && OSMajorVersion>1 && OSMinorVersion>1
|
#if defined(FreeBSDArchitecture) && OSMajorVersion>1 && OSMinorVersion>1
|
||||||
Locale_LIBRARIES = -lxpg4
|
Locale_LIBRARIES = -lxpg4
|
||||||
#endif /* End FreeBSD */
|
#endif /* End FreeBSD */
|
||||||
|
@ -31,6 +31,8 @@ struct configure key_modifiers[]=
|
|||||||
{0,0}
|
{0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define FALLBACK_FONT "-*-*-*-r-*-*-*-*-*-*-*-*-*-*"
|
||||||
|
|
||||||
char *NoTitleStyle( styles *tmp_style, char *str )
|
char *NoTitleStyle( styles *tmp_style, char *str )
|
||||||
{
|
{
|
||||||
tmp_style->flags &= ~TITLE;
|
tmp_style->flags &= ~TITLE;
|
||||||
@ -577,10 +579,21 @@ XFontStruct **font,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_LOCALE
|
#ifdef USE_LOCALE
|
||||||
|
asprintf(&fontname, "%s, %s", fontname, FALLBACK_FONT);
|
||||||
newfont = XCreateFontSet( dpy, fontname, &miss, &n_miss, &def );
|
newfont = XCreateFontSet( dpy, fontname, &miss, &n_miss, &def );
|
||||||
if( n_miss>0 ){
|
|
||||||
for( lp=0; lp<n_miss; lp++ )
|
if( Scr.flags & DEBUGOUT )
|
||||||
DrawErrMsgOnMenu( "Load miss font ", miss[lp] );
|
fprintf( stderr, "Loading fontset %s\n", fontname );
|
||||||
|
|
||||||
|
if( n_miss>0 ) {
|
||||||
|
if( Scr.flags & DEBUGOUT )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "Missing font encodings" );
|
||||||
|
for( lp=0; lp<n_miss; lp++ )
|
||||||
|
fprintf( stderr, "%s;", miss[lp] );
|
||||||
|
|
||||||
|
fprintf( stderr, "\n" );
|
||||||
|
}
|
||||||
XFreeStringList( miss );
|
XFreeStringList( miss );
|
||||||
}
|
}
|
||||||
if( newfont==NULL )
|
if( newfont==NULL )
|
||||||
|
@ -52,8 +52,6 @@
|
|||||||
|
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
|
|
||||||
#define MAX_NAME_LEN 200L /* truncate to this many */
|
|
||||||
|
|
||||||
extern int ShapeEventBase;
|
extern int ShapeEventBase;
|
||||||
|
|
||||||
extern void handle_expose( XEvent * );
|
extern void handle_expose( XEvent * );
|
||||||
|
@ -98,6 +98,9 @@ void LoadDefaultFonts( void )
|
|||||||
char **miss, *def;
|
char **miss, *def;
|
||||||
int n_miss, lp;
|
int n_miss, lp;
|
||||||
|
|
||||||
|
if( Scr.flags & DEBUGOUT )
|
||||||
|
fprintf( stderr, "Locale: %s\n", setlocale(LC_ALL, NULL));
|
||||||
|
|
||||||
Scr.MenuBarFs = XCreateFontSet( dpy, DEFAULTFS, &miss, &n_miss, &def );
|
Scr.MenuBarFs = XCreateFontSet( dpy, DEFAULTFS, &miss, &n_miss, &def );
|
||||||
if( n_miss>0 ){
|
if( n_miss>0 ){
|
||||||
for( lp=0; lp<n_miss; lp++ )
|
for( lp=0; lp<n_miss; lp++ )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user