DGen/SDL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Functions | Variables
font.cpp File Reference
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "font.h"

Classes

struct  dgen_font

Macros

#define FONT_VISIBLE   24
 DGen's font renderer.

Functions

static struct dgen_fontfont_select (unsigned int max_width, unsigned int max_height, enum font_type type)
static void font_mark (uint8_t *buf, unsigned int max_width, unsigned int max_height, unsigned int bytes_per_pixel, unsigned int pitch, unsigned int mark_x, unsigned int font_w, unsigned int font_h)
size_t font_text_width (const char *msg, size_t len, unsigned int max_width, unsigned int max_height, enum font_type type)
size_t font_text_max_len (unsigned int max_width, unsigned int max_height, enum font_type type)
size_t font_text (uint8_t *buf, unsigned int max_width, unsigned int max_height, unsigned int bytes_per_pixel, unsigned int pitch, const char *msg, size_t len, unsigned int mark, enum font_type type)

Variables

const shortdgen_font_8x13 [0x80]
const shortdgen_font_16x26 [0x80]
const shortdgen_font_7x5 [0x80]
struct dgen_font dgen_font []

Macro Definition Documentation

#define FONT_VISIBLE   24

DGen's font renderer.


Function Documentation

static void font_mark ( uint8_t *  buf,
unsigned int  max_width,
unsigned int  max_height,
unsigned int  bytes_per_pixel,
unsigned int  pitch,
unsigned int  mark_x,
unsigned int  font_w,
unsigned int  font_h 
)
static
static struct dgen_font* font_select ( unsigned int  max_width,
unsigned int  max_height,
enum font_type  type 
)
staticread
size_t font_text ( uint8_t *  buf,
unsigned int  max_width,
unsigned int  max_height,
unsigned int  bytes_per_pixel,
unsigned int  pitch,
const char *  msg,
size_t  len,
unsigned int  mark,
enum font_type  type 
)
size_t font_text_max_len ( unsigned int  max_width,
unsigned int  max_height,
enum font_type  type 
)
size_t font_text_width ( const char *  msg,
size_t  len,
unsigned int  max_width,
unsigned int  max_height,
enum font_type  type 
)

Variable Documentation

struct dgen_font dgen_font[]
const short* dgen_font_16x26[0x80]
const short* dgen_font_7x5[0x80]
const short* dgen_font_8x13[0x80]