Jo Engine  9
Jo Sega Saturn Engine
Data Structures | Macros | Functions
font.h File Reference

Jo Engine Simple ASCII Font & print support. More...

Go to the source code of this file.

Data Structures

struct  jo_font
 

Macros

#define jo_font_printf(F, X, Y, S, ...)
 Print arguments using a specific font (using top-left screen coordinates) More...
 
#define jo_font_printf_centered(F, X, Y, S, ...)
 Print arguments using a specific font (using screen center coordinates) More...
 

Functions

void jo_font_print (const jo_font *const font, int x, int y, float scale, char *str)
 Print a string using a specific font (using top-left screen coordinates) More...
 
void jo_font_print_centered (const jo_font *const font, int x, int y, float scale, char *str)
 Print a string using a specific font (using screen center coordinates) More...
 

Detailed Description

Jo Engine Simple ASCII Font & print support.

Author
Johannes Fetz
Bug:
Some glitch when changing scale in jo_font_printf_centered()

Data Structure Documentation

struct jo_font
Data Fields
char end_ascii
char * lookup_table
char spacing
char start_ascii
int z_index

Macro Definition Documentation

#define jo_font_printf (   F,
  X,
  Y,
  S,
  ... 
)

Print arguments using a specific font (using top-left screen coordinates)

Parameters
FThe font (returned by jo_font_load())
XHorizontal location from the left border of the screen
YVertical location from the top border of the screen
SFont scale
#define jo_font_printf_centered (   F,
  X,
  Y,
  S,
  ... 
)

Print arguments using a specific font (using screen center coordinates)

Parameters
FThe font (returned by jo_font_load())
XHorizontal location from the center of the screen
YVertical location from the center of the screen
SFont scale

Function Documentation

void jo_font_print ( const jo_font *const  font,
int  x,
int  y,
float  scale,
char *  str 
)

Print a string using a specific font (using top-left screen coordinates)

Parameters
fontThe font (returned by jo_font_load())
xHorizontal location from the left border of the screen
yVertical location from the top border of the screen
scaleFont scale
strThe string
void jo_font_print_centered ( const jo_font *const  font,
int  x,
int  y,
float  scale,
char *  str 
)

Print a string using a specific font (using screen center coordinates)

Parameters
fontThe font (returned by jo_font_load())
xHorizontal location from the center of the screen
yVertical location from the center of the screen
scaleFont scale
strThe string