Css specifies emoji fonts for body text #6422

Closed
opened 2025-11-02 06:55:18 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @Oreolek on GitHub (Dec 2, 2020).

Description

_base.less specifies the body and headings font family as:

-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Helvetica,Arial, Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,Twemoji Mozilla, sans-serif

This looks fine on Chrome but I guess you didn't test on Firefox because Firefox prints all numbers as emoji. Everywhere. It's hideous.

Screenshots

1

Also see #12966 because that bug is about the same CSS line.

Originally created by @Oreolek on GitHub (Dec 2, 2020). - Gitea version: 1.13.0 - Can you reproduce the bug at https://try.gitea.io: - [x] Yes: https://try.gitea.io/explore/repos - [ ] No ## Description `_base.less` specifies the body and headings font family as: > -apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Helvetica,Arial, **Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,Twemoji Mozilla,** sans-serif This looks fine on Chrome but I guess you didn't test on Firefox because Firefox prints all numbers as emoji. Everywhere. It's hideous. ## Screenshots ![1](https://user-images.githubusercontent.com/308627/100838679-c9b21100-346a-11eb-8012-e00fed2d5bf8.png) Also see #12966 because that bug is about the same CSS line.
Author
Owner

@techknowlogick commented on GitHub (Dec 2, 2020):

I am using FF but am not seeing what you see in screenshots, could you confirm the operating system and version of FF you are using?

@techknowlogick commented on GitHub (Dec 2, 2020): I am using FF but am not seeing what you see in screenshots, could you confirm the operating system and version of FF you are using?
Author
Owner

@Oreolek commented on GitHub (Dec 2, 2020):

Linux, Firefox beta 84.0. It's fine on a Windows virtual machine.

I guess the Noto Color Emoji is the first font installed on my system (I have Arial and Roboto but they're not used for some reason, and they're custom-installed anyway.)

@Oreolek commented on GitHub (Dec 2, 2020): Linux, Firefox beta 84.0. It's fine on a Windows virtual machine. I guess the `Noto Color Emoji` is the first font installed on my system (I have Arial and Roboto but they're not used for some reason, and they're custom-installed anyway.)
Author
Owner

@itsdeadguy commented on GitHub (Dec 3, 2020):

I'm seeing this as well, similar setup as @Oreolek

@itsdeadguy commented on GitHub (Dec 3, 2020): I'm seeing this as well, similar setup as @Oreolek
Author
Owner

@silverwind commented on GitHub (Dec 3, 2020):

Is it only numbers? I guess one could use CSS unicode-range to just exclude glyphs 1-9 thought I wonder if there are better solutions.

Also, this kind of smells like a Firefox bug, it should prefer the sans-serif fonts if they are installed.

@silverwind commented on GitHub (Dec 3, 2020): Is it only numbers? I guess one could use [CSS unicode-range](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) to just exclude glyphs 1-9 thought I wonder if there are better solutions. Also, this kind of smells like a Firefox bug, it should prefer the sans-serif fonts if they are installed.
Author
Owner

@silverwind commented on GitHub (Dec 3, 2020):

Can someone test if putting sans-serif before the emoji fonts solves this?

@silverwind commented on GitHub (Dec 3, 2020): Can someone test if putting `sans-serif` before the emoji fonts solves this?
Author
Owner

@itsdeadguy commented on GitHub (Dec 3, 2020):

@silverwind that works but it's not the proper way to define a font stack and might break something else down the line, possibly
edit: forgot to say that yes, it's only the numbers

@itsdeadguy commented on GitHub (Dec 3, 2020): @silverwind that works but it's not the proper way to define a font stack and might break something else down the line, possibly edit: forgot to say that yes, it's only the numbers
Author
Owner

@silverwind commented on GitHub (Dec 3, 2020):

What do you suggest? We can't really wrap all emoji in their own elements after all.

@silverwind commented on GitHub (Dec 3, 2020): What do you suggest? We can't really wrap all emoji in their own elements after all.
Author
Owner

@itsdeadguy commented on GitHub (Dec 3, 2020):

are they being used elsewhere? this is honestly the first time i noticed them. all other icons i've seen on the web interface seem to come from an icon font (like fontawesome or some such) and are contained in elements

@itsdeadguy commented on GitHub (Dec 3, 2020): are they being used elsewhere? this is honestly the first time i noticed them. all other icons i've seen on the web interface seem to come from an icon font (like fontawesome or some such) and are contained in elements
Author
Owner

@silverwind commented on GitHub (Dec 3, 2020):

Emoji can of course appear anywhere where there is user content and we might even use them at some point in our own templates. I think it's unavoidable to have those fonts in the font stack.

@silverwind commented on GitHub (Dec 3, 2020): Emoji can of course appear anywhere where there is user content and we might even use them at some point in our own templates. I think it's unavoidable to have those fonts in the font stack.
Author
Owner

@silverwind commented on GitHub (Dec 3, 2020):

Please try https://github.com/go-gitea/gitea/pull/13834.

@silverwind commented on GitHub (Dec 3, 2020): Please try https://github.com/go-gitea/gitea/pull/13834.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6422