metrics_t

Declaration

typedef struct {
int width;
int fontWidth;
int fontHeight;
int ascent;
int descent;
int leading;
int kern;
} metrics_t

Prototype In

mgraph.h

Description

Structure representing text metrics for a font or a single character, in the current text attributes. For bitmap fonts you can get all the metric information from the font_t structure, however for vector fonts, this routine will provide the proper metrics for the font after being scaled by the current font character scaling size. This structure is also used to obtain specified 'tightest fit' metrics information about any character in the font.

Members

width | Actual width of the character in pixels
fontWidth | Font character width, including any extra padding between this character and the next character. This value is used to advance the current position to the start of the next character, and can be larger than the actual character width (in order to put space between the characters).
fontHeight | Standard height of the font (not including the leading value).
ascent | Font or character ascent value. The ascent value is the number of pixels that the font extends up from the font's baseline.
descent | Font or character descent value. The descent value is the number of pixels that the font extends down from the font's baseline.
leading | Font leading value. The leading value is the number of vertical pixels of space that are usually required between two lines of text drawn with this font.
kern | Character kern value. The kern value for the character is the number of pixels it extends back past the character origin (such as the tail of the lowercase j character for some fonts).

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com