Skip to content

Inconsistent emoji display (emoji font ordering issue) #34246

Closed
@wolfbeast

Description

@wolfbeast

Description

Gitea's Web UI explicitly lists fonts to be used for emoji characters. The order of this causes inconsistency by placing browser-supplied fonts (in particular Twemoji Mozilla) last, and specifying various system-supplied fonts (which are not updated nearly as often) before them. Since emoji rendering occurs in a first-available order, any older/system emoji that are defined will take precedence over browser-supplied fonts, resulting in inconsistent emoji display by having older unicode emoji be used if defined in system fonts but then switching to newer ones if it hits an undefined and switches to the less prioritized emoji font.
This is particularly noticable with country flags where older fonts often don't have flags but a two-letter country code as letters, e.g. 🇨🇶 (flag: Sark) 🇸🇪 (flag:Sweden). Putting likely-more-up-to-date font face definitions first will solve this issue.

Gitea Version

1.23.6+16-ga40e15a116

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

current order
Image
Twemoji to front
Image

Git Version

No response

Operating System

Windows 10 22H2

How are you running Gitea?

self-hosted, Linux binary

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions