Function
Gimptext_get_extents_fontname
Declaration [src]
gboolean
gimp_text_get_extents_fontname (
const gchar* text,
gdouble size,
GimpSizeType size_type,
const gchar* fontname,
gint* width,
gint* height,
gint* ascent,
gint* descent
)
Description [src]
Get extents of the bounding box for the specified text.
This tool returns the width and height of a bounding box for the specified text string with the specified font information. Ascent and descent for the specified font are returned as well. Parameter size-type is not used and is currently ignored. If you need to display a font in points, divide the size in points by 72.0 and multiply it by the vertical resolution of the image you are taking into account.
Parameters
text |
const gchar* |
The text to generate (in UTF-8 encoding). |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
size |
gdouble |
The size of text in either pixels or points. |
|
size_type |
GimpSizeType |
The units of specified size. |
|
fontname |
const gchar* |
The name of the font. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
width |
gint* |
The width of the specified font. |
|
The argument will be set by the function. | |
height |
gint* |
The height of the specified font. |
|
The argument will be set by the function. | |
ascent |
gint* |
The ascent of the specified font. |
|
The argument will be set by the function. | |
descent |
gint* |
The descent of the specified font. |
|
The argument will be set by the function. |