diff --git a/unix/app.c b/unix/app.c index 433d8722..ce12ba51 100644 --- a/unix/app.c +++ b/unix/app.c @@ -64,12 +64,17 @@ x_error_handler( Display *d, XErrorEvent *ev) return 0; } -#ifdef NEED_X11_EXTENSIONS_XRENDER_H +#ifdef HAVE_X11_EXTENSIONS_XRENDER_H if ( ev-> request_code == guts. xft_xrender_major_opcode && ev-> request_code > 127 && - ev-> error_code == BadLength) - /* Xrender large polygon request failed */ + ev-> error_code == BadLength) { + /* Xrender large polygon request failed, + or colored glyphs over an older X11 server + */ + if ( guts. xft_disable_large_fonts ) + return 1; guts. xft_disable_large_fonts = 1; + } #endif #ifdef HAVE_X11_EXTENSIONS_XCOMPOSITE_H diff --git a/unix/font.c b/unix/font.c index 2be3e190..fa45f3e7 100644 --- a/unix/font.c +++ b/unix/font.c @@ -826,7 +826,6 @@ apc_font_is_colored( Handle self) { DEFXX; PCachedFont f = XX->font; - warn("%d\n", __LINE__); if ( f->has_colors < 0 || ( XT_IS_DBM(XX) && XT_IS_BITMAP(XX)) || @@ -835,7 +834,6 @@ apc_font_is_colored( Handle self) return false; else if ( f->has_colors > 0 ) return true; - warn("%d\n", __LINE__); #ifdef USE_FONTQUERY if ( is_opt(optInFontQuery) ) { @@ -844,18 +842,12 @@ apc_font_is_colored( Handle self) #endif #ifdef USE_XFT - warn("%d\n", __LINE__); if ( f->xft ) { - warn("%d\n", __LINE__); - warn("%d\n", __LINE__); Bool ok = prima_xft_is_font_colored(self); - warn("%d\n", __LINE__); f->has_colors = ok ? 1 : -1; - warn("%d\n", __LINE__); return ok; } #endif - warn("%d\n", __LINE__); return false; } diff --git a/unix/freetype.c b/unix/freetype.c index 097dee1b..900b9da6 100644 --- a/unix/freetype.c +++ b/unix/freetype.c @@ -389,6 +389,7 @@ prima_ft_is_font_colored( FT_Face face) FT_Int a,b,c; FT_ULong l = 0; + FT_Library_Version(ft_library,&a,&b,&c); if ( a < 2 || ( a == 2 && b < 10 )) /* CPAL/COLR only supported in 2.10 */ return false; return diff --git a/unix/render.c b/unix/render.c index d7a08ec9..d6646a39 100644 --- a/unix/render.c +++ b/unix/render.c @@ -32,7 +32,7 @@ typedef struct { static Pen pen; -#ifdef NEED_X11_EXTENSIONS_XRENDER_H +#ifdef HAVE_X11_EXTENSIONS_XRENDER_H /* piece of Xrender guts */ typedef struct _XExtDisplayInfo { struct _XExtDisplayInfo *next; @@ -62,7 +62,7 @@ prima_init_xrender_subsystem(char * error_buf, Bool disable_argb32) if ( !guts. render_extension ) return true; -#ifdef NEED_X11_EXTENSIONS_XRENDER_H +#ifdef HAVE_X11_EXTENSIONS_XRENDER_H { /* snatch error code from xrender guts */ XExtDisplayInfo *info = XRenderFindDisplay( DISP); if ( info && info-> codes)