General Category > General Discussion

FT813 Custom Font Text

<< < (2/3) > >>

FTDI Community:
Hello,

Sorry, must have pasted the link back in without the password after a couple minutes of fighting with the hyperlink.
This one should work now:
BRT_AN_042.zip

Best Regards,
FTDI Community

jberkhout:
Hi, thank you very much! I tested the utility used in the upcoming application note BRT_AN_042.zip, and it has exactly the same issue.
While I may be missing something, the proposed fix (modifying the raw file) works well.

FTDI Community:
Hello,

I will pass this on to the development team so they can look into it.

Best Regards,
FTDI Community

jberkhout:
It seems EVE Asset Builder Version 1.6.0 still has this little glitch where, when converting fonts, the font width table has the glyph widths shifted to much too the start of the table.
This results in all lowercase characters all being printed over each other, so the cursor doesn't move on when these characters are printed, according to the wrong table content.
The raw file can easily be patched by editing using an HEX-editor, shifting the values in the glyph width table to the right positions solves the issue. I created and attached a python script to do this, it is easy to use.
Note my characters.txt contains these characters (including a space at the start):
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
The first 128 bytes in the raw file are for the width of the individual glyphs.
The displays assumes the index of this table being equal the ASCII character value, but Asset builder assumes the index as in the characters.txt file (that defines the characters to be captured).
When we shift those values to the right place, the display prints the strings as expected.
This can easily be done with a python script, I created and attached here.
These are my observations, I hope it will help others who want to use custom fonts.
It is possible I have a flaw somewhere in my conversion process, but I can't see how or where.
Otherwise the EVE Asset Builder is a great program!
For the font conversion, I created a windows program, where I select a font via the font dialog, then it generates the .raw and .h files, see attached example of a .h file.
Some part of the .h header file generated by my program looks like:

--- Code: ---  /* Character 56 0x38 '8' */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */
  0x00, 0x00, 0x05, 0x9B, 0xA7, 0x20, 0x00, 0x00,  /*      :e63+.      */
  0x00, 0x01, 0xCF, 0xFE, 0xFF, 0xF6, 0x00, 0x00,  /*    `G##$###r     */
  0x00, 0x0D, 0xF8, 0x00, 0x04, 0xEF, 0x40, 0x00,  /*    8#o   ,$#,    */
  0x00, 0x4F, 0xC0, 0x00, 0x00, 0x4F, 0xB0, 0x00,  /*   ,#G     ,#6    */
  0x00, 0x6F, 0x90, 0x00, 0x00, 0x0F, 0xD0, 0x00,  /*   r#e      #8    */
  0x00, 0x4F, 0xC0, 0x00, 0x00, 0x1F, 0xB0, 0x00,  /*   ,#G     `#6    */
  0x00, 0x0D, 0xF8, 0x00, 0x00, 0x8F, 0x50, 0x00,  /*    8#o    o#:    */
  0x00, 0x02, 0xDF, 0xD6, 0x05, 0xF9, 0x00, 0x00,  /*    .8#8r :#e     */
  0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xA0, 0x00, 0x00,  /*     -#####3      */
  0x00, 0x08, 0xFA, 0x38, 0xDF, 0xF9, 0x00, 0x00,  /*    o#3-o8##e     */
  0x00, 0x9F, 0x70, 0x00, 0x03, 0xDF, 0xB0, 0x00,  /*   e#+    -8#6    */
  0x02, 0xFB, 0x00, 0x00, 0x00, 0x0D, 0xF4, 0x00,  /*  .#6       8#,   */
  0x06, 0xF8, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00,  /*  r#o       o#o   */
  0x05, 0xF9, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00,  /*  :#e       o#o   */
  0x01, 0xFF, 0x30, 0x00, 0x00, 0x1E, 0xF4, 0x00,  /*  `##-     `$#,   */
  0x00, 0x7F, 0xF8, 0x31, 0x26, 0xDF, 0xB0, 0x00,  /*   +##o-`.r8#6    */
  0x00, 0x05, 0xEF, 0xFF, 0xFF, 0xF8, 0x00, 0x00,  /*    :$######o     */
  0x00, 0x00, 0x03, 0x67, 0x64, 0x00, 0x00, 0x00,  /*      -r+r,       */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*                  */

--- End code ---
It gives me some extra flexibility to adjust character and line spacing. It also can load raw files to show the characters in it, as they would appear on the display, but just on the PC.
I'm using the display connected to a QUADSPI peripheral on a 480MHz STM32H7. I do like the EVE displays much!

FTDI Community:
Hello,

I had the dev team look at this and unfortunately they cannot reproduce what you are seeing:
The only thing they did note was to ensure the first character is at ASCII 32, not 31.


Best Regards,
FTDI Community

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version