Improve: update bundled NotoColorEmoji font#5507
Conversation
### This is for LINUX only! This pulls in changes for Unicode 13.1. It also will remove older versions of the font that prior versions of Mudlet will place in its own bit of the file-system so that the FontManager class will not try to load more than one instance of a font with an identical "family name" (which it will not IIRC). Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
clang-tidy review says "All clean, LGTM! 👍" |
src/main.cpp
Outdated
| // Identify old versions so that we can remove them and later on only try | ||
| // to load the latest (otherwise, as they all have the same family name | ||
| // only the first one found will be loaded by the FontManager class): | ||
| QStringList oldNotoFontDirectories; | ||
| oldNotoFontDirectories << QStringLiteral("%1/notocoloremoji-unhinted-2018-04-24-pistol-update").arg(mudlet::getMudletPath(mudlet::mainFontsPath)); | ||
| oldNotoFontDirectories << QStringLiteral("%1/noto-color-emoji-2019-11-19-unicode12").arg(mudlet::getMudletPath(mudlet::mainFontsPath)); | ||
|
|
||
| QStringListIterator itOldNotoFontDirectory(oldNotoFontDirectories); | ||
| while (itOldNotoFontDirectory.hasNext()) { | ||
| auto oldNotoFontDirectory = itOldNotoFontDirectory.next(); | ||
| QDir oldDir{oldNotoFontDirectory}; | ||
| if (oldDir.exists()) { | ||
| // This can fail but we do not worry about that too much, as long | ||
| // as it nukes any "NotoColorEmoji.ttf" files: | ||
| if (!oldDir.removeRecursively()) { | ||
| qDebug().nospace().noquote() << "main() INFO - failed to remove old Noto Color Emoji font located at: " << oldDir.absolutePath(); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Mind pulling this out into a method of its own?
There was a problem hiding this comment.
Not really - it is also part of the update because if Mudlet loads an older version I do not believe it will automatically replace it as an "application font" with the newer one - and if it DID then there is every reason to believe that the reverse would also be true, i..e if it did load the latest one first and then replaced it with the older one...!
There was a problem hiding this comment.
I don't follow - right now it's part of the main() method but since it's logical piece of code on its own, it should be a small function.
There was a problem hiding this comment.
Sorry, I misread method() as PR! 🤦♂️
…ction Requested in peer review. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
I'm looking to do a similar update for Unicode 14, I'm stumped - the release on https://github.com/googlefonts/noto-emoji/releases/tag/v2.028 looks nothing like the release you've included here. Where did you get this release of noto-color-emoji from? Or did you trim the official release and included it here? |
#### Brief overview of PR changes/additions Update Noto Color Emoji to the v2.034 release which supports Unicode 14. #### Motivation for adding to Mudlet So we can get these new emojis on Linux: https://emojipedia.org/unicode-14.0 ### Other info See #5507 which previously updated this to Unicode 13.

This is for LINUX only!
This pulls in changes for Unicode 13.1. It also will remove older versions of the font that prior versions of Mudlet will place in its own bit of the file-system so that the FontManager class will not try to load more than one instance of a font with an identical "family name" (which it will not IIRC).
Signed-off-by: Stephen Lyons slysven@virginmedia.com
Release post highlight
Update of the bundled copy of Note Color Emoji (used by Linux only builds of Mudlet) to version 2.028 (supporting Unicode 13.1) - this release also removes any older versions that prior release of Mudlet drop into the
fontsfolder within the files that Mudlet keeps locally. This should help to avoid complications that having multiple versions of fonts with the same "family name" might cause.