Wine failure
g.patel at wanadoo.fr
g.patel at wanadoo.fr
Mon Mar 12 07:09:11 CST 2001
On Mon, 12 Mar 2001 07:41:33 -0500, "Rinaldi J. Montessi"
<rjmontessi at excite.com> wrote:
<snip>
>Now. Is there a growing list of fonts that *are* wine compatable?
Wine has nothing to do with that.
Wine gives to X a font - an external input for Wine.
X don't like it. Unless the font has been converted
using font2bdf, there is nothing Wine can do to make
the font palatable to X Window. It's either a font or a
X Window problem.
Wine could ignore the invalid external inputs, though.
I have already posted this patch on this news group
You can access old posts using Google.
Gerard
--- xfont.c.orig Wed Jan 24 23:15:32 2001
+++ xfont.c Sun Jan 28 22:04:06 2001
@@ -1867,6 +1867,32 @@
#undef df
}
+static int staticXError;
+
+static int fonterror_handler(Display *display, XErrorEvent
*error_evt)
+{
+ ERR("X error %d\n", error_evt->error_code);
+ return 0;
+}
+
+static XFontStruct * XFONT_GetFont(char *lpstr)
+{
+ XFontStruct* x_fs;
+ void *ptr;
+
+ wine_tsx11_lock();
+ staticXError = FALSE;
+ ptr = XSetErrorHandler(fonterror_handler);
+ x_fs = XLoadQueryFont(display, lpstr);
+ XSync(display, False);
+ XSetErrorHandler(ptr);
+ wine_tsx11_unlock();
+ if (staticXError)
+ return NULL;
+ else
+ return x_fs;
+}
+
/***********************************************************************
* XFONT_BuildMetrics
*
@@ -1971,7 +1997,7 @@
}
else lpstr = x_pattern[i];
- if( (x_fs = TSXLoadQueryFont(display, lpstr)) )
+ if( (x_fs = XFONT_GetFont(lpstr)) )
{
XFONT_SetFontMetric( fi, fr, x_fs );
TSXFreeFont( display, x_fs );
More information about the wine-users
mailing list