2 files changed, 15 insertions(+), 14 deletions(-)
M README.md
M drw.c
M README.md => README.md +15 -1
@@ 5,6 5,15 @@ This is my personal fork with a few useful patches.

## Patches
+### color emoji fonts
+I've removed a bit of code that prevented colored fonts from being loaded.
+However, that piece of code existed for good reason; the current upstream font
+rendering library, libXft does not support colored fonts. There exists a patch
+which adds support, but it has not been merged in. You must install a patched
+version of libXft or this dmenu fork may have issues. On Arch Linux it exists
+packaged on the AUR as
+[libxft-bgra](https://aur.archlinux.org/packages/libxft-bgra).
+
### custom centering
The standard center patch on suckless.org is extremely slow when reading large
files because it reads all items, then loops through to determine the string
@@ 44,7 53,12 @@ dmenu.selforeground : selected foreground color
## Requirements
In order to build dmenu you need the Xlib header files.
-`doas apk add libx11-dev libxinerama-dev libxft-dev`
+`doas apk add libx11-dev libxinerama-dev libxft-bgra-dev`
+
+*Note:* This is slightly different than upstream `dmenu`. You must use a patched
+version of `libXft` such as
+[libxft-bgra](https://aur.archlinux.org/packages/libxft-bgra). This will allow
+using colored emoji fonts.
## Installation
Edit `config.mk` to match your local setup (dmenu is installed into
M drw.c => drw.c +0 -13
@@ 133,19 133,6 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
die("no font specified.");
}
- /* 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
- * https://lists.suckless.org/dev/1701/30932.html
- * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916349
- * and lots more all over the internet.
- */
- FcBool iscol;
- if(FcPatternGetBool(xfont->pattern, FC_COLOR, 0, &iscol) == FcResultMatch && iscol) {
- XftFontClose(drw->dpy, xfont);
- return NULL;
- }
-
font = ecalloc(1, sizeof(Fnt));
font->xfont = xfont;
font->pattern = pattern;