This page describes how to style text in an Evas Text Block.
Index
The following styling commands are accepted:
Contents
Backing Color
Sets a background color for text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
Backing
Sets if the text will have backing. The value must be one of the following:
- "off" - No backing
- "on" - Backing
Second Underline Color
Sets the color of the second line of underline(when using underline mode "double"). The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
Second Glow Color
Sets the second color of the glow of text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
Tabstops
Sets the size of the tab character. The value must be a number greater than one.
Line size
Sets the size of line of text. The value should be a number.
- Warning
- Setting this value sets linerelsize to 0%!
Relative line size
Sets the relative size of line of text. The value must be a percentage.
- Warning
- Setting this value sets linesize to 0!
Line gap
Sets the size of the line gap in text. The value should be a number.
- Warning
- Setting this value sets linerelgap to 0%!
Relative line gap
Sets the relative size of the line gap in text. The value must be a percentage.
- Warning
- Setting this value sets linegap to 0!
Line fill
Sets the size of the line fill in text. The value must be a percentage.
Underline Dash Color
Sets the color of dashed underline. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
underline_dash_color=<color>
Underline
Sets if and how a text will be underlined. The value must be one of the following:
- "off" - No underlining
- "single" - A single line under the text
- "on" - Alias for "single"
- "double" - Two lines under the text
- "dashed" - A dashed line under the text
underline=off/single/on/double/dashed
Strikethrough
Sets if the text will be striked through. The value must be one of the following:
- "off" - No strikethrough
- "on" - Strikethrough
Style
Sets the style of the text. The value must be a string composed of two comma separated parts. The first part of the value sets the appearance of the text, the second the position.
The first part may be any of the following values:
- "plain"
- "off" - Alias for "plain"
- "none" - Alias for "plain"
- "shadow"
- "outline"
- "soft_outline"
- "outline_shadow"
- "outline_soft_shadow"
- "glow"
- "far_shadow"
- "soft_shadow"
- "far_soft_shadow" The second part may be any of the following values:
- "bottom_right"
- "bottom"
- "bottom_left"
- "left"
- "top_left"
- "top"
- "top_right"
- "right"
style=<appearance>,<position>
Underline dash width
Sets the width of the underline dash. The value should be a number.
underline_dash_width=<number>
Underline dash gap
Sets the gap of the underline dash. The value should be a number.
underline_dash_gap=<number>
Font
This sets the name of the font to be used.
Font fallback
This sets the name of the fallback font to be used. This font will be used if the primary font is not available.
font_fallbacks=<font name>
Font size
This sets the the size of font in points to be used.
Font source
Specify an object from which to search for the font.
Font weight
Sets the weight of the font. The value must be one of:
- "normal"
- "thin"
- "ultralight"
- "extralight"
- "light"
- "book"
- "medium"
- "semibold"
- "bold"
- "ultrabold"
- "extrabold"
- "black"
- "extrablack"
Font style
Sets the style of the font. The value must be one of:
- "normal"
- "oblique"
- "italic"
Font width
Sets the width of the font. The value must be one of:
- "normal"
- "ultracondensed"
- "extracondensed"
- "condensed"
- "semicondensed"
- "semiexpanded"
- "expanded"
- "extraexpanded"
- "ultraexpanded"
Language
Sets the language of the text for FontConfig. The value can either be a language text or one of presets:
- "auto" - Respects system locale settings as language
- "none" - Disable language support
Color
Sets the color of the text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
Underline Color
Sets the color of the underline. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
Outline Color
Sets the color of the outline of the text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
Shadow Color
Sets the color of the shadow of the text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
First Glow Color
Sets the first color of the glow of text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
Strikethrough Color
Sets the color of text that is striked through. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA"
- "rgb(0-255,0-255,0-255)"
- "rgba(0-255,0-255,0-255,0.0-1.0)"
- "color_name" like "red"
strikethrough_color=<color>
Horizontal Align
Sets the horizontal alignment of the text. The value can either be a number, a percentage or one of several presets:
- "auto" - Respects LTR/RTL settings
- "locale" - Respects locale(language) direction settings
- "center" - Centers the text in the line
- "middle" - Alias for "center"
- "left" - Puts the text at the left of the line
- "right" - Puts the text at the right of the line
- "start" - Respects LTR/RTL settings. It is same with "auto"
- "end" - Puts the text at the opposite side of LTR/RTL settings
- <number> - A number between 0.0 and 1.0 where 0.0 represents "left" and 1.0 represents "right"
- <number>% - A percentage between 0% and 100% where 0% represents "left" and 100% represents "right"
Vertical Align
Sets the vertical alignment of the text. The value can either be a number or one of the following presets:
- "top" - Puts text at the top of the line
- "center" - Centers the text in the line
- "middle" - Alias for "center"
- "bottom" - Puts the text at the bottom of the line
- "baseline" - Baseline
- "base" - Alias for "baseline"
- <number> - A number between 0.0 and 1.0 where 0.0 represents "top" and 1.0 represents "bottom"
- <number>% - A percentage between 0% and 100% where 0% represents "top" and 100% represents "bottom"
See explanation of baseline at: https://en.wikipedia.org/wiki/Baseline_%28typography%29
Wrap
Sets the wrap policy of the text. The value must be one of the following:
- "word" - Only wraps lines at word boundaries
- "char" - Wraps at any character
- "mixed" - Wrap at words if possible, if not at any character
- "hyphenation" - Hyphenate if possible, if not wrap at words if possible, if not at any character
- "" - Don't wrap
Left margin
Sets the left margin of the text. The value can be a number, an increment, decrement or "reset":
- +<number> - Increments existing left margin by <number>
- -<number> - Decrements existing left margin by <number>
- <number> - Sets left margin to <number>
- "reset" - Sets left margin to 0
left_margin=<value or reset>
Right margin
Sets the right margin of the text. The value can be a number, an increment, decrement or "reset":
- +<number> - Increments existing right margin by <number>
- -<number> - Decrements existing right margin by <number>
- <number> - Sets left margin to <number>
- "reset" - Sets left margin to 0
right_margin=<value or reset>
Item
Not implemented! Does nothing!
Ellipsis
Sets ellipsis mode. The value should be a number. Any value smaller than 0.0 or greater than 1.0 disables ellipsis. A value of 0 means ellipsizing the leftmost portion of the text first, 1 on the other hand the rightmost portion.
Password
Sets if the text is being used for passwords. Enabling this causes all characters to be substituted for '*'. Value must be one of the following:
- "on" - Enable
- "off" - Disable
Underline height
Sets the height of the single underline. The value should be a floating number.
underline_height=<floatingnumber>
Gfx Filter
Experimental filter, see efl_gfx_filter for more information.