Opened 3 years ago

Last modified 2 months ago

#17328 new enhancement

Preload Noto Emoji font

Reported by: jt15s Owned by: stippi
Priority: normal Milestone: Unscheduled
Component: User Interface Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

To be able to support emoji "out of the box", it is a good idea to consider preloading the Noto Emoji TTF font. The font itself is 409KB (called "NotoEmoji-Regular.ttf), so it wouldn't result in a big increase in terms of file size for fonts we preload.

Change History (11)

comment:1 by X512, 3 years ago

Please don't make it a dependency of Haiku package and make it removable. I don't want it.

comment:2 by nephele, 3 years ago

Yeah, if it is included it should only be so in release images IMO. I have done a bit more checking and it seems that among other things dejavu sans includes some emoji glyphs aswell, maybe with a "generic" font fallback this would be much less of a problem.

(Also noto emoji includes ascii chars for no reason yet again, do we really need so many useless copies of ascii chars? Surely these are in the font to trick some broken parser on some OS?)

comment:3 by pulkomandy, 3 years ago

Just o clarify, this is about Noto Emoji which uses traditional monochrome characters. We will not include Noto Color Emoji which does colorful things (we can't display these with our current implementation anyway).

I think the monochrome version is acceptable as default.

As for dependencies, currently the font fallback is hardcoding specific fonts, so there is a dependency. We can remove it when the font fallback is improved and it will manage to find fallbacks on its own. Maybe we can consider removing the dependencies now that the font fallback at least manages to display a "missing glyph" character and not corrupt the whole string. That's acceptable fallback when the fonts are not available.

comment:4 by n0toose, 21 months ago

Should this marked as an "optional package" in the Installer?

comment:6 by nephele, 21 months ago

Component: - GeneralUser Interface
Owner: changed from nobody to stippi

No. an emoji font is required for proper operation on this day and age, and it's tiny really so the size argument doesn't even come into play. We should probably just add it now.

Not sure how that other ticket is related to emoji?

comment:7 by n0toose, 21 months ago

Understood, I thought that it was related because a similar problem of "Oh, hey, I may not want that on my system" alongside with a proposed solution of the package being optional during the installation process was brought up. I'm not that big into them, but I agree that the ability to display emojis is a must.

comment:8 by nephele, 21 months ago

Yeah, pulkomandy brought up above that we currently do indeed depend on this specific font, so while choice is nice unless someone redoes the font fallback code we do depend on this one and installing a different one wouldn't work unless you explicity (or an app) sets it as system font and everything that isnt emoji falls back. :)

comment:9 by n0toose, 21 months ago

I created a pull request in the Haikuports repository to update the font in question to its latest version: https://github.com/haikuports/haikuports/pull/7879

comment:10 by nephele, 20 months ago

I've iterated on the PR. The resulting package is about 4MB big, definetely small enough to add to the image. It also has all the weights, and it falls back fine :)

I don't know how the variable weight support works though, something for another time. Would be interesting to support also

comment:11 by Nexus-6, 2 months ago

I’m wondering if there’s any chance to include Noto Emoji in the default installation since it is already part of the fallback list. There is a case where in Genio we use the glyph of an earth globe which is provided by Noto Emoji in the end (as a fallback) but on a clean installation it does not appear. In my opinion, if that counts, Haiku should provide Noto Emoji by default.

Note: See TracTickets for help on using tickets.