ImpulseAdventure / GUIslice-Builder

Cross-platform drag & drop GUI builder for GUIslice
Other
163 stars 35 forks source link

unSupport Persian Characters #242

Closed MRcode2102 closed 12 months ago

MRcode2102 commented 1 year ago

Hi Guys ! I wanted to use your GUIslice-Builder library and software for the (2.4inch SPI Module ILI9341 SKU:Mar2406) display But our language is Persian, so I used the board ESP32 and the library TFT_eSPI and then using the software Processing IDE according to the help file user_guide.pdf, I made a file VLW and then according to the help file I entered it correctly into the software and the Farsi text According to photo #1, it displays correctly in the Windows software environment (in the software environment, I wrote سلام in Persian, or the same as HELLO) But the problem is that when the program for the board ESP32 is compiled correctly by the software ARDUINO IDE and uploaded to the board ESP32, the display TFT shows the photo number #2 and it seems that the font pixels are problematic. The first point: I used the U8g2_for_TFT_eSPI library with the u8g2_font_iranian_sans_10_t_all font in the following LIB method and displayed the Persian language correctly on the screen But I don't know exactly how to use this font in your software, I even followed this LINK , but I didn't understand how to configure the settings The second point: the font created by software Processing IDE is attached with the original font itself, as well as the compiled file and the output of your software.

Please if possible help me sir a lot thanks #1

#2

persian_proj.zip

Pconti31 commented 1 year ago

@MRcode2102 I'm happy to take a look but I can't make any promises. I only control the builder not the GUIslice API. That's controlled by @ImpulseAdventure Calvin Hass so if the problem is there and it requires more than a simple patch there won't be much I can do for you. In anycase, I'll post my findings here. Paul--

Pconti31 commented 1 year ago

@MRcode2102 Could post a zip file of the fonts you are using so i can try and run your sample? Paul--

MRcode2102 commented 1 year ago

Hi Mr I am really happy with your answer dear Yes, now I will send you the original font BNazanin.ttf and the font BNazanin-12.vlw converted by software Processing IDE Today I also designed the user interface of my device This device can be connected to the water cooler and control it In the attached photo, I am also sending a photo of this designed user interface, dear Paul Please, if you can help me, I will also send you a gift as DONATE

Note: I also send the builder_fonts.json file in GUIsliceBuilder\templates path .

image fonts.zip

Pconti31 commented 1 year ago

@MRcode2102 Ok, I found your problem The system couldn't find your font in the spiffsfile system so just printed junk. Turns out your builder_fonts.json had a small error, the

 "defineFile": "BNazanin12",
should have been
   "defineFile": "BNazanin-12",

TFT_eSPI uses the defineFile to lookup the actual file using this name after adding a / in front and .VLW at the end.

Now since I'm an old man I made a larger font size 36 so I could actually see things.

I modified your sample to display two fields one your original size 12 and my new one size 36.

Now I have no idea if this is doing what you want since many believe I don't deal with my language English all that well so for the rest I'm afraid you are on your own. Attached are my changes: persian-fixes.zip

If this helps you out please leave a star and close the issue. Paul--

MRcode2102 commented 1 year ago

Hello again dear Paul First of all, thank you for your time, it is very valuable to me. I replaced the persian-fixes.zip file with the previous configuration and after compiling the program, I uploaded it to the board, but again, unfortunately, the situation did not change and the problem remains as before. The photo is also attached dear I have a question for you sir Did you upload this program to Esp32 board like I did and did it work for you? And do you think I should raise this problem to Mr. @ImpulseAdventure Calvin Hass?

A lots thanks for your helps to me dear

Can I chat with you in a Messenger where you are? Only if I had a problem in terms of programming dear I don't have a problem with the cost, dear

#4

Pconti31 commented 1 year ago

@MRcode2102 Your system display means your font can't be found in your flash disk (spiffs). One reason could be you didn't use the correct file system. Two file systems exist, the newest is littlefs while its much better than spiffs guislice doesn't support littlefs yet. here are screen shots of what I did loading your fonts.

esp32_data

esp32_spiffs

also a text file of the output inside the Arduino IDE: spiffs_trace.txt

Paul--

Pconti31 commented 1 year ago

@MRcode2102 attached is a screen shot of my esp32. I had to change the background to grey and text to black to get a picture.

IMG_1651 Paul--

MRcode2102 commented 12 months ago

Hello, dear Paul Thank you very much for your time According to you, I uploaded the data folder to ESP32 and inside the spiffs_trace window all the steps are correct as you did, but still inside the ESP32 board it does not display the font as before, and inside the SERIAL MONITOR the FONT NOT FOUND error is displayed as in the photo I sent Is it possible to tell me the installed version of the board library ESP32 and library GUISLICE.h and also your installed touch handler GUISLICE driver?

SPIFFS_TRACE.txt

#5

Pconti31 commented 12 months ago

@MRcode2102 Sadly, from your trace it seems we both are running the same versions, Aduino IDE 1.8.19

mkspiffs : C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3\mkspiffs.exe
esptool : C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.2.1\esptool.exe
mkspiffs : C:\Users\mrcod\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3\mkspiffs.exe
esptool : C:\Users\mrcod\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.5.1\esptool.exe

What about the version of GUIslice? mine from src/GUIslice_version.h

#define GUISLICE_VER "0.17.1.3"

Attached is a simple standalone program (no TFT or guislice) to just list out the files on your card

list_files.zip

My output to the serial monitor for this program:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13160
load:0x40080400,len:3036
entry 0x400805e4
FILE: BNazanin-12.vlw
FILE: BNazanin-36.vlw

Attached is my esp32fs that I have unzipped in my sketchbook location C:\Users\Paul\Documents\Arduino\tools\ its ESP32FS when unzipped.

esp32fs.zip

Paul--

MRcode2102 commented 12 months ago

Hello, dear Pavel, I am really grateful for everything you have done for me. I tested the file list_files.zip and after uploading the code to the board ESP32, the message FONT FOUND was shown on the serial monitor. But again, when I upload the original file PERSIAN.ino, the error "font not found" is displayed. And also the version of my GUISLICE library is GUISLICE_VER "0.17.0" Please, if possible, send me the file of your library that has a higher version, because it was not higher than v0.17.0 on the GitHub site. And also, if possible, write me the type of your touchpad driver from the C:\Users\mrcod\Documents\Arduino\libraries\GUIslice\configs path Thank you for all your kindness Majid

Pconti31 commented 12 months ago

@MRcode2102 To grab the latest GUIslice in its main page you will see the green "Code" button. select it: code

Then select "Download Zip": download That's all there is to it. Not sure my config would be helpful to you. I've been using Adafruit esp32 feather shield with its matching TFT screen. Anyways I have attached a zip of it. mult-shld-adafruit_35_feather_myconfig_touch.zip

I wonder if you need to run some config program to setup the esp32 memory partitions? You should google that...

or if your board is defective? Paul--

Pconti31 commented 12 months ago

@MRcode2102 One more thing you should stop worrying about guislice and get your hardware working with my file_list.ino first. Nothing else will work until that standalone app can find your files in spiff.

Paul--

Pconti31 commented 12 months ago

@MRcode2102 Screen shot of my esp32 partitions: partitions Paul--

MRcode2102 commented 12 months ago

I have now uploaded your program to the board, but it still shows the font not found error in the corresponding photo that I have attached. Even the partition settings are the same as yours

#6

#7

#8

6 is related to uploading the PERSIAN.ino file to the board, which displays the font not found error

7 is related to your file (LIST_FILES.ino) , which has no problem inside and shows that the files are available in the board memory

8 is about the same settings as your photo

I am really confused, what could be the problem!!! :(

Pconti31 commented 12 months ago

@MRcode2102 Well, the good news is that my file_list can find your font now so your esp32 spiffs fs is fine.

The error is now coming from TFT_eSPI loadFont() function. Maybe we look in there for more details. I'm using TFT-eSPI version TFT_eSPI-2.4.79. attached a standalone program using just TFT_eSPI no guislice. see if that finds your font. If not maybe its a config problem with TFT_eSPI User_Setup.h font_persian.zip

Paul--

MRcode2102 commented 12 months ago

Hello, dear Paul It's so amazing😂  , thanks to you and God, I finally found the problem It was a small point that I put below #define GSLC_SPIFFS_EN **1** Until now, it has been 0, that's why it has been disabled to read the file from FS.h But thank you very much for your time on this project of mine 💛  Can I connect with you on social networks, dear Paul?

Pconti31 commented 12 months ago

@MRcode2102 Glad you figured it out! I'm happy to have helped...

Seems like guislice api should have reported an error. I'll make a pull request sometime in the future to fix this.

As for social networks I'm an old man and have no social media presence or any interest in creating one.

Good luck on your project!

Please leave a star if you are satisfied. Paul--

MRcode2102 commented 12 months ago

Thanks dear⭐