Pyrogenesis
13997
|
#include "precompiled.h"
#include "unifont.h"
#include <stdio.h>
#include <string>
#include <sstream>
#include <map>
#include "ogl_tex.h"
#include "lib/res/h_mgr.h"
Go to the source code of this file.
Classes | |
struct | UniFont |
Typedefs | |
typedef std::map< u16, UnifontGlyphData > | glyphmap |
Functions | |
H_TYPE_DEFINE (UniFont) | |
static void | UniFont_init (UniFont *f, va_list args) |
static void | UniFont_dtor (UniFont *f) |
static Status | UniFont_reload (UniFont *f, const PIVFS &vfs, const VfsPath &basename, Handle h) |
static Status | UniFont_validate (const UniFont *f) |
static Status | UniFont_to_string (const UniFont *f, wchar_t *buf) |
Handle | unifont_load (const PIVFS &vfs, const VfsPath &pathname, size_t flags) |
Load a font. More... | |
Status | unifont_unload (Handle &h) |
Release a handle to a previously loaded font (subject to reference counting). More... | |
int | unifont_linespacing (const Handle h) |
int | unifont_height (const Handle h) |
bool | unifont_has_rgb (const Handle h) |
int | unifont_character_width (const Handle h, wchar_t c) |
Status | unifont_stringsize (const Handle h, const wchar_t *text, int &width, int &height) |
Determine pixel extents of a string. More... | |
const glyphmap & | unifont_get_glyphs (const Handle h) |
Handle | unifont_get_texture (const Handle h) |
typedef std::map<u16, UnifontGlyphData> glyphmap |
Definition at line 38 of file unifont.cpp.
H_TYPE_DEFINE | ( | UniFont | ) |
Definition at line 237 of file unifont.cpp.
|
static |
Definition at line 58 of file unifont.cpp.
Definition at line 276 of file unifont.cpp.
Definition at line 289 of file unifont.cpp.
bool unifont_has_rgb | ( | const Handle | h | ) |
Definition at line 228 of file unifont.cpp.
int unifont_height | ( | const Handle | h | ) |
Definition at line 221 of file unifont.cpp.
|
static |
Definition at line 54 of file unifont.cpp.
int unifont_linespacing | ( | const Handle | h | ) |
Definition at line 214 of file unifont.cpp.
Load a font.
vfs | |
pathname | path and basename of the font definition file (.fnt) and its texture (.png) |
flags |
Definition at line 201 of file unifont.cpp.
|
static |
Definition at line 68 of file unifont.cpp.
Determine pixel extents of a string.
h | |
text | string in question. |
width | |
height | is roughly the pixel height of a capital letter, for use when aligning text in an aesthetically pleasing way. |
note: This is intended for the GUI (hence Unicode).
Definition at line 248 of file unifont.cpp.
Definition at line 188 of file unifont.cpp.
Release a handle to a previously loaded font (subject to reference counting).
Definition at line 207 of file unifont.cpp.
Definition at line 175 of file unifont.cpp.