You are not logged in.

#1 2020-05-16 18:29:02

porcelain1
Member
Registered: 2020-01-18
Posts: 97

[SOLVED] No emojis on dwm and dmenu

Hello.

I'm very happy that I can now insert emojis everywhere using this script from Luke Smith. Very fun!

The issue: dmenu won't show all emojis upon calling this script, only a few monochrome, and dwm won't show the title of this site properly, for example, and any other with emojis in the title.

In this video from Luke Smith, it is said that by removing some lines from drw.c in both dwm and dmenu sources, and modifying config.h the problem should be solved.

I cloned dwm and dmenu-git from AUR, and simply ran makepkg on each folder, and in each drw.c (~/aur/dwm/src/dwm-6.2/drw.c and ~/aur/dmenu-git/src/dmenu/drw.c) I commented out:

         /* 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;
        }

In the config.h of both, as I saw in this file, I changed this:

static const char *fonts[]          = { "monospace:size=10" };

to this:

static const char *fonts[]          = { "monospace:size=10", "JoyPixels:pixelsize=10" };

I then ran updpkgsums on each folder, and then makepkg -if to force compilation and install. I even restarted X, but no results. I have installed ttf-joypixels too.

I don't know how to program in C, I have absolutely no idea how fonts work in general, and I guess that editing stuff by hand defeats the purpose of ABS.

Do you think I should take some time to understand all this, and then everything would clear up, or am I missing something?

Last edited by porcelain1 (2020-05-16 19:15:05)


Behemoth, wake up!

Offline

#2 2020-05-16 18:36:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] No emojis on dwm and dmenu

porcelain1 wrote:

.. and then makepkg -if to force compilation and install

You also undid your changes.  You need to include the '-e' or --noextract flag for makepkg.

I'm not sure if that will be sufficient to get your changes working, but it will be necessary.

Off topic: in the dmenu script you linked to it's a bit odd to use echo to add a newline character to a string only to pipe through tr to then delete the newline.  That should just be:

printf "$chosen" | xclip -selection clipboard
# or alternatively
echo -n "$chosen" | xclip -selection clipboard

Last edited by Trilby (2020-05-16 18:38:06)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-05-16 19:14:41

porcelain1
Member
Registered: 2020-01-18
Posts: 97

Re: [SOLVED] No emojis on dwm and dmenu

Thank you! Running 'makepkg -ife' did the trick! Nice tip on the script, too. I will mark it as solved.


Behemoth, wake up!

Offline

Board footer

Powered by FluxBB