cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot import package: Typography with id: "Default" already exists

ferro
Senior III

Hi,

Do you know what I am doing wrong ?

ferro_0-1717592418235.png

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ferro
Senior III

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;
};

 

 

 

View solution in original post

4 REPLIES 4
ferro
Senior III

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;
};

 

 

 

GaetanGodart
ST Employee

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

@GaetanGodart  Thanks for confirming my findings.

GaetanGodart
ST Employee

My pleasure Ferro

Gaetan Godart
Software engineer at ST (TouchGFX)