cancel
Showing results for 
Search instead for 
Did you mean: 

Binary Translations - number of text resources

Guit32010
Associate III

Similar to this:

https://support.touchgfx.com/4.20/docs/development/ui-development/touchgfx-engine-features/using-binary-fonts#generating-binary-fonts-in-another-project

....I have a separate project that produces my binary translations and for the most part, don't use the translations in the main project. I noticed however that the main project is required to have greater or equal the number of text translations than the number of text translation in the binary translation.

It seems to be limited by code in setLanguage() in Texts.cpp where it uses the internal static table size (getInstanceSize()) rather than pulling a size from the binary file.

 if (currentLanguageTypedText)
    {
        currentLanguage = id;
        touchgfx::TypedText::registerTypedTextDatabase(currentLanguageTypedText,
                                                       TypedTextDatabase::getFonts(), TypedTextDatabase::getInstanceSize());
    }

Is this an oversight? It seems kind of limiting to always have to increase the size of an unused table (or setting it to beyond what one might possibly use in the future), if the binary translation file also has to grow.

2 REPLIES 2
Martin KJELDSEN
Chief III

Hi,

You're correct. I think we assumed, at the time, that there would be an equal amount of texts. Can you describe your use case for me?

/Martin

Guit32010
Associate III

We have our application split into two parts. One contains an RTOS, hardware drivers, TouchGFX core, a set number of TGFX screens, etc. You can think of it like an OS. The other is the "Application" and has any number or translations, texts, fonts, screen content, business logic, etc. The "Application" can be loaded independently, and will have a number of variations (i.e Number of text resources). This split architecture is made to support different customers and projects.