Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to display Thai on the interface #6209

Open
jeremyvirtue opened this issue May 9, 2024 · 4 comments
Open

How to display Thai on the interface #6209

jeremyvirtue opened this issue May 9, 2024 · 4 comments

Comments

@jeremyvirtue
Copy link

LVGL version

9.0.0

What happened?

when Thai is displayed with consonants superimposed on vowels and tones, the tone cannot be fully displayed and will be mixed with vowels,They show left and right. How can I display it correctly?

How to reproduce?

No response

@trivij
Copy link

trivij commented May 10, 2024

use BlynkGO is the best!

@liamHowatt
Copy link
Collaborator

Thanks for the tip @trivij!

@jeremyvirtue, which font were you seeing the issues with?

cc @BlynkGO (they participate here sometimes)

Regarding BlynkGO, I tried this:
https://github.com/BlynkGO/BlynkGO_font/blob/master/Eng-Thai/ThaiSansNeue/ThaiSansNeue_Bold_25.c
and it looks correct at first sight but I am not familiar with the language.

image

I simply downloaded the C file, added it to my build files, and made this change

diff --git a/../../Downloads/ThaiSansNeue_Bold_25.c b/../lvgl_workspace/ThaiSansNeue_Bold_25.c
index 49716e5b3..f3034a328 100644
--- a/../../Downloads/ThaiSansNeue_Bold_25.c
+++ b/../lvgl_workspace/ThaiSansNeue_Bold_25.c
@@ -4,7 +4,11 @@
  * Opts: --bpp 4 --size 25 --no-compress --font ThaiSansNeue-Bold_modified.ttf --range 32-126,161-255,3584-3675,8192-8805,63232-63632 --format lvgl -o ThaiSansNeue_Bold_25.c
  ******************************************************************************/
 
-#include "blynkgo_lib.h"
+#ifdef LV_LVGL_H_INCLUDE_SIMPLE
+    #include "lvgl.h"
+#else
+    #include "lvgl/lvgl.h"
+#endif
 
 #ifndef THAISANSNEUE_BOLD_25
 #define THAISANSNEUE_BOLD_25 1

And then used it like so:

static void thai_font_blynkgo()
{
    LV_FONT_DECLARE(ThaiSansNeue_Bold_25);
    lv_obj_t * label = lv_label_create(lv_screen_active());
    lv_obj_set_style_text_font(label, &ThaiSansNeue_Bold_25, 0);
    lv_label_set_text(label, "วิธีการใช้งาน");
}

I also tried arluck_25.c but had a less satisfying result.

@jeremyvirtue
Copy link
Author

blynkgo_lib

I try to understand,But do you have to use BlynkGO OS for this solution?Can we try to isolate it?

@liamHowatt
Copy link
Collaborator

I didn't use BlynkGO OS. Please read my comment again 🙂

I simply downloaded the C file, added it to my build files, and made this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants