KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Mini

Extra mini-font provided for Dreamcast and NAOMI. More...

Files

file  minifont.h
 Simple font drawing functions.
 

Functions

int minifont_draw (uint16 *buffer, uint32 bufwidth, uint32 c)
 Draw a single character to a buffer.
 
int minifont_draw_str (uint16 *b, uint32 bufwidth, const char *str)
 Draw a full string to any sort of buffer.
 

Detailed Description

Extra mini-font provided for Dreamcast and NAOMI.

Function Documentation

◆ minifont_draw()

int minifont_draw ( uint16 buffer,
uint32  bufwidth,
uint32  c 
)

Draw a single character to a buffer.

This function draws a single character to the given buffer.

Parameters
bufferThe buffer to draw to (at least 8 x 16 pixels)
bufwidthThe width of the buffer in pixels
cThe character to draw
Returns
Amount of width covered in 16-bit increments.

◆ minifont_draw_str()

int minifont_draw_str ( uint16 b,
uint32  bufwidth,
const char *  str 
)

Draw a full string to any sort of buffer.

This function draws a NUL-terminated string to the given buffer. Only standard ASCII encoded strings are supported (no extended ASCII, ANSI, Unicode, JIS, EUC, etc).

Parameters
bThe buffer to draw to.
bufwidthThe width of the buffer in pixels.
strThe string to draw.
Returns
Amount of width covered in 16-bit increments.