Full version, Basic version, Tiny version

Specification link: 10.4 The 'text' element

text-intro-05-t ← index → text-text-05-t

# text-text-04-t
SVG Image | PNG Image

The purpose of this test is to validate proper handling of the text element's x and y attributes. In the various samples, a red marker shows the text's (0,0) coordinate. The blue markers show the current text positions. These are either defined by absolute x/y positioning or they are computed from the embeded font's glyphs advances.

The first text sample shows a reference piece of text.

The second text sample (x all) shows a piece of text where all the glyphs are positioned along the x axis.

The third text sample (x more) is a text element where there are more x values than characters (5 values for 4 characters). The last x value should be ignored and the result should be the same as the third sample.

The fourth text sample (x fewer) is a text element where there are fewer x values than characters (3 values for 4 characters). The last character should not be positioned but laid out normally, following its previous character sibling.

The fifth (y all), sixth (y more) and seventh (y fewer) text sample parallel the second, third and fourth test, but for the y attribute values.

The samples in the right column show combinations of x/y value sets.

In all the above tests, blue markers represent the expected glyph positions. The red markers are showing positions where no glyph should appear. The glyphs are black squares of increasing sizes.

text-intro-05-t ← index → text-text-05-t

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License.
To contribute to a W3C Test Suite, see the policies and contribution forms.