Platforms to show: All Mac Windows Linux Cross-Platform
GM16TypeMetricMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | GraphicsMagick | MBS GraphicsMagick Plugin | 14.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
It provides information regarding font metrics such as ascent, descent, text width, text height, and maximum horizontal advance. The units of these font metrics are in pixels, and that the metrics are dependent on the current Image font (default Ghostscript's "Helvetica"), pointsize (default 12 points), and x/y resolution (default 72 DPI) settings.
The pixel units may be converted to points (the standard resolution-independent measure used by the typesetting industry) via the following equation:
size_points = (size_pixels * 72)/resolution
where resolution is in dots-per-inch (DPI). This means that at the default image resolution, there is one pixel per point.
Note that a font's pointsize is only a first-order approximation of the font height (ascender + descender) in points. The relationship between the specified pointsize and the rendered font height is determined by the font designer.
See FreeType Glyph Conventions for a detailed description of font metrics related issues.
- 5 properties
- property ascent as Double
- property descent as Double
- property maxHorizontalAdvance as Double
- property textHeight as Double
- property textWidth as Double
- method Constructor
This class has no sub classes.
Some methods using this class:
- GM16ImageMBS.fontTypeMetrics(name as string) as GM16TypeMetricMBS
The items on this page are in the following plugins: MBS GraphicsMagick Plugin.
GM16PixelsMBS - GM16UnsupportedExceptionMBS