MagickWand For PHP



MagickQueryFontMetrics -- returns a 7 element array containing various font metrics


array MagickQueryFontMetrics( MagickWand mgck_wnd, DrawingWand drw_wnd, string txt [, bool multiline] )

Returns a 13 element array containing various font metrics, or FALSE if an error occurs. Returned array defined as follows: Array { [0] => (maximum) character width [1] => (maximum) character height [2] => (maximum) ascender -- height of part of character drawn above font's baseline [3] => (maximum) descender -- height of part of character drawn below font's baseline [4] => (maximum) text width [5] => (maximum) text height [6] => maximum horizontal advance [7] => bounding box: x1 [8] => bounding box: y1 [9] => bounding box: x2 [10] => bounding box: y2 [11] => origin: x [12] => origin: y } If multiline is specified, and is TRUE, the C API's MagickQueryMultilineFontMetrics() is called internally instead. It returns the same kind of array as MagickQueryFontMetrics(), but with the metrics returned being those of multiple lines of text.

A description of each parameter follows:

mgck_wnd The MagickWand
drw_wnd The DrawingWand (contains the font information)
text The text
multiline (Optional) if TRUE, causes function to return metrics of muliple lines of text

Up Next