On Sat, Jul 05, 2003 at 12:37:04PM +0200, Lionel Ulmer wrote:
Hi all,
It seems that a lot of people out there are still using the 'old' core fonts rendering path for fonts (maybe one familiar with 'wineinstall' should have it print a help message telling people to install the MS core fonts in their Windows/Fonts directory).
As seen on bug 1555 (http://bugs.winehq.com/show_bug.cgi?id=1555), the call generating the X11 error is 'XLoadQueryFont'. So let's protect this with our own X11 error mechanism as we do for DGA2 for example and do as if the loading of the font failed.
This was not tested yet as I did not find an user who 1) had built Wine himself and 2) had the font issue. But well, according to 1555, it should work :-)
Changelog:
- do not have Wine crash when trying to load bad fonts
-- Lionel Ulmer - http://www.bbrox.org/
Index: graphics/x11drv/xfont.c
RCS file: /home/wine/wine/graphics/x11drv/xfont.c,v retrieving revision 1.114 diff -u -r1.114 xfont.c --- graphics/x11drv/xfont.c 18 Jun 2003 19:45:22 -0000 1.114 +++ graphics/x11drv/xfont.c 5 Jul 2003 10:31:32 -0000 @@ -2014,6 +2014,11 @@
- Build font metrics from X font
*/ +static int XLoadQueryFont_ErrorHandler(Display *dpy, XErrorEvent *event, void *arg) +{
- return 1;
+}
Why not print a user message here that such and such font might be broken?
Andreas Mohr