Hi,
I have a question. I'm currently working on Chinese Simplified Custom Font that store in the built-in Flash as ASTC (EVE4) with the format.
Font Conversion completed!
Generated Folder: FZShuSong_36_Extend
Format: COMPRESSED_RGBA_ASTC_10x5_KHR
Compressed: thorough
Layout Width: 64
Layout Height: 8
Pixel Width: 40
Pixel Height: 40
Number of characters in xfont file: 65408
Number of characters in user input file: 292
Success: 287
Fail: 5
Fail code point: 0x5f00, 0x8a00, 0x9000, 0x9700, 0x9600
There are non-graphic characters filtered out.
FZShuSong_36_ASTC.xfont and FZShuSong_36_ASTC.glyph are generated successfully.
----------------------------------------------------------------------
Flash Size for Custom Font
19.FZShuSong_30_ASTC.glyph : 3925440 : 1263360
20.FZShuSong_30_ASTC.xfont : 5188800 : 8832
21.FZShuSong_36_ASTC.glyph : 5197632 : 2021376
22.FZShuSong_36_ASTC.xfont : 7219008 : 8832
I use ASTC Speed Veryfast
The problem I got now is I can't display more than 7 characters (UTF-8) using Gpu_CoCmd_Text.
Font Setup
#define LANG_CN_XFONT_30_ASTC_ADDRESS 5188800
#define LANG_CN_XFONT_30_ASTC_SIZE 8832
#define LANG_CN_XFONT_36_ASTC_ADDRESS 7219008
#define LANG_CN_XFONT_36_ASTC_SIZE 8832
//Load font 30
Gpu_CoCmd_FlashRead(phost, RAM_G + 1000000, LANG_CN_XFONT_30_ASTC_ADDRESS, LANG_CN_XFONT_30_ASTC_SIZE);
Gpu_Hal_WaitCmdfifo_empty(phost);
//Load font 36
Gpu_CoCmd_FlashRead(phost, RAM_G + 1000000 + LANG_CN_XFONT_30_ASTC_SIZE, LANG_CN_XFONT_36_ASTC_ADDRESS, LANG_CN_XFONT_36_ASTC_SIZE);
Gpu_Hal_WaitCmdfifo_empty(phost);
Gpu_CoCmd_SetFont2(phost, FONT_S_HANDLE, RAM_G + 1000000, 0);
Gpu_CoCmd_SetFont2(phost, FONT_M_HANDLE, RAM_G + 1000000 + LANG_CN_XFONT_30_ASTC_SIZE, 0);
Gpu_CoCmd_SetBitmap(phost, RAM_G + 1000000, COMPRESSED_RGBA_ASTC_8x8_KHR, 32, 40);
Gpu_CoCmd_SetBitmap(phost, RAM_G + 1000000 + LANG_CN_XFONT_30_ASTC_SIZE, COMPRESSED_RGBA_ASTC_10x5_KHR, 40, 40);
Gpu_CoCmd_Text(phost, 30, 133/2, FONT_M_HANDLE, OPT_CENTERY, "设置流速");
Gpu_CoCmd_Text(phost, 230, 133/2, FONT_M_HANDLE, OPT_CENTERY, "= 10 ml/min");
Gpu_CoCmd_Text(phost, 30, 133/2 + 133, FONT_M_HANDLE, OPT_CENTERY, "实际流速");
Gpu_CoCmd_Text(phost, 230, 133/2 + 133, FONT_M_HANDLE, OPT_CENTERY, "= 10 ml/min");
Gpu_CoCmd_Text(phost, 30, 133/2 + 266, FONT_M_HANDLE, OPT_CENTERY, "输注量");
Gpu_CoCmd_Text(phost, 230, 133/2 + 266, FONT_M_HANDLE, OPT_CENTERY, "= 0 ml");
Gpu_CoCmd_Text(phost, 550, 133/2 + 133, FONT_M_HANDLE, OPT_CENTERY, "T = 33.8 °C");
// From now on, Text can't take any more.
//Gpu_CoCmd_Text(phost, 550, 133/2 + 266, FONT_M_HANDLE, OPT_CENTERY, "P = 130");
//Gpu_CoCmd_Text(phost, 512, 100, FONT_M_HANDLE, OPT_CENTER, "检查温度探测器窗口是否堵塞");
As I said, after the line T = 33.8 °C. the Cmd can't handle more input string.
The display is going crazy if I try to use display more text. I'm not sure what is the limit of the CMD_Text.
I want to use the ASTC and store in Flash because the table is big.
I'm not sure where I did wrong or how to solve this problem.
Also in some case, if the string of UTF-8 too long, the cmd is also not work and display go crazy again. Is it because UTF-8 take 3 bytes per char? and the Cmd can't handle it?
I'm using RVT70HSBNWC00-B - Riverdi (7" Display with 1024x600px resolution)