winex11.drv: Use a separate string buffer for X11R6 font check.

This commit is contained in:
Andrew Nguyen 2010-10-11 05:19:19 -05:00 committed by Alexandre Julliard
parent 6d605e68f4
commit 093ae8b691
1 changed files with 6 additions and 8 deletions

View File

@ -2893,7 +2893,8 @@ static void X11DRV_FONT_InitX11Metrics( void )
int i, x_count, buf_size;
char *buffer;
HKEY hkey;
XFontStruct* x_fs;
char fontcheck_name[] = "-*-*-*-*-normal-*-[12 0 0 12]-*-72-*-*-*-iso8859-1";
wine_tsx11_lock();
x_pattern = XListFonts(gdi_display, "*", MAX_FONTS, &x_count );
@ -2966,15 +2967,12 @@ static void X11DRV_FONT_InitX11Metrics( void )
XFreeFontNames(x_pattern);
/* check if we're dealing with X11 R6 server */
if( (x_fs = safe_XLoadQueryFont(gdi_display, fontcheck_name)) )
{
XFontStruct* x_fs;
strcpy(buffer, "-*-*-*-*-normal-*-[12 0 0 12]-*-72-*-*-*-iso8859-1");
if( (x_fs = safe_XLoadQueryFont(gdi_display, buffer)) )
{
text_caps |= TC_SF_X_YINDEP;
XFreeFont(gdi_display, x_fs);
}
text_caps |= TC_SF_X_YINDEP;
XFreeFont(gdi_display, x_fs);
}
wine_tsx11_unlock();
HeapFree(GetProcessHeap(), 0, buffer);