5

I'm running Ubuntu 16.04.3 LTS.

The emoji font I want to use system wide (in the OS and in the Browser) is the non-color version of Noto or: NotoEmoji-Regular.ttf (provided by Google)

How do I configure it to be default instead of Symbola (which is the current default) ?

  • Elementary OS is off-topic here. You can ask on the [unix.se] or [elementaryos.se] sites. – muru Oct 11 '17 at 06:45
  • @muru But isn't the requested answer identical between these two OS's since the font stack between elementary OS and Ubuntu is identical (that is elementary OS just uses the Ubuntu font stack)? – 01AutoMonkey Oct 11 '17 at 06:54
  • I don't know what changes elementaryOS has made to the font stack. – muru Oct 11 '17 at 06:55
  • @muru okay, I've removed the reference to elementary OS and the question can now be fully regarded as being in the context of Ubuntu 16.04 only, I won't ask for elementary OS specific modifications to answers, and it's also useful for me (and others) to know how to do this in Ubuntu since I use it as well. – 01AutoMonkey Oct 11 '17 at 07:04
  • the method differs between DEsktops, but in Ubuntu 16.04.3 LTS you can do most of it with unity-tweak-tool under the 'fonts' section. if you use a browser which 'obeys' the Unity defaults it'll be correct (eg. the ubuntu browser), but some use their own fonts, others read 'defaults' from specific desktops hence its not in a single place. – guiverc Oct 11 '17 at 07:16

1 Answers1

11

One way to set Noto Emoji as the default emoji font in Ubuntu is to setup some local font config files.

Create the directory and the file itself with:

  • mkdir -p ~/.config/fontconfig/
  • touch ~/.config/fontconfig/fonts.conf

And then populate the created file with the following text:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
  <match>
    <test name="family"><string>sans-serif</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Emoji</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>serif</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Emoji</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>monospace</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Emoji</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>Apple Color Emoji</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Emoji</string>
    </edit>
  </match>
</fontconfig>

And finally flush the font cache: fc-cache -f -v.

If Noto is installed you should now see Noto for emoji unicode blocks in the browser for example, and Symbola filling in where Noto is lacking.

  • I found this actually broke a lot of things for me. I think because Noto and Blobmoji improperly support some characters they shouldn't be? For example, if you do fc-cat | grep NotoColorEmoji, it's charset shows it supporting 20 (space) and after applying this config it would use a really big space. If I instead use the config from this answer with aliases, it properly uses DejaVu for spaces again, which can be tested/seen when running fc-match monospace:charset=20 against both configs – Cobertos Feb 05 '21 at 14:30