Skip to content

Commit 34ae30b

Browse files
MarkOatesSiegeLord
authored andcommitted
Add "al_is_font_addon_initialized"
1 parent e42830b commit 34ae30b

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

addons/font/allegro5/allegro_font.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ ALLEGRO_FONT_FUNC(void, al_get_text_dimensions, (const ALLEGRO_FONT *f,
102102
char const *text,
103103
int *bbx, int *bby, int *bbw, int *bbh));
104104
ALLEGRO_FONT_FUNC(bool, al_init_font_addon, (void));
105+
ALLEGRO_FONT_FUNC(bool, al_is_font_addon_initialized, (void));
105106
ALLEGRO_FONT_FUNC(void, al_shutdown_font_addon, (void));
106107
ALLEGRO_FONT_FUNC(uint32_t, al_get_allegro_font_version, (void));
107108
ALLEGRO_FONT_FUNC(int, al_get_font_ranges, (ALLEGRO_FONT *font,

addons/font/font.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,16 @@ bool al_init_font_addon(void)
387387
}
388388

389389

390+
391+
/* Function: al_is_font_addon_initialized
392+
*/
393+
bool al_is_font_addon_initialized(void)
394+
{
395+
return font_inited;
396+
}
397+
398+
399+
390400
/* Function: al_shutdown_font_addon
391401
*/
392402
void al_shutdown_font_addon(void)

docs/src/refman/font.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ checking the return value if your code needs to be compatible with Allegro
7171

7272
See also: [al_init_image_addon], [al_init_ttf_addon], [al_shutdown_font_addon]
7373

74+
### API: al_is_font_addon_initialized
75+
76+
Returns true if the font addon has been initialized, otherwise returns false.
77+
78+
See also: [al_init_image_addon], [al_shutdown_font_addon]
79+
7480
### API: al_shutdown_font_addon
7581

7682
Shut down the font addon. This is done automatically at program exit,

0 commit comments

Comments
 (0)