TestCoverage/10-Text

From SVG

This page is an archive of the previous Group's wiki from http://www.w3.org/Graphics/SVG/Group/wiki.


Test Coverage for SVG Tiny 1.2 Chapter 10: Text

[1]

Legend:

 - is a comment or note
  is an assertion or feature that is fully covered in the test suite
 # is an assertion or feature that is partially or not covered in the test suite

Removed or changed all tests which contain 'tref', 'textPath', 'text-decoration', or 'opacity'


10.1 Introduction

 test basic rendering of text, along with text-styles bold and italic, fill-only, stroke-only, and a combination of all of these.
 - text-intro-201-t.svg
- text-intro-01-t.svg
- text-intro-04-t.svg
- text-intro-05-t.svg
- text-intro-06-t.svg

10.2 Characters and their corresponding glyphs

 A single Unicode character mapping to a single glyph
 - text-area-225-t.svg


# Multiple Unicode characters mapping to a single glyph


# A single Unicode character mapping to multiple glyphs


# Multiple Unicode characters mapping to multiple glyphs


# 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-align-07-t.svg mixes baselines for Western, Northern Indic and Far-Eastern text.
 - text-align-08-t.svg horizontal baselines across script and font size changes.

10.4 The 'text' element

# Test that contains various text elements with transforms applied to each element.


# Test that contains various text elements with different fill and stroke paint servers applied.


 Test that contains various text elements with opacity applied to fill and stroke.
 - text-text-04-t.svg


# "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".
- text-text-04-t.svg tests proper handling of the text element's x and y attributes
- text-text-07-t.svg tests multiple x, y, rotate, with various combinations
- text-text-09-t.svg tests multiple x, y, rotate, with various combinations

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.
 - text-align-01-t.svg tests when no value specified.
 - text-align-201-t.svg test uses text-anchor with tspan.
 - text-align-202-t.svg tests values with non-english languages.
 - text-align-203-t.svg tests inherit value.
 - text-text-05-t.svg tests the interaction of text-anchor and x/y glyph positioning.

10.9 Font selection properties

 Test text elements with 'font-family' applied.
 - Test all values of 'font-family' [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-family>] | inherit.
 - text-fonts-01-t.svg
 - text-fonts-03-t.svg


# Test text elements with 'font-style' applied.
 - Test all values of 'font-style' [normal | italic | oblique | inherit].


# Test text elements with 'font-variant' applied.
 - Test all values of 'font-variant' [normal | small-caps | inherit].


 Test that has text elements with 'font-weight' applied.
 - Test all values of 'font-weight' [normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit].
 - Test test normal = "400", bold = "700", bolder when inherited 'font-weight' = "900", lighter when inherited 'font-weight' set "100".
 - text-fonts-02-t.svg
 - text-fonts-202-t.svg
 - text-fonts-203-t.svg


# Test that has text elements with 'font-size' applied.
 - Test all values of 'font-size' [<absolute-size> | <relative-size> | <length> | inherit].

10.10 White space handling

 Test text elements each with the different values of 'xml:space' [default | preserve] respectively. A least one separation between words in the text element should have more than one space.
 - text-area-223-t.svg Tests that whitespace is correctly handled in textArea with xml:space applied.
 - text-area-224-t.svg Tests that whitespace is correctly handled in textArea when xml:space is used.
 - text-ws-01-t.svg
 - text-ws-02-t.svg

10.11 Text in an area

10.11.1 Introduction to text in an area

- Nothing to test here.

10.11.2 The 'textArea' element

 Test textArea elements with various values for x, y, width and height attributes.
 - text-area-201-t.svg Testing 'textArea' with fixed 'width' and 'height'.
 - text-area-202-t.svg Testing 'textArea' with fixed 'width' and 'height'.
 - text-area-203-t.svg TextArea with Animated Width and Height.
 - text-area-204-t.svg TextArea with Animated Font-size.
 - text-area-205-t.svg TextArea with Height Set to Auto.
 - text-area-207-t.svg TextArea Transformed by Rotation.
 - text-area-208-t.svg TextArea with Both Width and Height Set to Auto.

10.11.3 The 'tbreak' element

 Test that has a textArea element with large width and height. Text inside the textArea is broken after the first word using a tbreak element.
 - text-area-209-t.svg TextArea Testing Word Breaks and Tbreak.
 - text-area-210-t.svg Testing "tbreak".
 - text-area-211-t.svg Testing 'tbreak' while animating the 'font-size' attribute in 'tspan' in 'textArea'.
 - text-area-212-t.svg Testing 'tbreak' while animating the 'font-size' attribute in 'tspan' in 'textArea'.

10.11.4 The 'line-increment' property

 Test that has a textArea element with a 'line-increment' property applied.
 # Test all values of 'line-increment' [auto | number | inherit].
 - text-area-206-t.svg TextArea with Line-increment and Tbreak.
 - text-area-221-t.svg TextArea with line-increment, text-align and display-align.

10.11.5 The 'text-align' property

 Test eight textArea elements each with a 'text-align' property applied.
 # The first four textArea elements have their language set to English and test all four values of 'text-align' [start | end | center | inherit] respectively.
 # The last four textArea elements have their language set to Hebrew and test all four values of 'text-align' [start | end | center | inherit] respectively.
 - Vertical text is not supported in SVG Tiny 1.2, hence a test for Chinese is not required.
 - text-area-220-t.svg
 - text-area-221-t.svg TextArea with line-increment, text-align and display-align.

10.11.6 The 'display-align' property

 Test five textArea elements each with a 'display-align' property applied.
 - text-area-213-t.svg TextArea with Animated Width and Height.
 # All five values of 'display-align' [inherit] are applied to each textArea respectively.

10.11.7 Text in an area layout rules

 Test that has a textArea filled with text that will extend outside the given area.
 - text-area-212-t.svg Testing 'tbreak' while animating the 'font-size' attribute in 'tspan' in 'textArea'.

10.12 Editable Text Fields

10.12.1 The editable attribute

 "Whenever the 'editable' attribute is set to simple, the 'focusable' attribute is considered to be set to true, irrespective of what the actual value is".
 # Test text element with 'editable' = "simple" and 'focusable' = "false".
 - text-area-222-t.svg Testing 'textArea' with editable attribute.


# "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.
- Tested in: text-edit-201-t.svg


# "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".
- Tested in: text-edit-201-t.svg
 - 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.
- text-tselect-03-t.svg Tests text selection of bidirectional text.