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

I think i'm beginning to understand that the question here is not really about simply counting character, but rather about segmenting text for display(right?).

I pulled together an exploratory test at https://w3c.github.io/i18n-tests/quick-tests/svg-counting/svg-counting-001 where i tried to think of the various permutations of characters that you might expect to glob together. (If you scroll down on the test page, there is a key.) Here are the results, when testing on my Mac/Windows10 machines:

Firefox
![firefox](https://user-images.githubusercontent.com/4839211/47926246-055b0500-deb8-11e8-9947-4c7ebdae8805.png)

Chrome
![chrome](https://user-images.githubusercontent.com/4839211/47926250-0b50e600-deb8-11e8-9478-a7ca4b0dab46.png)

Safari
![safari](https://user-images.githubusercontent.com/4839211/47926258-1277f400-deb8-11e8-828d-d44358c132ce.png)

Edge
![edge](https://user-images.githubusercontent.com/4839211/47926450-7dc1c600-deb8-11e8-84a2-107602a58529.png)

Chrome and Safari step codepoint by codepoint.

Firefox appears to segment on grapheme cluster boundaries, which means that the first conjunct is split (ugly).  However, it does keep the repha with the later conjunct.  It also keeps the burmese characters together, although there are two grapheme clusters involved.

Edge looks best to me. It keeps together everything i would have expected.

All browsers keep the arabic lam-alif ligature together.




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

Received on Friday, 2 November 2018 16:05:54 UTC