Gets the width in pixels of font-based text.
#include <graph.h>
short __far _getgtextextent( const char __far *text );
text | Text to be analyzed |
The _getgtextextent function returns the width in pixels that would be required to print the text string using _outgtext with the current font.
This function is particularly useful for determining the size of text that uses proportionally spaced fonts.
The _getgtextextent function returns the width in pixels. It returns –1 if a font has not been registered.
Standards:None
16-Bit:DOS
32-Bit:None
_getfontinfo, _outgtext, _registerfonts, _setfont, _unregisterfonts
See the example for _outgtext.