This function returns global font metrics for the specified font.
Parameter | Description |
---|---|
engine |
Handle of the previously created Standard Engine instance. |
font_index |
Font index of the font or font instance in the Font Catalog. |
font_xbs |
A valid pointer to the DT_UWORD type that will receive the base font width (or units per em-square in the horizontal direction), in font units. However, if you do not wish to receive the value of the above parameter, you may set this pointer to DV_NULL. |
font_ybs |
A valid pointer to the DT_UWORD type that will receive the base font height (or units per em-square in the vertical direction), in font units. However, if you do not wish to receive the value of the above parameter, you may set this pointer to DV_NULL. |
extent |
A pointer to the DT_RECT_SWORD structure that will receive global font extent as defined in the font file. This is the minimum (x, y) and maximum (x, y) coordinate for the entire font in font units. If you do not wish to receive this information, you may set the extent pointer to DV_NULL. Otherwise, this must be a valid pointer to the DT_RECT_SWORD structure. |
The return value is 1 if the function was successful. Otherwise, the function returns 0.
The global font extent returned via the DT_RECT_SWORD structure is typically copied directly from the font file. Therefore, its accuracy depends on how accurately this information is stored in the font file itself. If this information is not available in the font file (which is currently not the case with any of the supported font formats), the font driver responsible for handling that particular format may synthesize it (either accurately or, most likely, approximately).