String MeasurementFastgraph/Fonts includes two functions, fgf_width() and fgf_height(), to determine the size in pixels of a character string when displayed in the current font. The width of a string is obvious, but such is not the case for the height. We'll define the height of a string as the height of its tallest character; the height includes extra pixel rows reserved for descender characters, even if those rows aren't used. Both fgf_width() and fgf_height() expect two parameters: the string to measure and the number of characters to consider in the string. They return the computed width or height as their function value.
|
 
copyright 2001 Ted Gruber Software, Inc.