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

Not an expert on Unicode, but I think what we'd want is the definition of a ["base character"](https://www.unicode.org/glossary/#base_character):

> Base Character. Any graphic character except for those with the General Category of Combining Mark (M). (See definition D51 in Section 3.6, Combination. [PDF](http://www.unicode.org/versions/Unicode11.0.0/ch03.pdf#G30602)) In a combining character sequence, the base character is the initial character, which the combining marks are applied to.

So then the SVG rules would assign attribute values to the Unicode base characters in the text.  Actual layout would still need special rules for ligatures and other clusters which are laid out as a whole based on font-specific rules.

Upside: This is a good balance of intuitive and unambiguous.
Downside: There's no easy JS way (as far as I know) to identify how many "base characters" there are in a string.

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

Received on Monday, 3 September 2018 20:17:26 UTC