Hi ,
I am trying to use french language in one of my project.
I am using array converted from GOTHIC.ttf font using BIN2C tool.
I am facing issue with Century gothic font. Final output does not give proper output for "century gothic" font but works for other fonts.
Also tried using normal and encoded strings.
Here is my main code and output.
Display All
I have converted ttf file to array using UTF2C.exe tool.
Any help regarding this would be helpful.
Thank You,
Amar
I am trying to use french language in one of my project.
I am using array converted from GOTHIC.ttf font using BIN2C tool.
I am facing issue with Century gothic font. Final output does not give proper output for "century gothic" font but works for other fonts.
Also tried using normal and encoded strings.
Here is my main code and output.
Source Code
- void MainTask(void) {
- GUI_Init();
- Data0.pData = &_acGOTHIC[0]; // Address
- Data0.NumBytes = sizeof(_acGOTHIC);
- Cs0.pTTF = &Data0; // Use address of GUI_TTF_DATA
- Cs0.PixelHeight = 12; // Pixel height
- Cs0.FaceIndex = 0; // Initialize to 0
- GUI_TTF_CreateFont(&Font0, &Cs0);
- //
- //
- Data1.pData = &_actimes[0]; // Address
- Data1.NumBytes = sizeof(_actimes);
- Cs1.pTTF = &Data1; // Use address of GUI_TTF_DATA
- Cs1.PixelHeight = 12; // Pixel height
- Cs1.FaceIndex = 0; // Initialize to 0
- GUI_TTF_CreateFont(&Font1, &Cs1);
- //
- WM_SetDesktopColor(GUI_WHITE);
- //
- // Create BUTTON widget.
- //
- hButton = BUTTON_CreateEx(10, 50, 500, 50, WM_HBKWIN, WM_CF_SHOW | WM_CF_HASTRANS, 0, GUI_ID_BUTTON0);
- hButton2 = BUTTON_CreateEx(10, 150, 500, 50, WM_HBKWIN, WM_CF_SHOW | WM_CF_HASTRANS, 1, GUI_ID_BUTTON0);
- BUTTON_SetFont(hButton, &Font0);
- GUI_UC_SetEncodeUTF8();
- BUTTON_SetText(hButton, "\xc3\x8ates vous s\xc3\xbbr, \xc3\x89tat avanc\xc3\xa9");
- //BUTTON_SetText(hButton, "Êtes vous sûr, État avancé");
- BUTTON_SetFont(hButton2, &Font1);
- BUTTON_SetText(hButton2, "MadeleinaSans -> \xc3\x8ates vous s\xc3\xbbr,\xc3\x89tat avanc\xc3\xa9"); //Êtes vous sûr, État avancé
- while (1) {
- GUI_Delay(100);
- }
- }
Any help regarding this would be helpful.
Thank You,
Amar