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: Adding German Letters in BT818  (Read 7663 times)

HEYYA

  • Newbie
  • *
  • Posts: 7
    • View Profile
Adding German Letters in BT818
« on: January 11, 2024, 09:32:10 AM »

Is there a way to add German letters using CMD_TEXT, other than by adding a flash file or adding font to RAM memory location?
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: Adding German Letters in BT818
« Reply #1 on: January 11, 2024, 05:19:38 PM »

As in using one command to print out "tränenüberströmt" for example? No.

There are two fixed width fonts that have extra characters beyond "Basic Latin",
these are 17 and 19 and the same size regular sets are the fonts 16 and 18.
But you can not use fonts 17 and 19 directly, so this:
EVE_cmd_text_burst(10, 390, 18, 0, "tr nen berstr mt");
EVE_cmd_text_burst(10, 390, 19, 0, "  ä    ü       ö");
Does not work, the fonts only use values from 0...127 and the symbols need to translated from the table
to the correct numbers - see "Table 4-10 ROM Font Extended ASCII Characters" in the datasheet.

I just tried to print out a couple of chars and now I wonder how the first symbol with "Decimal" 128 is supposed to be useable,
as this one translates to zero printing that with CMD_TEXT should fail.

This works:
const char text[] = {127, 127, 4, 127, 127, 127, 1, 127, 127, 127, 127, 127, 127, 20, 0};
EVE_cmd_text_burst(10, 390, 18, 0, "tr nen berstr mt");
EVE_cmd_text_burst(10, 390, 19, 0, text);

But this is not only cumbersome to use, this is rather difficult to read on the 5" with 800x480 I am using.
And 18/19 already is the larger font pair.
I normally stick to fonts 26 to 31.

My recommendation is to use converted UTF-8 fonts with BT81x.
I am using this charmap to only convert a subset from "Basic Latin" and "Latin-1 Supplement":
Code: [Select]
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~©«°±²³´µ¹»¼½¾ÄÖ×Üßäëö÷øü
What I also did back when I "only" had FT813 was to cheat, printed a "o" with a smaller font to a fixed position for "°C".
And I printed an "i" over an "u" to get a "µ", a few pixels low of course.

The third option would be to use images for labels.
I used an image for the text "Prüfplatz" in one project.


New points for the wishlist for the next generation of EVE chips  8) :
- remove fonts 16 to 25 and put in UTF-8 versions of fonts 26 to 34 with "Latin-1 Supplement"
- vector fonts, perhaps with a command to convert a set of glyphs before using it, so like a font-cache
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 746
    • View Profile
Re: Adding German Letters in BT818
« Reply #2 on: January 12, 2024, 02:21:23 PM »

Hi,

Yes, adding the converted fonts as Rudolph mentioned would be the best option especially on BT81x as it supports Unicode. You can convert them and use from RAM_G for example. With BT81x you can store on Flash and copy to RAM_G to use them to save space on your MCU too.

The built-in fonts 17/19 can be used but these have a fixed size and so may be small depending on your application.

Thanks for the wishlist items too Rudolph, we'll pass those back to the R&D team,

Best Regards, BRT Community
Logged