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: accessing custom font Glyphs in Flash  (Read 10095 times)

iv_pb

  • Newbie
  • *
  • Posts: 6
    • View Profile
accessing custom font Glyphs in Flash
« on: January 13, 2021, 07:54:01 PM »

Currently I am setting the “start_of_Graphic_data”  (p + 32),  to the location of where the glyph file is in RAM.

        local Xfont = assetLoader.ImageInfo[xfont].index;
        local Glyph = assetLoader.ImageInfo[glyph].index;
        MCU_WriteMem32(Xfont + 32, Glyph);



For a glyph stored in Flash ([0x02F000 -> 0x057000]) for instance,
How would I compute the flash address to store in the “start_of_Graphic_data”  ?
Is there anything else I need to modify in the xfont (Font Metrics Block)?



Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: accessing custom font Glyphs in Flash
« Reply #1 on: January 20, 2021, 02:38:54 AM »

If the glyph is in ASTC and stored in flash, the address shall offset from 0x800000.
See the picture from programming guide
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: accessing custom font Glyphs in Flash
« Reply #2 on: January 26, 2021, 08:26:30 PM »

Is there anything else I need to modify in the xfont (Font Metrics Block)?

You do not really need to modify anything in the xfont data.
When you store SomeFont_xx.glyph and SomeFont_xx.xfont in a flash-file the .xfont data
is adjusted automatically by the EVE Asset Builder already.
You just need the offset and the length for the .xfont file, copy it to somewhere in RAM_G
with CMD_FLASHREAD and use CMD_SETFONT2  to assign the .xfont to a bitmap handle.
Logged