Closed maze61 closed 7 months ago
Thanks for letting me know the problem. I have confirmed that you are correct, that EncodeRange is in a missing state.
Because the EncodeRange structure is in namespace "m5gfx" ( or lgfx ),
The workaround you can do now is to add using m5gfx::EncodeRange;
.
#include <M5Unified.hpp> // before.
using m5gfx::EncodeRange; // add this.
#include "CUF_24px.h" // after.
I would consider doing this inside the library if USE_M5_FONT_CREATOR
is defined.
P.S: The next update will be released within a week.
Hello Lovyan03,
thank you for your fast response and also providing a workaround.
Take care Marcus
Hello Lovyan03,
examples sketch compiles now on Core 1, Core 2 and Stick C+.
On all three controllers:
M5.Lcd.drawString("Hello world", 160, 60, 1);
is displayed correctly.
But for
M5.Lcd.drawString("你好 世界", 160, 90, 1);
M5.Lcd.drawString("Здравствуй мир", 160, 120, 1);
M5.Lcd.drawString("こんにちは せかい", 160, 150, 1);
only boxes instead of characters are shown
unicodes dingbats via M5.Lcd.printf("☀☁☂☃☄★☆☇☈☉...";
are displayed correctly
Thanks, Marcus
It is important to note that M5Unified is not fully compatible with the previous library.
Some function arguments may not exhibit the same behavior. Therefore, some of them must be changed to match M5Unified.
In this example, the fourth argument of drawString
does not need to be ,1
.
Do the following.
M5.Lcd.drawString("你好 世界", 160, 90);
M5.Lcd.drawString("Здравствуй мир", 160, 120);
M5.Lcd.drawString("こんにちは せかい", 160, 150);
The conventional library for LCD control is based on a library called TFT_eSPI. This had the property that the control method switched greatly depending on the font type. Therefore, it has a special meaning that font number 1 behaves as a GFX font.
M5Unified (M5GFX) has devised a solution to this special situation, Font number 1 has no special meaning and is simply a missing number. Therefore, if font number 1 is specified, there is no corresponding font and the default font is used.
Hello lovyan03,
thanks for your explanation, which improved my understanding of M5 fonts!
Works now perfectly on both Core1 and Core2!
Please keep your good work on M5Unified going, I know it's a Tantalus task (M5.getPin(), M5.Power(), ...).
Take care, Marcus
Hello, first of all cudos to the developer(s) of M5Unified - excellent work!
After modifing
<m5stack path>/src/utility/In_eSPI_Setup.h, At the end of the file add "#define USE_M5_FONT_CREATOR"
, as per README.md, the sketch"Examples -> M5Stack -> Advanced -> Display -> Display_Unicode"
runs without any problems on Core1 (V2.7) and Core2.If I'm now "porting" this example to M5Unified by
I got the following compilation error:
Which is the same also on a Core2.
As an Austrian, I depend on Unicode (äöüßÄÖÜ°)
Thank you, Marcus
P.S.: I am looking forward to when
M5.getPin()
will be available.