Gimp.text_layer_new

@accepts(Gimp.Image, unicode, unicode, float, Gimp.Unit)
@returns(Gimp.Layer)
def text_layer_new(image, text, fontname, size, unit):
    # Python wrapper for gimp_text_layer_new()
  

Creates a new text layer.

This procedure creates a new text layer. The arguments are kept as simple as necessary for the normal case. All text attributes, however, can be modified with the appropriate gimp_text_layer_set_*() procedures. The new layer still needs to be added to the image, as this is not automatic. Add the new layer using Gimp.Image.insert_layer.

Since 2.6

image

The image.

text

The text to generate (in UTF-8 encoding).

fontname

The name of the font.

size

The size of text in either pixels or points.

unit

The units of specified size.

Returns