[LINUX] Emoji fonts-noto-color-emoji on Ubuntu Characters are strange in some apps after installation

Confirmed on Ubuntu 20.04.

To view emoji on Ubuntu, install the fonts-noto-color-emoji package. Just install it and the emoji will be applied to Chrome etc.

sudo apt install fonts-noto-color-emoji

However, since then, the numbers have become full-width black characters and strange Serif (Mincho style).

2020-05-16_13-27.png

2020-05-16_13-28.png

When I checked with font-manager what characters were hit, Noto Color Emoji was found.

2020-05-16_13-33.png

Noto Color Emoji came out first when using fc-match to check font priority.

fc-match -a | head -5

NotoColorEmoji.ttf: "Noto Color Emoji" "Regular"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSansCondensed.ttf: "DejaVu Sans" "Condensed"
DejaVuSans-ExtraLight.ttf: "DejaVu Sans" "ExtraLight"
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"

Perhaps the installation of Noto Color Emoji puts this at the top of the priority list, and some applications that use only the highest fonts use only this font, which is what it looks like. ..

Manipulating font priorities Looking at ~ / .config / fontconfig / fonts.conf, I found an operation to insert Noto Color Emoj at the beginning.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match>
  <test name="family">
   <string>sans-serif</string>
  </test>
  <edit mode="prepend" binding="strong" name="family">
   <string>Noto Color Emoji</string>
  </edit>
 </match>
 <match>
  <test name="family">
   <string>serif</string>
  </test>
  <edit mode="prepend" binding="strong" name="family">
   <string>Noto Color Emoji</string>
  </edit>
 </match>

I changed to Noto Sans / Serif CJK JP.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match>
  <test name="family">
   <string>sans-serif</string>
  </test>
  <edit mode="prepend" binding="strong" name="family">
   <string>Noto Sans CJK JP</string>
  </edit>
 </match>
 <match>
  <test name="family">
   <string>serif</string>
  </test>
  <edit mode="prepend" binding="strong" name="family">
   <string>Noto Serif CJK JP</string>
  </edit>
 </match>

When I confirmed it, the ranking was down.

fc-match -a | head -10

NotoSansCJK-Regular.ttc: "Noto Sans CJK JP" "Regular"
NotoSansCJK-Medium.ttc: "Noto Sans CJK JP" "Medium"
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK JP" "DemiLight"
NotoSansCJK-Light.ttc: "Noto Sans CJK JP" "Light"
NotoSansCJK-Thin.ttc: "Noto Sans CJK JP" "Thin"
NotoSansCJK-Bold.ttc: "Noto Sans CJK JP" "Bold"
NotoSansCJK-Black.ttc: "Noto Sans CJK JP" "Black"
NotoColorEmoji.ttf: "Noto Color Emoji" "Regular"

Emojis can still be used in Chrome and other devices, and in addition, apps that Noto Color Emoji used to hit unnecessarily can now be displayed normally.

Recommended Posts

Emoji fonts-noto-color-emoji on Ubuntu Characters are strange in some apps after installation