Text Object Functions
Evas » Specific Object Functions

Functions that operate on single line, single style text objects. More...

## Macros

#define | EVAS_TEXT_STYLE_MASK_BASIC 0xf
#define | EVAS_TEXT_STYLE_BASIC_SET(x, s)
| Text style type creation macro.
#define | EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION (0x7 << 4)
#define | EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s)
| Text style type creation macro.

## Enumerations

enum

Evas_Text_Style_Type {
EVAS_TEXT_STYLE_PLAIN = 0 ,
EVAS_TEXT_STYLE_SHADOW ,
EVAS_TEXT_STYLE_OUTLINE ,
EVAS_TEXT_STYLE_SOFT_OUTLINE ,
EVAS_TEXT_STYLE_GLOW ,
EVAS_TEXT_STYLE_OUTLINE_SHADOW ,
EVAS_TEXT_STYLE_FAR_SHADOW ,
EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW ,
EVAS_TEXT_STYLE_SOFT_SHADOW ,
EVAS_TEXT_STYLE_FAR_SOFT_SHADOW ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT = 0 ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM = 16 ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT = 32 ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT = 48 ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT = 64 ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP = 80 ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT = 96 ,
EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT = 112
}

| Types of styles to be applied on text objects. More...

## Functions

EVAS_API void | evas_object_text_shadow_color_set (Evas_Text *obj, int r, int g, int b, int a)
| Controls the shadow color for the given text object.
EVAS_API void | evas_object_text_shadow_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a)
| Controls the shadow color for the given text object.
EVAS_API void | evas_object_text_ellipsis_set (Evas_Text *obj, double ellipsis)
| Controls the ellipsis that should be used for the text object.
EVAS_API double | evas_object_text_ellipsis_get (const Evas_Text *obj)
| Controls the ellipsis that should be used for the text object.
EVAS_API void | evas_object_text_bidi_delimiters_set (Evas_Text *obj, const char *delim)
| Sets the BiDi delimiters used in the textblock.
EVAS_API const char * | evas_object_text_bidi_delimiters_get (const Evas_Text *obj)
| Sets the BiDi delimiters used in the textblock.
EVAS_API void | evas_object_text_outline_color_set (Evas_Text *obj, int r, int g, int b, int a)
| Controls the outline color for the given text object.
EVAS_API void | evas_object_text_outline_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a)
| Controls the outline color for the given text object.
EVAS_API void | evas_object_text_glow2_color_set (Evas_Text *obj, int r, int g, int b, int a)
| Sets the 'glow 2' color for the given text object.
EVAS_API void | evas_object_text_glow2_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a)
| Sets the 'glow 2' color for the given text object.
EVAS_API void | evas_object_text_style_set (Evas_Text *obj, Evas_Text_Style_Type style)
| Controls the style to apply on the given text object.
EVAS_API Evas_Text_Style_Type | evas_object_text_style_get (const Evas_Text *obj)
| Controls the style to apply on the given text object.
EVAS_API void | evas_object_text_glow_color_set (Evas_Text *obj, int r, int g, int b, int a)
| Sets the glow color for the given text object.
EVAS_API void | evas_object_text_glow_color_get (const Evas_Text *obj, int *r, int *g, int *b, int *a)
| Sets the glow color for the given text object.
EVAS_API int | evas_object_text_max_descent_get (const Evas_Text *obj)
| Maximal descent property.
EVAS_API void | evas_object_text_style_pad_get (const Evas_Text *obj, int *l, int *r, int *t, int *b)
| Gets the text style pad of a text object.
EVAS_API Efl_Text_Bidirectional_Type | evas_object_text_direction_get (const Evas_Text *obj)
| Retrieves the direction of the text currently being displayed in the text object.
EVAS_API int | evas_object_text_ascent_get (const Evas_Text *obj)
| Ascent property.
EVAS_API int | evas_object_text_horiz_advance_get (const Evas_Text *obj)
| Horizontal advance property.
EVAS_API int | evas_object_text_inset_get (const Evas_Text *obj)
| Inset property.
EVAS_API int | evas_object_text_max_ascent_get (const Evas_Text *obj)
| Maximal ascent property.
EVAS_API int | evas_object_text_vert_advance_get (const Evas_Text *obj)
| Vertical advance property.
EVAS_API int | evas_object_text_descent_get (const Evas_Text *obj)
| descent property
EVAS_API int | evas_object_text_last_up_to_pos (const Evas_Text *obj, int x, int y)
| Returns the logical position of the last char in the text up to the pos given.
EVAS_API int | evas_object_text_char_coords_get (const Evas_Text *obj, int x, int y, int *cx, int *cy, int *cw, int *ch)
| Get character coordinates.
EVAS_API Eina_Bool | evas_object_text_char_pos_get (const Evas_Text *obj, int pos, int *cx, int *cy, int *cw, int *ch)
| Retrieve position and dimension information of a character within a text Efl_Canvas_Object.
EVAS_API Evas_Object * | evas_object_text_add (Evas *e)
| Creates a new text object on the provided canvas.
EVAS_API void | evas_object_text_text_set (Eo *obj, const char *text)
| Sets the text string to be displayed by the given text object.
EVAS_API const char * | evas_object_text_text_get (const Eo *obj)
| Retrieves the text string currently being displayed by the given text object.
EVAS_API void | evas_object_text_font_source_set (Eo *obj, const char *font_source)
| Set the font (source) file to be used on a given text object.
EVAS_API const char * | evas_object_text_font_source_get (const Eo *obj)
| Get the font file's path which is being used on a given text object.
EVAS_API void | evas_object_text_font_set (Eo *obj, const char *font, Evas_Font_Size size)
| Set the font family or filename, and size on a given text object.
EVAS_API void | evas_object_text_font_get (const Eo *obj, const char **font, Evas_Font_Size *size)
| Retrieve the font family and size in use on a given text object.

## Detailed Description

Functions that operate on single line, single style text objects.

For multiline and multiple style text, see Textblock Object Functions.

See some examples on this group of functions.

Warning
  We don't guarantee any proper results if you create a Text object without setting the evas engine.

## Macro Definition Documentation

## EVAS_TEXT_STYLE_BASIC_SET

#define EVAS_TEXT_STYLE_BASIC_SET | ( |  | x,
|  |  | s )

Value:
do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0)

Text style type creation macro.

Use style types on the 's' arguments, being 'x' your style variable.

## EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET

#define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET | ( |  | x,
|  |  | s )

Value:
do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0)

Text style type creation macro.

This one will impose shadow directions on the style type variable – use the `EVAS_TEXT_STYLE_SHADOW_DIRECTION_*` values on 's', incrementally.

## Enumeration Type Documentation

## Evas_Text_Style_Type

enum Evas_Text_Style_Type

Types of styles to be applied on text objects.

The EVAS_TEXT_STYLE_SHADOW_DIRECTION_* ones are to be OR'ed together with others imposing shadow, to change the shadow's direction.

See also
  evas_object_text_style_set()
  evas_object_text_style_get()

Enumerator
EVAS_TEXT_STYLE_PLAIN | plain, standard text
EVAS_TEXT_STYLE_SHADOW | text with shadow underneath
EVAS_TEXT_STYLE_OUTLINE | text with an outline
EVAS_TEXT_STYLE_SOFT_OUTLINE | text with a soft outline
EVAS_TEXT_STYLE_GLOW | text with a glow effect
EVAS_TEXT_STYLE_OUTLINE_SHADOW | text with both outline and shadow effects
EVAS_TEXT_STYLE_FAR_SHADOW | text with (far) shadow underneath
EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW | text with outline and soft shadow effects combined
EVAS_TEXT_STYLE_SOFT_SHADOW | text with (soft) shadow underneath
EVAS_TEXT_STYLE_FAR_SOFT_SHADOW | text with (far soft) shadow underneath
EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT | shadow growing to bottom right
EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM | shadow growing to the bottom
EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT | shadow growing to bottom left
EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT | shadow growing to the left
EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT | shadow growing to top left
EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP | shadow growing to the top
EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT | shadow growing to top right
EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT | shadow growing to the right

Examples
  evas-text.c.

## Function Documentation

## evas_object_text_shadow_color_set()

EVAS_API void evas_object_text_shadow_color_set | ( | Evas_Text * | obj,
|  | int | r,
|  | int | g,
|  | int | b,
|  | int | a )

Controls the shadow color for the given text object.

Shadow effects are fading colors decorating the text underneath it. They will be shown if the object is set to one of the following styles:

- `EVAS_TEXT_STYLE_TYPE_SHADOW` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW` - `EVAS_TEXT_STYLE_TYPE_FAR_SHADOW` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW` - `EVAS_TEXT_STYLE_TYPE_SOFT_SHADOW` - `EVAS_TEXT_STYLE_TYPE_FAR_SOFT_SHADOW`

One can also change the direction where the shadow grows to, with evas_object_text_style_get

See evas_object_text_shadow_color_get

Parameters

  [in] | obj | The object.
  [in] | r | The red component of the given color.
  [in] | g | The green component of the given color.
  [in] | b | The blue component of the given color.
  [in] | a | The alpha component of the given color.

## evas_object_text_shadow_color_get()

EVAS_API void evas_object_text_shadow_color_get | ( | const Evas_Text * | obj,
|  | int * | r,
|  | int * | g,
|  | int * | b,
|  | int * | a )

Controls the shadow color for the given text object.

Shadow effects are fading colors decorating the text underneath it. They will be shown if the object is set to one of the following styles:

- `EVAS_TEXT_STYLE_TYPE_SHADOW` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW` - `EVAS_TEXT_STYLE_TYPE_FAR_SHADOW` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW` - `EVAS_TEXT_STYLE_TYPE_SOFT_SHADOW` - `EVAS_TEXT_STYLE_TYPE_FAR_SOFT_SHADOW`

One can also change the direction where the shadow grows to, with evas_object_text_style_get

See evas_object_text_shadow_color_get

Note
  Use `NULL` pointers on the color components you're not interested in: they'll be ignored by the function.

Parameters

  [in] | obj | The object.
  [out] | r | The red component of the given color.
  [out] | g | The green component of the given color.
  [out] | b | The blue component of the given color.
  [out] | a | The alpha component of the given color.

## evas_object_text_ellipsis_set()

EVAS_API void evas_object_text_ellipsis_set | ( | Evas_Text * | obj,
|  | double | ellipsis )

Controls the ellipsis that should be used for the text object.

This is a value between 0.0 and 1.0 indicating the position of the text to be shown. 0.0 means the start will be shown and the end trimmed, 1.0 means the beginning will be trimmed and the end will be shown, and any value in between will cause ellipsis to be added in both end of the text and the requested part to be shown. -1.0 means ellipsis is turned off.

Parameters

  [in] | obj | The object.
  [in] | ellipsis | The ellipsis. Allowed values: -1.0 or 0.0-1.0

Since
  1.8

## evas_object_text_ellipsis_get()

EVAS_API double evas_object_text_ellipsis_get | ( | const Evas_Text * | obj | ) |

Controls the ellipsis that should be used for the text object.

This is a value between 0.0 and 1.0 indicating the position of the text to be shown. 0.0 means the start will be shown and the end trimmed, 1.0 means the beginning will be trimmed and the end will be shown, and any value in between will cause ellipsis to be added in both end of the text and the requested part to be shown. -1.0 means ellipsis is turned off.

Parameters

  [in] | obj | The object.

Returns
  The ellipsis. Allowed values: -1.0 or 0.0-1.0

Since
  1.8

## evas_object_text_bidi_delimiters_set()

EVAS_API void evas_object_text_bidi_delimiters_set | ( | Evas_Text * | obj,
|  | const char * | delim )

Sets the BiDi delimiters used in the textblock.

BiDi delimiters are use for in-paragraph separation of bidi segments. This is useful for example in recipients fields of e-mail clients where bidi oddities can occur when mixing RTL and LTR.

Parameters

  [in] | obj | The object.
  [in] | delim | A null terminated string of delimiters, e.g ",|".

Since
  1.1

## evas_object_text_bidi_delimiters_get()

EVAS_API const char * evas_object_text_bidi_delimiters_get | ( | const Evas_Text * | obj | ) |

Sets the BiDi delimiters used in the textblock.

BiDi delimiters are use for in-paragraph separation of bidi segments. This is useful for example in recipients fields of e-mail clients where bidi oddities can occur when mixing RTL and LTR.

Parameters

  [in] | obj | The object.

Returns
  A null terminated string of delimiters, e.g ",|".

Since
  1.1

## evas_object_text_outline_color_set()

EVAS_API void evas_object_text_outline_color_set | ( | Evas_Text * | obj,
|  | int | r,
|  | int | g,
|  | int | b,
|  | int | a )

Controls the outline color for the given text object.

Outline effects (colored lines around text glyphs) will be shown if the object is set to one of the following styles: - `EVAS_TEXT_STYLE_TYPE_OUTLINE` - `EVAS_TEXT_STYLE_TYPE_SOFT_OUTLINE` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW`

Parameters

  [in] | obj | The object.
  [in] | r | The red component of the given color.
  [in] | g | The green component of the given color.
  [in] | b | The blue component of the given color.
  [in] | a | The alpha component of the given color.

## evas_object_text_outline_color_get()

EVAS_API void evas_object_text_outline_color_get | ( | const Evas_Text * | obj,
|  | int * | r,
|  | int * | g,
|  | int * | b,
|  | int * | a )

Controls the outline color for the given text object.

Outline effects (colored lines around text glyphs) will be shown if the object is set to one of the following styles: - `EVAS_TEXT_STYLE_TYPE_OUTLINE` - `EVAS_TEXT_STYLE_TYPE_SOFT_OUTLINE` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW` - `EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW`

Parameters

  [in] | obj | The object.
  [out] | r | The red component of the given color.
  [out] | g | The green component of the given color.
  [out] | b | The blue component of the given color.
  [out] | a | The alpha component of the given color.

## evas_object_text_glow2_color_set()

EVAS_API void evas_object_text_glow2_color_set | ( | Evas_Text * | obj,
|  | int | r,
|  | int | g,
|  | int | b,
|  | int | a )

Sets the 'glow 2' color for the given text object.

'Glow 2' effects are glowing colors decorating the text's (immediate) surroundings. They will be shown if the object is set to the `EVAS_TEXT_STYLE_TYPE_GLOW` style. See also evas_object_text_glow_color_get.

Parameters

  [in] | obj | The object.
  [in] | r | The red component of the given color.
  [in] | g | The green component of the given color.
  [in] | b | The blue component of the given color.
  [in] | a | The alpha component of the given color.

## evas_object_text_glow2_color_get()

EVAS_API void evas_object_text_glow2_color_get | ( | const Evas_Text * | obj,
|  | int * | r,
|  | int * | g,
|  | int * | b,
|  | int * | a )

Sets the 'glow 2' color for the given text object.

'Glow 2' effects are glowing colors decorating the text's (immediate) surroundings. They will be shown if the object is set to the `EVAS_TEXT_STYLE_TYPE_GLOW` style. See also evas_object_text_glow_color_get.

Parameters

  [in] | obj | The object.
  [out] | r | The red component of the given color.
  [out] | g | The green component of the given color.
  [out] | b | The blue component of the given color.
  [out] | a | The alpha component of the given color.

## evas_object_text_style_set()

EVAS_API void evas_object_text_style_set | ( | Evas_Text * | obj,
|  | Evas_Text_Style_Type | style )

Controls the style to apply on the given text object.

Text object styles are one of the values in Evas_Text_Style_Type Some of those values are combinations of more than one style, and some account for the direction of the rendering of shadow effects.

Note
  One may use the helper macros EVAS_TEXT_STYLE_BASIC_SET and EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.

Parameters

  [in] | obj | The object.
  [in] | style | Style type

## evas_object_text_style_get()

EVAS_API Evas_Text_Style_Type evas_object_text_style_get | ( | const Evas_Text * | obj | ) |

Controls the style to apply on the given text object.

Text object styles are one of the values in Evas_Text_Style_Type Some of those values are combinations of more than one style, and some account for the direction of the rendering of shadow effects.

Note
  One may use the helper macros EVAS_TEXT_STYLE_BASIC_SET and EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.

Parameters

  [in] | obj | The object.

Returns
  Style type

## evas_object_text_glow_color_set()

EVAS_API void evas_object_text_glow_color_set | ( | Evas_Text * | obj,
|  | int | r,
|  | int | g,
|  | int | b,
|  | int | a )

Sets the glow color for the given text object.

Glow effects are glowing colors decorating the text's surroundings. They will be shown if the object is set to the `EVAS_TEXT_STYLE_TYPE_GLOW` style.

Note
  Glow effects are placed from a short distance of the text itself, but not touching it. For glowing effects right on the borders of the glyphs, see 'glow 2' effects.

Parameters

  [in] | obj | The object.
  [in] | r | The red component of the given color.
  [in] | g | The green component of the given color.
  [in] | b | The blue component of the given color.
  [in] | a | The alpha component of the given color.

## evas_object_text_glow_color_get()

EVAS_API void evas_object_text_glow_color_get | ( | const Evas_Text * | obj,
|  | int * | r,
|  | int * | g,
|  | int * | b,
|  | int * | a )

Sets the glow color for the given text object.

Glow effects are glowing colors decorating the text's surroundings. They will be shown if the object is set to the `EVAS_TEXT_STYLE_TYPE_GLOW` style.

Note
  Glow effects are placed from a short distance of the text itself, but not touching it. For glowing effects right on the borders of the glyphs, see 'glow 2' effects.

Parameters

  [in] | obj | The object.
  [out] | r | The red component of the given color.
  [out] | g | The green component of the given color.
  [out] | b | The blue component of the given color.
  [out] | a | The alpha component of the given color.

## evas_object_text_max_descent_get()

EVAS_API int evas_object_text_max_descent_get | ( | const Evas_Text * | obj | ) |

Maximal descent property.

Parameters

  [in] | obj | The object.

Returns
  Evas coordinate

## evas_object_text_style_pad_get()

EVAS_API void evas_object_text_style_pad_get | ( | const Evas_Text * | obj,
|  | int * | l,
|  | int * | r,
|  | int * | t,
|  | int * | b )

Gets the text style pad of a text object.

Parameters

  [in] | obj | The object.
  [out] | l | The left pad (or `NULL`).
  [out] | r | The right pad (or `NULL`).
  [out] | t | The top pad (or `NULL`).
  [out] | b | The bottom pad (or `NULL`).

## evas_object_text_direction_get()

EVAS_API Efl_Text_Bidirectional_Type evas_object_text_direction_get | ( | const Evas_Text * | obj | ) |

Retrieves the direction of the text currently being displayed in the text object.

Parameters

  [in] | obj | The object.

Returns
  Bidirectional type

## evas_object_text_ascent_get()

EVAS_API int evas_object_text_ascent_get | ( | const Evas_Text * | obj | ) |

Ascent property.

Parameters

  [in] | obj | The object.

Returns
  Evas coordinate

## evas_object_text_horiz_advance_get()

EVAS_API int evas_object_text_horiz_advance_get | ( | const Evas_Text * | obj | ) |

Horizontal advance property.

Parameters

  [in] | obj | The object.

Returns
  Evas coordinate

## evas_object_text_inset_get()

EVAS_API int evas_object_text_inset_get | ( | const Evas_Text * | obj | ) |

Inset property.

Parameters

  [in] | obj | The object.

Returns
  Evas coordinate

## evas_object_text_max_ascent_get()

EVAS_API int evas_object_text_max_ascent_get | ( | const Evas_Text * | obj | ) |

Maximal ascent property.

Parameters

  [in] | obj | The object.

Returns
  Evas coordinate

## evas_object_text_vert_advance_get()

EVAS_API int evas_object_text_vert_advance_get | ( | const Evas_Text * | obj | ) |

Vertical advance property.

Parameters

  [in] | obj | The object.

Returns
  Evas coordinate

## evas_object_text_descent_get()

EVAS_API int evas_object_text_descent_get | ( | const Evas_Text * | obj | ) |

descent property

Parameters

  [in] | obj | The object.

Returns
  Evas coordinate

## evas_object_text_last_up_to_pos()

EVAS_API int evas_object_text_last_up_to_pos | ( | const Evas_Text * | obj,
|  | int | x,
|  | int | y )

Returns the logical position of the last char in the text up to the pos given.

This is NOT the position of the last char because of the possibility of RTL in the text.

Parameters

  [in] | obj | The object.
  [in] | x | X coordinate
  [in] | y | Y coordinate

Returns
  Logical position of the last char

## evas_object_text_char_coords_get()

EVAS_API int evas_object_text_char_coords_get | ( | const Evas_Text * | obj,
|  | int | x,
|  | int | y,
|  | int * | cx,
|  | int * | cy,
|  | int * | cw,
|  | int * | ch )

Get character coordinates.

Parameters

  [in] | obj | The object.
  [in] | x | X coordinate
  [in] | y | Y coordinate
  [out] | cx | X coordinate
  [out] | cy | Y coordinate
  [out] | cw | Width
  [out] | ch | Height

Returns
  Logical position of char

## evas_object_text_char_pos_get()

EVAS_API Eina_Bool evas_object_text_char_pos_get | ( | const Evas_Text * | obj,
|  | int | pos,
|  | int * | cx,
|  | int * | cy,
|  | int * | cw,
|  | int * | ch )

Retrieve position and dimension information of a character within a text Efl_Canvas_Object.

This function is used to obtain the X, Y, width and height of the character located at `pos` within the Efl_Canvas_Object `obj`. `obj` must be a text object Any of the `Evas_Coord` parameters ($cx, `cy`, `cw`, `ch`) may be `NULL` in which case no value will be assigned to that parameter.

Parameters

  [in] | obj | The object.
  [in] | pos | The character position to request co-ordinates for.
  [out] | cx | A pointer to an int to store the X value in (can be NULL).
  [out] | cy | A pointer to an int to store the Y value in (can be NULL).
  [out] | cw | A pointer to an int to store the Width value in (can be NULL).
  [out] | ch | A pointer to an int to store the Height value in (can be NULL).

Returns
  `false` on success, `true` otherwise

## evas_object_text_add()

EVAS_API Evas_Object * evas_object_text_add | ( | Evas * | e | ) |

Creates a new text object on the provided canvas.

Parameters

  e | The canvas to create the text object on.

Returns
  `NULL` on error, a pointer to a new text object on success.

Text objects are for simple, single line text elements. If you want more elaborated text blocks, see Textblock Object Functions.

See also
  evas_object_text_font_source_set()
  evas_object_text_font_set()
  evas_object_text_text_set()

References EINA_SAFETY_ON_FALSE_RETURN_VAL, and EVAS_CANVAS_CLASS.

## evas_object_text_text_set()

EVAS_API void evas_object_text_text_set | ( | Eo * | obj,
|  | const char * | text )

Sets the text string to be displayed by the given text object.

See also
  evas_object_text_text_get()

Parameters

  [in] | text | Text string to display on it.

## evas_object_text_text_get()

EVAS_API const char * evas_object_text_text_get | ( | const Eo * | obj | ) |

Retrieves the text string currently being displayed by the given text object.

Returns
  The text string currently being displayed on it.

Note
  Do not free() the return value.

See also
  evas_object_text_text_set()

## evas_object_text_font_source_set()

EVAS_API void evas_object_text_font_source_set | ( | Eo * | obj,
|  | const char * | font_source )

Set the font (source) file to be used on a given text object.

This function allows the font file to be explicitly set for a given text object, overriding system lookup, which will first occur in the given file's contents.

See also
  evas_object_text_font_get()

Parameters

  [in] | font_source | The font file's path.

## evas_object_text_font_source_get()

EVAS_API const char * evas_object_text_font_source_get | ( | const Eo * | obj | ) |

Get the font file's path which is being used on a given text object.

Returns
  The font file's path.

See also
  evas_object_text_font_get() for more details

## evas_object_text_font_set()

EVAS_API void evas_object_text_font_set | ( | Eo * | obj,
|  | const char * | font,
|  | Evas_Font_Size | size )

Set the font family or filename, and size on a given text object.

This function allows the font name and size of a text object to be set. The `font` string has to follow fontconfig's convention on naming fonts, as it's the underlying library used to query system fonts by Evas (see the `fc-list` command's output, on your system, to get an idea). Alternatively, one can use a full path to a font file.

See also
  evas_object_text_font_get()
  evas_object_text_font_source_set()

Parameters

  [in] | font | The font family name or filename.
  [in] | size | The font size, in points.

## evas_object_text_font_get()

EVAS_API void evas_object_text_font_get | ( | const Eo * | obj,
|  | const char ** | font,
|  | Evas_Font_Size * | size )

Retrieve the font family and size in use on a given text object.

This function allows the font name and size of a text object to be queried. Be aware that the font name string is still owned by Evas and should not have free() called on it by the caller of the function.

See also
  evas_object_text_font_set()

Parameters

  [out] | font | The font family name or filename.
  [out] | size | The font size, in points.