BFont class definition, unicode_block class definition, and font-related struct and enum definitions. More...
Classes | |
class | BFont |
Represents a typeface including its family, style and size. More... | |
struct | edge_info |
The distance that a character outline is inset from its escapement boundaries. More... | |
struct | escapement_delta |
A struct that allows you to specify extra horizontal space to surround each character with. More... | |
struct | font_cache_info |
Font cache parameters. More... | |
struct | font_height |
The amount of vertical space surrounding a character. More... | |
struct | tuned_font_info |
Tuning information of fonts used to make it look better when displayed on-screen. More... | |
class | unicode_block |
Describes the blocks of Unicode characters supported by a font. More... | |
Enumerations | |
enum | { B_CHAR_SPACING = 0 , B_STRING_SPACING = 1 , B_BITMAP_SPACING = 2 , B_FIXED_SPACING = 3 } |
enum | { B_DISABLE_ANTIALIASING = 0x00000001 , B_FORCE_ANTIALIASING = 0x00000002 } |
enum | { } |
enum | { B_UNICODE_UTF8 = 0 , B_ISO_8859_1 = 1 , B_ISO_8859_2 = 2 , B_ISO_8859_3 = 3 , B_ISO_8859_4 = 4 , B_ISO_8859_5 = 5 , B_ISO_8859_6 = 6 , B_ISO_8859_7 = 7 , B_ISO_8859_8 = 8 , B_ISO_8859_9 = 9 , B_ISO_8859_10 = 10 , B_MACINTOSH_ROMAN = 11 } |
enum | { B_HAS_TUNED_FONT = 0x0001 , B_IS_FIXED = 0x0002 } |
enum | { B_ITALIC_FACE = 0x0001 , B_UNDERSCORE_FACE = 0x0002 , B_NEGATIVE_FACE = 0x0004 , B_OUTLINED_FACE = 0x0008 , B_STRIKEOUT_FACE = 0x0010 , B_BOLD_FACE = 0x0020 , B_REGULAR_FACE = 0x0040 , B_CONDENSED_FACE = 0x0080 , B_LIGHT_FACE = 0x0100 , B_HEAVY_FACE = 0x0200 } |
enum | font_direction { B_FONT_LEFT_TO_RIGHT = 0 , B_FONT_RIGHT_TO_LEFT = 1 } |
enum | font_file_format { B_TRUETYPE_WINDOWS = 0 , B_POSTSCRIPT_TYPE1_WINDOWS = 1 } |
enum | font_metric_mode { B_SCREEN_METRIC = 0 , B_PRINTING_METRIC = 1 } |
Functions | |
int32 | count_font_families (void) |
Gets the number of installed font families. | |
int32 | count_font_styles (font_family name) |
Gets the number of styles available for a font family. | |
status_t | get_font_family (int32 index, font_family *name, uint32 *flags=NULL) |
Retrieves the family name at the specified index. | |
status_t | get_font_style (font_family family, int32 index, font_style *name, uint16 *face, uint32 *flags=NULL) |
Retrieves the family name at the specified index. | |
status_t | get_font_style (font_family family, int32 index, font_style *name, uint32 *flags=NULL) |
Retrieves the family name at the specified index. | |
bool | update_font_families (bool checkOnly) |
Updates the font families list. | |
BFont class definition, unicode_block class definition, and font-related struct and enum definitions.
anonymous enum |
anonymous enum |
Enumerator | |
---|---|
B_DISABLE_ANTIALIASING | Disable antialiasing. Used by BFont::Flags() and BFont::SetFlags().
|
B_FORCE_ANTIALIASING | Force antialiasing. Used by BFont::Flags() and BFont::SetFlags().
|
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
enum font_direction |
enum font_file_format |
enum font_metric_mode |
int32 count_font_families | ( | void | ) |
Gets the number of installed font families.
int32 count_font_styles | ( | font_family | family | ) |
Gets the number of styles available for a font family.
Retrieves the family name at the specified index.
index | Unique font identifier code. |
_name | font_family String to receive the name of the family. |
_flags | if non-NULL , the values of the flags IS_FIXED and B_HAS_TUNED_FONT are returned. |
B_OK
on success or an error code. B_BAD_VALUE | _name is NULL . |
B_ERROR | index does not correspond to a font family. |
status_t get_font_style | ( | font_family | family, |
int32 | index, | ||
font_style * | _name, | ||
uint16 * | _face, | ||
uint32 * | _flags = NULL |
||
) |
Retrieves the family name at the specified index.
The face value returned by this function is not very reliable. At the same time, the value returned should be fairly reliable, returning the proper flag for 90%-99% of font names.
family | The font family. |
index | Unique font identifier code. |
_name | String to receive the name of the family. |
_face | recipient of font face value, such as B_REGULAR_FACE . |
_flags | if non-NULL , the values of the flags IS_FIXED and B_HAS_TUNED_FONT are returned. |
B_OK
on success or an error code. B_ERROR | index does not correspond to a font style. |
status_t get_font_style | ( | font_family | family, |
int32 | index, | ||
font_style * | _name, | ||
uint32 * | _flags = NULL |
||
) |
Retrieves the family name at the specified index.
family | The font family. |
index | Unique font identifier code. |
_name | string to receive the name of the family. |
_flags | if non-NULL , the values of the flags IS_FIXED and B_HAS_TUNED_FONT are returned |
B_OK
on success or an error code. B_ERROR | index does not correspond to a font style. |
bool update_font_families | ( | bool | checkOnly | ) |
Updates the font families list.
checkOnly | Parameter is ignored. |
true
if the font list has changed, false
if not.