Re: [svgwg] Character counting in text 'x', 'y', 'dx', 'dy', and 'rotate' attributes.

A reminder that SVG already has rules for font-specific combined characters, whether those are traditional ligatures or combined emojis. They are supposed to be positioned as a single glyph-cluster, and coordinates assigned to additional characters in the combination sequence are either ignored (if they were absolute values) or accumulated in the next independently-positioned character (if they were relative adjustments).

This prevents the rest of the text layout from breaking completely if you switch between fonts (or layout engines) that do or don't support the ligature.  The assignment of coordinates in the list to characters in the text must never be affected by the font used.

Re usage & breaking changes:

Much of the usage of this feature comes from visual editors, which allow designers to manually tweak kerning, or set letter positioning absolutely, & the software converts that to coordinate sequences.  So the software will know whether it is using a pre-composed accent or a set of combining characters, and will add the correct number of values accordingly.

That said—as one of the rare people who does write these types of attributes by hand, it would be nice if I could look at text & know how many values are required.

> Additionally, I would suggest that SVG add a no-op symbol to the coordinate list syntax, which would assign the character a position relative to the previous character (as dictated by the font), so that the author doesn't have to give a coordinate for each codepoint.

This would be a nice addition to the absolute position attributes (for the relative position attributes, you can already use 0 for this result). Not sure what that would look like.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/537#issuecomment-435112151 using your GitHub account

Received on Thursday, 1 November 2018 17:07:59 UTC