gimp r25342 - in trunk: . app/pdb libgimp tools/pdbgen tools/pdbgen/pdb



Author: neo
Date: Wed Apr  2 21:53:51 2008
New Revision: 25342
URL: http://svn.gnome.org/viewvc/gimp?rev=25342&view=rev

Log:
2008-04-02  Sven Neumann  <sven gimp org>

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/text_layer.pdb: new text layer PDB API 
created
	by Marcus Heese (see bug #164539).

	* app/pdb/Makefile.am
	* app/pdb/text_layer_cmds.c: new generated file.

	* libgimp/Makefile.am
	* libgimp/gimptextlayer_pdb.[ch]: new generated files.

	* app/pdb/internal_procs.[ch]
	* libgimp/gimp_pdb.h
	* tools/pdbgen/groups.pl: regenerated.



Added:
   trunk/app/pdb/text_layer_cmds.c
   trunk/libgimp/gimptextlayer_pdb.c
   trunk/libgimp/gimptextlayer_pdb.h
   trunk/tools/pdbgen/pdb/text_layer.pdb   (contents, props changed)
Modified:
   trunk/ChangeLog
   trunk/app/pdb/Makefile.am
   trunk/app/pdb/internal_procs.c
   trunk/app/pdb/internal_procs.h
   trunk/libgimp/Makefile.am
   trunk/libgimp/gimp_pdb.h
   trunk/tools/pdbgen/Makefile.am
   trunk/tools/pdbgen/groups.pl

Modified: trunk/app/pdb/Makefile.am
==============================================================================
--- trunk/app/pdb/Makefile.am	(original)
+++ trunk/app/pdb/Makefile.am	Wed Apr  2 21:53:51 2008
@@ -62,6 +62,7 @@
 	progress_cmds.c			\
 	selection_cmds.c		\
 	selection_tools_cmds.c		\
+	text_layer_cmds.c		\
 	text_tool_cmds.c		\
 	transform_tools_cmds.c		\
 	undo_cmds.c			\

Modified: trunk/app/pdb/internal_procs.c
==============================================================================
--- trunk/app/pdb/internal_procs.c	(original)
+++ trunk/app/pdb/internal_procs.c	Wed Apr  2 21:53:51 2008
@@ -29,7 +29,7 @@
 #include "internal_procs.h"
 
 
-/* 555 procedures registered total */
+/* 582 procedures registered total */
 
 void
 internal_procs_init (GimpPDB *pdb)
@@ -77,6 +77,7 @@
   register_progress_procs (pdb);
   register_selection_procs (pdb);
   register_selection_tools_procs (pdb);
+  register_text_layer_procs (pdb);
   register_text_tool_procs (pdb);
   register_transform_tools_procs (pdb);
   register_undo_procs (pdb);

Modified: trunk/app/pdb/internal_procs.h
==============================================================================
--- trunk/app/pdb/internal_procs.h	(original)
+++ trunk/app/pdb/internal_procs.h	Wed Apr  2 21:53:51 2008
@@ -66,6 +66,7 @@
 void   register_progress_procs           (GimpPDB *pdb);
 void   register_selection_procs          (GimpPDB *pdb);
 void   register_selection_tools_procs    (GimpPDB *pdb);
+void   register_text_layer_procs         (GimpPDB *pdb);
 void   register_text_tool_procs          (GimpPDB *pdb);
 void   register_transform_tools_procs    (GimpPDB *pdb);
 void   register_undo_procs               (GimpPDB *pdb);

Added: trunk/app/pdb/text_layer_cmds.c
==============================================================================
--- (empty file)
+++ trunk/app/pdb/text_layer_cmds.c	Wed Apr  2 21:53:51 2008
@@ -0,0 +1,1858 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* NOTE: This file is auto-generated by pdbgen.pl. */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include "libgimpbase/gimpbase.h"
+#include "libgimpcolor/gimpcolor.h"
+
+#include "pdb-types.h"
+
+#include "core/gimpcontext.h"
+#include "core/gimpimage.h"
+#include "core/gimplayer.h"
+#include "core/gimpparamspecs.h"
+#include "text/gimptext.h"
+#include "text/gimptextlayer.h"
+
+#include "gimppdb.h"
+#include "gimppdberror.h"
+#include "gimppdb-utils.h"
+#include "gimpprocedure.h"
+#include "internal_procs.h"
+
+#include "gimp-intl.h"
+
+
+static GValueArray *
+text_layer_new_invoker (GimpProcedure      *procedure,
+                        Gimp               *gimp,
+                        GimpContext        *context,
+                        GimpProgress       *progress,
+                        const GValueArray  *args,
+                        GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpImage *image;
+  const gchar *text;
+  const gchar *fontname;
+  gdouble size;
+  GimpUnit unit;
+  GimpLayer *layer = NULL;
+
+  image = gimp_value_get_image (&args->values[0], gimp);
+  text = g_value_get_string (&args->values[1]);
+  fontname = g_value_get_string (&args->values[2]);
+  size = g_value_get_double (&args->values[3]);
+  unit = g_value_get_int (&args->values[4]);
+
+  if (success)
+    {
+      GimpText *gimp_text;
+      GimpRGB   color;
+
+      gimp_context_get_foreground (context, &color);
+
+      gimp_text = g_object_new (GIMP_TYPE_TEXT,
+                                "text",           text,
+                                "font",           fontname,
+                                "font-size",      size,
+                                "font-size-unit", unit,
+                                "color",          &color,
+                                NULL);
+
+      layer = gimp_text_layer_new (image, gimp_text);
+      g_object_unref (gimp_text);
+
+      if (! layer)
+        {
+          g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_EXECUTION_ERROR,
+                       _("Failed to create text layer"));
+
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    gimp_value_set_layer (&return_vals->values[1], layer);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_set_text_invoker (GimpProcedure      *procedure,
+                             Gimp               *gimp,
+                             GimpContext        *context,
+                             GimpProgress       *progress,
+                             const GValueArray  *args,
+                             GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  const gchar *text;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  text = g_value_get_string (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "text", text,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_font_invoker (GimpProcedure      *procedure,
+                             Gimp               *gimp,
+                             GimpContext        *context,
+                             GimpProgress       *progress,
+                             const GValueArray  *args,
+                             GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  const gchar *font;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  font = g_value_get_string (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "font", font,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_fontsize_invoker (GimpProcedure      *procedure,
+                                 Gimp               *gimp,
+                                 GimpContext        *context,
+                                 GimpProgress       *progress,
+                                 const GValueArray  *args,
+                                 GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gdouble font_size;
+  GimpUnit unit;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  font_size = g_value_get_double (&args->values[1]);
+  unit = g_value_get_int (&args->values[2]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "font-size-unit", unit,
+                               "font-size",      font_size,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_hinting_invoker (GimpProcedure      *procedure,
+                                Gimp               *gimp,
+                                GimpContext        *context,
+                                GimpProgress       *progress,
+                                const GValueArray  *args,
+                                GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gboolean hinting;
+  gboolean autohint;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  hinting = g_value_get_boolean (&args->values[1]);
+  autohint = g_value_get_boolean (&args->values[2]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "hinting",  hinting,
+                               "autohint", autohint,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_antialias_invoker (GimpProcedure      *procedure,
+                                  Gimp               *gimp,
+                                  GimpContext        *context,
+                                  GimpProgress       *progress,
+                                  const GValueArray  *args,
+                                  GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gboolean antialias;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  antialias = g_value_get_boolean (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "antialias", antialias,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_kerning_invoker (GimpProcedure      *procedure,
+                                Gimp               *gimp,
+                                GimpContext        *context,
+                                GimpProgress       *progress,
+                                const GValueArray  *args,
+                                GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gboolean kerning;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  kerning = g_value_get_boolean (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "kerning", kerning,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_language_invoker (GimpProcedure      *procedure,
+                                 Gimp               *gimp,
+                                 GimpContext        *context,
+                                 GimpProgress       *progress,
+                                 const GValueArray  *args,
+                                 GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  const gchar *language;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  language = g_value_get_string (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "language", language,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_base_direction_invoker (GimpProcedure      *procedure,
+                                       Gimp               *gimp,
+                                       GimpContext        *context,
+                                       GimpProgress       *progress,
+                                       const GValueArray  *args,
+                                       GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gint32 direction;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  direction = g_value_get_enum (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "base-direction", direction,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_justification_invoker (GimpProcedure      *procedure,
+                                      Gimp               *gimp,
+                                      GimpContext        *context,
+                                      GimpProgress       *progress,
+                                      const GValueArray  *args,
+                                      GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gint32 justify;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  justify = g_value_get_enum (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "justify", justify,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_color_invoker (GimpProcedure      *procedure,
+                              Gimp               *gimp,
+                              GimpContext        *context,
+                              GimpProgress       *progress,
+                              const GValueArray  *args,
+                              GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  GimpRGB color;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  gimp_value_get_rgb (&args->values[1], &color);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "color", &color,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_indent_invoker (GimpProcedure      *procedure,
+                               Gimp               *gimp,
+                               GimpContext        *context,
+                               GimpProgress       *progress,
+                               const GValueArray  *args,
+                               GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gdouble indent;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  indent = g_value_get_double (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "indent", indent,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_line_spacing_invoker (GimpProcedure      *procedure,
+                                     Gimp               *gimp,
+                                     GimpContext        *context,
+                                     GimpProgress       *progress,
+                                     const GValueArray  *args,
+                                     GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gdouble line_spacing;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  line_spacing = g_value_get_double (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "line-spacing", line_spacing,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_set_letter_spacing_invoker (GimpProcedure      *procedure,
+                                       Gimp               *gimp,
+                                       GimpContext        *context,
+                                       GimpProgress       *progress,
+                                       const GValueArray  *args,
+                                       GError            **error)
+{
+  gboolean success = TRUE;
+  GimpLayer *layer;
+  gdouble letter_spacing;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+  letter_spacing = g_value_get_double (&args->values[1]);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                               _("Set text layer attribute"),
+                               "letter-spacing", letter_spacing,
+                               NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return gimp_procedure_get_return_values (procedure, success);
+}
+
+static GValueArray *
+text_layer_get_text_invoker (GimpProcedure      *procedure,
+                             Gimp               *gimp,
+                             GimpContext        *context,
+                             GimpProgress       *progress,
+                             const GValueArray  *args,
+                             GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gchar *text = NULL;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "text", &text,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_take_string (&return_vals->values[1], text);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_font_invoker (GimpProcedure      *procedure,
+                             Gimp               *gimp,
+                             GimpContext        *context,
+                             GimpProgress       *progress,
+                             const GValueArray  *args,
+                             GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gchar *font = NULL;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "font", &font,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_take_string (&return_vals->values[1], font);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_fontsize_invoker (GimpProcedure      *procedure,
+                                 Gimp               *gimp,
+                                 GimpContext        *context,
+                                 GimpProgress       *progress,
+                                 const GValueArray  *args,
+                                 GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gdouble font_size = 0.0;
+  GimpUnit unit = 0;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "font-size",      &font_size,
+                        "font-size-unit", &unit,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    {
+      g_value_set_double (&return_vals->values[1], font_size);
+      g_value_set_int (&return_vals->values[2], unit);
+    }
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_hinting_invoker (GimpProcedure      *procedure,
+                                Gimp               *gimp,
+                                GimpContext        *context,
+                                GimpProgress       *progress,
+                                const GValueArray  *args,
+                                GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gboolean hinting = FALSE;
+  gboolean autohint = FALSE;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "hinting",  &hinting,
+                        "autohint", &autohint,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    {
+      g_value_set_boolean (&return_vals->values[1], hinting);
+      g_value_set_boolean (&return_vals->values[2], autohint);
+    }
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_antialias_invoker (GimpProcedure      *procedure,
+                                  Gimp               *gimp,
+                                  GimpContext        *context,
+                                  GimpProgress       *progress,
+                                  const GValueArray  *args,
+                                  GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gboolean antialias = FALSE;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "antialias", &antialias,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_set_boolean (&return_vals->values[1], antialias);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_kerning_invoker (GimpProcedure      *procedure,
+                                Gimp               *gimp,
+                                GimpContext        *context,
+                                GimpProgress       *progress,
+                                const GValueArray  *args,
+                                GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gboolean kerning = FALSE;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "kerning", &kerning,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_set_boolean (&return_vals->values[1], kerning);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_language_invoker (GimpProcedure      *procedure,
+                                 Gimp               *gimp,
+                                 GimpContext        *context,
+                                 GimpProgress       *progress,
+                                 const GValueArray  *args,
+                                 GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gchar *language = NULL;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "language", &language,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_take_string (&return_vals->values[1], language);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_base_direction_invoker (GimpProcedure      *procedure,
+                                       Gimp               *gimp,
+                                       GimpContext        *context,
+                                       GimpProgress       *progress,
+                                       const GValueArray  *args,
+                                       GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gint32 direction = 0;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "base-direction", &direction,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_set_enum (&return_vals->values[1], direction);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_justification_invoker (GimpProcedure      *procedure,
+                                      Gimp               *gimp,
+                                      GimpContext        *context,
+                                      GimpProgress       *progress,
+                                      const GValueArray  *args,
+                                      GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gint32 justify = 0;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "justify", &justify,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_set_enum (&return_vals->values[1], justify);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_color_invoker (GimpProcedure      *procedure,
+                              Gimp               *gimp,
+                              GimpContext        *context,
+                              GimpProgress       *progress,
+                              const GValueArray  *args,
+                              GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "color", &color,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    gimp_value_set_rgb (&return_vals->values[1], &color);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_indent_invoker (GimpProcedure      *procedure,
+                               Gimp               *gimp,
+                               GimpContext        *context,
+                               GimpProgress       *progress,
+                               const GValueArray  *args,
+                               GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gdouble indent = 0.0;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "indent", &indent,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_set_double (&return_vals->values[1], indent);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_line_spacing_invoker (GimpProcedure      *procedure,
+                                     Gimp               *gimp,
+                                     GimpContext        *context,
+                                     GimpProgress       *progress,
+                                     const GValueArray  *args,
+                                     GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gdouble line_spacing = 0.0;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "line-spacing", &line_spacing,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_set_double (&return_vals->values[1], line_spacing);
+
+  return return_vals;
+}
+
+static GValueArray *
+text_layer_get_letter_spacing_invoker (GimpProcedure      *procedure,
+                                       Gimp               *gimp,
+                                       GimpContext        *context,
+                                       GimpProgress       *progress,
+                                       const GValueArray  *args,
+                                       GError            **error)
+{
+  gboolean success = TRUE;
+  GValueArray *return_vals;
+  GimpLayer *layer;
+  gdouble letter_spacing = 0.0;
+
+  layer = gimp_value_get_layer (&args->values[0], gimp);
+
+  if (success)
+    {
+      if (gimp_pdb_layer_is_text_layer (layer, error))
+        {
+          g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                        "letter-spacing", &letter_spacing,
+                        NULL);
+        }
+      else
+        {
+          success = FALSE;
+        }
+    }
+
+  return_vals = gimp_procedure_get_return_values (procedure, success);
+
+  if (success)
+    g_value_set_double (&return_vals->values[1], letter_spacing);
+
+  return return_vals;
+}
+
+void
+register_text_layer_procs (GimpPDB *pdb)
+{
+  GimpProcedure *procedure;
+
+  /*
+   * gimp-text-layer-new
+   */
+  procedure = gimp_procedure_new (text_layer_new_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-new");
+  gimp_procedure_set_static_strings (procedure,
+                                     "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-add-layer'.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_image_id ("image",
+                                                         "image",
+                                                         "The image",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_string ("text",
+                                                       "text",
+                                                       "The text to generate (in UTF-8 encoding)",
+                                                       FALSE, FALSE, FALSE,
+                                                       NULL,
+                                                       GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_string ("fontname",
+                                                       "fontname",
+                                                       "The name of the font",
+                                                       FALSE, FALSE, FALSE,
+                                                       NULL,
+                                                       GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_double ("size",
+                                                    "size",
+                                                    "The size of text in either pixels or points",
+                                                    0.0, 8192.0, 0.0,
+                                                    GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_unit ("unit",
+                                                     "unit",
+                                                     "The units of specified size",
+                                                     TRUE,
+                                                     FALSE,
+                                                     GIMP_UNIT_PIXEL,
+                                                     GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   gimp_param_spec_layer_id ("layer",
+                                                             "layer",
+                                                             "The new text layer.",
+                                                             pdb->gimp, FALSE,
+                                                             GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-text
+   */
+  procedure = gimp_procedure_new (text_layer_set_text_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-text");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-text",
+                                     "Set the text of a text layer.",
+                                     "This procedure changes the text of a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_string ("text",
+                                                       "text",
+                                                       "The new text to set",
+                                                       FALSE, FALSE, FALSE,
+                                                       NULL,
+                                                       GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-font
+   */
+  procedure = gimp_procedure_new (text_layer_set_font_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-font");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-font",
+                                     "Set the font of a text layer.",
+                                     "This procedure modifies the font used in the specified text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_string ("font",
+                                                       "font",
+                                                       "The new font to use",
+                                                       FALSE, FALSE, FALSE,
+                                                       NULL,
+                                                       GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-fontsize
+   */
+  procedure = gimp_procedure_new (text_layer_set_fontsize_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-fontsize");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-fontsize",
+                                     "Set the font size.",
+                                     "This procedure changes the font size of a text layer. The size of your font will be a double 'font-size' of 'unit' units.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_double ("font-size",
+                                                    "font size",
+                                                    "The font size",
+                                                    0.0, 8192.0, 0.0,
+                                                    GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_unit ("unit",
+                                                     "unit",
+                                                     "The unit to use for the font size",
+                                                     TRUE,
+                                                     FALSE,
+                                                     GIMP_UNIT_PIXEL,
+                                                     GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-hinting
+   */
+  procedure = gimp_procedure_new (text_layer_set_hinting_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-hinting");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-hinting",
+                                     "Enable/disable the use of hinting in a text layer.",
+                                     "This procedure enables or disables hinting on the text of a text layer. If you enable 'auto-hint', FreeType\'s automatic hinter will be used and hinting information from the font will be ignored.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_boolean ("hinting",
+                                                     "hinting",
+                                                     "Enable/disable the use of hinting on the text",
+                                                     FALSE,
+                                                     GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_boolean ("autohint",
+                                                     "autohint",
+                                                     "Force the use of the autohinter provided through FreeType",
+                                                     FALSE,
+                                                     GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-antialias
+   */
+  procedure = gimp_procedure_new (text_layer_set_antialias_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-antialias");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-antialias",
+                                     "Enable/disable anti-aliasing in a text layer.",
+                                     "This procedure enables or disables anti-aliasing of the text in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_boolean ("antialias",
+                                                     "antialias",
+                                                     "Enable/disable antialiasing of the text",
+                                                     FALSE,
+                                                     GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-kerning
+   */
+  procedure = gimp_procedure_new (text_layer_set_kerning_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-kerning");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-kerning",
+                                     "Enable/disable kerning in a text layer.",
+                                     "This procedure enables or disables kerning in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_boolean ("kerning",
+                                                     "kerning",
+                                                     "Enable/disable kerning in the text",
+                                                     FALSE,
+                                                     GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-language
+   */
+  procedure = gimp_procedure_new (text_layer_set_language_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-language");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-language",
+                                     "Set the language of the text layer.",
+                                     "This procedure sets the language of the text in text layer. For some scripts the language has an influence of how the text is rendered.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_string ("language",
+                                                       "language",
+                                                       "The new language to use for the text layer",
+                                                       FALSE, FALSE, FALSE,
+                                                       NULL,
+                                                       GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-base-direction
+   */
+  procedure = gimp_procedure_new (text_layer_set_base_direction_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-base-direction");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-base-direction",
+                                     "Set the base direction in the text layer.",
+                                     "This procedure sets the base direction used in applying the Unicode bidirectional algorithm when rendering the text.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("direction",
+                                                  "direction",
+                                                  "The base direction of the text.",
+                                                  GIMP_TYPE_TEXT_DIRECTION,
+                                                  GIMP_TEXT_DIRECTION_LTR,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-justification
+   */
+  procedure = gimp_procedure_new (text_layer_set_justification_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-justification");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-justification",
+                                     "Set the justification of the text in a text layer.",
+                                     "This procedure sets the alignment of the lines in the text layer relative to each other.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_enum ("justify",
+                                                  "justify",
+                                                  "The justification for your text.",
+                                                  GIMP_TYPE_TEXT_JUSTIFICATION,
+                                                  GIMP_TEXT_JUSTIFY_LEFT,
+                                                  GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-color
+   */
+  procedure = gimp_procedure_new (text_layer_set_color_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-color");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-color",
+                                     "Set the color of the text in the text layer.",
+                                     "This procedure sets the text color in the text layer 'layer'.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_rgb ("color",
+                                                    "color",
+                                                    "The color to use for the text",
+                                                    FALSE,
+                                                    NULL,
+                                                    GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-indent
+   */
+  procedure = gimp_procedure_new (text_layer_set_indent_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-indent");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-indent",
+                                     "Set the indentation of the first line in a text layer.",
+                                     "This procedure sets the indentation of the first line in the text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_double ("indent",
+                                                    "indent",
+                                                    "The indentation for the first line.",
+                                                    -8192.0, 8192.0, -8192.0,
+                                                    GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-line-spacing
+   */
+  procedure = gimp_procedure_new (text_layer_set_line_spacing_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-line-spacing");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-line-spacing",
+                                     "Adjust the line spacing in a text layer.",
+                                     "This procedure sets the additional spacing used between lines a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_double ("line-spacing",
+                                                    "line spacing",
+                                                    "The additional line spacing to use.",
+                                                    -8192.0, 8192.0, -8192.0,
+                                                    GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-set-letter-spacing
+   */
+  procedure = gimp_procedure_new (text_layer_set_letter_spacing_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-set-letter-spacing");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-set-letter-spacing",
+                                     "Adjust the letter spacing in a text layer.",
+                                     "This procedure sets the additional spacing between the single glyphs in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_argument (procedure,
+                               g_param_spec_double ("letter-spacing",
+                                                    "letter spacing",
+                                                    "The additional letter spacing to use.",
+                                                    -8192.0, 8192.0, -8192.0,
+                                                    GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-text
+   */
+  procedure = gimp_procedure_new (text_layer_get_text_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-text");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-text",
+                                     "Get the text from a text layer as string.",
+                                     "This procedure returns the text from a text layer as a string.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   gimp_param_spec_string ("text",
+                                                           "text",
+                                                           "The text from the specified text layer.",
+                                                           FALSE, FALSE, FALSE,
+                                                           NULL,
+                                                           GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-font
+   */
+  procedure = gimp_procedure_new (text_layer_get_font_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-font");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-font",
+                                     "Get the font from a text layer as string.",
+                                     "This procedure returns the name of the font from a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   gimp_param_spec_string ("font",
+                                                           "font",
+                                                           "The font which is used in the specified text layer.",
+                                                           FALSE, FALSE, FALSE,
+                                                           NULL,
+                                                           GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-fontsize
+   */
+  procedure = gimp_procedure_new (text_layer_get_fontsize_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-fontsize");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-fontsize",
+                                     "Get the font size from a text layer.",
+                                     "This procedure returns the size of the font which is used in a text layer. You will receive the size as a float 'font-size' in 'unit' units.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_double ("font-size",
+                                                        "font size",
+                                                        "The font size",
+                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
+                                                        GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   gimp_param_spec_unit ("unit",
+                                                         "unit",
+                                                         "The unit used for the font size",
+                                                         TRUE,
+                                                         FALSE,
+                                                         GIMP_UNIT_PIXEL,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-hinting
+   */
+  procedure = gimp_procedure_new (text_layer_get_hinting_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-hinting");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-hinting",
+                                     "Get information about hinting in the specified text layer.",
+                                     "This procedure provides information about the hinting that is being used in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_boolean ("hinting",
+                                                         "hinting",
+                                                         "A flag which is true if hinting is used on the font.",
+                                                         FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_boolean ("autohint",
+                                                         "autohint",
+                                                         "A flag which is true if the text layer is forced to use the autohinter from FreeType.",
+                                                         FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-antialias
+   */
+  procedure = gimp_procedure_new (text_layer_get_antialias_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-antialias");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-antialias",
+                                     "Check if antialiasing is used in the text layer.",
+                                     "This procedure checks if antialiasing is enabled in the specified text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_boolean ("antialias",
+                                                         "antialias",
+                                                         "A flag which is true if antialiasing is used for rendering the font in the text layer.",
+                                                         FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-kerning
+   */
+  procedure = gimp_procedure_new (text_layer_get_kerning_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-kerning");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-kerning",
+                                     "Check if kerning is used in the text layer.",
+                                     "This procedure checks if kerning is enabled in the specified text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_boolean ("kerning",
+                                                         "kerning",
+                                                         "A flag which is true if kerning is used in the text layer.",
+                                                         FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-language
+   */
+  procedure = gimp_procedure_new (text_layer_get_language_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-language");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-language",
+                                     "Get the language used in the text layer.",
+                                     "This procedure returns the language string which is set for the text in the text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer.",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   gimp_param_spec_string ("language",
+                                                           "language",
+                                                           "The language used in the text layer.",
+                                                           FALSE, FALSE, FALSE,
+                                                           NULL,
+                                                           GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-base-direction
+   */
+  procedure = gimp_procedure_new (text_layer_get_base_direction_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-base-direction");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-base-direction",
+                                     "Get the base direction used for rendering the text layer.",
+                                     "This procedure returns the base direction used for rendering the text in the text layer",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer.",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_enum ("direction",
+                                                      "direction",
+                                                      "The based direction used for the text layer.",
+                                                      GIMP_TYPE_TEXT_DIRECTION,
+                                                      GIMP_TEXT_DIRECTION_LTR,
+                                                      GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-justification
+   */
+  procedure = gimp_procedure_new (text_layer_get_justification_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-justification");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-justification",
+                                     "Get the text justification information of the text layer.",
+                                     "This procedure returns the alignment of the lines in the text layer relative to each other.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer.",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_enum ("justify",
+                                                      "justify",
+                                                      "The justification used in the text layer.",
+                                                      GIMP_TYPE_TEXT_JUSTIFICATION,
+                                                      GIMP_TEXT_JUSTIFY_LEFT,
+                                                      GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-color
+   */
+  procedure = gimp_procedure_new (text_layer_get_color_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-color");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-color",
+                                     "Get the color of the text in a text layer.",
+                                     "This procedure returns the color of the text in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer.",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   gimp_param_spec_rgb ("color",
+                                                        "color",
+                                                        "The color of the text.",
+                                                        FALSE,
+                                                        NULL,
+                                                        GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-indent
+   */
+  procedure = gimp_procedure_new (text_layer_get_indent_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-indent");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-indent",
+                                     "Get the line indentation of text layer.",
+                                     "This procedure returns the indentation of the first line in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer.",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_double ("indent",
+                                                        "indent",
+                                                        "The indentation value of the first line.",
+                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
+                                                        GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-line-spacing
+   */
+  procedure = gimp_procedure_new (text_layer_get_line_spacing_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-line-spacing");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-line-spacing",
+                                     "Get the spacing between lines of text.",
+                                     "This procedure returns the line-spacing between lines of text in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer.",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_double ("line-spacing",
+                                                        "line spacing",
+                                                        "The line-spacing value.",
+                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
+                                                        GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+
+  /*
+   * gimp-text-layer-get-letter-spacing
+   */
+  procedure = gimp_procedure_new (text_layer_get_letter_spacing_invoker);
+  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-text-layer-get-letter-spacing");
+  gimp_procedure_set_static_strings (procedure,
+                                     "gimp-text-layer-get-letter-spacing",
+                                     "Get the letter spacing used in a text layer.",
+                                     "This procedure returns the additional spacing between the single glyps in a text layer.",
+                                     "Marcus Heese <heese cip ifi lmu de>",
+                                     "Marcus Heese",
+                                     "2008",
+                                     NULL);
+  gimp_procedure_add_argument (procedure,
+                               gimp_param_spec_layer_id ("layer",
+                                                         "layer",
+                                                         "The text layer.",
+                                                         pdb->gimp, FALSE,
+                                                         GIMP_PARAM_READWRITE));
+  gimp_procedure_add_return_value (procedure,
+                                   g_param_spec_double ("letter-spacing",
+                                                        "letter spacing",
+                                                        "The letter-spacing value.",
+                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
+                                                        GIMP_PARAM_READWRITE));
+  gimp_pdb_register_procedure (pdb, procedure);
+  g_object_unref (procedure);
+}

Modified: trunk/libgimp/Makefile.am
==============================================================================
--- trunk/libgimp/Makefile.am	(original)
+++ trunk/libgimp/Makefile.am	Wed Apr  2 21:53:51 2008
@@ -109,6 +109,7 @@
 	gimpprogress_pdb.c		\
 	gimpselection_pdb.c		\
 	gimpselectiontools_pdb.c	\
+	gimptextlayer_pdb.c		\
 	gimptexttool_pdb.c		\
 	gimptransformtools_pdb.c	\
 	gimpundo_pdb.c			\
@@ -158,6 +159,7 @@
 	gimpprogress_pdb.h		\
 	gimpselection_pdb.h		\
 	gimpselectiontools_pdb.h	\
+	gimptextlayer_pdb.h		\
 	gimptexttool_pdb.h		\
 	gimptransformtools_pdb.h	\
 	gimpundo_pdb.h			\

Modified: trunk/libgimp/gimp_pdb.h
==============================================================================
--- trunk/libgimp/gimp_pdb.h	(original)
+++ trunk/libgimp/gimp_pdb.h	Wed Apr  2 21:53:51 2008
@@ -65,6 +65,7 @@
 #include <libgimp/gimpprogress_pdb.h>
 #include <libgimp/gimpselection_pdb.h>
 #include <libgimp/gimpselectiontools_pdb.h>
+#include <libgimp/gimptextlayer_pdb.h>
 #include <libgimp/gimptexttool_pdb.h>
 #include <libgimp/gimptransformtools_pdb.h>
 #include <libgimp/gimpundo_pdb.h>

Added: trunk/libgimp/gimptextlayer_pdb.c
==============================================================================
--- (empty file)
+++ trunk/libgimp/gimptextlayer_pdb.c	Wed Apr  2 21:53:51 2008
@@ -0,0 +1,974 @@
+/* LIBGIMP - The GIMP Library
+ * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
+ *
+ * gimptextlayer_pdb.c
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* NOTE: This file is auto-generated by pdbgen.pl */
+
+#include "config.h"
+
+#include "gimp.h"
+
+/**
+ * gimp_text_layer_new:
+ * @image_ID: 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.
+ *
+ * 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_add_layer().
+ *
+ * Returns: The new text layer.
+ *
+ * Since: GIMP 2.6
+ */
+gint32
+gimp_text_layer_new (gint32       image_ID,
+                     const gchar *text,
+                     const gchar *fontname,
+                     gdouble      size,
+                     GimpUnit     unit)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gint32 layer_ID = -1;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-new",
+                                    &nreturn_vals,
+                                    GIMP_PDB_IMAGE, image_ID,
+                                    GIMP_PDB_STRING, text,
+                                    GIMP_PDB_STRING, fontname,
+                                    GIMP_PDB_FLOAT, size,
+                                    GIMP_PDB_INT32, unit,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    layer_ID = return_vals[1].data.d_layer;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return layer_ID;
+}
+
+/**
+ * gimp_text_layer_set_text:
+ * @layer_ID: The text layer.
+ * @text: The new text to set.
+ *
+ * Set the text of a text layer.
+ *
+ * This procedure changes the text of a text layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_text (gint32       layer_ID,
+                          const gchar *text)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-text",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_STRING, text,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_font:
+ * @layer_ID: The text layer.
+ * @font: The new font to use.
+ *
+ * Set the font of a text layer.
+ *
+ * This procedure modifies the font used in the specified text layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_font (gint32       layer_ID,
+                          const gchar *font)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-font",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_STRING, font,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_fontsize:
+ * @layer_ID: The text layer.
+ * @font_size: The font size.
+ * @unit: The unit to use for the font size.
+ *
+ * Set the font size.
+ *
+ * This procedure changes the font size of a text layer. The size of
+ * your font will be a double 'font-size' of 'unit' units.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_fontsize (gint32   layer_ID,
+                              gdouble  font_size,
+                              GimpUnit unit)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-fontsize",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_FLOAT, font_size,
+                                    GIMP_PDB_INT32, unit,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_hinting:
+ * @layer_ID: The text layer.
+ * @hinting: Enable/disable the use of hinting on the text.
+ * @autohint: Force the use of the autohinter provided through FreeType.
+ *
+ * Enable/disable the use of hinting in a text layer.
+ *
+ * This procedure enables or disables hinting on the text of a text
+ * layer. If you enable 'auto-hint', FreeType\'s automatic hinter will
+ * be used and hinting information from the font will be ignored.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_hinting (gint32   layer_ID,
+                             gboolean hinting,
+                             gboolean autohint)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-hinting",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_INT32, hinting,
+                                    GIMP_PDB_INT32, autohint,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_antialias:
+ * @layer_ID: The text layer.
+ * @antialias: Enable/disable antialiasing of the text.
+ *
+ * Enable/disable anti-aliasing in a text layer.
+ *
+ * This procedure enables or disables anti-aliasing of the text in a
+ * text layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_antialias (gint32   layer_ID,
+                               gboolean antialias)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-antialias",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_INT32, antialias,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_kerning:
+ * @layer_ID: The text layer.
+ * @kerning: Enable/disable kerning in the text.
+ *
+ * Enable/disable kerning in a text layer.
+ *
+ * This procedure enables or disables kerning in a text layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_kerning (gint32   layer_ID,
+                             gboolean kerning)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-kerning",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_INT32, kerning,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_language:
+ * @layer_ID: The text layer.
+ * @language: The new language to use for the text layer.
+ *
+ * Set the language of the text layer.
+ *
+ * This procedure sets the language of the text in text layer. For some
+ * scripts the language has an influence of how the text is rendered.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_language (gint32       layer_ID,
+                              const gchar *language)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-language",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_STRING, language,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_base_direction:
+ * @layer_ID: The text layer.
+ * @direction: The base direction of the text.
+ *
+ * Set the base direction in the text layer.
+ *
+ * This procedure sets the base direction used in applying the Unicode
+ * bidirectional algorithm when rendering the text.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_base_direction (gint32            layer_ID,
+                                    GimpTextDirection direction)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-base-direction",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_INT32, direction,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_justification:
+ * @layer_ID: The text layer.
+ * @justify: The justification for your text.
+ *
+ * Set the justification of the text in a text layer.
+ *
+ * This procedure sets the alignment of the lines in the text layer
+ * relative to each other.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_justification (gint32                layer_ID,
+                                   GimpTextJustification justify)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-justification",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_INT32, justify,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_color:
+ * @layer_ID: The text layer.
+ * @color: The color to use for the text.
+ *
+ * Set the color of the text in the text layer.
+ *
+ * This procedure sets the text color in the text layer 'layer'.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_color (gint32         layer_ID,
+                           const GimpRGB *color)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-color",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_COLOR, color,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_indent:
+ * @layer_ID: The text layer.
+ * @indent: The indentation for the first line.
+ *
+ * Set the indentation of the first line in a text layer.
+ *
+ * This procedure sets the indentation of the first line in the text
+ * layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_indent (gint32  layer_ID,
+                            gdouble indent)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-indent",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_FLOAT, indent,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_line_spacing:
+ * @layer_ID: The text layer.
+ * @line_spacing: The additional line spacing to use.
+ *
+ * Adjust the line spacing in a text layer.
+ *
+ * This procedure sets the additional spacing used between lines a text
+ * layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_line_spacing (gint32  layer_ID,
+                                  gdouble line_spacing)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-line-spacing",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_FLOAT, line_spacing,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_set_letter_spacing:
+ * @layer_ID: The text layer.
+ * @letter_spacing: The additional letter spacing to use.
+ *
+ * Adjust the letter spacing in a text layer.
+ *
+ * This procedure sets the additional spacing between the single glyphs
+ * in a text layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_set_letter_spacing (gint32  layer_ID,
+                                    gdouble letter_spacing)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-set-letter-spacing",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_FLOAT, letter_spacing,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_get_text:
+ * @layer_ID: The text layer.
+ *
+ * Get the text from a text layer as string.
+ *
+ * This procedure returns the text from a text layer as a string.
+ *
+ * Returns: The text from the specified text layer.
+ *
+ * Since: GIMP 2.6
+ */
+gchar *
+gimp_text_layer_get_text (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gchar *text = NULL;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-text",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    text = g_strdup (return_vals[1].data.d_string);
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return text;
+}
+
+/**
+ * gimp_text_layer_get_font:
+ * @layer_ID: The text layer.
+ *
+ * Get the font from a text layer as string.
+ *
+ * This procedure returns the name of the font from a text layer.
+ *
+ * Returns: The font which is used in the specified text layer.
+ *
+ * Since: GIMP 2.6
+ */
+gchar *
+gimp_text_layer_get_font (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gchar *font = NULL;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-font",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    font = g_strdup (return_vals[1].data.d_string);
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return font;
+}
+
+/**
+ * gimp_text_layer_get_fontsize:
+ * @layer_ID: The text layer.
+ * @unit: The unit used for the font size.
+ *
+ * Get the font size from a text layer.
+ *
+ * This procedure returns the size of the font which is used in a text
+ * layer. You will receive the size as a float 'font-size' in 'unit'
+ * units.
+ *
+ * Returns: The font size.
+ *
+ * Since: GIMP 2.6
+ */
+gdouble
+gimp_text_layer_get_fontsize (gint32    layer_ID,
+                              GimpUnit *unit)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gdouble font_size = 0.0;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-fontsize",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    {
+      font_size = return_vals[1].data.d_float;
+      *unit = return_vals[2].data.d_unit;
+    }
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return font_size;
+}
+
+/**
+ * gimp_text_layer_get_hinting:
+ * @layer_ID: The text layer.
+ * @autohint: A flag which is true if the text layer is forced to use the autohinter from FreeType.
+ *
+ * Get information about hinting in the specified text layer.
+ *
+ * This procedure provides information about the hinting that is being
+ * used in a text layer.
+ *
+ * Returns: A flag which is true if hinting is used on the font.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_get_hinting (gint32    layer_ID,
+                             gboolean *autohint)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean hinting = FALSE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-hinting",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    {
+      hinting = return_vals[1].data.d_int32;
+      *autohint = return_vals[2].data.d_int32;
+    }
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return hinting;
+}
+
+/**
+ * gimp_text_layer_get_antialias:
+ * @layer_ID: The text layer.
+ *
+ * Check if antialiasing is used in the text layer.
+ *
+ * This procedure checks if antialiasing is enabled in the specified
+ * text layer.
+ *
+ * Returns: A flag which is true if antialiasing is used for rendering the font in the text layer.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_get_antialias (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean antialias = FALSE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-antialias",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    antialias = return_vals[1].data.d_int32;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return antialias;
+}
+
+/**
+ * gimp_text_layer_get_kerning:
+ * @layer_ID: The text layer.
+ *
+ * Check if kerning is used in the text layer.
+ *
+ * This procedure checks if kerning is enabled in the specified text
+ * layer.
+ *
+ * Returns: A flag which is true if kerning is used in the text layer.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_get_kerning (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean kerning = FALSE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-kerning",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    kerning = return_vals[1].data.d_int32;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return kerning;
+}
+
+/**
+ * gimp_text_layer_get_language:
+ * @layer_ID: The text layer.
+ *
+ * Get the language used in the text layer.
+ *
+ * This procedure returns the language string which is set for the text
+ * in the text layer.
+ *
+ * Returns: The language used in the text layer.
+ *
+ * Since: GIMP 2.6
+ */
+gchar *
+gimp_text_layer_get_language (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gchar *language = NULL;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-language",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    language = g_strdup (return_vals[1].data.d_string);
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return language;
+}
+
+/**
+ * gimp_text_layer_get_base_direction:
+ * @layer_ID: The text layer.
+ *
+ * Get the base direction used for rendering the text layer.
+ *
+ * This procedure returns the base direction used for rendering the
+ * text in the text layer
+ *
+ * Returns: The based direction used for the text layer.
+ *
+ * Since: GIMP 2.6
+ */
+GimpTextDirection
+gimp_text_layer_get_base_direction (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  GimpTextDirection direction = 0;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-base-direction",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    direction = return_vals[1].data.d_int32;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return direction;
+}
+
+/**
+ * gimp_text_layer_get_justification:
+ * @layer_ID: The text layer.
+ *
+ * Get the text justification information of the text layer.
+ *
+ * This procedure returns the alignment of the lines in the text layer
+ * relative to each other.
+ *
+ * Returns: The justification used in the text layer.
+ *
+ * Since: GIMP 2.6
+ */
+GimpTextJustification
+gimp_text_layer_get_justification (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  GimpTextJustification justify = 0;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-justification",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    justify = return_vals[1].data.d_int32;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return justify;
+}
+
+/**
+ * gimp_text_layer_get_color:
+ * @layer_ID: The text layer.
+ * @color: The color of the text.
+ *
+ * Get the color of the text in a text layer.
+ *
+ * This procedure returns the color of the text in a text layer.
+ *
+ * Returns: TRUE on success.
+ *
+ * Since: GIMP 2.6
+ */
+gboolean
+gimp_text_layer_get_color (gint32   layer_ID,
+                           GimpRGB *color)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gboolean success = TRUE;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-color",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
+
+  if (success)
+    *color = return_vals[1].data.d_color;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return success;
+}
+
+/**
+ * gimp_text_layer_get_indent:
+ * @layer_ID: The text layer.
+ *
+ * Get the line indentation of text layer.
+ *
+ * This procedure returns the indentation of the first line in a text
+ * layer.
+ *
+ * Returns: The indentation value of the first line.
+ *
+ * Since: GIMP 2.6
+ */
+gdouble
+gimp_text_layer_get_indent (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gdouble indent = 0.0;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-indent",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    indent = return_vals[1].data.d_float;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return indent;
+}
+
+/**
+ * gimp_text_layer_get_line_spacing:
+ * @layer_ID: The text layer.
+ *
+ * Get the spacing between lines of text.
+ *
+ * This procedure returns the line-spacing between lines of text in a
+ * text layer.
+ *
+ * Returns: The line-spacing value.
+ *
+ * Since: GIMP 2.6
+ */
+gdouble
+gimp_text_layer_get_line_spacing (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gdouble line_spacing = 0.0;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-line-spacing",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    line_spacing = return_vals[1].data.d_float;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return line_spacing;
+}
+
+/**
+ * gimp_text_layer_get_letter_spacing:
+ * @layer_ID: The text layer.
+ *
+ * Get the letter spacing used in a text layer.
+ *
+ * This procedure returns the additional spacing between the single
+ * glyps in a text layer.
+ *
+ * Returns: The letter-spacing value.
+ *
+ * Since: GIMP 2.6
+ */
+gdouble
+gimp_text_layer_get_letter_spacing (gint32 layer_ID)
+{
+  GimpParam *return_vals;
+  gint nreturn_vals;
+  gdouble letter_spacing = 0.0;
+
+  return_vals = gimp_run_procedure ("gimp-text-layer-get-letter-spacing",
+                                    &nreturn_vals,
+                                    GIMP_PDB_LAYER, layer_ID,
+                                    GIMP_PDB_END);
+
+  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
+    letter_spacing = return_vals[1].data.d_float;
+
+  gimp_destroy_params (return_vals, nreturn_vals);
+
+  return letter_spacing;
+}

Added: trunk/libgimp/gimptextlayer_pdb.h
==============================================================================
--- (empty file)
+++ trunk/libgimp/gimptextlayer_pdb.h	Wed Apr  2 21:53:51 2008
@@ -0,0 +1,85 @@
+/* LIBGIMP - The GIMP Library
+ * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
+ *
+ * gimptextlayer_pdb.h
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* NOTE: This file is auto-generated by pdbgen.pl */
+
+#ifndef __GIMP_TEXT_LAYER_PDB_H__
+#define __GIMP_TEXT_LAYER_PDB_H__
+
+G_BEGIN_DECLS
+
+/* For information look into the C source or the html documentation */
+
+
+gint32                gimp_text_layer_new                (gint32                 image_ID,
+                                                          const gchar           *text,
+                                                          const gchar           *fontname,
+                                                          gdouble                size,
+                                                          GimpUnit               unit);
+gboolean              gimp_text_layer_set_text           (gint32                 layer_ID,
+                                                          const gchar           *text);
+gboolean              gimp_text_layer_set_font           (gint32                 layer_ID,
+                                                          const gchar           *font);
+gboolean              gimp_text_layer_set_fontsize       (gint32                 layer_ID,
+                                                          gdouble                font_size,
+                                                          GimpUnit               unit);
+gboolean              gimp_text_layer_set_hinting        (gint32                 layer_ID,
+                                                          gboolean               hinting,
+                                                          gboolean               autohint);
+gboolean              gimp_text_layer_set_antialias      (gint32                 layer_ID,
+                                                          gboolean               antialias);
+gboolean              gimp_text_layer_set_kerning        (gint32                 layer_ID,
+                                                          gboolean               kerning);
+gboolean              gimp_text_layer_set_language       (gint32                 layer_ID,
+                                                          const gchar           *language);
+gboolean              gimp_text_layer_set_base_direction (gint32                 layer_ID,
+                                                          GimpTextDirection      direction);
+gboolean              gimp_text_layer_set_justification  (gint32                 layer_ID,
+                                                          GimpTextJustification  justify);
+gboolean              gimp_text_layer_set_color          (gint32                 layer_ID,
+                                                          const GimpRGB         *color);
+gboolean              gimp_text_layer_set_indent         (gint32                 layer_ID,
+                                                          gdouble                indent);
+gboolean              gimp_text_layer_set_line_spacing   (gint32                 layer_ID,
+                                                          gdouble                line_spacing);
+gboolean              gimp_text_layer_set_letter_spacing (gint32                 layer_ID,
+                                                          gdouble                letter_spacing);
+gchar*                gimp_text_layer_get_text           (gint32                 layer_ID);
+gchar*                gimp_text_layer_get_font           (gint32                 layer_ID);
+gdouble               gimp_text_layer_get_fontsize       (gint32                 layer_ID,
+                                                          GimpUnit              *unit);
+gboolean              gimp_text_layer_get_hinting        (gint32                 layer_ID,
+                                                          gboolean              *autohint);
+gboolean              gimp_text_layer_get_antialias      (gint32                 layer_ID);
+gboolean              gimp_text_layer_get_kerning        (gint32                 layer_ID);
+gchar*                gimp_text_layer_get_language       (gint32                 layer_ID);
+GimpTextDirection     gimp_text_layer_get_base_direction (gint32                 layer_ID);
+GimpTextJustification gimp_text_layer_get_justification  (gint32                 layer_ID);
+gboolean              gimp_text_layer_get_color          (gint32                 layer_ID,
+                                                          GimpRGB               *color);
+gdouble               gimp_text_layer_get_indent         (gint32                 layer_ID);
+gdouble               gimp_text_layer_get_line_spacing   (gint32                 layer_ID);
+gdouble               gimp_text_layer_get_letter_spacing (gint32                 layer_ID);
+
+
+G_END_DECLS
+
+#endif /* __GIMP_TEXT_LAYER_PDB_H__ */

Modified: trunk/tools/pdbgen/Makefile.am
==============================================================================
--- trunk/tools/pdbgen/Makefile.am	(original)
+++ trunk/tools/pdbgen/Makefile.am	Wed Apr  2 21:53:51 2008
@@ -43,6 +43,7 @@
 	pdb/progress.pdb		\
 	pdb/selection.pdb		\
 	pdb/selection_tools.pdb		\
+	pdb/text_layer.pdb		\
 	pdb/text_tool.pdb		\
 	pdb/transform_tools.pdb		\
 	pdb/undo.pdb			\

Modified: trunk/tools/pdbgen/groups.pl
==============================================================================
--- trunk/tools/pdbgen/groups.pl	(original)
+++ trunk/tools/pdbgen/groups.pl	Wed Apr  2 21:53:51 2008
@@ -41,6 +41,7 @@
     progress
     selection
     selection_tools
+    text_layer
     text_tool
     transform_tools
     undo

Added: trunk/tools/pdbgen/pdb/text_layer.pdb
==============================================================================
--- (empty file)
+++ trunk/tools/pdbgen/pdb/text_layer.pdb	Wed Apr  2 21:53:51 2008
@@ -0,0 +1,1068 @@
+# GIMP - The GNU Image Manipulation Program
+# Copyright (C) 1995 Spencer Kimball and Peter Mattis
+
+# New Text PDB API
+# Copyright (C) 2008 Marcus Heese <heese cip ifi lmu de>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+sub text_layer_new {
+    $blurb = 'Creates a new text layer.';
+
+    $help = <<'HELP';
+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_add_layer().
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'image', type => 'image',
+          desc => 'The image' },
+        { name => 'text', type => 'string',
+          desc => 'The text to generate (in UTF-8 encoding)' },
+        { name => 'fontname', type => 'string',
+          desc => 'The name of the font' },
+        { name => 'size', type => '0.0 <= float <= 8192.0',
+          desc => 'The size of text in either pixels or points' },
+        { name => 'unit', type => 'unit',
+          desc => 'The units of specified size' }
+    );
+
+    @outargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The new text layer.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  GimpText *gimp_text;
+  GimpRGB   color;
+
+  gimp_context_get_foreground (context, &color);
+  
+  gimp_text = g_object_new (GIMP_TYPE_TEXT,
+                            "text",           text,
+                            "font",           fontname,
+                            "font-size",      size,
+                            "font-size-unit", unit,
+                            "color",          &color,
+                            NULL);
+  
+  layer = gimp_text_layer_new (image, gimp_text);
+  g_object_unref (gimp_text);
+
+  if (! layer)
+    {
+      g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_EXECUTION_ERROR,
+                   _("Failed to create text layer"));
+
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_text {
+    $blurb = 'Set the text of a text layer.';
+
+    $help = <<'HELP';
+This procedure changes the text of a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'text', type => 'string',
+          desc => 'The new text to set' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "text", text,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_font {
+    $blurb = 'Set the font of a text layer.';
+
+    $help = <<'HELP';
+This procedure modifies the font used in the specified text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'font', type => 'string',
+          desc => 'The new font to use' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "font", font,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_fontsize {
+    $blurb = 'Set the font size.';
+
+    $help = <<'HELP';
+This procedure changes the font size of a text layer. The size of your font will be a double 'font-size' of 'unit' units.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'font_size', type => '0.0 <= float <= 8192.0',
+          desc => 'The font size' },
+        { name => 'unit', type => 'unit',
+          desc => 'The unit to use for the font size' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "font-size-unit", unit,
+                           "font-size",      font_size,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_hinting {
+    $blurb = 'Enable/disable the use of hinting in a text layer.';
+
+    $help = <<'HELP';
+This procedure enables or disables hinting on the text of a text layer. If you enable 'auto-hint', FreeType\'s automatic hinter will be used and hinting information from the font will be ignored.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'hinting', type => 'boolean',
+          desc => 'Enable/disable the use of hinting on the text' },
+        { name => 'autohint', type => 'boolean',
+          desc => 'Force the use of the autohinter provided through FreeType' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "hinting",  hinting,
+                           "autohint", autohint,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_antialias {
+    $blurb = 'Enable/disable anti-aliasing in a text layer.';
+
+    $help = <<'HELP';
+This procedure enables or disables anti-aliasing of the text in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'antialias', type => 'boolean',
+          desc => 'Enable/disable antialiasing of the text' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "antialias", antialias,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_kerning {
+    $blurb = 'Enable/disable kerning in a text layer.';
+
+    $help = <<'HELP';
+This procedure enables or disables kerning in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'kerning', type => 'boolean',
+          desc => 'Enable/disable kerning in the text' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "kerning", kerning,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_language {
+    $blurb = 'Set the language of the text layer.';
+
+    $help = <<'HELP';
+This procedure sets the language of the text in text layer. For some scripts the language has an influence of how the text is rendered.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'language', type => 'string',
+          desc => 'The new language to use for the text layer' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "language", language,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_base_direction {
+    $blurb = 'Set the base direction in the text layer.';
+
+    $help = <<'HELP';
+This procedure sets the base direction used in applying the Unicode bidirectional algorithm when rendering the text.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'direction', type => 'enum GimpTextDirection',
+          desc => 'The base direction of the text.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "base-direction", direction,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_justification {
+    $blurb = 'Set the justification of the text in a text layer.';
+
+    $help = <<'HELP';
+This procedure sets the alignment of the lines in the text layer relative to each other.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'justify', type => 'enum GimpTextJustification',
+          desc => 'The justification for your text.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "justify", justify,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_color {
+    $blurb = 'Set the color of the text in the text layer.';
+
+    $help = <<'HELP';
+This procedure sets the text color in the text layer 'layer'.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'color', type => 'color',
+          desc => 'The color to use for the text' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "color", &color,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_indent {
+    $blurb = 'Set the indentation of the first line in a text layer.';
+
+    $help = <<'HELP';
+This procedure sets the indentation of the first line in the text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'indent', type => '-8192.0 <= float <= 8192.0',
+          desc => 'The indentation for the first line.' }
+     );
+
+     %invoke = (
+         code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "indent", indent,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_line_spacing {
+    $blurb = 'Adjust the line spacing in a text layer.';
+
+    $help = <<'HELP';
+This procedure sets the additional spacing used between lines a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'line_spacing', type => '-8192.0 <= float <= 8192.0',
+          desc => 'The additional line spacing to use.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "line-spacing", line_spacing,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_set_letter_spacing {
+    $blurb = 'Adjust the letter spacing in a text layer.';
+
+    $help = <<'HELP';
+This procedure sets the additional spacing between the single glyphs in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' },
+        { name => 'letter_spacing', type => '-8192.0 <= float <= 8192.0',
+          desc => 'The additional letter spacing to use.' }
+    );
+    
+    %invoke = (    
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
+                           _("Set text layer attribute"),
+                           "letter-spacing", letter_spacing,
+                           NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_text {
+    $blurb = 'Get the text from a text layer as string.';
+
+    $help = <<'HELP';
+This procedure returns the text from a text layer as a string.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' }
+    );
+
+    @outargs = (
+        { name => 'text', type => 'string',
+          desc => 'The text from the specified text layer.' }
+    );
+    
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "text", &text,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_font {
+    $blurb = 'Get the font from a text layer as string.';
+
+    $help = <<'HELP';
+This procedure returns the name of the font from a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' }
+    );
+
+    @outargs = (
+        { name => 'font', type => 'string',
+          desc => 'The font which is used in the specified text layer.' }
+    );
+    
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "font", &font,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_fontsize {
+    $blurb = 'Get the font size from a text layer.';
+
+    $help = <<'HELP';
+This procedure returns the size of the font which is used in a text layer. You will receive the size as a float 'font-size' in 'unit' units.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' }
+    );
+
+    @outargs = (
+        { name => 'font_size', type => 'float',
+          desc => 'The font size' },
+        { name => 'unit', type => 'unit',
+          desc => 'The unit used for the font size' }
+    );
+    
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "font-size",      &font_size,
+                    "font-size-unit", &unit,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_hinting {
+    $blurb = 'Get information about hinting in the specified text layer.';
+
+    $help = <<'HELP';
+This procedure provides information about the hinting that is being used in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' }
+    );
+
+    @outargs = (
+        { name => 'hinting', type => 'boolean',
+          desc => 'A flag which is true if hinting is used on the font.' },
+        { name => 'autohint', type => 'boolean',
+          desc => 'A flag which is true if the text layer is forced to use the autohinter from FreeType.' }
+    );
+    
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "hinting",  &hinting,
+                    "autohint", &autohint,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_antialias {
+    $blurb = 'Check if antialiasing is used in the text layer.';
+
+    $help = <<'HELP';
+This procedure checks if antialiasing is enabled in the specified text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' }
+    );
+
+    @outargs = (
+        { name => 'antialias', type => 'boolean',
+          desc => 'A flag which is true if antialiasing is used for rendering the font in the text layer.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "antialias", &antialias,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_kerning {
+    $blurb = 'Check if kerning is used in the text layer.';
+
+    $help = <<'HELP';
+This procedure checks if kerning is enabled in the specified text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer' }
+    );
+
+    @outargs = (
+        { name => 'kerning', type => 'boolean',
+          desc => 'A flag which is true if kerning is used in the text layer.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "kerning", &kerning,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_language {
+    $blurb = 'Get the language used in the text layer.';
+
+    $help = <<'HELP';
+This procedure returns the language string which is set for the text in the text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer.' }
+    );
+
+    @outargs = (
+        { name => 'language', type => 'string',
+          desc => 'The language used in the text layer.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "language", &language,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_base_direction {
+    $blurb = 'Get the base direction used for rendering the text layer.';
+
+    $help = <<'HELP';
+This procedure returns the base direction used for rendering the text in the text layer
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer.' }
+    );
+
+    @outargs = (
+        { name => 'direction', type => 'enum GimpTextDirection',
+          desc => 'The based direction used for the text layer.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "base-direction", &direction,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+
+sub text_layer_get_justification {
+    $blurb = 'Get the text justification information of the text layer.';
+
+    $help = <<'HELP';
+This procedure returns the alignment of the lines in the text layer relative to each other.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer.' }
+    );
+
+    @outargs = (
+        { name => 'justify', type => 'enum GimpTextJustification',
+          desc => 'The justification used in the text layer.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "justify", &justify,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_color {
+    $blurb = 'Get the color of the text in a text layer.';
+
+    $help = <<'HELP';
+This procedure returns the color of the text in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer.' }
+    );
+
+    @outargs = (
+        { name => 'color', type => 'color', void_ret => 1,
+          desc => 'The color of the text.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "color", &color,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_indent {
+    $blurb = 'Get the line indentation of text layer.';
+
+    $help = <<'HELP';
+This procedure returns the indentation of the first line in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer.' }
+    );
+
+    @outargs = (
+        { name => 'indent', type => 'float',
+          desc => 'The indentation value of the first line.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "indent", &indent,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_line_spacing {
+    $blurb = 'Get the spacing between lines of text.';
+
+    $help = <<'HELP';
+This procedure returns the line-spacing between lines of text in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer.' }
+    );
+
+    @outargs = (
+        { name => 'line_spacing', type => 'float',
+          desc => 'The line-spacing value.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "line-spacing", &line_spacing,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+sub text_layer_get_letter_spacing {
+    $blurb = 'Get the letter spacing used in a text layer.';
+
+    $help = <<'HELP';
+This procedure returns the additional spacing between the single glyps in a text layer.
+HELP
+
+    &marcus_pdb_misc('2008', '2.6');
+
+    @inargs = (
+        { name => 'layer', type => 'layer',
+          desc => 'The text layer.' }
+    );
+
+    @outargs = (
+        { name => 'letter_spacing', type => 'float',
+          desc => 'The letter-spacing value.' }
+    );
+
+    %invoke = (
+        code => <<'CODE'
+{
+  if (gimp_pdb_layer_is_text_layer (layer, error))
+    {
+      g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
+                    "letter-spacing", &letter_spacing,
+                    NULL);
+    }
+  else
+    {
+      success = FALSE;
+    }
+}
+CODE
+    );
+}
+
+
+ headers = qw("libgimpbase/gimpbase.h"
+              "core/gimpcontext.h"
+              "text/gimptext.h" "text/gimptextlayer.h"
+              "gimppdb-utils.h" "gimppdberror.h"
+              "gimp-intl.h");
+
+ procs = qw(text_layer_new
+            text_layer_set_text
+            text_layer_set_font
+            text_layer_set_fontsize
+            text_layer_set_hinting
+            text_layer_set_antialias
+            text_layer_set_kerning
+            text_layer_set_language
+            text_layer_set_base_direction
+            text_layer_set_justification
+            text_layer_set_color
+            text_layer_set_indent
+            text_layer_set_line_spacing
+            text_layer_set_letter_spacing
+            text_layer_get_text
+            text_layer_get_font
+            text_layer_get_fontsize
+            text_layer_get_hinting
+            text_layer_get_antialias
+            text_layer_get_kerning
+            text_layer_get_language
+            text_layer_get_base_direction
+            text_layer_get_justification
+            text_layer_get_color
+            text_layer_get_indent
+            text_layer_get_line_spacing
+            text_layer_get_letter_spacing);
+
+%exports = (app => [ procs], lib => [ procs]);
+
+$desc = 'Text layer procedures';
+
+1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]