Stylus Studio XML Editor

Table of contents

Appendices

7.16 Character Properties

Character Properties

character[top]

"character"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttop<character>
11lefttopInitial: 11lefttopN/A, value is required
11lefttopApplies to: 11lefttopfo:character
11lefttopInherited: 11lefttopno, a value is required
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

Values have the following meanings:

<character>

Specifies the code point of the Unicode character to be presented.

letter-spacing[top]

"letter-spacing"

CSS2 Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopnormal | <length> | <space> | inherit
11lefttopInitial: 11lefttopnormal
11lefttopApplies to: 11lefttopall elements
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "letter-spacing" property ] http://www.w3.org/TR/REC-CSS2/text.html#propdef-letter-spacing

This property specifies spacing behavior between text characters. Values have the following meanings:

normal

The spacing is the normal spacing for the current font. This value allows the user agent to alter the space between characters in order to justify text.

<length>

This value indicates inter-character space in addition to the default space between characters. Values may be negative, but there may be implementation-specific limits. User agents may not further increase or decrease the inter-character space in order to justify text.

Character-spacing algorithms are user agent dependent. Character spacing may also be influenced by justification (see the "text-align" property).

When the resultant space between two characters is not the same as the default space, user agents should not use ligatures.

Conforming user agents may consider the value of the 'letter-spacing' property to be 'normal'.

XSL modifications to the CSS definition:

The following value type has been added for XSL:

<space>

This allows the user to specify a range of adjustments in addition to the default space between characters.

The minimum and maximum values specify the limits of the adjustment.

Default space between characters is defined to be 0pt, i.e., glyph-areas stacked with no extra space between the allocation-rectangles of the glyph-areas. The inline-progression-dimension of the glyph-area is obtained by formatting the fo:character.

For an fo:character that in the Unicode database is classified as "Alphabetic", unless the treat-as-word-space trait has the value "true", the space-start and space-end traits are each set to a value as follows:

  • For "normal": .optimum = "the normal spacing for the current font" / 2, .maximum = auto, .minimum = auto, .precedence = force, and .conditionality = discard. A value of auto for a component implies that the limits are User Agent specific.

  • For a <length>: .optimum = <length> / 2, .maximum = .optimum, .minimum = .optimum, .precedence = force, and .conditionality = discard.

  • For a <space>: a value that is half the value of the "letter-spacing" property for the numeric components and the value for the .precedence and .conditionality components. The initial values for .precedence is "force" and for .conditionality "discard".

The CSS statement that "Conforming user agents may consider the value of the 'letter-spacing' property to be 'normal'." does not apply in XSL, if the User Agent implements the "Extended" property set.

NOTE: 

If it is desired that the letter space combine with other spaces that have less than forcing precedence, then the value of the "letter-space" should be specified as a <space> with precedence less than force which implies that space combines according to the space resolution rules described in [spacecond] .

The algorithm for resolving the adjusted values between word spacing and letter spacing is User Agent dependent.

suppress-at-line-break[top]

"suppress-at-line-break"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | suppress | retain | inherit
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:character
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

This property applies only to fo:character and determines whether the character's representation shall be suppressed when it would occur adjacent to a formatter-generated line break. Multiple characters may be so suppressed.

This property has the following values:

auto

The value of this property is determined by the Unicode value of the object's character property. The character at code point U+0020 is treated as if 'suppress' had been specified. All other characters are treated as if 'retain' had been specified.

This value does not automatically suppress the presentation of the non-breaking-space (U+00A0), the fixed spaces (U+2000 through U+200A), or the ideographic-space (U+3000).

suppress

If the glyph-area generated by the fo:character is first or last in a line-building partition (see section [area-linebuild] ) then it is deleted rather than being placed in the area tree, together with all adjacent areas with a suppress-at-line-break value of suppress. Otherwise it is retained and placed in the area tree.

retain

The glyph-area generated by the fo:character shall be placed in the area tree whether or not it is first or last in a line-building partition.

text-decoration[top]

"text-decoration"

CSS2 Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopnone | [ [ underline | no-underline] || [ overline | no-overline ] || [ line-through | no-line-through ] || [ blink | no-blink ] ] | inherit
11lefttopInitial: 11lefttopnone
11lefttopApplies to: 11lefttopall elements
11lefttopInherited: 11lefttopno, but see prose
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "text-decoration" property ] http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-decoration

This property describes decorations that are added to the text of an element. If the property is specified for a block-level element, it affects all inline-level descendants of the element. If it is specified for (or affects) an inline-level element, it affects all boxes generated by the element. If the element has no content or no text content (e.g., the IMG element in HTML), user agents must ignore this property.

Values have the following meanings:

none

Produces no text decoration.

underline

Each line of text is underlined.

overline

Each line of text has a line above it.

line-through

Each line of text has a line through the middle

blink

Text blinks (alternates between visible and invisible). Conforming user agents are not required to support this value.

The color(s) required for the text decoration should be derived from the "color" property value.

This property is not inherited, but descendant boxes of a block box should be formatted with the same decoration (e.g., they should all be underlined). The color of decorations should remain the same even if descendant elements have different "color" values.

XSL modifications to the CSS definition:

XSL adds the following values with the following meanings:

no-underline

Turns off underlining, if any.

no-overline

Turns off overlining, if any.

no-line-through

Turns off line-through, if any.

no-blink

Turns off blinking, if any.

text-shadow[top]

"text-shadow"

CSS2 Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopnone | [<color> || <length> <length> <length>? ,]* [<color> || <length> <length> <length>?] | inherit
11lefttopInitial: 11lefttopnone
11lefttopApplies to: 11lefttopall elements
11lefttopInherited: 11lefttopno, see prose
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "text-shadow" property ] http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-shadow

This property accepts a comma-separated list of shadow effects to be applied to the text of the element. The shadow effects are applied in the order specified and may thus overlay each other, but they will never overlay the text itself. Shadow effects do not alter the size of a box, but may extend beyond its boundaries. The stack level of the shadow effects is the same as for the element itself.

Each shadow effect must specify a shadow offset and may optionally specify a blur radius and a shadow color.

A shadow offset is specified with two "length" values that indicate the distance from the text. The first length value specifies the horizontal distance to the right of the text. A negative horizontal length value places the shadow to the left of the text. The second length value specifies the vertical distance below the text. A negative vertical length value places the shadow above the text.

A blur radius may optionally be specified after the shadow offset. The blur radius is a length value that indicates the boundaries of the blur effect. The exact algorithm for computing the blur effect is not specified.

A color value may optionally be specified before or after the length values of the shadow effect. The color value will be used as the basis for the shadow effect. If no color is specified, the value of the "color" property will be used instead.

text-transform[top]

"text-transform"

CSS2 Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopcapitalize | uppercase | lowercase | none | inherit
11lefttopInitial: 11lefttopnone
11lefttopApplies to: 11lefttopall elements
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "text-transform" property ] http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-transform

This property controls capitalization effects of an element's text. Values have the following meanings:

capitalize

Puts the first character of each word in uppercase.

uppercase

Puts all characters of each word in uppercase.

lowercase

Puts all characters of each word in lowercase.

none

No capitalization effects.

The actual transformation in each case is written language dependent. See [RFC2070] for ways to find the language of an element.

Conforming user agents may consider the value of "text-transform" to be "none" for characters that are not from the ISO Latin-1 repertoire and for elements in languages for which the transformation is different from that specified by the case-conversion tables of Unicode or ISO 10646.

XSL modifications to the CSS definition:

There are severe internationalization issues with the use of this property. It has been retained for CSS compatibility, but its use is not recommended in XSL.

treat-as-word-space[top]

"treat-as-word-space"

XSL Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopauto | true | false | inherit
11lefttopInitial: 11lefttopauto
11lefttopApplies to: 11lefttopfo:character
11lefttopInherited: 11lefttopno
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

This property determines if the character shall be treated as a word space or as a normal letter.

This property has the following values:

auto

The value of this property is determined by the Unicode code point for the character.

As the default behavior:

  • The characters at code points U+0020 and U+00A0 are treated as if 'true' had been specified. All other characters are treated as if 'false' had been specified.

  • This property does not automatically apply word spacing to the fixed spaces (U+2000 through U+200A) or the ideographic-space (U+3000).

  • This default behavior can be overridden by information in the font used for formatting the character, which can specify additional characters that may be treated as "word spaces".

true

This inline-progression-dimension of the character shall be adjusted as described in the "word-spacing" property.

false

This character shall not have a word spacing adjustment applied.

word-spacing[top]

"word-spacing"

CSS2 Definition:

0prop-summary lefttoplefttoplefttoplefttoplefttoplefttop
11lefttopValue: 11lefttopnormal | <length> | <space> | inherit
11lefttopInitial: 11lefttopnormal
11lefttopApplies to: 11lefttopall elements
11lefttopInherited: 11lefttopyes
11lefttopPercentages: 11lefttopN/A
11lefttopMedia: 11lefttopvisual

CSS2 Reference: [ "word-spacing" property ] http://www.w3.org/TR/REC-CSS2/text.html#propdef-word-spacing

This property specifies spacing behavior between words. Values have the following meanings:

normal

The normal inter-word space, as defined by the current font and/or the UA.

<length>

This value indicates inter-word space in addition to the default space between words. Values may be negative, but there may be implementation-specific limits.

Word spacing algorithms are user agent-dependent. Word spacing is also influenced by justification (see the 'text-align' property).

XSL modifications to the CSS definition:

The following value type has been added for XSL:

<space>

This allows the user to specify a range of adjustments in addition to the default space between words.

The minimum and maximum values specify the limits of the adjustment.

Default space between words is defined to be the inline-progression-dimension of the glyph-area obtained by formatting the current fo:character whose treat-as-word-space trait has the value "true".

For fo:character whose treat-as-word-space trait has the value "true", the space-start and space-end traits are each set to a value as follows:

  • For "normal": .optimum = ("the normal inter-word space, as defined by the current font and/or the UA" - "the inline-progression-dimension of the glyph-area obtained by formatting the fo:character") / 2, .maximum = .optimum, .minimum = .optimum, .precedence = force, and .conditionality = discard.

  • For a <length>: .optimum = <length> / 2, .maximum = .optimum, .minimum = .optimum, .precedence = force, and .conditionality = discard.

  • For a <space>: a value that is half the value of the "word-spacing" property for the numeric components and the value for the .precedence and .conditionality components. The initial values for .precedence is "force" and for .conditionality "discard".

NOTE: 

If it is desired that the word space combine with other spaces that have less than forcing precedence, then the value of the word space should be specified as a <space> with precedence less than force which implies that space combines according to the space resolution rules described in [spacecond] .

The algorithm for resolving the adjusted values between word spacing and letter spacing is User Agent dependent.

NOTE: 

The "word-spacing" property only affects the placement of glyphs and not the shape that may be associated with the characters. For example, adjusting a "_" treated as a word space does not lengthen or shorten the "_" glyph.