Specification link: 10.4 The 'text' element

text-spacing-01-b ← index → text-text-03-b

Tests that contain the draft-watermark are under development and may be incorrectly testing a feature.

# text-text-01-b.svg
SVG Image | PNG Image

## Operator Script

Run the test. No interaction required.

## Pass Criteria

The rendered picture should match the reference image, except as noted in the Test Description. In particular, the 'textLength' constraint must be satisfied precisely, and the basic rules associated with the "spacing" and "spacingAndGlyphs" values of 'lengthAdjust' must be met, but the precise algorithm for meeting all of the required contraints is otherwise unspecified.

## Test Description

Test viewer capibility to handle basic use of 'textLength' and 'lengthAdjust' attributes.

There are four pairs of sub-tests. Each pair of sub-tests consists of the same two strings: "Line to Stretch" on the left, and "this is a line to squeeze" on the right.

The first (topmost) pair contains no occurrences of the textLength and lengthAdjust attributes in the 'text' elements. The pink reference line under each of the top two strings indicates the approximate length of the strings. Since the lengths are not constrained by the 'textLength' attribute, small variations of the lengths are permissible.

The remaining three pairs each applies 'textLength' attributes to the strings. In the leftmost sub-test of each pair, the 'textLength' value will cause a stretching of the string of approximately 25% over the "normal" length. In the rightmost sub-test of each pair, the 'textLength' value will cause a squeezing of the string of approximately 20% under the "normal" length for the string.

In each of the sub-tests with an application of 'textLength', the pink reference lines indicate the exact extent of the rendered text. The rendered text should fit snugly just within the ticks at the end of the pink lines.

The second pair from the top contains 'textLength' but no 'lengthAdjust' attributes. In this case, the effect should be as if the value "spacing" were specified. Only the inter-character advancement and inter-word spacing should change. The aspect ratio of the glyphs should be unaffected. The reference image illustrates one valid way to achieve this, by a uniform increase or decrease of inter-character advancement.

The third pair from the top explicitly sets 'lengthAdjust' value to "spacing". Therefore it should be rendered identically to the second pair.

The fourth (bottommost) sub-test pair explicitly sets 'lengthAdjust' value to "spacingAndGlyphs". The advancements between characters and words, as well as the glyph aspect ratios should be affected. The reference image illustrates one valid way to achieve this, by a uniform expansion or compression of the string as a whole. This effect is equivalent to application of a "scale(xfactor, 1.0)" transformation to the 'text' elements.

text-spacing-01-b ← index → text-text-03-b