DEV Community

capital-inversion
capital-inversion

Posted on • Originally published at github.com

Emoji in the TOR Browser

The TOR browser has to limit the emoji characters it displays since the range of fonts available varies between computers and can be used to deanonymize a user.

Typically the browser displays a tofu character, and nothing is useful anymore, but since TorBrowser is based on Firefox, we can use a font specifically designed for firefox usage, and embed it in the page.

Steps to get it on the page:

First Grab the firefox font from https://github.com/mozilla/fxemoji

Find an emoji that is different in chrome to the fxemoji, so can know the page is loading it correctly.

Twitter color emoji can be used, but this is very heavy to download Can bang that down to a 256kb woff2 font file using: https://onlinefontconverter.com/

Use stylesheet:

@font-face {
  font-family: 'Firefox Emoji';
  src: url('FirefoxEmoji.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
Enter fullscreen mode Exit fullscreen mode

Tools used: https://wakamaifondue.com/ Extraordinarily helpful too to see fonts working in Tor before going thru deployment.

Links to terminal to see it in action.

Top comments (0)