User Tools

Site Tools


it:emacs:fonts

Adding Fonts in Pengwin WSL1 (2021-06-22)

I was working on the Eloquent Javascript book online when I cut and pasted the code below into Emacs, and found that the Emacs I was running (version 26 on windows) could not display color emojis.

let roseDragon = "๐ŸŒน๐Ÿ‰";
for (let char of roseDragon) {
  console.log(char);
}
// โ†’ ๐ŸŒน
// โ†’ ๐Ÿ‰

Stack exchange provided a solution https://emacs.stackexchange.com/questions/62219/how-do-i-get-colour-emoji-to-display-in-emacs, which I tried.

Firstly, I tred an upgrade. The windows upgrade to the 27.2 version did not help. The binary available did not have Cairo installed, but the WSL pengwin version did.

Next up was to download and install the emoji fonts from https://www.google.com/get/noto/help/emoji/. Installation was done through font-manager. I did a local install, which put the font files in ~/.local/share/fonts. This directory was different from some advice in the web which showed a manual install in ~./fonts. Apparently the latter is deprecated (https://github.com/13rac1/emojione-color-font/issues/14). You could install it manually via command line, but font-manager worked well for me.

After the installation and running the code above, the emojis displayed. The I created a .emacs file for myself to make it load each time I start it up.

See also

it/emacs/fonts.txt ยท Last modified: 2021/06/23 12:07 by admin