RFR: 8269806: Emoji rendering on Linux [v18]

Nikita Gubarkov duke at openjdk.org
Wed Feb 1 22:42:33 UTC 2023


On Wed, 1 Feb 2023 21:13:55 GMT, Nikita Gubarkov <duke at openjdk.org> wrote:

>> Are you sure ? I would expect that Segoe UI Emoji has a glyf table as well as a colr table.
>
> I thought so, but now you made me doubt. Anyway, I will read the code, recall this and will let you know what I find.

Well, what I did find so far:
* Segoe UI Emoji does have `FE0F` UVS (colored selector), but no `FE0E` (monochrome).
* Segoe UI Symbol doesn't have any UVS.

So fonts alone will not guide us to a correct glyph.
However, we can ignore COLR table and render base glyphs from Segoe UI Emoji to achieve monochrome effect, so we actually can have both mono/color inside Segoe UI Emoji alone (but we would still have to determine whether to use mono or color ourselves).
But these base glyphs are not the same as in Segoe UI Symbol and I can clearly see that every Windows app which respect variation selectors, renders monochrome ones using Segoe UI Symbol, not base glyphs from Segoe UI Emoji.

I will try to investigate this further, but so far it looks to me like to support variation selectors the way native apps do, we need to use some kind of hardcoded tables, like those exclusion ranges, because:
1. We don't know whether character must be draw mono/colored by default, fonts doesn't tell us, only CLDR does.
2. Even if we somehow know the default variant, looking for `FE0F` selector will lead us to to Segoe UI Emoji, but `FE0E` - nowhere.

Ideas?

-------------

PR: https://git.openjdk.org/jdk/pull/4798



More information about the client-libs-dev mailing list