InterViews Reference Manual -- Font

NAME
Font - text font for a painter
SYNOPSIS
#include <InterViews/font.h>
DESCRIPTION
A font defines the representation of characters on the screen. The global variable ``stdfont'' is a small, fixed-width font that Painter operations use by default.
PUBLIC OPERATIONS
Font(const char* str)
Font(const char* str, int length)
Construct a font named by the given string or substring.
int Baseline()
Return the font's baseline in pixels.
bool FixedWidth()
Return whether the font contains fixed width characters.
int Height()
Return the font's height in pixels.
int Index(const char* string, int offset, bool between)
int Index(const char* string, int len, int offset, bool between)
Return the index in a string or substring of the character that would be offset pixels from the left if the string were displayed. If between is false, the index of the character that contains offset is returned; otherwise the index of the character following the between-character space that is nearest offset is returned. In either case a negative offset will return an index of zero and an offset beyond the end of the string or substring will return an index equal to the length of the string.
int Width(const char* string)
int Width(const char* string, int len)
Return the width in pixels that the string or substring would have if it were displayed in this font.
bool Valid()
Return whether the font is meaningful.
SEE ALSO
Painter

Next: Frame | Prev: FileChooser | Up: index | Top: index