Post by steved on Feb 4, 2022 10:29:46 GMT -8
More font questions.
I would like to use a custom font, but I also want 2 different sizes of said font. I've created a header and gd3 file with the asset tool, but they are both being defined as the same shape_t object and bitmap.
Would it be safe for me to just rename them in the header file so I can use them separately?
IE
This will have to be loaded from a microSD card and I have run into the 8.3 format limit on names before. Do I need to worry about that anywhere in here as well?
I would like to use a custom font, but I also want 2 different sizes of said font. I've created a header and gd3 file with the asset tool, but they are both being defined as the same shape_t object and bitmap.
#define DCILOGO_HANDLE 0
#define DCILOGO_WIDTH 300
#define DCILOGO_HEIGHT 93
#define DCILOGO_CELLS 1
#define ARIALNB_HANDLE 1
#define ARIALNB_WIDTH 81
#define ARIALNB_HEIGHT 94
#define ARIALNB_CELLS 96
#define ARIALNB_HANDLE 2
#define ARIALNB_WIDTH 61
#define ARIALNB_HEIGHT 70
#define ARIALNB_CELLS 96
#define ASSETS_END 634400UL
#define LOAD_ASSETS() (GD.safeload("age-cell.gd3"), GD.loadptr = ASSETS_END)
static const shape_t DCILOGO_SHAPE = {0, 300, 93, 0};
static const shape_t ARIALNB_SHAPE = {1, 81, 94, 0};
static const shape_t ARIALNB_SHAPE = {2, 61, 70, 0};
struct {
Bitmap dcilogo;
Bitmap arialnb;
Bitmap arialnb;
} bitmaps = {
/* dcilogo */ {{300, 93}, {150, 46}, 0x0UL, 0, 0},
/* arialnb */ {{ 81, 94}, { 40, 47}, 0xd9f8UL, 2, 1},
/* arialnb */ {{ 61, 70}, { 30, 35}, 0x67fccUL, 2, 2}
};
Would it be safe for me to just rename them in the header file so I can use them separately?
IE
#define DCILOGO_HANDLE 0
#define DCILOGO_WIDTH 300
#define DCILOGO_HEIGHT 93
#define DCILOGO_CELLS 1
#define ARIALNB96_HANDLE 1
#define ARIALNB96_WIDTH 81
#define ARIALNB96_HEIGHT 94
#define ARIALNB96_CELLS 96
#define ARIALNB72_HANDLE 2
#define ARIALNB72_WIDTH 61
#define ARIALNB72_HEIGHT 70
#define ARIALNB72_CELLS 96
#define ASSETS_END 634400UL
#define LOAD_ASSETS() (GD.safeload("age-cell.gd3"), GD.loadptr = ASSETS_END)
static const shape_t DCILOGO_SHAPE = {0, 300, 93, 0};
static const shape_t ARIALNB96_SHAPE = {1, 81, 94, 0};
static const shape_t ARIALNB72_SHAPE = {2, 61, 70, 0};
struct {
Bitmap dcilogo;
Bitmap arialnb96;
Bitmap arialnb72;
} bitmaps = {
/* dcilogo */ {{300, 93}, {150, 46}, 0x0UL, 0, 0},
/* arialnb96 */ {{ 81, 94}, { 40, 47}, 0xd9f8UL, 2, 1},
/* arialnb72 */ {{ 61, 70}, { 30, 35}, 0x67fccUL, 2, 2}
};
This will have to be loaded from a microSD card and I have run into the 8.3 format limit on names before. Do I need to worry about that anywhere in here as well?