ImpulseAdventure / GUIslice-Builder

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

Need Help! #245

Closed MRcode2102 closed 11 months ago

MRcode2102 commented 1 year ago

Hi dear friend First of all, I apologize for the questions I am asking you. I have a question for you. After adding the Persian font to your GUIslice-Builder software, I ran it in the Esp32 board, but I have a problem, and that is that it displays the Persian font in a jumbled and irregular manner on the screen, now I wanted to know if there is a way Is there a solution to solve this problem dear?

the photo of the screen :

photo_2023-10-04_21-13-51

Note: it must be "سلام" but the monitor shows: "م ا ل س"

the program with font and UI:

persian.zip

MRcode2102 commented 12 months ago

Mr. Paul Conti, sir, are you here?

Pconti31 commented 12 months ago

@MRcode2102 Sorry, but GITHUB has forced me to turn on extra security features that have made it very hard to login. For example it took over ten minutes to login just now. Therefore, I have been cutting back dealing with github.

Now GUIslice builder shows your font correctly but the runtime of GUIslice api and TFT_eSPI does not. I wonder if you can edit one of the TFT_eSPI examples to use your spiffs font? If so, it would indicate if the problem is with either GUIslice api or TFT_eSPI. If the sample works correctly its with GUIslice otherwise TFT_eSPI and you should ask for help there. Of course, its quite possible I did something wrong with my code generation. Anyway, let me know what happens. Paul--

Pconti31 commented 12 months ago

@MRcode2102 Of course, its also possible the created font is damaged... So, as I think about it even if TFT_eSPI fails it could still be a problem with the font and not really TFT_eSPI but still it would be nice to get GUIslice api out of the loop. Paul--

MRcode2102 commented 12 months ago

Hello, dear Mr. Paul. Thank you for answering my questions According to you, I used the example Font_Demo_1 inside the library TFT_eSPI and put my own fonts in it, but it still didn't work, unfortunately, and my Persian language font was shown in a broken form.

captured screen photo:

photo_2023-10-06_22-04-14

What do you think I should do dear?

MRcode2102 commented 12 months ago

A Note! On this GitHub page, someone has customized the Persian font, but I don't know how to integrate it with your library so that I can use it. Can you guide my dear Paul, please?

his GitHub page

and his Arduino example:

Persian_Letters_Arduino.ino

Pconti31 commented 12 months ago

@MRcode2102 Try using this instead of bodmer's TFT_eFEX library: Arabic support Then try and run examples)/drawStringRTL.ino with the supplied data/NotoSansBold15.vlw By the way I include this font with GUIsliceBuilder NotoSansBold16.vlw

If that example works then the next step is to try and modify the sample to use your font and see what happens. If ieither or both fonts work we can move forward looking at GUIslice API with whichever font you like best...

The mods to GUIslice API would be to use the calls supplied with this modified TFT_eSPI to display text strings, example:

  fex.setCursorRTL(xpos, ypos);
  fex.drawStringRTL();

But no point going that far if the sample doesn't work. Paul--

Pconti31 commented 12 months ago

@MRcode2102 Sorry again, I ment for you to use this repro: Arabic support using TFT_eFEX

Paul--

MRcode2102 commented 12 months ago

Hello dear Are you well and healthy? I did as you said and the result was as follows: I ran the file drawStringRTLAr on the kit ESP32 in library TFT_eFEX and the text was displayed correctly as shown below:

photo_2023-10-08_22-39-37

Then I added the font in Persian BNazanin-12 to the file, but again, the words of the font were mixed up and did not solve the problem, as shown below:

photo_2023-10-08_22-39-41

so I came to the conclusion that the problem is with the font and also the library itself. ; Because I alone added the CairoLight22 font file in this example, but there was still a problem of confusion of font words, so it can be concluded that the problem is not only my Persian font, but also from the TFT_eSPI library. Dear, if you can explain to me what should I do?! Can you add TFT_eFEX library to GUI_SLICE library?

MRcode2102 commented 12 months ago

So, dear, if you can add the TFT_eFEX lib to the GUI_SLICE library, I can use the pre-made font CairoLight22 from the drawStringRTLAr file that is related to the TFT_eFEX library. But the problem is that the font is 22 and the size is too big for me Do you think this operation can be solved?

Thank you for taking the time to answer my questions, dear Paul

Pconti31 commented 12 months ago

@MRcode2102 I can try and add Arabic support using this version of TFT_eSPI to GUIslice API. I can't say how long it will take... Few days or a week? Not sure what you mean by using CairoLight22 . The CairoLight22 isn't used by example. As I said above it uses data/NotoSansBold15.vlw. I include various font sizes of this font with the Builder. Paul--

Pconti31 commented 11 months ago

@MRcode2102 Ok, I created vlw cario fonts sizes 16, and 20. Let me know which ones you like to use if any. Try them using the example drawStringRTLAr. If you need a different size I can respin them. If they are acceptable I'll add them to my next release of Builder and start working on support for GUIslice API.

Otherwise, I don't know what other fonts to try.

Paul--

Pconti31 commented 11 months ago

@MRcode2102 Here is the zip file of cario fonts cario-fonts.zip Paul--

MRcode2102 commented 11 months ago

Hello, dear Paul I really thank you again for your efforts And sorry I couldn't get online yesterday! Thank you for making the font cario-fonts Ok brother, I will test it now and let you know the result soon

MRcode2102 commented 11 months ago

Hello again, dear Paul I tested the cario_font font and I can say that it is almost perfect for me Please integrate it with the GUISLICE-API library if you can

Just please, can you do this operation faster?! And can you please tell me how long this operation takes?

And thank you very much for your precious tips If God wills, I will give you a gift, dear Paul

Pconti31 commented 11 months ago

@MRcode2102 Good news for you, bad news for me. I got the Builder enhancements added and modified the GUIslice API to use the Cario fonts I posted above. I tested with my version of the person.prj file posted somewhere above. Looks good to me.

Unfortunately for me in the process of debugging I fried my Adafruit 3.5 feather TFT display. This is why debugging took so long. It took me a while to realize it wasn't my new code that was the problem but instead my damaged TFT display that wasn't working. correctly. Ugh!!!

Likely I had spare 2.4 Adafruit feather TFT display I could plug-in.

The thing left now is to check everything in and respin a new builder. Since I don't have write access to GUIslice API you will need to down load from my copy of GUIslice repository.

I will post full details when I have everything available. I'm done working today so it won't be completed until sometime tomorrow (here in the USA).

Paul--

MRcode2102 commented 11 months ago

Hello dear Paul I am glad that you answered my questions so completely and accurately. I understood from your words that I have to wait for you to upload the new results on your page. Did I understand you correctly?

Also, thank you very much for your great help to me in this project I will definitely make up for it

Pconti31 commented 11 months ago

@MRcode2102 I have everything checked in now. GUIsliceBuilder 0.17.25b will generate correct code for Arabic Cairo fonts. Now I DO NOT have write access to GUIslice API repository since thats @ImpulseAdventure Calvin's project not mine. To correctly display Arabic TFT_eSPI SMOOTH_FONT (vlw extensions) you need to load them into SPIFFS using your App's data folder.

Then you need to download and replace GUIslice with my branch of GUIslice API
pconti-arabic Use the GitHub Green <> Code button and choose download zip file.

You should first save your GUIslice/config/*.h file and your GUIslice/src/GUIslice_config.h files so you can just copy them over the new download versions.

Then you need to open your app project in the Builder and change all text to use whatever Cario font you choose to use and re-generate your *.ini file.

Good Luck! Paul--

MRcode2102 commented 11 months ago

Hello dear Paul It's a shame that I was traveling these few days and didn't have time to continue the project But today and tomorrow, I will definitely do your test and I will announce the result right here dear And a special thank you dear for the time you spent on my project I will definitely make up for it, dear Paul

MRcode2102 commented 11 months ago

Hello dear Paul After a few busy days, I was finally able to continue the project today I followed your instructions and did all the steps correctly and the result was as follows: It displays the Persian font correctly from right to left in the screen, but again the words of the font are written separately. Where do you think the problem comes from, dear?

I have uploaded the output file from the latest version of your $ software here, dear

new_cooler.zip

Here is a picture of the screen:

image

MRcode2102 commented 11 months ago

Again, I don't really know how to compensate you for your precious efforts, dear Paul Thank you very much for your efforts

MRcode2102 commented 11 months ago

Hello, dear Mr. Paul Are you not here?

MRcode2102 commented 11 months ago

Hi dear paul It's done
Special thanks to you my dear