You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
647 B
33 lines
647 B
#ifndef _FONT_H
|
|
#define _FONT_H
|
|
|
|
|
|
/* width and height of a glyph contain the kering advance
|
|
* (u,v)
|
|
* +----------*---+ -
|
|
* | .ii. | | ^
|
|
* | @@@@@@. |<->| |
|
|
* | V@Mio@@o |adv| |
|
|
* | :i. V@V | | |
|
|
* | :oM@@M | | |
|
|
* | :@@@MM@M | | |
|
|
* | @@o o@M | | |
|
|
* |:@@. M@M | | |
|
|
* | @@@o@@@@ | | |
|
|
* | :M@@V:@@.| | v
|
|
* +----------*---+ -
|
|
* |<------------->|
|
|
* w
|
|
*/
|
|
struct font_glyph {
|
|
unsigned int codepoint;
|
|
unsigned int u, v, w, h;
|
|
};
|
|
|
|
|
|
struct font_atlas;
|
|
|
|
int font_load(struct font_atlas *atlas, const char *path, int height);
|
|
int font_free(struct font_atlas *atlas);
|
|
|
|
#endif
|
|
|