This page describes how to style text in an Evas Text Block.
Index
The following styling commands are accepted:
- Font
- Font fallback
- Font size
- Font source
- Font weight
- Font style
- Font width
- Language
- Color
- Underline Color
- Second Underline Color
- Underline Dash Color
- Outline Color
- Shadow Color
- First Glow Color
- Second Glow Color
- Backing Color
- Strikethrough Color
- Horizontal Align
- Vertical Align
- Wrap
- Left margin
- Right margin
- Underline
- Strikethrough
- Backing
- Style
- Tabstops
- Line size
- Relative line size
- Line gap
- Relative line gap
- Item
- Line fill
- Ellipsis
- Password
- Underline dash width
- Underline dash gap
Contents
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 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"
- "light"
- "book"
- "medium"
- "semibold"
- "bold"
- "ultrabold"
- "black"
- "extrablack" font_weight=<weight>
Font style
Sets the style of the font. The value must be one of:
- "normal"
- "oblique"
- "italic" font_style=<style>
Font width
Sets the width of the font. The value must be one of:
- "normal"
- "ultracondensed"
- "extracondensed"
- "condensed"
- "semicondensed"
- "semiexpanded"
- "expanded"
- "extraexpanded"
- "ultraexpanded" font_width=<width>
Language
Sets the language of the text for FontConfig.
Color
Sets the color of the text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" color=<color>
Underline Color
Sets the color of the underline. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" underline_color=<color>
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" underline2_color=<color>
Underline Dash Color
Sets the color of dashed underline. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" underline_dash_color=<color>
Outline Color
Sets the color of the outline of the text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" outline_color=<color>
Shadow Color
Sets the color of the shadow of the text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" shadow_color=<color>
First Glow Color
Sets the first color of the glow of text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" glow_color=<color>
Second Glow Color
Sets the second color of the glow of text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" glow2_color=<color>
Backing Color
Sets a background color for text. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" backing_color=<color>
Strikethrough Color
Sets the color of text that is striked through. The following formats are accepted:
- "#RRGGBB"
- "#RRGGBBAA"
- "#RGB"
- "#RGBA" 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
- "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
- <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" align=<value or preset>
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" valign=<value or preset>
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
- "" - Don't wrap wrap=<value or preset>
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>
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 strikethrough=on/off
Backing
Sets if the text will have backing. The value must be one of the following:
- "off" - No backing
- "on" - Backing backing=on/off
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>
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%! linesize=<number>
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! linerelsize=<number>%
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%! linegap=<number>
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! linerelgap=<number>%
Item
Not implemented! Does nothing!
Line fill
Sets the size of the line fill in text. The value must be a percentage.
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 password=<number>
Underline dash width
Sets the width of the underline dash. The value should be a number.
Underline dash gap
Sets the gap of the underline dash. The value should be a number.