|
|
Home » Community » U++ community news and announcements » 32 bit wchar merged
|
|
|
Re: 32 bit wchar merged [message #57732 is a reply to message #57728] |
Thu, 02 December 2021 19:44   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
Linux.
./umk reference GLDrawDemo CLANG -bus
/home/buildbot/worker/l-upp/build/uppsrc/GLDraw/Text.cpp:72:7: error: use of undeclared identifier 'wstrlen'; did you mean 'strlen'?
n = wstrlen(text);
^~~~~~~
strlen
Broken in rev. 34ff69130826ac72f1481f82ef7f0fda0cce0a3e
Windows is fine. Actually, I didn't test this demo on Windows ...
Regards,
Novo
[Updated on: Fri, 03 December 2021 20:43] Report message to a moderator
|
|
|
Re: 32 bit wchar merged [message #57734 is a reply to message #57732] |
Sat, 04 December 2021 19:49   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Mirek,
I just did quick test with Emojies. It seems that most of it 90% are not rendered. Should it work like this at the moment? Example:

Platform: Linux/Manjaro - GTK. We could use https://openmoji.org/ emojies library.
Klugier
-
Attachment: Emojies.png
(Size: 264.22KB, Downloaded 608 times)
U++ - one framework to rule them all.
[Updated on: Sat, 04 December 2021 19:55] Report message to a moderator
|
|
|
|
Re: 32 bit wchar merged [message #57737 is a reply to message #57735] |
Sat, 04 December 2021 20:45   |
Tom1
Messages: 1303 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi,
I seem to have similar results on Linux Mint, but on Windows I can see quite a selection of emojis in UWord. (In black'n'white in Windows though.)
Libre Office in the same Linux Mint installation can show a whole lot of emojis for the same set.
Best regards,
Tom
|
|
|
|
|
|
|
Re: 32 bit wchar merged [message #57743 is a reply to message #57742] |
Sun, 05 December 2021 15:11   |
Tom1
Messages: 1303 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi Mirek,
The change (in Draw/FontCR.cpp) does not seem to change anything on UWord + Linux Mint for the test file.
Best regards,
Tom
|
|
|
Re: 32 bit wchar merged [message #57744 is a reply to message #57742] |
Sun, 05 December 2021 16:05   |
Oblivion
Messages: 1206 Registered: August 2007
|
Senior Contributor |
|
|
I've changed the line, and unfortunately nothing has changed.
It seems that the fallback list and the new font rendering routines have some issues. Because upp wchar32 update can definitely render emojis on Linux, as it can be seen from the screenshot in my previous message.
In my test case, it displays all the emojis correctly. The problem is I have to pass the emoji font as the active font. (in TheIDE's code editor, for example)
P.s I have recreated the fallback font list, using the FontMap2. Noto Color Emoji is correctly listed in it, but It doesn't take it into account (or maybe it does bot not scaling correctly, because I am getting a single pixel instead of a emoji. (This may also have to do the incorrect line height issue I have mentioned in my previous post.)
Best regards,
Obilvion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 05 December 2021 16:06] Report message to a moderator
|
|
|
Re: 32 bit wchar merged [message #57745 is a reply to message #57744] |
Sun, 05 December 2021 16:24   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
Oblivion wrote on Sun, 05 December 2021 16:05I've changed the line, and unfortunately nothing has changed.
It seems that the fallback list and the new font rendering routines have some issues. Because upp wchar32 update can definitely render emojis on Linux, as it can be seen from the screenshot in my previous message.
In my test case, it displays all the emojis correctly. The problem is I have to pass the emoji font as the active font. (in TheIDE's code editor, for example)
P.s I have recreated the fallback font list, using the FontMap2. Noto Color Emoji is correctly listed in it, but It doesn't take it into account (or maybe it does bot not scaling correctly, because I am getting a single pixel instead of a emoji. (This may also have to do the incorrect line height issue I have mentioned in my previous post.)
Best regards,
Obilvion
Well, if the font is not found in the fixed list, all remaining fonts are loaded and tested (this takes time, the purpose of fixed list is to speedup the process in "normal" cases).
I think this is more likely related to color font rendering / handling.
Mirek
|
|
|
|
|
Re: 32 bit wchar merged [message #57776 is a reply to message #57775] |
Sun, 12 December 2021 17:55   |
Oblivion
Messages: 1206 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
Thanks!
Initial test: it works, and rather looks nice! (taken fron TerminalCtrl, test code):

As for your other question: In my experience, the general preference and rule seems to be mixing a set of consistent color emoji with font, where possible, though it is not set in stone.
Best regards,
Oblivion
-
Attachment: emojis.png
(Size: 245.36KB, Downloaded 478 times)
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 12 December 2021 18:08] Report message to a moderator
|
|
|
Re: 32 bit wchar merged [message #57778 is a reply to message #57726] |
Mon, 13 December 2021 12:42   |
pvictor
Messages: 75 Registered: December 2015
|
Member |
|
|
Hello!
I've found an error in displaying Cyrillic characters in latest U++ releases.
Here's a testcase:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyApp : TopWindow {
void Paint(Draw& w) {
ImagePainter ip(GetSize());
ip.DrawRect(GetSize(), White());
String s = "Абвгдежз"; // some cyrillic text
ip.DrawText(10, 10, s); // OK
String s2 = ToCharset(CHARSET_WIN1251, s);
ip.DrawText(10, 50, s2, CHARSET_WIN1251); // draws rectangles instead of letters
Image im = ip;
w.DrawImage(0, 0, im);
}
};
GUI_APP_MAIN
{
MyApp().Run();
}
It works fine under U++ 15947.
Platform: Linux Mint.
Best regards.
Victor
|
|
|
Re: 32 bit wchar merged [message #57783 is a reply to message #57778] |
Mon, 13 December 2021 23:06   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
pvictor wrote on Mon, 13 December 2021 12:42Hello!
I've found an error in displaying Cyrillic characters in latest U++ releases.
Here's a testcase:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyApp : TopWindow {
void Paint(Draw& w) {
ImagePainter ip(GetSize());
ip.DrawRect(GetSize(), White());
String s = "Абвгдежз"; // some cyrillic text
ip.DrawText(10, 10, s); // OK
String s2 = ToCharset(CHARSET_WIN1251, s);
ip.DrawText(10, 50, s2, CHARSET_WIN1251); // draws rectangles instead of letters
Image im = ip;
w.DrawImage(0, 0, im);
}
};
GUI_APP_MAIN
{
MyApp().Run();
}
It works fine under U++ 15947.
Platform: Linux Mint.
Best regards.
Victor
Well, I was planning to remove that DrawText variant with charset, looks like I will just deprecate it then. Fixed.
|
|
|
Re: 32 bit wchar merged [message #57785 is a reply to message #57775] |
Wed, 15 December 2021 08:29   |
Tom1
Messages: 1303 Registered: March 2007
|
Ultimate Contributor |
|
|
mirek wrote on Sun, 12 December 2021 17:41The question now remains: When doing replacement, often some replacement font with black&white emoji glyph is closer in appearance than Color Emoji font. That results in mixing colored and B&W emojis. While technically probably more correct, should in case I am looking for emoji glyph always prioritize Noto Color Emoji (or maybe any color emoji font) over matching appearance of font?
Mirek
Hi,
Prioritizing color emoji would give the most consistent user experience on any desktop environment.
Best regards,
Tom
|
|
|
Goto Forum:
Current Time: Fri May 09 08:48:10 CEST 2025
Total time taken to generate the page: 0.03116 seconds
|
|
|