cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestion for Typography/TypographyFontIndex, and this use of struct construct in general

ferro
Senior III

Hi GFX team,

GFX auto generates Typography/TypographyFontIndex structs in "\generated\fonts\include\fonts\ApplicationFontProvider.hpp"

 

struct Typography
{
    static const touchgfx::FontId DEFAULT = 0;
};

 

Could you consider adding a tag that would alias type of struct members ie:

 

struct Typography
{
    using type_t = touchgfx::FontId;
    static const touchgfx::FontId DEFAULT = 0;
};

 

This would allow to write eg funtion with  Typography as a parameter:

 

void functUsingTypography ( Typography::type_t tpg );

 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @ferro ,

We will consider it for future work, but could you explain what functionality you would like to have that you cannot use touchgfx::FontId or Typography directly?

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

3 REPLIES 3

Hello @ferro ,

We will consider it for future work, but could you explain what functionality you would like to have that you cannot use touchgfx::FontId or Typography directly?

Mohammad MORADI
ST Software Developer | TouchGFX

Hi Mohammad,

"could you explain what functionality you would like to have that you cannot use touchgfx::FontId or Typography directly"

Ah, I see. I must have got something wrong while trying to use Typography as a type. Or there was some scenario where I thought Typography::type_t to be useful. Thanks and sorry for the spam.

Ferro

 

 

No worries at all :grinning_face:

Good luck

Mohammad MORADI
ST Software Developer | TouchGFX