# Glyph substitution for Unicode characters in a direction other than right to left (e.g. vertical)

10.3 Fonts, font tables and baselines

✓ "Western and most other alphabetic and syllabic glyphs are aligned to an "alphabetic" baseline, the northern indic glyphs are aligned to a "hanging" baseline and the far-eastern glyphs are aligned to an "ideographic" baseline".

# "Text behaves like other graphical objects, and it is therefore possible to apply a gradient to text. When this facility is applied to text then the object bounding box units are computed relative to the entire 'text' element in all cases, even when different effects are applied to different 'tspan' elements within the same 'text' element".

10.5 The 'tspan' element

# "Within a text content block element, graphic and font properties can be adjusted by including a 'tspan' element".

- Test that contains a text element with nested tspans that have various different font properties applied to them.

- Test that contains a text element with nested tspans that have various different graphical properties should be applied to them.

# Test that contains a text element with nested tspans that have 'focusable' attribute applied to them with the different focusable values set. Perhaps when the tspan text has focus an event could occur.

# Test that contains a text element with nested tspans that have navigation attributes applied to them. Perhaps when the tspan is used for navigation a block moves around depending on the navigation command selected.

10.6 Text layout

10.6.1 Text layout introduction

# "Ligature formation must only occur between characters that are not separated by element markup, and must still be enabled between characters separated by other XML markup, such as comments, processing instructions, or CDATA sections".

- Test XML markup, comments, processing instructions, CDATA sections in text. Similar to the example in the specification.

10.6.2 Relationship with bidirectionality

# "While kerning or ligature processing might be font-specific, the preferred model is that kerning and ligature processing occurs between combinations of characters or glyphs after the characters have been re-ordered".

- Test kerning pairs with bidi applied to the text. Reference against text that is already placed in the reverse order.

10.7 Text rendering order

# "for text that goes right-to-left visually, the glyphs associated with the rightmost character are rendered before the glyphs associated with the other characters".

- Test glyph substitution for characters in bidi text.

10.8 Alignment properties

10.8.1 Text alignment properties

✓ Test that has a text element with 'text-anchor' applied. All values of 'text-anchor' [start | middle | end | inherit] are tested.

# "SVG Tiny 1.2 user agents must also support system functions such as copy/paste and drag/drop if they are available to applications on the platform".

- Test text element with 'editable' = "simple" and button that performs a copy from the edit box and a paste to another 'text' element with 'editable' = "simple". [Not sure how possible this test is].

# "To start editing, the current presentation value of the editable attribute must be "simple", the text content block element must have focus, and it must then be activated, e.g. by using an Enter key or clicking on the text region with a pointer device. When editing text in a text field, all DOM3 Events text and key events [DOM3Events] are dispatched to the SVG user agent, which processes the events for proper handling of text entry".

- Test text element with 'editable' = "simple". When the text element is activated the state is displayed in green text in separate text element.

# "If a text content block element is editable, then the SVG user agent must not normalize white space in user input when changing the tree according to the input. However, the displayed text must be rendered according to the SVG rules for xml:space".

- Test text elements both with 'editable' = "simple". One text element has 'xml:space' = "default" and the other has 'xml:space' = 'preserve'.

# "For editing in-place the following functionality must be made available:

movement to the next/previous character (in logical order), for example with Left/Right arrows

in textArea elements, movement to the next/previous line, for example with the Down/Up keys

movement to the beginning of the line, for example with the Home key

movement to the end of the line, for example with the End key"

- Test has a textArea element with 'editable' = "simple' and a list of the movements that are required. When each of the movement keys (Left/Right/Down/Up/Home/End) the associated movement text listed changes to green to indicate the test has passed.

# "When using a modal editing dialog, the content of the DOM nodes will only change once the user commits the edit".

- Test text element with 'editable' = "simple", a button with the text "commit". After text is typed into the text element and the commit button is pressed the contents of the edit box are displayed. Test should state that it is only applicable to modal dialog editors.

# "If the text of an editable element is edited, and the element has child elements, the contents of the edited element must first be stripped of all non-'tbreak' elements, preserving the contents of each non-'tbreak' element in place".

- Test has a textArea element with with 'editable' = "simple". The textArea element has child tspan elements that change the color of the text. The textArea element also has a tbreak elements to split the text.

- Test that checks that tbreaks are kept intact and that it's possible to input tbreaks: text-edit-201-t.svg

10.13 Text selection and clipboard operations

✓ Test two textArea elements both with 'editable = "simple" set and two buttons.

# One button with the word "copy" and other with the word "paste". When the test is loaded a selection of the text in the first textArea is highlighted. Pressing the "copy" button copies the selected text to the system clipboard. Pressing the "paste" button pastes the contents of the clipboard to the second textArea.