# Gimp.text_font

    function text_font(image: Gimp.Image, drawable: Gimp.Drawable, x: Number(gdouble), y: Number(gdouble), text: String, border: Number(gint), antialias: Boolean, size: Number(gdouble), font: Gimp.Font): Gimp.Layer {
        // Gjs wrapper for gimp_text_font()
    }

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

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 (null), 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. The size is always in pixels. If you need to display a font in points, divide the size in points by 72.0 and multiply it by the image's vertical resolution.

image

  The image.

drawable

  The affected drawable: (null for a new text layer).

x

  The x coordinate for the left of the text bounding box.

y

  The y coordinate for the top of the text bounding box.

text

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

border

  The size of the border.

antialias

  Antialiasing.

size

  The size of text in pixels.

font

  The font.

Returns

  The new text layer or null if no layer was created.