### Function

# Gimp text_fontname

#### Declaration [src]

    GimpLayer*
    gimp_text_fontname (
      GimpImage* image,
      GimpDrawable* drawable,
      gdouble x,
      gdouble y,
      const gchar* text,
      gint border,
      gboolean antialias,
      gdouble size,
      GimpSizeType size_type,
      const gchar* fontname
    )

#### Description [src]

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 (`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. 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 image’s vertical resolution.

#### Parameters

`image` | `GimpImage`
| The image.
| The data is owned by the caller of the function.
`drawable` | `GimpDrawable`
| The affected drawable: (`NULL` for a new text layer).
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`x` | `gdouble`
| The x coordinate for the left of the text bounding box.
`y` | `gdouble`
| The y coordinate for the top of the text bounding box.
`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.
`border` | `gint`
| The size of the border.
`antialias` | `gboolean`
| Antialiasing.
`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.

#### Return value

Returns: | `GimpLayer`

         The new text layer or `NULL` if no layer was created.

| The data is owned by the called function.
| The return value can be `NULL`.