Magick::TypeMetric Class
Author: Bob Friesenhahn
Description: Class to access raw image pixels.
Keywords: ImageMagick,Pixel,Magick++

### Magick::TypeMetric

The TypeMetric class provides the means to pass data from the Image classes TypeMetric method to the user. It provides information regarding font metrics. The characterWidth and characterHeight values are expressed in units of a pixel, while the ascent, decent, textWidth, textHeight, and maxHorizontalAdvance values are expressed in units of 1/64th of a pixel (FreeType 2.0 "26.6 format"). See FreeType Glyph Conventions for a detailed description of glyph conventions.

The methods available in the TypeMetric class are shown in the following table:

TypeMetric Methods
Method | Returns | Units | Signature | Description
characterWidth | unsigned int | pixels | void | Returns the character width
characterHeight | unsigned int | pixels | void | Returns the character height
ascent | int | 64ths of a pixel | void | Returns the distance from the baseline to the highest/upper grid coordinate used to place an outline point. Always a positive value.
decent | int | 64ths of a pixel | void | Returns the distance from the baseline to the lowest grid coordinate used to place an outline point. Always a negative value.
textWidth | unsigned int | 64ths of a pixel | void | Returns text width
textHeight | unsigned int | 64ths of a pixel | void | Returns text height
maxHorizontalAdvance | unsigned int | 64ths of a pixel | void | Returns the maximum horizontal advance