diff --git a/README.md b/README.md index 36b1c71..cdbbaf2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t ### Changelog: +2020-05-29 - Added the color emoji patch + 2020-05-26 - Added the status2d patch (with alpha, systray, statuspadding and dwmblocks compatibility, no statuscolors or extrabar compatibility) 2020-05-21 - Added the moveplace and moveresize patches @@ -160,6 +162,10 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t - [cmdcustomize](https://dwm.suckless.org/patches/cmdcustomize/) - allows color attributes to be set through the command line + - color_emoji + - enables color emoji in dmenu by removing a workaround for a BadLength error in the Xft library when color glyphs are used + - enabling this will crash dwm on encountering such glyphs unless you also have an updated Xft library that can handle them + - [combo](https://dwm.suckless.org/patches/combo/) - allows you to select multiple tags by pressing all the right keys as a combo, e.g. hold MOD and press and hold 1 and 3 together to view those two tags diff --git a/drw.c b/drw.c index a3d4f3f..bc32a50 100644 --- a/drw.c +++ b/drw.c @@ -150,6 +150,7 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) die("no font specified."); } + #if !COLOR_EMOJI_PATCH /* Do not allow using color fonts. This is a workaround for a BadLength * error from Xft with color glyphs. Modelled on the Xterm workaround. See * https://bugzilla.redhat.com/show_bug.cgi?id=1498269 @@ -162,6 +163,7 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) XftFontClose(drw->dpy, xfont); return NULL; } + #endif // COLOR_EMOJI_PATCH font = ecalloc(1, sizeof(Fnt)); font->xfont = xfont; diff --git a/patches.def.h b/patches.def.h index 873a81a..a897412 100644 --- a/patches.def.h +++ b/patches.def.h @@ -110,6 +110,14 @@ */ #define CMDCUSTOMIZE_PATCH 0 +/* This patch enables color emoji in dwm by removing a workaround for a BadLength error + * in the Xft library when color glyphs are used. + * To enable this you will need an updated Xft library that can handle color glyphs otherwise + * dwm will crash on encountering such characters. Note that you will also need a font that + * provides color emojis for this to work. + */ +#define COLOR_EMOJI_PATCH 0 + /* This patch tweaks the tagging interface so that you can select multiple tags for tag * or view by pressing all the right keys as a combo. For example to view tags 1 and 3, * hold MOD and then press and hold 1 and 3 together.