Monochrome Emoji #5447

Closed
opened 2025-11-02 06:25:12 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @zeripath on GitHub (May 23, 2020).

Description

Emoji are monochrome on a linux machine with Segoe UI Symbol and DejaVu Sans fonts installed, despite having Noto Color Emoji and Segoe UI Emoji installed.

Screenshots

Screenshot from 2020-05-23 13-09-07

Github appears thus

Screenshot from 2020-05-23 13-10-37

Originally created by @zeripath on GitHub (May 23, 2020). - Gitea version (or commit ref): master (v1.13.0-dev-39-g1752a976e) - Operating system: linux - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) https://try.gitea.io/tester_mailinator.com/emoji-noji/issues/1 - [ ] No - [ ] Not relevant ## Description Emoji are monochrome on a linux machine with Segoe UI Symbol and DejaVu Sans fonts installed, despite having Noto Color Emoji and Segoe UI Emoji installed. ## Screenshots ![Screenshot from 2020-05-23 13-09-07](https://user-images.githubusercontent.com/1824502/82730320-9f7eda00-9cf6-11ea-91ad-845ed04ebe13.png) ## Github appears thus ![Screenshot from 2020-05-23 13-10-37](https://user-images.githubusercontent.com/1824502/82730355-d0f7a580-9cf6-11ea-8470-911eb68a7c3e.png)
Author
Owner

@zeripath commented on GitHub (May 23, 2020):

Pure unicode emoji:

👍👎😆😕❤️🎉👀😀😸🤡💃💅💥✏⚠⤴⤵

Colon code emoji

:gitea: 👎 👍 😆 😕

@zeripath commented on GitHub (May 23, 2020): ## Pure unicode emoji: 👍👎😆😕❤️🎉👀😀😸🤡💃💅💥⚡✏⚠⤴⤵ ## Colon code emoji :gitea: :-1: :+1: :laugh: :confused:
Author
Owner

@mrsdizzie commented on GitHub (May 23, 2020):

Does it look as expected if you add this to emoji class:

font-family: Apple Color Emoji,Segoe UI,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji

Or maybe a different order if it doesn't work? That looks like what Github does (minus Noto Color Emoji)

@mrsdizzie commented on GitHub (May 23, 2020): Does it look as expected if you add this to emoji class: ``` font-family: Apple Color Emoji,Segoe UI,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji ``` Or maybe a different order if it doesn't work? That looks like what Github does (minus Noto Color Emoji)
Author
Owner

@zeripath commented on GitHub (May 23, 2020):

OK, so I've managed to create a partial solution following:

https://www.reddit.com/r/archlinux/comments/9q8dlj/how_to_better_enable_color_emojis/

which just overrides the segoe ui symbol font.

now the question is whether it's possible to override the dejavu sans emoji

@zeripath commented on GitHub (May 23, 2020): OK, so I've managed to create a partial solution following: https://www.reddit.com/r/archlinux/comments/9q8dlj/how_to_better_enable_color_emojis/ which just overrides the segoe ui symbol font. now the question is whether it's possible to override the dejavu sans emoji
Author
Owner

@zeripath commented on GitHub (May 23, 2020):

In my previous suggestion I said remove system-ui maybe we should be setting sans-serif instead?

@zeripath commented on GitHub (May 23, 2020): In my previous suggestion I said remove system-ui maybe we should be setting sans-serif instead?
Author
Owner

@zeripath commented on GitHub (May 23, 2020):

OK this is my own problem...

There are a couple of things at play:

  • I had my system-ui font set to "Sans" because I generally prefer the shape of DejaVu's sans-serif font shapes and Sans allows a lot of fallbacks if there is a missing glyph.
  • I had my system sans-serif font to Noto Sans - uncertain why I changed this.
  • DejaVu Sans unfortunately provides a number of emoji characters - which for some reason still have not been separated out or removed.

The reason why switching from system-ui to sans-serif partially fixes the glyph problem is that the font changed from DejaVu Sans to Noto Sans as above.

The other issue is that unlike a lot of linux users I have a full set of segoe ui fonts installed (mainly for testing things and because I want documents from Windows users to work.)

fc-match "Segoe UI Emoji"

apperars to return Noto Color Emoji first even though Segoe UI Emoji is there - I'm unable to figure out why or force this - but that is enough for chrome to fall back to Segoe UI Symbol which is then monochrome. For some reason if we had:

@font-face {
    font-family: 'Segoe UI Emoji';
    src: local('Segoe UI Emoji');
}

That would be enough to force chrome to render the segoe ui emoji font - but I don't understand why!

This has been a maddeningly frustrating journey into the fontconfig world and a total waste of a day and the attention of several maintainers.

In the end I've simply set noto as my base font - I'll just have to get used to it - and effectively blacklisted the segoe ui emoji font.

I apologise for wasting everyone's time.

(There's still an issue with dejavu mono providing monospace emoji which affects the editor and the correct choice of font for monospace emoji but it's very minor)

@zeripath commented on GitHub (May 23, 2020): OK this is my own problem... There are a couple of things at play: * I had my system-ui font set to "Sans" because I generally prefer the shape of DejaVu's sans-serif font shapes and Sans allows a lot of fallbacks if there is a missing glyph. * I had my system sans-serif font to Noto Sans - uncertain why I changed this. * DejaVu Sans unfortunately provides a number of emoji characters - which for some reason still have not been separated out or removed. The reason why switching from system-ui to sans-serif partially fixes the glyph problem is that the font changed from DejaVu Sans to Noto Sans as above. The other issue is that unlike a lot of linux users I have a full set of segoe ui fonts installed (mainly for testing things and because I want documents from Windows users to work.) ```bash fc-match "Segoe UI Emoji" ``` apperars to return `Noto Color Emoji` first even though `Segoe UI Emoji` is there - I'm unable to figure out why or force this - but that is enough for chrome to fall back to `Segoe UI Symbol` which is then monochrome. For some reason if we had: ```css @font-face { font-family: 'Segoe UI Emoji'; src: local('Segoe UI Emoji'); } ``` That would be enough to force chrome to render the segoe ui emoji font - but I don't understand why! This has been a maddeningly frustrating journey into the fontconfig world and a total waste of a day and the attention of several maintainers. In the end I've simply set noto as my base font - I'll just have to get used to it - and effectively blacklisted the segoe ui emoji font. I apologise for wasting everyone's time. (There's still an issue with dejavu mono providing monospace emoji which affects the editor and the correct choice of font for monospace emoji but it's very minor)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5447