maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
RetroFont API

Files

file  retrofnt.h
 

Data Structures

struct  RETROFONT
 

Macros

#define RETROFONT_PRESENT   1
 
#define RETROFONT_LINE_SZ   80
 
#define RETROFONT_TRACE_LVL   0
 
#define RETROFONT_FLAG_OUTLINE   0x04
 Flag for retroflat_string() and retroflat_string_sz() to print text as outline-only.
 
#define retrofont_glyph_at(p_font, idx)
 Get a pointer to the glyph with the given index in the given font.
 

Functions

MERROR_RETVAL retrofont_load (const char *font_name, MAUG_MHANDLE *p_font_h, uint8_t glyph_h, uint16_t first_glyph, uint16_t glyphs_count)
 
void retrofont_blit_glyph (struct RETROFLAT_BITMAP *target, RETROFLAT_COLOR color, char c, struct RETROFONT *font, size_t x, size_t y, uint8_t flags)
 
void retrofont_string (struct RETROFLAT_BITMAP *target, RETROFLAT_COLOR color, const char *str, size_t str_sz, MAUG_MHANDLE font_h, size_t x, size_t y, size_t max_w, size_t max_h, uint8_t flags)
 
MERROR_RETVAL retrofont_string_sz (struct RETROFLAT_BITMAP *target, const char *str, size_t str_sz, MAUG_MHANDLE font_h, size_t max_w, size_t max_h, size_t *out_w_p, size_t *out_h_p, uint8_t flags)
 

Variables

uint16_t RETROFONT::sz
 
uint16_t RETROFONT::first_glyph
 
uint16_t RETROFONT::glyphs_count
 
uint8_t RETROFONT::glyph_w
 
uint8_t RETROFONT::glyph_h
 
uint8_t RETROFONT::glyph_sz
 

Detailed Description

Macro Definition Documentation

◆ RETROFONT_FLAG_OUTLINE

#define RETROFONT_FLAG_OUTLINE   0x04

Flag for retroflat_string() and retroflat_string_sz() to print text as outline-only.

Todo
This has not yet been implemented and is present for backward compatibility.

◆ retrofont_glyph_at

#define retrofont_glyph_at ( p_font,
idx )
Value:
&(((uint8_t*)(p_font))[(p_font)->sz + \
((p_font)->glyph_sz * (idx - (p_font)->first_glyph))])

Get a pointer to the glyph with the given index in the given font.