Colourize emojis shown in Mudlet#2835
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
I think the licence is compatible with the GPL (see https://www.gnu.org/licenses/license-list.html#SILOFL) but to comply with licence term number 2 we need to include the SIL text in the "About Mudlet" dialog if the |
|
Okay it is waiting for you at vadi2#14 . |
SlySven
left a comment
There was a problem hiding this comment.
👍 I support this - but it needs the licence adding in...
The text is quite similar to the Ubuntu Font licence as it happens and it is now needed under exactly the same situation (when `INCLUDE_FONTS` is `#define`d during compilation... Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Added, thank you. |
|
One thought - does this work on ALL three main platforms? I'd heard some rumours that it might not work on some Windows flavours - whilst the latest Win 🔟 version works it might not for some older flavours. I will have to give it a spin on my Win 7️⃣ PC... |
|
Does not seem to work in Windows 7, but I guess this is a Windows problem... it works in Win 10. |
|
So, it's better than nothing for Linux and Windows 10. |
|
On Windows 7, it just renders black and white emojii most of the time, so I wouldn't call it a complete failure. |
That was my expectation - M$ had their own candidate for a means to do coloured font support but it is not the default that the w3 group choose - see googlefonts/noto-emoji#43 . Something about this improved with a particular version of Windows 10 - but everything thing before that is problematic I understand... |
|
Anything outstanding to finish the PR? |
|
My life will not be complete until my emojii eggplant is purple. Do we actually know what causes Win 7 to not work? Is it something we can fix? I don't know knees from elbows when it comes to the emojii handling, but I can test whatever you want me to. |
|
googlefonts/noto-emoji#43 (comment) Yes Windows 7 doesn't think it's a valid font, Windows 10 has it fixed. Windows 7 from the looks of it wants an SVG-based font instead - which would be a performance killer; colour emojis already are a really big hit already. |
|
@maiyannah ℹ️ As I understand it only the latest (? though by now it might not be the latest) Windows 10 update supports colour fonts using the somewhat heavy-weight but agreed W3 standard for them - previous versions of Windows (7, 8, 8.1 and prior 10s) only supported M$s own proposed standard (which is somewhat lighter but only used by M$, and was only one of four proposals put forward)... ... and be careful who you send your purple egg-plant to: in the UK "eggplant" is just another name for an aubergine but I understand that over the other side of the pond it has a much more outstanding meaning! 😮 |
|
So, this good to go? |
|
Wow, they expect people to use SVGs in place of fonts? I can't imagine why that didn't get adopted. I was just wondering if there was something we could do so we aren't missing Windows 7 with this, but it doesn't look like there is anything reasonable we can do. |
|
👎 Its a bummer but I can't currently get noto colour emojis to work on Mudlet in FreeBSD either... BTW Here is a relevant blog from M$ about the addition to Windows 🔟 : |
|
Let's enable this for cases where it works then, Linux & modern Windows? macOS already works with this out of the box. |
Kebap
left a comment
There was a problem hiding this comment.
Changes seem reasonable. Let's do this, as long as it doesn't worsen state or even crash on unsupported OS...
|
It should be fine as far as I know, @maiyannah didn't mention anything being worse off either... but if there is hopefully we catch it in the 5 day test period! |
|
Today is the freeze date for new features, and I don't see any big objections from you @SlySven anymore. I'll dismiss your changes requested review about including the license; that is already in - just so we can get this in 4.0. |
This is needed because forcing the use of "Noto Color Emoji" on all
versions of all OSes is just no good:
Even the latest version (September 2019) of Windows 10 cannot load it for
use generally. Also versions of Windows prior to 8.1 are (unless, it is
suggested, they have MS Office 2016 installed) incapable of displaying ANY
color emoji characters.
Also, before a particular version of font-config - I *think* it is 2.11.94
things are broken and color emojis from the Noto Color Emoji font (at
least) end up being - I discovered - being miscaled so that they were
grossly oversized. Unfortunately there are some current Linux
distributions, including Devuan 2.0 ("ASCII") that use an older version
than this.
I am not sure that FreeBSD can do color emojis but that might just be a
configuration issue on my end.
So this PR is designed to allow the font used as a substitute to provide
emojis to be selected from several specific options - and to try to select
a reasonable default for each OS/Version. As well as providing a "None"
option - which reverts Mudlet's behaviour back to that before Vadim
introduced the support for color emojis in Mudlet#2835 .
As a fall-back to provide the SAME (currently only BW) Emojis for ALL cases
I have included the CC BY-SA 4.0 licenced font called:
[OpenMoji](https://www.openmoji.org/).
This includes support for Unicode 12.1 (Noto Color Emoji is only up to 11.0
even with the update I have included in this PR).
This PR deals only with fonts used in the following locations:
* Main Profile Console
* Dockable/Floating User Windows
* Sub-Console
Further PRs will be provided to address other areas where we might
reasonably expect color emoji characters to apply. Note that this setting
has to be applied to the whole Mudlet application at a time as the Qt
facilities act on modifying the underlying application's font database - so
when you change the substitution for, say "DejaVu Sans" then whenever a
copy of that font is created for use in a widget then the changes will take
affect in that and all later uses - but it won't change any previous
instances of that font in other widgets. It also means that there are
distinct differences between passing references to `QFont`s and just
passing a *name* of a font. This is wht I have changed the name of:
`(bool) TConsole::setMiniConsoleFont(const QString&)`
to:
`(bool) TConsole::setMiniConsoleFontName(const QString&)` !
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>


Brief overview of PR changes/additions
This makes all emoji's that appear in Mudlet be shown in colour.
It does not attempt to or fix the case of emojis's/text overlapping each other times.
Motivation for adding to Mudlet
Black and white emoji's aren't modern anymore, and we're a modern client.
Other info (issues closed, discussion etc)
Credit to https://www.google.com/get/noto/help/emoji/ for the graphics.