sync code with last improvements from OpenBSD
This commit is contained in:
commit
88965415ff
26235 changed files with 29195616 additions and 0 deletions
38
app/fvwm/libs/GetFontSet.c
Normal file
38
app/fvwm/libs/GetFontSet.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* This file brings from GetFont.c */
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include "fvwmlib.h"
|
||||
|
||||
/*
|
||||
** loads fontset or "fixed" on failure
|
||||
*/
|
||||
XFontSet GetFontSetOrFixed(Display *disp, char *fontname)
|
||||
{
|
||||
XFontSet fontset;
|
||||
char **ml;
|
||||
int mc;
|
||||
char *ds;
|
||||
|
||||
if ((fontset = XCreateFontSet(disp,fontname,&ml,&mc,&ds))==NULL)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"[FVWM][GetFontSetOrFixed]: WARNING -- can't get fontset %s, trying 'fixed'\n",
|
||||
fontname);
|
||||
/* fixed should always be avail, so try that */
|
||||
/* plain X11R6.3 hack */
|
||||
if ((fontset = XCreateFontSet(disp,"fixed,-*--14-*",&ml,&mc,&ds))==NULL)
|
||||
{
|
||||
fprintf(stderr,"[FVWM][GetFontSetOrFixed]: ERROR -- can't get fontset 'fixed'\n");
|
||||
}
|
||||
}
|
||||
return fontset;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue