Top | ![]() |
![]() |
![]() |
![]() |
GimpLayer * gimp_text_layer_new (GimpImage *image
,const gchar *text
,const gchar *fontname
,gdouble size
,GimpUnit unit
);
Creates a new text layer.
This procedure creates a new text layer. The arguments are kept as
simple as necessary for the normal case. All text attributes,
however, can be modified with the appropriate
gimp_text_layer_set_*() procedures. The new layer still needs to be
added to the image, as this is not automatic. Add the new layer
using gimp_image_insert_layer()
.
image |
The image. |
|
text |
The text to generate (in UTF-8 encoding). |
|
fontname |
The name of the font. |
|
size |
The size of text in either pixels or points. |
|
unit |
The units of specified size. |
Since: 2.6
gchar *
gimp_text_layer_get_text (GimpLayer *layer
);
Get the text from a text layer as string.
This procedure returns the text from a text layer as a string.
The text from the specified text layer.
The returned value must be freed with g_free()
.
[transfer full]
Since: 2.6
gboolean gimp_text_layer_set_text (GimpLayer *layer
,const gchar *text
);
Set the text of a text layer.
This procedure changes the text of a text layer.
Since: 2.6
gchar *
gimp_text_layer_get_markup (GimpLayer *layer
);
Get the markup from a text layer as string.
This procedure returns the markup of the styles from a text layer. The markup will be in the form of Pango's markup - See https://www.pango.org/ for more information about Pango and its markup. Note: Setting the markup of a text layer using Pango's markup is not supported for now.
The markup which represents the style of the specified text layer.
The returned value must be freed with g_free()
.
[transfer full]
Since: 2.8
gchar *
gimp_text_layer_get_font (GimpLayer *layer
);
Get the font from a text layer as string.
This procedure returns the name of the font from a text layer.
The font which is used in the specified text layer.
The returned value must be freed with g_free()
.
[transfer full]
Since: 2.6
gboolean gimp_text_layer_set_font (GimpLayer *layer
,const gchar *font
);
Set the font of a text layer.
This procedure modifies the font used in the specified text layer.
Since: 2.6
gdouble gimp_text_layer_get_font_size (GimpLayer *layer
,GimpUnit *unit
);
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.
Since: 2.6
gboolean gimp_text_layer_set_font_size (GimpLayer *layer
,gdouble font_size
,GimpUnit unit
);
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.
Since: 2.6
gboolean
gimp_text_layer_get_antialias (GimpLayer *layer
);
Check if antialiasing is used in the text layer.
This procedure checks if antialiasing is enabled in the specified text layer.
Since: 2.6
gboolean gimp_text_layer_set_antialias (GimpLayer *layer
,gboolean antialias
);
Enable/disable anti-aliasing in a text layer.
This procedure enables or disables anti-aliasing of the text in a text layer.
Since: 2.6
gboolean
gimp_text_layer_get_kerning (GimpLayer *layer
);
Check if kerning is used in the text layer.
This procedure checks if kerning is enabled in the specified text layer.
Since: 2.6
gboolean gimp_text_layer_set_kerning (GimpLayer *layer
,gboolean kerning
);
Enable/disable kerning in a text layer.
This procedure enables or disables kerning in a text layer.
Since: 2.6
gchar *
gimp_text_layer_get_language (GimpLayer *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.
The language used in the text layer.
The returned value must be freed with g_free()
.
[transfer full]
Since: 2.6
gboolean gimp_text_layer_set_language (GimpLayer *layer
,const gchar *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.
Since: 2.6
GimpTextDirection
gimp_text_layer_get_base_direction (GimpLayer *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
Since: 2.6
gboolean gimp_text_layer_set_base_direction (GimpLayer *layer
,GimpTextDirection 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.
Since: 2.6
GimpTextJustification
gimp_text_layer_get_justification (GimpLayer *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.
Since: 2.6
gboolean gimp_text_layer_set_justification (GimpLayer *layer
,GimpTextJustification justify
);
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.
Since: 2.6
gboolean gimp_text_layer_get_color (GimpLayer *layer
,GimpRGB *color
);
Get the color of the text in a text layer.
This procedure returns the color of the text in a text layer.
Since: 2.6
gboolean gimp_text_layer_set_color (GimpLayer *layer
,const GimpRGB *color
);
Set the color of the text in the text layer.
This procedure sets the text color in the text layer 'layer'.
Since: 2.6
gdouble
gimp_text_layer_get_indent (GimpLayer *layer
);
Get the line indentation of text layer.
This procedure returns the indentation of the first line in a text layer.
Since: 2.6
gboolean gimp_text_layer_set_indent (GimpLayer *layer
,gdouble 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.
Since: 2.6
gdouble
gimp_text_layer_get_line_spacing (GimpLayer *layer
);
Get the spacing between lines of text.
This procedure returns the line-spacing between lines of text in a text layer.
Since: 2.6
gboolean gimp_text_layer_set_line_spacing (GimpLayer *layer
,gdouble line_spacing
);
Adjust the line spacing in a text layer.
This procedure sets the additional spacing used between lines a text layer.
Since: 2.6
gdouble
gimp_text_layer_get_letter_spacing (GimpLayer *layer
);
Get the letter spacing used in a text layer.
This procedure returns the additional spacing between the single glyphs in a text layer.
Since: 2.6
gboolean gimp_text_layer_set_letter_spacing (GimpLayer *layer
,gdouble letter_spacing
);
Adjust the letter spacing in a text layer.
This procedure sets the additional spacing between the single glyphs in a text layer.
Since: 2.6
GimpTextHintStyle
gimp_text_layer_get_hint_style (GimpLayer *layer
);
Get information about hinting in the specified text layer.
This procedure provides information about the hinting that is being used in a text layer. Hinting can be optimized for fidelity or contrast or it can be turned entirely off.
Since: 2.8
gboolean gimp_text_layer_set_hint_style (GimpLayer *layer
,GimpTextHintStyle style
);
Control how font outlines are hinted in a text layer.
This procedure sets the hint style for font outlines in a text layer. This controls whether to fit font outlines to the pixel grid, and if so, whether to optimize for fidelity or contrast.
Since: 2.8
gboolean gimp_text_layer_resize (GimpLayer *layer
,gdouble width
,gdouble height
);
Resize the box of a text layer.
This procedure changes the width and height of a text layer while
keeping it as a text layer and not converting it to a bitmap like
gimp_layer_resize()
would do.
layer |
The text layer. |
|
width |
The new box width in pixels. |
|
height |
The new box height in pixels. |
Since: 2.8