Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotoColorEmoji.ttf not a valid font in Windows #43

Closed
vandasian opened this issue Feb 16, 2016 · 68 comments · Fixed by #323
Closed

NotoColorEmoji.ttf not a valid font in Windows #43

vandasian opened this issue Feb 16, 2016 · 68 comments · Fixed by #323
Assignees
Labels

Comments

@vandasian
Copy link

I've tried installing NotoColorEmoji.ttf in Windows 10 and it is not a valid font to install. From https://www.google.com/get/noto/ I've downloaded and extracted the font from both the individual font .zip and the complete Noto .zip file without success. An online font converter failed to convert it to a .ttf or an .otf for testing as well.
Windows 10 Build 10586.104

@jungshik
Copy link

There are 3 formats for color fonts being standardized; 1. Google's proposal as used in Noto Color Emoji among other fonts 2. Microsoft's proposal 3. SVG-based format (mainly proposed by Mozilla and Adobe). There's also a proprietary format used by Apple on Mac OS/iOS.

Windows currently supports one of them (quite naturally, it's what MS proposed) and does not support a format used in Noto Color Emoji, yet.

@vandasian
Copy link
Author

Can you comment on why there's no mention of this? No where does it say "this doesn't work on windows" 😃

@13rac1
Copy link

13rac1 commented Feb 25, 2016

@jungshik The standardization process completed 1/27/16 and the forth option was selected: https://www.w3.org/community/svgopentype/2016/01/27/opentype-spec-adopts-svg-in-opentype-proposal/

@behdad
Copy link
Contributor

behdad commented Feb 25, 2016

@eosrei:

@jungshik The standardization process completed 1/27/16 and the forth option was selected: https://www.w3.org/community/svgopentype/2016/01/27/opentype-spec-adopts-svg-in-opentype-proposal/

No. That post was created recently to point people away from the working group's draft. In reality, the standardization process concluded in 2014, and all three of Microsoft's, Google's, and Adobe+Mozilla+W3C's proposals became part of OpenType and ISO version. Indeed, you can see all of COLR+CPAL, SVG+CPAL, and CBLC+CBDT both on Microsoft's OpenType spec website as well as latest version of ISO OFF if you can get your hands on it.

https://www.microsoft.com/typography/otspec/otff.htm#otttables
http://standards.iso.org/ittf/PubliclyAvailableStandards/c066391_ISO_IEC_14496-22_2015.zip

@13rac1
Copy link

13rac1 commented Feb 25, 2016

Ah ha! Thanks for the correction and details. :)

@adrientetar
Copy link

, and all three of Microsoft's, Google's, and Adobe+Mozilla+W3C's proposals became part of OpenType and ISO version

Why three? Is there no single format to rule them all?

@behdad
Copy link
Contributor

behdad commented Feb 28, 2016

Why three? Is there no single format to rule them all?

The rule-all option is SVG, which is cumbersome to implement. So the other two were accepted as much lighter ways to address existing needs: color bitmaps, and color layers.

@LinkofHyrule89
Copy link

Is there any solution to using the front on Windows yet?

@13rac1
Copy link

13rac1 commented Aug 25, 2016

@LinkofHyrule89 Since the above conversation, I've made emoji fonts which work in Windows. https://github.com/eosrei/emojione-color-font#install-on-windows V1.3 and older shows color in Firefox only. V1.4+(when I release it) shows color on Windows 10 Edge V38.14393+ also. Sorry, not this graphic set because of #30. You can test your browser's color font support here: https://pixelambacht.nl/chromacheck/

@LinkofHyrule89
Copy link

LinkofHyrule89 commented Aug 26, 2016

@eosrei after they fix #30 will you port noto-emoji to work on Windows? Also, the current version of Chrome on Windows doesn't natively support Emoji yet? Do you know if they are working on this problem?

EDIT: After updating to the latest Chrome Dev this is what I see on http://eosrei.github.io/emojione-color-font/full-demo.html Your test page however claims Chrome doesn't support any of the open standards.

screenshot 2016-08-25 19 50 16

EDIT2: After installing your font it shows the black and white emoji and not the color ones. So I guess Chrome now supports the Windows style emoji which is ironic considering Google makes it.

@miguelsousa
Copy link
Contributor

Is there any solution to using the front on Windows yet?

@LinkofHyrule89 the official font works as-is in Microsoft Edge, if you're running Windows 10 with the Anniversary Update.

notocoloremoji

@13rac1
Copy link

13rac1 commented Aug 26, 2016

will you port noto-emoji to work on Windows?

I would have done it originally, but it wasn't an option. Now, the current CBDT/CBLC version works since Edge supports everything. I'd probably do it in SVGinOT anyway though if the SVGs were available.

After installing your font it shows the black and white emoji and not the color ones.

Chrome supports COLR/CPAL and CBDT/CBLC on Windows. It doesn't support SVGinOT. My documentation specifically mention support in Firefox only, soon Edge. Chrome may add support in the future, but that's way outside of my purview.

@RoelN bug report on https://pixelambacht.nl/chromacheck/ is this RoelN/ChromaCheck#8 ?

Edit: It's only Linux.

@13rac1
Copy link

13rac1 commented Aug 26, 2016

Oh also, per @miguelsousa This issue can be closed.

@RoelN
Copy link
Collaborator

RoelN commented Aug 26, 2016

Chrome on Windows doesn't support any color format yet — only the Android version supports CBDT.

The CBDT test in ChromaCheck has been fixed a couple of weeks ago, so it should report properly: RoelN/ChromaCheck@c6889d6

@LinkofHyrule89
Copy link

Chrome does support the Microsoft color emoji format in the latest Chrome Dev because how else would it be displaying those? I did find this it says fixed.

https://bugs.chromium.org/p/chromium/issues/detail?id=333011

@miguelsousa but how did you install the font on Windows and run it in edge?

@RoelN
Copy link
Collaborator

RoelN commented Aug 26, 2016

Ah yes, it is displaying color emoji in Window's own emoji font, Segoe UI. I checked in Dev and indeed COLR fonts work, but ChromaCheck says it doesn't. I'll look at this during lunch, will report back.

@LinkofHyrule89
Copy link

@RoelN much appreciated is like to get to the bottom of all this. I'm hoping to switch the default font with the noto some day but at least we can know what font format Chrome Dev actually supports 😀

@RoelN
Copy link
Collaborator

RoelN commented Aug 26, 2016

The COLR test of ChromaCheck in Chrome Dev 53 and 54 on Windows 10 failed because the font had a non-empty (no outline data) fallback glyph. I don't know why it fails on that, but I think it's a bug. I fixed this by simply using a non-empty glyph as the fallback glyph in ChromaCheck: RoelN/ChromaCheck#31.

The CBDT font simply won't render so I suppose this is just not implemented in Chrome on Windows.

@eosrei Could the empty glyph thing be the case for the emoji in the COLR font? Or do you have singlecolor fallback emoji in there?

@13rac1
Copy link

13rac1 commented Aug 26, 2016

@RoelN Yes. Segoe UI Emoji/Symbol and my SVGinOT fonts (EmojiOne Color & Twitter Color Emoji) have fallback TrueType glyphs. Noto Color Emoji and Apple Color Emoji do not. SVGinOT was only supported in Firefox/Gecko when I made these fonts, so I created TTF glyphs to make the fonts work everywhere. Also, fallback CFF/TT glyphs are needed for text vs emoji variation selectors VS15/VS16 (which I haven't dealt with yet.)

@miguelsousa
Copy link
Contributor

but how did you install the font on Windows and run it in edge?

@LinkofHyrule89 I didn't install the font. The webpage loads it via @font-face

@jungshik
Copy link

Chrome on WIndows and Mac does not support CBDT-based color fonts (, yet). Chrome needs to bundle a subset of FreeType to support that. It has been talked about, but no movement so far.

@LinkofHyrule89
Copy link

@miguelsousa is there a way to use CSS to use the @font-face to use the font on all web pages instead of Segoe?

@ghost
Copy link

ghost commented Oct 6, 2016

When I try to open NotoColorEmoji.ttf with FontForge, it gives this error:

No (usable) bitmap strikes in this TTF font

Followed by:

NotoColorEmoji.ttf is not in a known format (or uses features of that format fontforge does not support, or is so badly corrupted as to be unreadable)

That may or may not help. :P

@bannmann
Copy link

bannmann commented Oct 7, 2016

In case it helps anyone: Microsoft's DirectWrite Programming Guide: Color fonts says SVG-based color fonts are supported by DirectWrite/Direct2D as of Win10 Anniversary Edition. They claim to support only a subset of SVG, though.

@KrasnayaPloshchad
Copy link

I think this font shouldn’t be limited by specific font technology.

@ischacht
Copy link

ischacht commented Aug 10, 2017

Any word about this? I keep reading that the new anniversary update (1703) should work, but I don't know how to start.

Installing via right click -> install gives an error.

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Aug 19, 2017

Try putting it in the C:\Windows\Fonts folder manually.

@be5invis
Copy link

The test results from @fdwr's tool
image
So, DWrite support loading it but not GDI.

Some points I found:

  • No glyf.
  • cmap only having a 3/10 subtable, without 3/1 subtable, which is something GDI dislikes.

@zahtec
Copy link

zahtec commented Oct 16, 2020

Hi, i saw this in 2020 is there any hope of getting support for noto emojis format? Im back to the "Not supported" error

@davelab6
Copy link
Member

The test results from @fdwr's tool
image
So, DWrite support loading it but not GDI.

Some points I found:

  • No glyf.

As there's no black and white design for Noto Emoji, I think this won't be possible to fix technically; it would require design work.

  • cmap only having a 3/10 subtable, without 3/1 subtable, which is something GDI dislikes.

That seems like something we can fix technically. @RoelN does that description give you enough to go on to fix it?

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Oct 20, 2020

You could use the old black and white font, if it's acceptable that it's missing everything from the past several years.

https://github.com/googlefonts/noto-emoji/blob/master/fonts/NotoEmoji-Regular.ttf (Source code for the B/W font)

That would mean there would be a glyf table, so maybe that would make it installable on Windows? (I vaguely recall there isn't supposed to be a glyf table in CBDT/CBLC fonts such as Noto Color Emoji? And even more-vaguely, I think it's not a problem if there is a glyf table anyhow... but don't quote me on that.)

Not sure if this is a good idea, just posting it as an idea.

@RoelN
Copy link
Collaborator

RoelN commented Oct 20, 2020

We can add the glyf table and a cmap that makes Windows happy, sure.

Downside of that approach is that the font will fail silently (in the eyes of the user) in a situation where CBDT/CBLC isn't supported, as it will show blank glyf glyphs.

Edit: the reason the glyf table is missing now, is that even an empty table adds bytes to the font. Seeing the font still works as intended everywhere else, we'd be adding these bytes solely for Windows. This might not be the bad: I think an empty glyf table (or a table with empty glyphs, to be precise) will compress away nicely, and might amount to just the same file size increase as adding a new emoji would.

Assigned this task to me.

@DeeDeeG Drafts of the CBDT/CBLC spec indeed proposed the glyf table to be left out, but the current spec doesn't say anything about it. Lots of early adopter CBDT/CBLC fonts are without glyf table, but there should be no reason to not have an empty/fallback table now.

@RoelN
Copy link
Collaborator

RoelN commented Oct 27, 2020

Adding a glyf table with empty glyphs, a loca table, and a cmap CMAP4 3/1 table will make the font installable and work in Windows 10 (Home edition, version 20H2). At least, for as far as I could test: Paint 3D will use Noto Color Emoji for its emoji, but WordPad and Notepad will not apply Noto Color Emoji.

All this adds ~10KB to the font, which sounds reasonable on a ~10MB file. The manually built font can be found here, if any Windows users want to test it out in other software.

Regarding testing in TextLayoutSampler, only "D2D DrawTextLayout" always renders the color glyphs properly. I tried various combinations of glyf and cmap, but they would either not render er even error out with "Error drawing object 0x80004005".

If this version meets the requirement "works in Windows", I can submit a PR where the build process adds glyf, loca and cmap.

(Note that the current Noto Color Emoji version works in all versions of Edge. This test was specifically for Noto Color Emoji as installed "system font".)

@13rac1
Copy link

13rac1 commented Oct 27, 2020

FWIW This issue is why I went through the hassle of creating a method to generate B&W glyphs for twemoji-color-font https://github.com/eosrei/twemoji-color-font/blob/585d2fe5/Makefile#L115-L128 They aren't perfect, but it's a good enough solution and better than empty.

@fdwr
Copy link

fdwr commented Oct 28, 2020

Regarding testing in TextLayoutSampler, only "D2D DrawTextLayout" always renders the color glyphs properly. I tried various combinations of glyf and cmap, but they would either not render er even error out with "Error drawing object 0x80004005".

@RoelN : Yeah, that is expected, as...

  • GDI and GDI+ only support vector glyf outlines, not COLR, CBDT, or SVG tables. I don't know what GDI+ is complaining about though :/ (returning a failing Status::GenericError from Gdiplus::Graphics::DrawString).
  • DWrite itself reads the color table information (which D2D can query), but DWrite's own simple builtin IDWriteBitmapRenderTarget::DrawGlyphRun only supports vector graphics (glyf), and so to draw PNG glyphs, I'd have to check in TextLayoutSampler for DWRITE_GLYPH_IMAGE_FORMATS_PNG to then call WIC and GDI StretchBlt (todo).
  • Direct2D's DrawTextLayout and DrawColorBitmapGlyphRun directly support all the glyph image formats (PNG, TIFF, SVG...), making it trivial to implement. D2D is used by Edge, recent Office applications, and any WinUI XAML-based application. So that reaches a sizeable audience.

@RoelN
Copy link
Collaborator

RoelN commented Nov 2, 2020

@fdwr I have a PR with a proper build, if you want to test with that!

@J0shua-code
Copy link

@fdwr I have a PR with a proper build, if you want to test with that!

Could you please tell me how to set the windows compatible emojis as system default?

@RoelN
Copy link
Collaborator

RoelN commented Feb 17, 2021

@joshua-612 I don't know, but perhaps you can find instructions elsewhere, e.g. https://superuser.com/questions/1062418/how-do-i-replace-windows-10s-emoji?

@fdwr
Copy link

fdwr commented Feb 17, 2021

@RoelN : Cool (sorry for very late response - a sea of notifications 😅). Yep, testing your font, I'm able to install it fine. The emoji are fully rendered via D2D, blanks for DirectWrite (because I don't read PNG glyphs in TextLayoutSampler), emptiness for GDI (alas, it is highly unlikely GDI will ever read PNG glyphs), and an error for GDI+ (don't know what GDI+'s deal is). I wish there was a way to appease the installer so you can install the font, while still getting font fallback to Segoe UI Emoji for the unsupported PNG glyphs, but I don't think there is a way to satisfy both requirements.

image

@sparx058
Copy link

@fdwr I have a PR with a proper build, if you want to test with that!

Could you please tell me how to set the windows compatible emojis as system default?

I tried that build but it changes nothing. The best you can have is to change font to NotoEmoji.
While its still monochrome, it at least adds more emojis to what were previously rendered as "☐"

@macabeus
Copy link

@RoelN I would like to use this font as default on Windows, so I needed to change the font name to Segoe UI Emoji. I tried to do that using Font Forge, but no file was output for some unknown reason.
Would it be possible to do that using another approach?

@RoelN
Copy link
Collaborator

RoelN commented Feb 22, 2021

@fdwr Thanks for checking! I think perhaps checking for CBDT support, and then loading the appropriate font through CSS would be quicker than to hope/wait for a all-in-one solution :-)

@macabeus You could dump the font to a .ttx file, change the name, and compile it back to a .ttf using ttx?

@Funmoring46
Copy link

Funmoring46 commented Aug 2, 2021

I think it might work if we use this: https://github.com/eosrei/twemoji-color-font#replace-the-default-windows-emoji-fonts

And edit: install.cmd

And replace the Twemoji font with Noto Color Emoji.

@SaveTheRbtz
Copy link
Contributor

SaveTheRbtz commented Apr 3, 2022

Should we make cmap4 and glyf generation a default? Size increase is negligible (8KiB on a 10MiB file) but it will simplify font installation. e.g.: SaveTheRbtz@b2216b0
(cc: @RoelN)

Merrit added a commit to Merrit/feeling_finder that referenced this issue Jun 7, 2023
Include the Noto Color Emoji font in the package and use it to render
emojis. This resolves the missing emojis on Android, and ensures
they will render properly on Linux systems without the font or an
old version.

Windows does not appear to support Noto Color Emoji, so the emojis
will still appear differently on Windows.
See: googlefonts/noto-emoji#43

In addition, the native Windows font only supports Unicode 14.0
emojis, so newer emojis are not shown on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.