Skip to main content
JGoew.1
Associate
September 15, 2022
Question

White boxes when using Fonts from External Flash

  • September 15, 2022
  • 2 replies
  • 2133 views

This is a project that I just updated from TouchGFX 4.5 to 4.19.

I've been working to update a project to use external flash fonts instead of internal which was the reason from upgrading from 4.5 to 4.19.

I'm stuck at a point where the font gets loaded. It appears that the glyphNode buffer is getting filled correctly as the width, height, left, kerning, etc from the datareader->copydata

But it appears that the font itself might not be getting loaded as getBitsPerPixel is returning unexpected values like 0x79, when I know that my font has a BPP of 2. Which makes me think that the actual bitmap of the glyph might not be getting loaded.

All the other image graphics and drawings we use are working fine.

Code from TouchGFX/UnmappedDataFont.cpp
 
const GlyphNode* UnmappedDataFont::getGlyph(Unicode::UnicodeChar unicode, const uint8_t*& pixelData, uint8_t& bitsPerPixel) const
{
 int index = lookupUnicode(unicode);
 
 if (index != -1)
 {
 // Read glyphNode from unmapped flash
 touchgfx::FlashDataReader* const flashReader = ApplicationFontProvider::getFlashReader();
 flashReader->copyData(glyphList + index, &glyphNodeBuffer, sizeof(GlyphNode));
 
 pixelData = getPixelData(const_cast<const GlyphNode*>(&glyphNodeBuffer));
 bitsPerPixel = getBitsPerPixel();
 return &glyphNodeBuffer;
 }
 return 0;
}

Example:

Internal --> External

0693W00000SvTbvQAF.png 

Any ideas

This topic has been closed for replies.

2 replies

MM..1
Chief III
September 15, 2022

Why you dont use memory mapped mode ?

JGoew.1
JGoew.1Author
Associate
September 15, 2022

The STM32F429I that we use for the display doesn't have QSPI, so I thought that wasn't possible.

Followed this for setting up the normal SPI:

https://support.touchgfx.com/4.20/docs/development/scenarios/fonts-in-unmapped-flash

MM..1
Chief III
September 16, 2022
Then you need debug or implement custom ApplicationFontProvider::getFlashReader
JGoew.1
JGoew.1Author
Associate
September 16, 2022

Thanks. I figured that since I was posting and stated that the data is getting pulled through my datareader that I wrote and that the problem is that it is like TouchGFX just throws away that data when exiting out of GetGlyph, it was understood that I have implemented getFlashReader and have been debugging it.

I wish TouchGFX still provided full source like when we were originally paying for it instead of this precompiled library.