Previous topic

efl.evas.Polygon Class

Next topic

efl.evas.Textblock Class

efl.evas.Text Class

class efl.evas.Text

Bases: efl.evas.Object

Text.

Parameters:
  • canvas (Canvas) – Evas canvas for this object
  • size (tuple of ints) – Width and height
  • pos (tuple of ints) – X and Y
  • geometry (tuple of ints) – X, Y, width, height
  • color (tuple of ints) – R, G, B, A
  • name (string) – Object name
  • text (string) – The text
  • font (string) – Font name
  • font_source (string) – Where to find the font
  • style (string) – Style
  • 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
ascent
Type :int
char_coords_get(int x, int y)

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(int char_index) -> (x, y, w, h)

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
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_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
glow2_color
Type :(int r, int g, int b, int a)
glow_color
Type :(int r, int g, int b, int a)
horiz_advance
Type :int
inset
Type :int
max_ascent
Type :int
max_descent
Type :int
outline_color
Type :(int r, int g, int b, int a)
shadow_color
Type :(int r, int g, int b, int a)
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_pad
Type :(int l, int r, int t, int b)
text

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

Type :unicode
vert_advance
Type :int