C1710 / blobmoji

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

trying to use this font in firefox #115

Open ImUrX opened 2 years ago

ImUrX commented 2 years ago

im using this font in css but it doesnt load and just returns this

downloadable font: no supported glyph data table(s) present (font-family: "Blobmoji" style:normal weight:400 stretch:100 src index:0) source: http://localhost:8000/fonts/BlobmojiCompat.ttf
downloadable font: rejected by sanitizer (font-family: "Blobmoji" style:normal weight:400 stretch:100 src index:0) source: http://localhost:8000/fonts/BlobmojiCompat.ttf

in chrome it does work, so idk. Wasn't sure if I should report this. I found issues like this so yeah

C1710 commented 2 years ago

Firefox simply does not support this color font format (CBDT/CBLC), so it's not a specific bug for this font. I think, only SVG and one other format are supported, regardless of the OS.

(Although it might work if it's the system's default emoji font, but I'm not sure. It definitely won't work with CSS, etc.)

Not sure if that's really the reason for that error message, but even if it isn't, it wouldn't work anyway, sorry.

ImUrX commented 2 years ago

in the issue i passed it says that it supports CBDT/CBLC for freetype, so maybe release it like that too? I ended up using the noto emoji release that is text-based because thats what I currently need, is there a way to make blobmoji text-based?

C1710 commented 2 years ago

in the issue i passed it says that it supports CBDT/CBLC for freetype, so maybe release it like that too? I ended up using the noto emoji release that is text-based because thats what I currently need, is there a way to make blobmoji text-based?

FreeType is a common font rendering engine on Linux, so it's OS-specific.

They also say that these fonts are deliberately blocked, because they are not supported by all operating systems and that they wanted to include a preference to allow it anyway.

As for the text-based format, there is no way to make it work with that as it would essentially mean recreating the whole font. I might add COLR or SVG-in-OT support in the future, but I don't know when.

C1710 commented 2 years ago

So, you should be able to enable it in about:config under gfx.downloadable_fonts.keep_color_bitmaps. However, this of course wouldn't work for a website you want to be publicly available

nolombic commented 1 year ago

Just wanted to drop in to mention that BlobmojiWindows.ttf and BlobmojiWindowsDefaultReplacement.ttf won't throw an error in Firefox, but will always show up empty. Chrome however does show the blobmojis.

Firefox Developer Edition 112.0b4 Chrome 111.0.5563.65

Tested with Blobmoji Version 15 under Windows 10


To improve compatibility you could perhaps also provide a font file in the SVG format (these do also exist) and perhaps even a WOFF/WOFF2 in the future.

And should you do something like that you might as well include a CSS file to easily import them at that point:

@font-face {
  font-family: "Blobmoji";
  src: url("./Blobmoji.ttf") format("truetype");
  font-style: normal;
  font-weight: normal;
  text-rendering: optimizeLegibility;
}

.blobmoji {
  font-family: "Blobmoji";
}