C1710 / blobmoji

Noto Emoji with extended Blob support
Apache License 2.0
498 stars 25 forks source link

Possible to use blobmoji as a base for replacing Windows 10 emojis? #28

Closed rmenessec closed 3 years ago

rmenessec commented 6 years ago

Is there a way to build the fonts in a format that can be used by most native / .NET Windows applications, and a method I can use to integrate blobmoji into the system default fonts on Windows 10, similar to the twemoji-color-font project?

I'm not very familiar with Python, nor with the TrueType / OpenType formats and specifications, or I would be picking apart the respective sources and answering those questions for myself. 😩

I'm not very happy with most vendors' emoji choices, but I've loved the blobs since they debuted...

C1710 commented 6 years ago

Well that's an issue I have myself. I haven't managed to convert this font to the font format Mucrosoft uses yet, since there seem to be some problems with the SVG files.
Anyhow it might work inside an app or something like that since Windows 10 should support this color font format.
I can just say that I haven't managed to set it as the system's default font yet and I have to say that I don't have very much time for like the next 1½ months.

And finally I have to admit that I think the Windows 10 emojis aren't that bad (except for these outlines) 😅

rmenessec commented 6 years ago

I fully understand having a lack of time. 😊

My admittedly loose understanding is that Windows 10 as of 1709 or so (perhaps 1803?) does support SVGinOT; however, that support may be limited to Microsoft Edge. At least, that's what I've synthesized from the search results that I'm looking at.

If blobs in... whatever format(s) 10 supports... are something you think you might be able to add in the future—perhaps in a few months?—I would love to see it happen.

(Do TT / OT fonts allow multiple glyph formats per container? My understanding is that you can pack both standard TT/ OT vector data and per-glyph, pre-rendered bitmaps in a single font. I'm not clear on whether the specs also allow more than one of COLR+CPAL, SVG+CPAL, and CBLC+CBDT at a time. Wikipedia is strangely unhelpful on the entire topic, so I'm taking some pointers from this comment.)

C1710 commented 6 years ago

To be honest, I don't understand much about this font stuff myself. I mostly changed the assets themselves and experimented a bit with some simple things in the scripts.
Anyhow Windows 10 (or MS Edge) should support CBLC/CBDT (Google's format which is used here) natively just as it supports SVG/OTF (which is the actual standard) although I have never tested this support in Edge...

C1710 commented 6 years ago

Soooo…. Both Edge and Chrome support this type of font in Windows 10 and XAML (whatever this is) should support it too.

You can try browser support with this HTML page.
EDIT: Chrome doesn't work while the font is not locally present...

DeeDeeG commented 6 years ago

Hi,

I noticed that @rmenessec linked to my comment.

Do TT / OT fonts allow multiple glyph formats per container? . . . I'm not clear on whether the specs also allow more than one of COLR+CPAL, SVG+CPAL, and CBLC+CBDT at a time.

Yes, this is allowed. That said, you might get problems trying to install a font with all four formats, because if the operating system doesn't understand one of the formats it might decide the whole file is corrupt. Similarly, browsers sometimes reject the font if they don't understand just one of the four formats, or if the file size of the font is too large.

If you want all the technical details of OTF/TTF format and color fonts, and where they do and don't work, you might like to read this issue: https://github.com/googlei18n/noto-emoji/issues/191 and its comments.

I also tested support across all the major browsers several months ago: Windows 10 test results.

If you have any more questions, I suppose I could try to answer them. I'm not an expert, I just spent a lot of time looking this up.

rmenessec commented 6 years ago

@DeeDeeG, thanks for clarifying that! Can you comment on which formats Windows 10 (1803+) supports now, and whether they have OS-wide or Edge-only support?

Also, is there a single format that could reasonably be called cross-platform at this time?

DeeDeeG commented 6 years ago

@rmenessec No problem.

Can you comment on which formats Windows 10 (1803+) supports now, and whether they have OS-wide or Edge-only support?

I just checked on my Windows 10 computer, and support for color emoji doesn't seem to have changed.

Edge can display any and all of the formats (see my test result for Edge here: png)

(Edge doesn't support as much of the SVG spec as Firefox does, but it does at least support basic color SVG fonts that don't use super-fancy SVG features. Twemoji SVG font seems to work fine. On the other hand, the Noto Color Emoji SVG font I'm working on has had some issues in Edge as of late.)

Windows will install SVG color fonts and COLR/CPAL (the Microsoft format used by Segoe UI Emoji) without any issues.

On the other hand, Windows still doesn't seem to like most CBLC/CBDT fonts, and doesn't like most SBIX fonts, although I found one SBIX font Windows will install: link

I think the problem is, most of these fonts happen to be constructed in a way Windows and some other software doesn't like, rather than the formats being fundamentally incompatible. Most tools that make CBLC/CBDT fonts, for example, don't include a font table with traditional outline characters in it, which for instance causes Firefox's "font sanitizer" to reject the font as invalid.

Also, is there a single format that could reasonably be called cross-platform at this time?

No, not really.

But if you know your audience, you can work around the differences in compatibility.

If you only want to reach browser users, it's possible to host each of the four font formats, but enable them in the webpage selectively, based on User Agent sniffing, so you only give each browser/OS combo a font it can actually use. See ChromaCheck for a project allowing you to more-easily do this.

Regarding the best "one format for all users":

COLR/CPAL is cleverly designed so it will look okay in black/white if color rendering breaks down, and this fallback behavior seems to work across all browsers and operating systems I tried. SVG also has a strong ability to fall back to traditional black and white designs, if you include such black and white characters in your font.

Of these two, COLR/CPAL is the simpler and more purpose-built format for fonts. SVG is a more complex standard, is more general-purpose, and support can be present without being 100% (see Microsoft Edge). Still, they're roughly equivalent in being strong cross-platform contenders.

Apple's SBIX and Google's CBLC/CBDT either 100% work or 100% fail, in my experience. These formats seem to be supported on 2/4 or 1/3 major browsers per operating system.

As for full color support everywhere, there's no format that can do this yet. I'd say this will all come down to whether the software you want to use emoji with gets updated in the future to support more of these formats. Or whether the tools that make these fonts get updated to cause less errors in various software people want to use the fonts with. Or both.

(As a workaround, it's possible on the web to just bypass the whole color font situation, and serve color emoji as, say, PNG images. And in most software, emoji can be distributed as color PNG or JPEG images, etc. But that's no fun IMO.)

P.S. I'm thinking of checking macOS again to see if anything has changed there. I think Ubuntu is about at the same place as wen I last checked, but it wouldn't hurt to check that again as well.

iaman commented 5 years ago

@DeeDeeG Just wanted to update you in case you didn't notice (because Apple was VERY quiet about it!): macOS Mojave and iOS 12 both support color opentype SVG at the system level and in Safari, which is a pretty rad development!

DeeDeeG commented 5 years ago

@iaman, thank you for the information!

DeeDeeG commented 5 years ago

I'm not sure how I missed this at first, but...

Is there a way to build the fonts in a format that can be used by most native / .NET Windows applications,

Not sure. But...

and a method I can use to integrate blobmoji into the system default fonts on Windows 10, similar to the twemoji-color-font project?

Yes, definitely.

You would just need to replace the "twemoji" svgs (in a clone of that repo) with the SVGs from blobmoji, and then rename them properly. I have a script for renaming the emoji SVGs properly right here: https://github.com/DeeDeeG/noto-color-emoji-font/blob/oreo-rebase/bash_rename.sh

You would then probably want to edit the scfbuild.yml file to not name the font "twemoji". And the Windows Install script should merge blobmoji with Windows 10 emoji.

I can't guarantee it works 100% with this repo (blobmoji), since it's been a while since I worked on any of this, and this repo does have some non-standard stuff going on. But as long as there's nothing too crazy or difficult that takes a lot of time, I'd be happy to help out with that if anyone still wants to make a color SVG font for this repo.

C1710 commented 5 years ago

@DeeDeeG I have already looked at porting it to the Twemoji style but there seem to be some differences in the available emojis.
Anyhow, the main issue could be that the SVGs might include stuff that's not compatible with all systems, like SVG masks (these are already heavily used in the original set) or centered text.

DeeDeeG commented 5 years ago

I have experience porting the Lollipop era SVGs from the original set, since that is basically my repo: https://github.com/DeeDeeG/noto-color-emoji-font/tree/lollipop-rebase So in my opinion, it should be possible.

Anyhow, the main issue could be that the SVGs might include stuff that's not compatible with all systems, like SVG masks (these are already heavily used in the original set) or centered text.

True, and small issues like this can be a pain. I would still expect most of the SVGs from here can be included in a font much like twemoji-color-font, even if some of them might not look perfect, or if some of them might have to be disabled or fixed up first. Just thought folks would like to know this can be done.

C1710 commented 5 years ago

If you wish to use the font somewhere on Windows 10: Unigram recently added the option to choose an emoji style which includes this one 😄 (I don't have anything to do with the development of that app).

I already installed the font system-wide (I don't know if I'm allowed to share the file or even where the file is located; it doesn't seem to be available in the repository) and it actually seems to work (although that build doesn't include Emoji 12 yet and I haven't made any Ninja cats).

C1710 commented 5 years ago

WARNING:

Once you have the font installed system-wide (and maybe restarted your PC), you will not be able to simply delete it anymore, since it is in use by some process.
The solution I used to get rid of it was restarting into command line mode, (which in my case requires a recovery key because my drive is encrypted).

C1710 commented 3 years ago

Noto-Emoji now (okay for some months already) includes a way to build a Windows 10-compatible font.
I could integrate this into the builder for this font as well, so there now is a highly experimental, Windows 10-installable version available: https://github.com/C1710/blobmoji/blob/emoji13/fonts/BlobmojiWindows.ttf

BUT: Please don't try to replace the System font with it. My first test was rather unsuccessful, so it will most likely break things.

C1710 commented 3 years ago

My best guess is that it doesn't work because of its name. But I probably won't try it again anytime soon, as I quite like Segoe UI Emoji 😅

C1710 commented 3 years ago

My best guess is that it doesn't work because of its name. But I probably won't try it again anytime soon, as I quite like Segoe UI Emoji 😅

Okay, it does work now (with a different name). However, the emojis don't look good on Windows 10, very pixelated - it's still a bitmap format after all - and I think there are some issues with (ZWJ) sequences; probably due to the fact that Google/Noto ignores VS-16 (FE0F), which Microsoft (most probably) doesn't.

But, as it technically works now, I'll close this issue.