#include <draw.h>
#include <tamtypes.h>
Go to the source code of this file.
|
| #define | SINGLE_BYTE 0 |
| |
|
#define | DOUBLE_BYTE 1 |
| |
| #define | LEFT_ALIGN 0 |
| |
|
#define | CENTER_ALIGN 1 |
| |
|
#define | RIGHT_ALIGN 2 |
| |
|
| int | fontx_load (const char *path, fontx_t *fontx, int type, int wmargin, int hmargin, int bold) |
| |
| void | fontx_unload (fontx_t *fontx) |
| |
| qword_t * | fontx_print_ascii (qword_t *q, int context, const unsigned char *str, int alignment, const vertex_t *v0, const color_t *c0, fontx_t *fontx) |
| |
| qword_t * | fontx_print_sjis (qword_t *q, int context, const unsigned char *str, int alignment, const vertex_t *v0, const color_t *c0, fontx_t *ascii, fontx_t *kanji) |
| |
| fsfont_t * | fontstudio_init (int height) |
| |
|
void | fontstudio_free (fsfont_t *font) |
| |
| int | fontstudio_parse_ini (fsfont_t *font, char *ini, float tex_width, float tex_height) |
| |
| char * | fontstudio_load_ini (const char *path) |
| |
| void | fontstudio_unload_ini (fsfont_t *font) |
| |
| qword_t * | fontstudio_print_string (qword_t *q, int context, const unsigned char *string, int alignment, const vertex_t *v0, const color_t *c0, fsfont_t *font) |
| |
Font library.
Definition in file font.h.
◆ fontx_t
Definition at line 16 of file font.h.
| Data Fields |
|
char |
name[9] |
Name of font
|
|
char |
bold |
Enable/Disable bold effect
|
|
char |
w_margin |
Margin width between characters
|
|
char |
h_margin |
Margin height between lines
|
|
int |
rowsize |
Size in byte of each row
|
|
int |
charsize |
Size in bytes of each character
|
|
int |
offset |
Offset from beginning of font to character
|
|
char * |
font |
The font data
|
◆ inidata_t
FontStudio type fonts
Definition at line 36 of file font.h.
| Data Fields |
|
char |
A |
|
|
char |
B |
|
|
char |
C |
|
|
char |
ox |
|
|
char |
oy |
|
|
char |
width |
|
|
char |
height |
|
|
unsigned short |
u1 |
|
|
unsigned short |
v1 |
|
|
unsigned short |
u2 |
|
|
unsigned short |
v2 |
|
◆ fsfont_t
Definition at line 50 of file font.h.
| Data Fields |
|
float |
scale |
|
|
char |
height |
|
|
unsigned short * |
charmap |
|
|
int |
totalchars |
|
|
int |
spacewidth |
|
|
inidata_t * |
chardata |
|
◆ SINGLE_BYTE
FontX2 types
Definition at line 13 of file font.h.
◆ LEFT_ALIGN
Alignments
Definition at line 60 of file font.h.
◆ fontx_load()
| int fontx_load |
( |
const char * |
path, |
|
|
fontx_t * |
fontx, |
|
|
int |
type, |
|
|
int |
wmargin, |
|
|
int |
hmargin, |
|
|
int |
bold |
|
) |
| |
Loads a FontX2 type font with set characteristics Use "rom0:KROM" as the path to load the PS2's internal FontX2 font
Definition at line 262 of file fontx.c.
◆ fontx_unload()
| void fontx_unload |
( |
fontx_t * |
fontx | ) |
|
◆ fontx_print_ascii()
| qword_t* fontx_print_ascii |
( |
qword_t * |
q, |
|
|
int |
context, |
|
|
const unsigned char * |
str, |
|
|
int |
alignment, |
|
|
const vertex_t * |
v0, |
|
|
const color_t * |
c0, |
|
|
fontx_t * |
fontx |
|
) |
| |
Prints an ascii/JISX201 formatted string
Definition at line 559 of file fontx.c.
◆ fontx_print_sjis()
| qword_t* fontx_print_sjis |
( |
qword_t * |
q, |
|
|
int |
context, |
|
|
const unsigned char * |
str, |
|
|
int |
alignment, |
|
|
const vertex_t * |
v0, |
|
|
const color_t * |
c0, |
|
|
fontx_t * |
ascii, |
|
|
fontx_t * |
kanji |
|
) |
| |
Prints a SJIS formatted string
Definition at line 735 of file fontx.c.
◆ fontstudio_init()
Loads the FontStudio ini file that contains the font texture's characteristics
Definition at line 22 of file fsfont.c.
◆ fontstudio_parse_ini()
| int fontstudio_parse_ini |
( |
fsfont_t * |
font, |
|
|
char * |
ini, |
|
|
float |
tex_width, |
|
|
float |
tex_height |
|
) |
| |
Parses a font's ini for the font. The content of ini is no longer required afterwards and can be discarded.
Definition at line 91 of file fsfont.c.
◆ fontstudio_load_ini()
| char* fontstudio_load_ini |
( |
const char * |
path | ) |
|
Loads an ini file into memory and returns pointer to it
Definition at line 53 of file fsfont.c.
◆ fontstudio_unload_ini()
| void fontstudio_unload_ini |
( |
fsfont_t * |
font | ) |
|
Unloads a parsed font's ini file.
Definition at line 313 of file fsfont.c.
◆ fontstudio_print_string()
| qword_t* fontstudio_print_string |
( |
qword_t * |
q, |
|
|
int |
context, |
|
|
const unsigned char * |
string, |
|
|
int |
alignment, |
|
|
const vertex_t * |
v0, |
|
|
const color_t * |
c0, |
|
|
fsfont_t * |
font |
|
) |
| |
Prints a unicode formatted string (UTF+8)
Definition at line 456 of file fsfont.c.