Skip to content

Commit

Permalink
Install Color Emoji font system-wide to close #2382
Browse files Browse the repository at this point in the history
  • Loading branch information
Botspot committed Jul 4, 2023
1 parent 40f63c7 commit 1312132
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions apps/Color Emoji font/install
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
mkdir -p $HOME/.fonts
cd $HOME/.fonts || error "Failed to enter fonts directory!"
wget https://github.com/googlefonts/noto-emoji/raw/main/fonts/NotoColorEmoji.ttf || error "Failed to download NotoColorEmoji.ttf!"
wget -O /tmp/NotoColorEmoji.ttf https://github.com/googlefonts/noto-emoji/raw/main/fonts/NotoColorEmoji.ttf || error "Failed to download NotoColorEmoji.ttf!"

sudo mkdir -p /usr/local/share/fonts || error "Failed to create /usr/local/share/fonts folder!"
sudo mv /tmp/NotoColorEmoji.ttf /usr/local/share/fonts

This comment has been minimized.

Copy link
@theofficialgman

theofficialgman Jul 4, 2023

Collaborator

its bad practice to install fonts directly into the /usr/local/share/fonts folder. refer to the system fonts folder where each font is first put in a folder that corresponds to the fonts type (eg: truetype) and then the fontname (eg:droid)

so you should put this font in /usr/local/share/fonts/truetype/noto

I actually have this font already on ubuntu lunar from the fonts-noto-color-emoji apt package

dpkg -S /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf 
fonts-noto-color-emoji: /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf

don't place the font in /usr/share though, thats only for system apt packages to interact with

This comment has been minimized.

Copy link
@theofficialgman

theofficialgman Jul 4, 2023

Collaborator

this package fonts-noto-color-emoji is available on buster/bullseye/bookworm bionic/focal/jammy/etc
why don't we just use it instead and make this a package app?

This comment has been minimized.

Copy link
@Botspot

Botspot Jul 4, 2023

Author Owner

this package fonts-noto-color-emoji is available on buster/bullseye/bookworm bionic/focal/jammy/etc why don't we just use it instead and make this a package app?

I think because originally this script was installing Segoe UI Emoji from Microsoft, which was later changed to Noto in a PR. There is no good reason it is not a package-app.


fc-cache -f || error "Failed to run fc-cache!"
4 changes: 3 additions & 1 deletion apps/Color Emoji font/uninstall
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/bash
rm -f "$HOME/.fonts/NotoColorEmoji.ttf" || sudo rm -f "$HOME/.fonts/NotoColorEmoji.ttf" || error "Failed to remove font file!"

sudo rm -f /usr/local/share/fonts/NotoColorEmoji.ttf || error "Failed to remove font file!"
fc-cache -f || error "Failed to run fc-cache!"

0 comments on commit 1312132

Please sign in to comment.