stove-panini/fontconfig-emoji

Problem with ☺️

Closed this issue · 4 comments

Hello!

On this page: https://eosrei.github.io/emojione-color-font/full-demo.html

I have a problem with this smile: ☺️

image

As I see, it's https://emojipedia.org/smiling-face/

And it exists since Emoji 1.0, 2015.

First, from the README:

For example, ☺ (Unicode U+263A, White Smiling Face) is supported by the Liberation family (Microsoft equivalents) as well as the URW family (PostScript equivalents). So, if ☺ is on a page declaring Arial, Times, Helvetica, etc, the non-emoji version will be rendered.

The eosrei page declares two fonts: EmojiOne Color and sans-serif.
image

Neither of us have EmojiOne Color, so we're falling back to sans-serif and my prioritization rules are kicking in. I suspect you don't have a generic font available and fontconfig is using Liberation (or maybe URW) as the choice for rendering sans-serif.

For example, I'm on Fedora right now, which has the generic PT Sans and it renders this way for me:
image
image

Inspect the page and let me know what fonts your system is choosing.

Yep, this is just as I had suspected in my first comment. You don't have any font other than Liberation Sans which assumes the role of sans-serif. You'll need a font that can fill in the role of generic families and is higher in fontconfig's priority list than Liberation.

I used to mention in the readme to also install Bitstream Vera Sans (the font DejaVu was forked from, just without non-Latin alphabets and emoji) but ended up removing it because I thought it was too opinionated. You can install that one, if you'd like. Or, as I mentioned before, Fedora comes with PT Sans for that role.

I just want to understand:

  1. CSS has "EmojiOne Color", sans-serif, so EmojiOne Color is in higher priority.
  2. ...

Oh, I saw this section:

The emoji family can't be top priority because it contains very common characters like 0-9. Imagine emoji overriding every number on your display! Your web pages, your terminal, your system clock... It'd be chaos!

Thank you, my bad. I'll try to change default font (it's sadly because I like Liberation).