19

Apple Emoji on Linux

 1 year ago
source link: https://gist.github.com/win0err/9d8c7f0feabdfe8a4c9787b02c79ac51
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Install Apple Color Emoji on Linux

  1. Download font. Check https://github.com/samuelngs/apple-emoji-linux/releases to get a link to the latest AppleColorEmoji.ttf
mkdir ~/.local/share/fonts/
wget https://github.com/samuelngs/apple-emoji-linux/releases/download/ios-15.4/AppleColorEmoji.ttf -O ~/.local/share/fonts/AppleColorEmoji.ttf
# or system-wide to /usr/share/fonts/AppleColorEmoji/, for example
  1. Put Apple Color Emoji on 1st place in /etc/fonts/conf.d/60-generic.conf:
...
	<alias binding="same">
		<family>emoji</family>
		<prefer>
			<family>Apple Color Emoji</family> <!-- Added -->
			<!-- System fonts -->
			<family>Noto Color Emoji</family> <!-- Google -->
			<family>Apple Color Emoji</family> <!-- Apple -->
			<family>Segoe UI Emoji</family> <!-- Microsoft -->
			<family>Twitter Color Emoji</family> <!-- Twitter -->
			<family>EmojiOne Mozilla</family> <!-- Mozilla -->
			<!-- Third-Party fonts -->
			<family>Emoji Two</family>
			<family>Emoji One</family>
			<!-- Non-color -->
			<family>Noto Emoji</family> <!-- Google -->
			<family>Android Emoji</family> <!-- Google -->
		</prefer>
	</alias>
...
  1. Create font config:
mkdir ~/.config/fontconfig/	
tee ~/.config/fontconfig/fonts.conf << FONTS	
<?xml version="1.0" encoding="UTF-8"?>	
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">	
<fontconfig>	
  <alias>	
    <family>serif</family>	
    <prefer>	
      <family>Apple Color Emoji</family>	
    </prefer>	
  </alias>	
  <alias>	
    <family>sans-serif</family>	
    <prefer>	
      <family>Apple Color Emoji</family>	
    </prefer>	
  </alias>	
  <alias>	
    <family>monospace</family>	
    <prefer>	
      <family>Apple Color Emoji</family>	
    </prefer>	
  </alias>	
  <match target="pattern">	
    <test qual="any" name="family"><string>Noto Color Emoji</string></test>	
    <edit name="family" mode="assign" binding="same"><string>Apple Color Emoji</string></edit>	
  </match>	
</fontconfig>	
FONTS	
  1. Clear font cache: fc-cache -f -v

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK