mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-29 13:03:36 +01:00
topti: return previously-configured font in dfont()
This commit is contained in:
parent
ae4f7af172
commit
d7c33b12a5
2 changed files with 7 additions and 3 deletions
|
@ -154,8 +154,9 @@ typedef struct
|
|||
On fx9860g, the default font is a 5x7 font very close to the system's.
|
||||
On fxcg50, the default font is an original 8x9 font.
|
||||
|
||||
@font Font to use for subsequent text rendering calls */
|
||||
void dfont(font_t const * font);
|
||||
@font Font to use for subsequent text rendering calls
|
||||
Returns the previously configured font. */
|
||||
font_t const *dfont(font_t const * font);
|
||||
|
||||
/* dsize() - get the width and height of rendered text
|
||||
This function computes the size that the given string would take up if
|
||||
|
|
|
@ -8,9 +8,12 @@
|
|||
|
||||
/* dfont(): Set the default font for text rendering */
|
||||
GSECTION(".pretext")
|
||||
void dfont(font_t const * font)
|
||||
font_t const *dfont(font_t const * font)
|
||||
{
|
||||
font_t const *old_font = topti_font;
|
||||
|
||||
topti_font = font ? font : gint_default_font;
|
||||
return old_font;
|
||||
}
|
||||
|
||||
/* charset_size(): Number of elements in each character set */
|
||||
|
|
Loading…
Reference in a new issue