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

Is it possible to use Openmoji Color as a replacement for Noto Color Emoji in Qt applications? #66

Closed
SlySven opened this issue Oct 29, 2019 · 3 comments
Assignees
Labels

Comments

@SlySven
Copy link

SlySven commented Oct 29, 2019

I am part of a project (https:/mudlet) that has recently start to adopt colour emojis and for Linux users this means we are currently forcing the use of Noto Color Emoji to fill-in and provide colour emojis by adding it with a QFont::insertSubstitution(<main font name>, "Noto Color Emoji") to the font we are using in various Qt widgets - I have revised our codebase to allow a different emoji font to be used and I selected Openmoji because I liked that it wasn't tied to a particular OS (and because it is working on supporting Unicode 12)!

However, although I can see that it is being used to substitute for Emoji code-points but unlike the Noto font I am only seeing the black and white glyphs. Can anyone explain why that is and what more needs to happen before the colour glyphs can be accessed. I did a fc-scan (from the fontconfig suite of tools) for each of the two font files and I was curious to see that the color option was false for Openmoji - is this a symptom or a cause of the Qt font rendering system from not handling the colour elements under Linux?

Noto color emoji:

Pattern has 27 elts (size 32)
	family: "Noto Color Emoji"(s)
	familylang: "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "Noto Color Emoji"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)
	weight: 80(f)(s)
	width: 100(f)(s)
	pixelsize: 109(f)(s)
	spacing: 100(i)(s)
	foundry: "GOOG"(s)
	antialias: False(s)
	file: "./src/fonts/noto-emoji-2018-08-10-unicode11/NotoColorEmoji.ttf"(s)
	index: 0(i)(s)
	outline: False(s)
	scalable: True(w)
	charset: 
	0000: 00000000 03ff0409 00000000 00000000 00000000 00004200 00000000 00000000
	0020: 00002000 10000000 00000200 00000000 00000000 00000000 00000000 00000008
	0021: 00000000 02000004 00000000 00000000 03f00000 00000600 00000000 00000000
	0023: 0c000000 00000100 00000000 00000000 00000000 00000000 00008000 070ffe00
	0024: 00000000 00000000 00000000 00000000 00000000 00000000 00000004 00000000
	0025: 00000000 00000000 00000000 00000000 00000000 00400c00 00000001 78000000
	0026: 2132401f 0700c44d 800fff05 c8000169 1afc0000 60030c03 001ac130 27bf0600
	0027: 2054bf24 00180102 00b85090 00000018 00e00000 80010002 00000000 00000000
	0029: 00000000 00300000 00000000 00000000 00000000 00000000 00000000 00000000
	002b: 180000e0 00000000 00210000 00000000 00000000 00000000 00000000 00000000
	0030: 00000000 20010000 00000000 00000000 00000000 00000000 00000000 00000000
	0032: 00000000 00000000 00000000 00000000 02800000 00000000 00000000 00000000
	01f0: 00000010 00000000 00000000 00000000 00000000 00000000 00008000 00000000
	01f1: 00000000 00000000 00000000 c0030000 07fe4000 00000000 00000000 ffffffc0
	01f2: 04000006 07fc8000 00030000 00000000 00000000 00000000 00000000 00000000
	01f3: ffffffff fffffff3 ffffffff ffffffff cecfffff ffffffff ffffffff ffb9ffff
	01f4: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff bfffffff
	01f5: ffffffff 3fffffff ffff7e00 07f980ff 00613c80 10060130 700e001c fc08810a
	01f6: ffffffff ffffffff 0000ffff 00000000 ffffffff ffffffff 0007f83f 03f91a3f
	01f9: ffff0000 77ffffff ffffffbf f479ffff ffffffff 03ff0007 ffff0007 ffffffff
	0e00: 00000000 03ff0000 00000000 87fffffe 00000000 00000000 00000000 00000000
	0fe4: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00007fe0
	0fe8: 00000000 00ffd000 00000000 00000000 00000000 00000000 00000000 00000000
(s)
	lang: und-zsye(s)
	fontversion: 132186(i)(s)
	capability: "otlayout:DFLT"(s)
	fontformat: "TrueType"(s)
	decorative: False(s)
	postscriptname: "NotoColorEmoji"(s)
	color: DontCare(s)
	symbol: False(s)
	variable: False(s)

Openmoji color:

Pattern has 24 elts (size 32)
	family: "OpenMoji"(s)
	familylang: "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "OpenMoji Color"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)
	weight: 80(f)(s)
	width: 100(f)(s)
	foundry: "PfEd"(s)
	file: "./src/fonts/openmoji-12.0/OpenMoji-Color.ttf"(s)
	index: 0(i)(s)
	outline: True(s)
	scalable: True(s)
	charset: 
	0000: 00000000 03ff0409 00000000 00000000 00000000 00004200 00000000 00000000
	0020: 00002000 10000000 00000200 00000000 00000000 00000000 00000000 00000008
	0021: 00000000 02000004 00000000 00000000 03f00000 00000600 00000000 00000000
	0023: 0c000000 00000100 00000000 00000000 00000000 00000000 00008000 070ffe00
	0024: 00000000 00000000 00000000 00000000 00000000 00000000 00000004 00000000
	0025: 00000000 00000000 00000000 00000000 00000000 00400c02 00000001 78000000
	0026: 2132401f 0700c44d 800fff05 c8000169 1afc0000 60030c03 001ac130 27bf0600
	0027: 2054bf24 00180102 00b85090 00000018 00e00000 80010002 00000000 00000000
	0029: 00000000 00300000 00000000 00000000 00000000 00000000 00000000 00000000
	002b: 180030e0 00000000 00210000 00000000 00008000 00000000 00000000 00000000
	0030: 00000000 20010000 00000000 00000000 00000000 00000000 00000000 00000000
	0032: 00000000 00000000 00000000 00000000 02800000 00000000 00000000 00000000
	00e0: 00000003 00000000 0000000f 00000000 ffffffff 00000fff 0000000f 00000000
	00e1: 00003fff 00000000 000001df 00000000 0000000f 00000000 00ffffff 00000000
	00e2: 000007ff 00000000 ffffffff 000003ff 00000000 00000000 00000000 00000000
	00fe: 00008000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
	01f0: 00000010 00000000 00000000 00000000 00000000 00000000 00008000 00000000
	01f1: 00000000 00000000 00000000 c0030000 07fe4000 00000000 00000000 ffffffc0
	01f2: 04000006 07fc8000 00030000 00000000 00000000 00000000 00000000 00000000
	01f3: ffffffff fffffff3 ffffffff ffffffff cecfffff ffffffff ffffffff ffb9ffff
	01f4: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff bfffffff
	01f5: ffffffff 3fffffff ffff7e00 07f980ff 00613c80 10060130 700e001c fc08810a
	01f6: ffffffff ffffffff 0000ffff 00000000 ffffffff ffffffff 0027f83f 07f91a3f
	01f7: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000fff
	01f9: ffffe000 f7ffffff ffffffbf fc7bffff ffffffff ffffc7e7 ffffe7ff ffffffff
	01fa: 00000000 00000000 00000000 070f0000 003f0007 00000000 00000000 00000000
	0e00: 00000000 00000000 00000000 809850ac 00000000 00000000 00000000 00000000
(s)
	lang: und-zsye(s)
	fontversion: 65536(i)(s)
	capability: "otlayout:latn"(s)
	fontformat: "TrueType"(s)
	decorative: False(s)
	postscriptname: "OpenMojiColor"(s)
	color: False(s)
	symbol: False(s)
	variable: False(s)
@SlySven
Copy link
Author

SlySven commented Oct 29, 2019

In practice the effects are:

Plain Deja Vu Mono without a substitute font:
Plain Deja Vu Mono without substitute

Deja Vu Mono with Noto Color Emoji as substitute font:
Deja Vu Mono with Noto Color Emoji as substitute

Deja Vu Mono with Openmoji Color as substitute font:
Deja Vu Mono with Openmoji Color as substitute

@b-g
Copy link
Member

b-g commented Oct 30, 2019

Hi @SlySven, many thanks for the interest!

Quick answer is: "No" :( I've spent this year ca. 2 weeks trying to generate a valid colorfont. I unfortunately just partly succeed. The OpenMoji Colorfont works in Firefox (with some glitches). The font folder holds all the current tooling to generate from SVG files a colorfont.

But as this is an non commercial project ... figuring out the colorfont issue feels currently out of scope. We are already very busy with the very core of the project: creating, maintaining and testing emojis!

However the google noto-emoji repo seems to have another approach to generate colorfonts. One would have to have a look and port it to OpenMoji. I don't have time for it in the next months. But ... of course any help on this is very welcome! Wink wink! 👋

@b-g b-g added the question label Oct 30, 2019
@b-g b-g self-assigned this Nov 1, 2019
@b-g
Copy link
Member

b-g commented Nov 4, 2019

I guess this is answered. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants