Public Methods |
struct Font* | Font_ctor (struct Font *ptr_font) |
struct Font* | Font_ctor_Ex (struct Font *ptr_font, char *file_name, bool fixed, int spacing) |
void | Font_dtor (struct Font *ptr_font, int memory_flag) |
char* | Font_get_name (struct Font *ptr_font) |
void | Font_set_name (struct Font *ptr_font, char *filename) |
int | Font_get_char_width (struct Font *ptr_font, int chr) |
int | Font_string_width (struct Font *ptr_font, char *str) |
int | Font_string_width_Ex (struct Font *ptr_font, char *str, int len) |
int | Font_get_char_height (struct Font *ptr_font) |
bool | Font_is_fixed (struct Font *ptr_font) |
void | Font_set_fixed (struct Font *ptr_font, bool fixed) |
int | Font_get_spacing (struct Font *ptr_font) |
void | Font_set_spacing (struct Font *ptr_font, int spacing) |
bool | Font_load (struct Font *ptr_font, struct Input *input) |
struct Bitmap* | Font_bmp_by_char (struct Font *ptr_font, int chr) |
char* | Font_split_string (struct Font *ptr_font, char **str, int width, int *len) |
int | Font_get_size (struct Font *ptr_font) |
int | Font_get_x (struct Font *ptr_font, int bitmap_index) |
int | Font_get_y (struct Font *ptr_font, int bitmap_index) |
struct Bitmap* | Font_get_bitmap (struct Font *ptr_font, int bitmap_index) |
bool | Font_store (struct Font *ptr_font, struct Output *output) |
Public Attributes |
struct Font* | cool_bold_font |
struct Font* | cool_normal_font |
struct Font* | mini_bold_font |
struct Font* | mini_normal_font |
To use a Font object, construct it with the Font_ctor or Font_ctor_Ex functions. Use Font_dtor to deconstruct a Font object after use. Font object operations include receiving information about the character width and height, string length or length of a predefined number of characters in a string; as well as receiving the Bitmap representation of any character in a string.
You can fix the current font by calling the Font_set_fixed function. You can set the font spacing value by calling the Font_set_spacing function. You can also use the extended version of the Font_ctor function, which calls Font_ctor_Ex and enables it to create a font object using a resource.
Since all characters in a text string are elements of a BitmapSequence object, you can manipulate a text string as if it were a BitmapSequence object.