Open deividAlfa opened 3 years ago
Nice, UTF-8 support is great!
I also have a fork, https://github.com/0x3333/UGUI, with those features:
Nice! Will have a look, shouldn't be too hard to add the code. This library deserves more attention!
I've checking your code. The externalization actually complicates things. Instead of simply including ugui.h, you have to include:
Which is a poor implementation. it should be simpler. Giving some issues due that...
Sure, I had this in my backlog for a while. Thanks
I fixed it in a simple way: Adding the includes after the defines and typedefs ugui.h:455
This works perfectly, no more messsing with includes. I'm almost done at merging my code.
Finished! I have some simple demos using current uGUI version here: https://github.com/deividAlfa/ST7789-STM32-uGUI
Also check my ttf2ugui fork to generate fonts using the new structure. I ported the old fonts, adding a bit to disable UTF8 when these fonts are selected, as they use codepage 850 encoding.
It is missing the simulator files, like ugui_sim_x11.c
.
Yep, ugui_sim.c was left when uploading the files. Fixed
Me again, missing the X11 sim, ugui_sim_x11.c
. Super helpful to debug on Mac or Linux the output(I used it to print my screenshots, see README.md in my fork).
Yeah, I noticed that file too, I was going to update the comment but I was late
hey,dude,you still there??I tried your enhancement.A very good job. I've noticed an issue with your program when handling CJK characters whose encoding falls above 0x8000; they fail to display. The problem doesn't seem to lie with the font array itself, but rather with the positioning logic in _UG_GetCharData, specifically the line curr_offset & 0x8000.
OK,let my adjust my words:when the font array contains the characters over 0x8000,device will display nothing including any asciis or latin or CJK. when regain the font array without 0x8000+,everything goes fine.
Hope there will be a fix
Yes, it only works with Unicode below 0x8000. I just enabled issues in the repo.
I might extend the range to full Unicode (0-65535).
Dude,many many thanks
Given this project seems no longer alive, I'm providing the fork for anyone who might be searching new enhancements... https://github.com/deividAlfa/UGUI