TextStyle¶
- class rinoh.text.TextStyle(base=None, **attributes)¶
Style class for
Text- typeface¶
Typeface to set the text in
Accepts
Typeface: the name of a typeface. Seerinoh --list-fontsfor a list of the available typefaces.Default:
Times
- font_weight¶
Thickness of character outlines relative to their height
Accepts
FontWeight:hairline,thin,ultra-light,extra-light,light,regular,normal,book,roman,medium,semi-bold,demi-bold,bold,extra-bold,ultra-bold,black,heavy,extra-black,ultra-blackDefault:
500
- font_width¶
Stretch of the characters
Accepts
FontWidth:ultra-condensed,extra-condensed,condensed,semi-condensed,normal,medium,semi-expanded,expanded,extra-expanded,ultra-expandedDefault:
5
- font_size¶
Height of characters
Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
10pt
- font_color¶
Color of the font
Accepts
Color: HEX string with optional alpha component (#RRGGBB,#RRGGBBAA,#RGBor#RGBA)Default:
#000
- font_variant¶
Variant of the font
Accepts
FontVariant:normal,small capital,oldstyle figuresDefault:
normal
- position¶
Vertical text position
Accepts
TextPosition:normal,superscript,subscriptDefault:
normal
- hyphen_chars¶
Minimum number of characters in a hyphenated part of a word
Accepts
Integer: a natural number (positive integer)Default:
2
- hyphen_lang¶
Language to use for hyphenation. Accepts locale codes such as ‘en_US’
Accepts
Locale: locale identifier in the<language ID>_<region ID>formatDefault:
en_US
- before¶
Item to insert before this one (inherited from
InlineStyle)Accepts
StyledText: a list of styled text strings, separated by spaces. A styled text string is a quoted string ('or"), optionally followed by a style name enclosed in braces:'text string' (style name)Default: (no value)
- after¶
Item to insert after this one (inherited from
InlineStyle)Accepts
StyledText: a list of styled text strings, separated by spaces. A styled text string is a quoted string ('or"), optionally followed by a style name enclosed in braces:'text string' (style name)Default: (no value)