From 8b6aeac39ef54acd001717814b4c922347ce3c8b Mon Sep 17 00:00:00 2001 From: Dawid Potocki Date: Thu, 14 Jul 2022 22:47:58 +1200 Subject: Add colour emoji support --- README.md | 2 ++ config.h | 3 ++- drw.c | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d5cb887..4c90856 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Make sure you have dependencies installed before you build dmenu. ### Dependencies +`libxft-bgra`AUR is required for colour emoji support. + ```sh $ sudo pacman -S libxinerama libxft # Arch Linux ``` diff --git a/config.h b/config.h index 6b93f58..11b8978 100644 --- a/config.h +++ b/config.h @@ -6,7 +6,8 @@ static const char *prompt = NULL; /* -p option; prompt to the left of input fi /* -fn option overrides fonts[0]; default X11 font or font set */ static const char *fonts[] = { - "monospace:pixelsize=15:antialias=true:hintstyle=hintmedium" + "monospace:pixelsize=15:antialias=true:hintstyle=hintmedium", + "emoji:pixelsize=15" }; static const char *colors[SchemeLast][2] = { diff --git a/drw.c b/drw.c index 4cdbcbe..8783a42 100644 --- a/drw.c +++ b/drw.c @@ -140,11 +140,11 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) * 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; - } + /* 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; -- cgit v1.2.3-70-g09d2