BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Custom Font (right to left f.e. arabic) on BT815  (Read 8711 times)

nico

  • Newbie
  • *
  • Posts: 6
    • View Profile
Custom Font (right to left f.e. arabic) on BT815
« on: June 04, 2021, 05:22:45 PM »

Hi, is it possible to show arabic text on the BT815? I converted the font "Noto Sans Arabic" with the EVE Asset Builder to ASTC. I then use it with CMD_SETFONT2 and CMD_TEXT. Everything works fine for any unicode letter I tried, I have just problems with fonts which are written right to left.

This example shows how I try to display the persian text for "Hello":
Code: [Select]
Gpu_CoCmd_SetFont2(phost, customFontId, fontRamAddress, 0);
Gpu_CoCmd_Text(phost, x, y, customFontId, alignment, "سلام");

The C file is saved with UTF-8 encoding.
It results as the reversed text on the display.
Is the only way to invert the text before sending it out with CMD_TEXT? I think the result would be wrong, because f.e. in persian the letters look different if they are connected from the right or left side.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 746
    • View Profile
Re: Custom Font (right to left f.e. arabic) on BT815
« Reply #1 on: June 07, 2021, 05:57:01 PM »

Hello,

One alternative might be to make your own text function so that you can customise it.

We have an example in this application note draft below which shows how to use the widths of the characters from the metric block. In this case it is a standard ANSI font and the font data is in RAM_G (see example 2)

 BRT_AN_042.pdf

This would allow you to make a more flexible text command,

Beat Regards, BRT Community
Logged