sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dmenu-allow-color-font-5.0.diff (1231B)


      1 diff --git drw.c drw.c
      2 index 4cdbcbe..7a5bc0d 100644
      3 --- drw.c
      4 +++ drw.c
      5 @@ -133,19 +133,6 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
      6  		die("no font specified.");
      7  	}
      8  
      9 -	/* Do not allow using color fonts. This is a workaround for a BadLength
     10 -	 * error from Xft with color glyphs. Modelled on the Xterm workaround. See
     11 -	 * https://bugzilla.redhat.com/show_bug.cgi?id=1498269
     12 -	 * https://lists.suckless.org/dev/1701/30932.html
     13 -	 * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916349
     14 -	 * and lots more all over the internet.
     15 -	 */
     16 -	FcBool iscol;
     17 -	if(FcPatternGetBool(xfont->pattern, FC_COLOR, 0, &iscol) == FcResultMatch && iscol) {
     18 -		XftFontClose(drw->dpy, xfont);
     19 -		return NULL;
     20 -	}
     21 -
     22  	font = ecalloc(1, sizeof(Fnt));
     23  	font->xfont = xfont;
     24  	font->pattern = pattern;
     25 @@ -351,7 +338,6 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
     26  			fcpattern = FcPatternDuplicate(drw->fonts->pattern);
     27  			FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
     28  			FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
     29 -			FcPatternAddBool(fcpattern, FC_COLOR, FcFalse);
     30  
     31  			FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
     32  			FcDefaultSubstitute(fcpattern);