2024-06-05 06:00 AM
2024-06-05 07:47 AM - edited 2024-06-07 10:59 AM
So before export, changing Typography name used by the Custom container from 'Deafult' to let say 'DeafultExp' resolved this issue.
Hm, so there must be as many different Typography names as number imported Custom containers ?
Gfx understands that the 'DefaultExp' and 'Default' are the same Fonts and asigns them the same Id:
static const touchgfx::FontId DEFAULT = 0; // verdana_20_4bpp
static const touchgfx::FontId DEFAULTEXP = 0; // verdana_20_4bpp
struct Typography
{
static const touchgfx::FontId DEFAULT = 0;
static const touchgfx::FontId LARGE = 1;
static const touchgfx::FontId SMALL = 2;
static const touchgfx::FontId DEFAULT1 = 3;
static const touchgfx::FontId DEFAULTEXP = 4;
};
struct TypographyFontIndex
{
static const touchgfx::FontId DEFAULT = 0; // verdana_20_4bpp
static const touchgfx::FontId LARGE = 1; // verdana_40_4bpp
static const touchgfx::FontId SMALL = 2; // verdana_10_4bpp
static const touchgfx::FontId DEFAULT1 = 0; // verdana_20_4bpp
static const touchgfx::FontId DEFAULTEXP = 0; // verdana_20_4bpp
static const uint16_t NUMBER_OF_FONTS = 3;
};
2024-06-05 07:47 AM - edited 2024-06-07 10:59 AM
So before export, changing Typography name used by the Custom container from 'Deafult' to let say 'DeafultExp' resolved this issue.
Hm, so there must be as many different Typography names as number imported Custom containers ?
Gfx understands that the 'DefaultExp' and 'Default' are the same Fonts and asigns them the same Id:
static const touchgfx::FontId DEFAULT = 0; // verdana_20_4bpp
static const touchgfx::FontId DEFAULTEXP = 0; // verdana_20_4bpp
struct Typography
{
static const touchgfx::FontId DEFAULT = 0;
static const touchgfx::FontId LARGE = 1;
static const touchgfx::FontId SMALL = 2;
static const touchgfx::FontId DEFAULT1 = 3;
static const touchgfx::FontId DEFAULTEXP = 4;
};
struct TypographyFontIndex
{
static const touchgfx::FontId DEFAULT = 0; // verdana_20_4bpp
static const touchgfx::FontId LARGE = 1; // verdana_40_4bpp
static const touchgfx::FontId SMALL = 2; // verdana_10_4bpp
static const touchgfx::FontId DEFAULT1 = 0; // verdana_20_4bpp
static const touchgfx::FontId DEFAULTEXP = 0; // verdana_20_4bpp
static const uint16_t NUMBER_OF_FONTS = 3;
};
2024-06-06 05:38 AM
Hello @ferro ,
I previously had this error message when importing custom containers (tpkg files).
Basically, when exporting a custom container using one of the default fonts (default, large and small), when importing it to a project already having the same font names, there will be this error message.
A good practice is then to change the name of the typographies ( ~= font names) to not have this erroe message.
This seems to be what you have done to solve the issue yourself (c.f. your previous message).
I invite you to select either my comment or you comment as "best answer" to make it easier for other users to find the right answer to the problem.
Regards,
2024-06-06 02:16 PM
@GaetanGodart Thanks for confirming my findings.
2024-06-07 12:44 AM
My pleasure Ferro :smiling_face_with_smiling_eyes: