Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fallback XLFD font name, Removed dead code #31

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion configure.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ XCOMM

#if HasLocale
Locale_DEFINES = -DUSE_LOCALE
Loacle_INCLUDES =
#if defined(FreeBSDArchitecture) && OSMajorVersion>1 && OSMinorVersion>1
Locale_LIBRARIES = -lxpg4
#endif /* End FreeBSD */
Expand Down
19 changes: 16 additions & 3 deletions mlvwm/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ struct configure key_modifiers[]=
{0,0}
};

#define FALLBACK_FONT "-*-*-*-r-*-*-*-*-*-*-*-*-*-*"

char *NoTitleStyle( styles *tmp_style, char *str )
{
tmp_style->flags &= ~TITLE;
Expand Down Expand Up @@ -577,10 +579,21 @@ XFontStruct **font,
#endif

#ifdef USE_LOCALE
asprintf(&fontname, "%s, %s", fontname, FALLBACK_FONT);
newfont = XCreateFontSet( dpy, fontname, &miss, &n_miss, &def );
if( n_miss>0 ){
for( lp=0; lp<n_miss; lp++ )
DrawErrMsgOnMenu( "Load miss font ", miss[lp] );

if( Scr.flags & DEBUGOUT )
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 );
}
if( newfont==NULL )
Expand Down
2 changes: 0 additions & 2 deletions mlvwm/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@

#include <X11/extensions/shape.h>

#define MAX_NAME_LEN 200L /* truncate to this many */

extern int ShapeEventBase;

extern void handle_expose( XEvent * );
Expand Down
3 changes: 3 additions & 0 deletions mlvwm/mlvwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ void LoadDefaultFonts( void )
char **miss, *def;
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 );
if( n_miss>0 ){
for( lp=0; lp<n_miss; lp++ )
Expand Down