Smanar / CYD-Domoticz-Remote

WIP project to control your home-automation using Domoticz and a CYD (Cheap touchscreen).
9 stars 2 forks source link

€ sign is not correct displayed on the screen. #14

Closed SargonofAssyria closed 1 month ago

SargonofAssyria commented 1 month ago

The Euro sign (€) is displayed on the info screen as a box. Also other sign like superscript 2 -> ² and mu -> μ Any idea for a solution?

Smanar commented 1 month ago

Yep it can depend of used font. What is your device ? To see which one font it use.

By defaut on autogenerated one I m using as special char €°µ¥£²³ So you need to have them

SargonofAssyria commented 1 month ago

I am using esp32-8048S070C As far as I see it, I use Montserrat_Bold_18

Smanar commented 1 month ago

Exactly

    LV_FONT_DECLARE(Montserrat_Bold_18)
    const lv_font_t font1 = Montserrat_Bold_18;
    #ifdef CUSTOM_FONT
        LV_FONT_DECLARE(Montserrat_16)
        onst lv_font_t font3 = Montserrat_16;
        LV_FONT_DECLARE(Montserrat_14)
        const lv_font_t font2 = Montserrat_14;
    #else
        const lv_font_t font3 = lv_font_montserrat_16;
        const lv_font_t font2 = lv_font_montserrat_14;
    #endif

You still have CUSTOM_FONT to false ? So those one are native

       const lv_font_t font3 = lv_font_montserrat_16;
        const lv_font_t font2 = lv_font_montserrat_14;

And this one is custom const lv_font_t font1 = Montserrat_Bold_18;

But this one have thoses special character

/*******************************************************************************
 * Size: 18 px
 * Bpp: 4
 * Opts: --bpp 4 --size 18 --no-compress --font Montserrat-Bold.ttf --symbols €°µ¥£²³ --range 32-126 --format lvgl -o Montserrat_Bold_18.c
 ******************************************************************************/

Do you have a capture to see wich one text miss it ?

SargonofAssyria commented 1 month ago

IMG_20240706_142926 Every where there is Prijs or Kosten there should be an € sign And the superscript 2 -> ² should on some place after the m And the µ is missing at my Geiger counter µSv/h And CUSTOM_FONT is set to false

Smanar commented 1 month ago

I m checking the code, I think I don't use font at all in this part, so the code use a defaut one, probably without custom char. I will check it after the OTA

SargonofAssyria commented 1 month ago

I am using -DDEVICE_SIZE=3 # Device display size So I should be on font1 = Montserrat_Bold_18; font3 = lv_font_montserrat_16; font2 = lv_font_montserrat_14;

First is in the source and both the lv_font are in the lib Those signs are not in the lib fonts.

SargonofAssyria commented 1 month ago

So I tried font3 with Montserrat_Bold_18 That worked for € and other signs. But I think 16 and normal (not bold) would be better. Side effect is that the firmware.bin is 10k smaller, but the screen wipe seems slower.

Smanar commented 1 month ago

Yeah, same for me it's smaller, have probably removed other special char. So have pull a new version with generated font for Montserrat_12 and Montserrat_16.

I m not sure, but for me they are smaller too (not only space but size too). Was forced to increase padding on info panel.

Smanar commented 1 month ago

Still have the issue ?

SargonofAssyria commented 1 month ago

No, with those 'new' fonts they where fine on the test branch, but for some reason the home panel did not display devices on the test branch, so I returned to master branch.

Smanar commented 1 month ago

Can you check with "serial monitor" to see if you have some ouput ? To see what is blocking, on my side with bad font, it freeze.

If you set const lv_font_t font3 = Montserrat_Bold_18;

Still the same issue ? (even you will have graphical issue with this edition)

I can't reproduce it on my side, probably another missing char ?

SargonofAssyria commented 1 month ago

I copied the Montserrat_16 font to my environment of yesterday and changed font3 to that font. No problems and € and others are display fine. So it has to be something else... will keep searching...

SargonofAssyria commented 1 month ago

This works fine for me now with test branch. Quick response and no crashes. font1 = Montserrat_Bold_18 font2 = lv_font_montserrat_14 font3 = Montserrat_16 I am now testing with font2 = Montserrat_16 In my case the text just fits. So This issue is solved.