diff --git a/include/gint/display.h b/include/gint/display.h index e955b97..8c224ca 100644 --- a/include/gint/display.h +++ b/include/gint/display.h @@ -229,9 +229,6 @@ typedef struct dtext_opt(), dtext() and the related functions. If the specified font is NULL, gint's default font is used instead. - On fx-9860G, the default font is a 5x7 font very close to the system's. - On fx-CG 50, the default font is an original, proportional 8x9 font. - This function returns the previously configured font. Normally you want to restore it after you're done so as to not affect ambiant calls to text rendering functions. It would look like this: @@ -244,6 +241,12 @@ typedef struct Returns the previously configured font. */ font_t const *dfont(font_t const *font); +/* dfont_default(): Get gint's default font + + On fx-9860G, the default font is a 5x7 font very close to the system's. + On fx-CG 50, the default font is an original, proportional 8x9 font. */ +font_t const *dfont_default(void); + /* dsize(): Get the width and height of rendered text This function computes the size that the given string would take up if diff --git a/src/render/topti.c b/src/render/topti.c index 0676cbe..0fe2868 100644 --- a/src/render/topti.c +++ b/src/render/topti.c @@ -12,6 +12,12 @@ font_t const *dfont(font_t const * font) return old_font; } +/* dfont_default(): Get gint's default font */ +font_t const *dfont_default(void) +{ + return gint_default_font; +} + /* topti_glyph_index(): Obtain the glyph index of a Unicode code point */ int topti_glyph_index(font_t const *f, uint32_t code_point) {