gimptexttool

Name

gimptexttool -- 

Synopsis



gint32      gimp_text_fontname              (gint32 image_ID,
                                             gint32 drawable_ID,
                                             gdouble x,
                                             gdouble y,
                                             gchar *text,
                                             gint border,
                                             gboolean antialias,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *fontname);
gboolean    gimp_text_get_extents_fontname  (gchar *text,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *fontname,
                                             gint *width,
                                             gint *height,
                                             gint *ascent,
                                             gint *descent);
gint32      gimp_text                       (gint32 image_ID,
                                             gint32 drawable_ID,
                                             gdouble x,
                                             gdouble y,
                                             gchar *text,
                                             gint border,
                                             gboolean antialias,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *foundry,
                                             gchar *family,
                                             gchar *weight,
                                             gchar *slant,
                                             gchar *set_width,
                                             gchar *spacing,
                                             gchar *registry,
                                             gchar *encoding);
gboolean    gimp_text_get_extents           (gchar *text,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *foundry,
                                             gchar *family,
                                             gchar *weight,
                                             gchar *slant,
                                             gchar *set_width,
                                             gchar *spacing,
                                             gchar *registry,
                                             gchar *encoding,
                                             gint *width,
                                             gint *height,
                                             gint *ascent,
                                             gint *descent);

Description

Details

gimp_text_fontname ()

gint32      gimp_text_fontname              (gint32 image_ID,
                                             gint32 drawable_ID,
                                             gdouble x,
                                             gdouble y,
                                             gchar *text,
                                             gint border,
                                             gboolean antialias,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *fontname);

Add text at the specified location as a floating selection or a new layer.

This tool requires a fontname matching an installed PangoFT2 font. You can specify the fontsize in units of pixels or points, and the appropriate metric is specified using the size_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the specified drawable parameter is valid, the text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels.


gimp_text_get_extents_fontname ()

gboolean    gimp_text_get_extents_fontname  (gchar *text,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *fontname,
                                             gint *width,
                                             gint *height,
                                             gint *ascent,
                                             gint *descent);

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.


gimp_text ()

gint32      gimp_text                       (gint32 image_ID,
                                             gint32 drawable_ID,
                                             gdouble x,
                                             gdouble y,
                                             gchar *text,
                                             gint border,
                                             gboolean antialias,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *foundry,
                                             gchar *family,
                                             gchar *weight,
                                             gchar *slant,
                                             gchar *set_width,
                                             gchar *spacing,
                                             gchar *registry,
                                             gchar *encoding);

Add text at the specified location as a floating selection or a new layer.

This tool requires font information in the form of nine parameters: size, foundry, family, weight, slant, set_width, spacing, registry, encoding. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layers. This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels. If the border is specified as -1, empty spaces around the text will not be cropped.


gimp_text_get_extents ()

gboolean    gimp_text_get_extents           (gchar *text,
                                             gdouble size,
                                             GimpSizeType size_type,
                                             gchar *foundry,
                                             gchar *family,
                                             gchar *weight,
                                             gchar *slant,
                                             gchar *set_width,
                                             gchar *spacing,
                                             gchar *registry,
                                             gchar *encoding,
                                             gint *width,
                                             gint *height,
                                             gint *ascent,
                                             gint *descent);

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.