Character formatting of text in shapes, placeholders and notes is held in
style:text-properties, an element with no children whose attributes are
the properties. It may appear in text, paragraph, presentation, graphic, table-cell
and chart styles, in default styles, in list level styles and in data styles. Many attributes come from XSL-FO 1.0 (fo:),
with the value inherit and some others not allowed; the standard
points to the XSL section for their exact syntax. This page lists every attribute of
style:text-properties and style:ruby-properties from
OpenDocument 1.3 part 3, sections 16.29.29, 17.10 and chapter 20.
Three scripts
Many properties come in three forms: a plain one for Latin text, an
-asian one and a -complex one. Which applies to a
character depends on its script type, taken from the standard’s Table 22:
| Script type | Unicode ranges |
|---|---|
| latin | U+0003–001F, U+0021–009F, U+00A1–04FF, U+0530–058F, U+10A0–10FF, U+13A0–16FF, U+1E00–1FFF, U+2C60–2C7F, U+2C80–2CE3, U+A720–A7FF |
| complex | U+0590–074F, U+0780–07BF, U+0900–109F, U+1200–137F, U+1780–18AF, U+FB50–FDFF, U+FE70–FEFF |
| asian | U+1100–11FF, U+2E80–31BF, U+31C0–31EF, U+3200–4DBF, U+4E00–A4CF, U+AC00–D7AF, U+F900–FAFF, U+FE30–FE4F, U+FF00–FFEF, U+20000–2A6DF, U+2F800–2FA1F |
Other code points are up to the program. style:script-type
(latin, asian, complex, ignore)
says which set is active for a run of text, for readers that cannot work it out and
to settle weak characters; ignore, allowed only in default styles,
applies every script’s properties to all text.
Font
| Attribute (Latin / Asian / complex) | Values | Meaning |
|---|---|---|
style:font-name / style:font-name-asian / style:font-name-complex | font face name | A font declared by a style:font-face in office:font-face-decls, named by its style:name; the declaration gives svg:font-family, style:font-family-generic, style:font-pitch, style:font-charset and the SVG font descriptors. The preferred way to set the font. |
fo:font-family / style:font-family-asian / style:font-family-complex | family name | Font family directly (XSL §7.8.2); style:font-name should be used instead. |
style:font-family-generic / -asian / -complex | roman, swiss, modern, decorative, script, system | Generic family; ignored without a font family on the same element. |
style:font-style-name / -asian / -complex | text | Font style name; ignored without a font family. |
style:font-pitch / -asian / -complex | fixed, variable | Fixed or variable width; ignored without a font family. |
style:font-charset / -asian / -complex | x-symbol or an encoding | x-symbol: a symbol font not following Unicode; ignored without a font family. |
fo:font-size / style:font-size-asian / style:font-size-complex | length, or percent | Size. A percentage is allowed only in common styles and is of the parent style’s size (unlike XSL). Named and relative sizes are not allowed. |
style:font-size-rel / -asian / -complex | length | A change to the parent style’s size, such as 2pt; not in automatic styles. |
fo:font-style / style:font-style-asian / style:font-style-complex | normal, italic, oblique | Slant. |
fo:font-weight / style:font-weight-asian / style:font-weight-complex | normal, bold, 100–900 in hundreds | Weight. |
fo:font-variant | normal, small-caps | Small capitals. |
fo:text-transform | none, lowercase, uppercase, capitalize | Case change. Combining it with a fo:font-variant other than normal is undefined. |
style:font-relief | none, embossed, engraved | Relief effect. |
style:text-outline | true, false | Show the outline of the letters instead of the letters. |
fo:text-shadow | none or an XSL shadow (§7.16.5) | Text shadow. |
style:letter-kerning | true, false | Pair kerning on or off. |
fo:letter-spacing | length, normal | Extra space between letters. |
style:text-scale | percent | Width of the letters, scaled. |
Colour and background
| Attribute | Values | Meaning |
|---|---|---|
fo:color | colour #rrggbb | Text colour. |
style:use-window-font-color | true, false | true: use the window’s text colour on a light background and white on a dark one (what counts as light is up to the program), instead of fo:color. |
fo:background-color | transparent or colour | Background behind the characters (highlighting). |
Underline, overline and line-through
The three decorations have the same set of attributes; the names below show
underline, and the same attributes exist with overline and
line-through in place of underline.
| Attribute | Values | Meaning |
|---|---|---|
style:text-underline-style | none, solid, dotted, dash, long-dash, dot-dash, dot-dot-dash, wave | Line pattern (based on CSS3 Text). |
style:text-underline-type | single, double, none (deprecated) | Single or double line. Should always come with a style, and not be given when the style is none. |
style:text-underline-width | auto, normal, bold, thin, medium, thick, positive integer, percent, length | auto: from the font size; bold: wider than auto; thin < medium < thick, sizes up to the program. |
style:text-underline-color | font-color or colour | Line colour; font-color uses the text colour. |
style:text-underline-mode | continuous, skip-white-space | Under spaces as well, or words only. |
style:text-line-through-text | text | Line-through only: a character to strike through with (such as x or /) instead of a line, when the style is not none. Readers that support only one character use the first; readers that cannot do this use the line style. |
style:text-line-through-text-style | text style name | Line-through only: a text style for those characters. In a common style it may name only a common style. |
<style:style style:name="T1" style:family="text">
<style:text-properties style:text-underline-style="wave" style:text-underline-type="double"
style:text-underline-width="auto" style:text-underline-color="#c9211e"/>
</style:style>
Position, rotation and emphasis
| Attribute | Values | Meaning |
|---|---|---|
style:text-position | one or two values: percent, super or sub; then optionally a percent | Raise (positive or super) or lower (negative or sub) the text by a percentage of the font height, and optionally the font size as a percentage. For super and sub the program picks the offset; without the second value it picks the size. |
style:text-rotation-angle | angle (an integer is degrees) | Rotate the text; a selection of several characters turns as a block. |
style:text-rotation-scale | fixed, line-height | For rotated text: keep the width (changing the line height) or scale it to fit the line height. |
style:text-emphasize | none, or a mark and a position: accent, dot, circle, disc with above or below | Emphasis marks on Asian text: calligraphic accent, calligraphic dot, hollow circle, filled circle. |
style:text-combine | none, letters, lines | letters (Kumimoji): up to five characters squeezed into two lines in one wide character cell, the rest shown normally. lines (Warichu): a run of characters set in two lines of about equal length within the line. |
style:text-combine-start-char, style:text-combine-end-char | a character | Characters shown before and after Warichu text (such as brackets). |
style:text-blinking | true, false | Blinking text. |
Language and hyphenation
| Attribute | Values | Meaning |
|---|---|---|
fo:language / style:language-asian / style:language-complex | language code (ISO 639, wider than XSL allows) | Language of the text. May be ignored without a country. |
fo:country / style:country-asian / style:country-complex | country code | Country. May be ignored without a language. |
fo:script / style:script-asian / style:script-complex | script code | Script, only where RFC 5646 §2.2.3 calls for one. |
style:rfc-language-tag / -asian / -complex | RFC 5646 tag | Only when the tag cannot be expressed by language, script and country. Writers may also give those three, approximately, for older readers. |
fo:hyphenate | true, false | Hyphenate words. |
fo:hyphenation-remain-char-count | positive integer | Fewest characters left before a hyphen. |
fo:hyphenation-push-char-count | positive integer | Fewest characters carried to the next line. |
Ruby properties
style:ruby-properties belongs to styles of family ruby,
used by text:ruby (ruby text, small annotations above or below a run of
base text).
| Attribute | Values | Meaning |
|---|---|---|
style:ruby-position | above, below | Ruby text above or below the base text. |
style:ruby-align | left, center, right, distribute-letter, distribute-space | Alignment against the base. distribute-letter: the shorter of ruby and base is spread so its first and last letters line up with the other’s; distribute-space: spread with space before the first and after the last letter (normally half the gap between letters). |
Source
OpenDocument Version 1.3, OASIS Standard, 27 April 2021, part 3 (schema), section
16.29.29 (style:text-properties), 17.10 and the matching attributes in
chapter 20 (including Table 22, script types); read in full for this page. For the
exact syntax of the fo: values the standard refers to XSL 1.0, which was
not read for this page.