efl.evas.Text Class

class efl.evas.Text(Canvas canvas, font=None, shadow_color=None, glow_color=None, glow2_color=None, outline_color=None, **kwargs)

Bases: efl.evas.Object

Parameters:
  • canvas (Canvas) – Evas canvas for this object
  • font (string) – Font name
  • shadow_color (tuple of ints) – The shadow color
  • glow_color (tuple of ints) – The primary glow color
  • glow2_color (tuple of ints) – The secondary glow color
  • outline_color (tuple of ints) – The outline color
  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance
ascent
Type:int
ascent_get
char_coords_get

Retrieve position and dimension information of a character at desired position.

Like char_pos_get(), but instead of providing the character index one can give its position.

Parameters:
  • x
  • y
Return type:

(int x, int y, int w, int h)

char_pos_get

Retrieve position and dimension information of a character.

This function is used to obtain the x, y, width and height of a the character located at char_index within this object.

Parameters:char_index – index of desired character.
Return type:(int x, int y, int w, int h)
descent
Type:int
descent_get
font

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

Parameters:
  • font – The font (family) name.
  • size – The font size, in points.

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).

See:font_source
font_get
font_set
font_source

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

Parameters:font – The font file’s path.

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:font
font_source_get
font_source_set
glow2_color
Type:(int r, int g, int b, int a)
glow2_color_get
glow2_color_set
glow_color
Type:(int r, int g, int b, int a)
glow_color_get
glow_color_set
horiz_advance
Type:int
horiz_advance_get
inset
Type:int
inset_get
max_ascent
Type:int
max_ascent_get
max_descent
Type:int
max_descent_get
outline_color
Type:(int r, int g, int b, int a)
outline_color_get
outline_color_set
shadow_color
Type:(int r, int g, int b, int a)
shadow_color_get
shadow_color_set
style

Text drawing style.

One of:

  • EVAS_TEXT_STYLE_PLAIN
  • 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
Type:Evas_Text_Style_Type
style_get
style_pad
Type:(int l, int r, int t, int b)
style_pad_get
style_set
text

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

Type:unicode
text_get
text_set
vert_advance
Type:int
vert_advance_get