Closed Bug 716666 Opened 12 years ago Closed 11 years ago
SVG <text> positioning lists break with non-BMP characters
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10 Steps to reproduce: From https://bugs.webkit.org/show_bug.cgi?id=18039: Open the testcase https://bug-18039-attachments.webkit.org/attachment.cgi?id=20000, which contains non-BMP characters positioned with dx positioning lists inside an SVG <text> element. Actual results: Characters are incorrectly positioned (they don't respect the positioning list correctly). Expected results: See a WebKit nightly for the expected result; there should be four separate characters, evenly spaced, each underlined.
See this bit from the spec: When multiple XML characters map to a single glyph (e.g., when a ligature is used) - Suppose that the i-th and (i+1)-th XML characters map to a single glyph. In this case, the i-th value for the ‘x’, ‘y’, ‘dx’, ‘dy’ and ‘rotate’ attributes all apply when rendering the glyph. The (i+1)-th values, however, for ‘x’, ‘y’ and ‘rotate’ are ignored (exception: the final ‘rotate’ value in the list would still apply to subsequent characters), whereas the ‘dx’ and ‘dy’ are applied to the subsequent XML character (i.e., the (i+2)-th character), if one exists, by translating the current text position by the given amounts before rendering the first glyph associated with that character.
Confirmed, each dx="" value should correspond to a single character (and not the individual surrogates stored in memory). Bug 655877 should fix both the positioning and the lack of underline.
Status: UNCONFIRMED → NEW
Depends on: svgtext
Ever confirmed: true
Version: 9 Branch → Trunk
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.