KallistiOS git master
Independent SDK for the Sega Dreamcast
|
API for the Dreamcast's built-in BIOS font. More...
Topics | |
Byte Sizes | |
Byte size definitions for the BIOS fonts. | |
Character Drawing | |
Methods for rendering characters/icons. | |
Dimensions | |
Font size definitions for the BIOS fonts. | |
String Drawing | |
Methods for rendering formatted text/icons. | |
Structure | |
Structure of the Bios Font. | |
Files | |
file | biosfont.h |
BIOS font drawing functions. | |
Enumerations | |
enum | bfont_code_t { BFONT_CODE_ISO8859_1 = 0 , BFONT_CODE_EUC = 1 , BFONT_CODE_SJIS = 2 , BFONT_CODE_RAW = 3 } |
Functions | |
void | bfont_set_encoding (bfont_code_t enc) |
Set the font encoding. | |
Coloring | |
Methods for modifying the text color. | |
uint32_t | bfont_set_foreground_color (uint32_t c) |
Set the font foreground color. | |
uint32_t | bfont_set_background_color (uint32_t c) |
Set the font background color. | |
Character Lookups | |
Methods for finding various font characters and icons. | |
const uint8_t * | bfont_find_char (uint32_t ch) |
Find an ISO-8859-1 character in the font. | |
uint8_t * | bfont_find_char_jp (uint32_t ch) |
Find an full-width Japanese character in the font. | |
uint8_t * | bfont_find_char_jp_half (uint32_t ch) |
Find an half-width Japanese character in the font. | |
uint8_t * | bfont_find_icon (bfont_vmu_icon_t icon) |
Find a VMU icon. | |
uint8_t * | bfont_find_dc_icon (bfont_dc_icon_t icon) |
Find a DC icon. | |
API for the Dreamcast's built-in BIOS font.
enum bfont_code_t |
const uint8_t * bfont_find_char | ( | uint32_t | ch | ) |
Find an ISO-8859-1 character in the font.
This function retrieves a pointer to the font data for the specified character in the font, if its available. Generally, you will not have to use this function, use one of the bfont_draw_* functions instead.
ch | The character to look up |
uint8_t * bfont_find_char_jp | ( | uint32_t | ch | ) |
Find an full-width Japanese character in the font.
This function retrieves a pointer to the font data for the specified character in the font, if its available. Generally, you will not have to use this function, use one of the bfont_draw_* functions instead.
This function deals with full-width kana and kanji.
ch | The character to look up |
uint8_t * bfont_find_char_jp_half | ( | uint32_t | ch | ) |
Find an half-width Japanese character in the font.
This function retrieves a pointer to the font data for the specified character in the font, if its available. Generally, you will not have to use this function, use one of the bfont_draw_* functions instead.
This function deals with half-width kana only.
ch | The character to look up |
uint8_t * bfont_find_dc_icon | ( | bfont_dc_icon_t | icon | ) |
Find a DC icon.
This function retrieves a pointer to the icon data for the specified DC icon in the bios, if its available. Each dc icon has dimensions 24x24 pixels and is 72 bytes long.
icon | The DC icon index to look up. |
uint8_t * bfont_find_icon | ( | bfont_vmu_icon_t | icon | ) |
Find a VMU icon.
This function retrieves a pointer to the icon data for the specified VMU icon in the bios, if its available. The icon data is flipped both vertically and horizontally. Each vmu icon has dimensions 32x32 pixels and is 128 bytes long.
icon | The VMU icon index to look up. |
uint32_t bfont_set_background_color | ( | uint32_t | c | ) |
Set the font background color.
This function selects the background color to draw when a pixel is drawn in the font. This color is only used for pixels not covered by the font when you have selected to have the font be opaque.
c | The color to use. |
void bfont_set_encoding | ( | bfont_code_t | enc | ) |
Set the font encoding.
This function selects the font encoding that is used for the font. This allows you to select between the various character sets available.
enc | The character encoding in use |
uint32_t bfont_set_foreground_color | ( | uint32_t | c | ) |
Set the font foreground color.
This function selects the foreground color to draw when a pixel is opaque in the font. The value passed in for the color should be in whatever pixel format that you intend to use for the image produced.
c | The color to use. |