Re: SVG Working Group text question.

Hi Tav, others,

Sorry for late reply.

Gah. What do I say..

On Fri, Sep 21, 2018 at 9:19 AM, Tavmjong Bah <tav.w3c@gmail.com> wrote:

> Then came the issue of how to treat precomposed and decomposed characters.
> Amelia's tests(4) show that browsers treat 'u' + combining character as
> follows:
>
>   * Firefox:    consumes two numbers, translates/rotates as unit.
>   * Chrome and Safari: consumes two numbers, translates/rotates separately.
>   * Edge: consume one number (even in cases where there is not a
> precomposed equivalent).
>
> Everyone agrees that Chrome and Safari's behavior is wrong. There is some
> disagreement between if Firefox or Edge behavior is better, the first uses
> Unicode Code points, the second uses Extended Grapheme Clusters (UAX#29).
>

I like Edge's better I think.


> My concern with Edge's behavior is that it requires an SVG renderer/editor
> to know what are Extended Grapheme Clusters which I imagine could be quite
> complex for some scripts. Pango appears to have this built in. Is this
> something that is exposed to a user?
>

Yes.  pango_break() returns PangoLogAttr array, which has
is_cursor_position set for the beginning of each Extended Grapheme Cluster.


> Is this something that is well defined for all (most) scripts?
>

It's quite well-defined by Unicode data:

  http://unicode.org/reports/tr29/


> The advantage of using Unicode Code Points (besides being backwards
> compatible) is that it is well defined and predictable.
>

Right. But Unicode Code Points are arbitrary and don't match what users
perceive as a unit.

We would appreciate any thoughts you would have about this.
>
> Thanks,
>
> Tav
>
> 1. https://github.com/w3c/svgwg/issues/537
> 2. https://www.w3.org/TR/SVG2/text.html#TSpanNotes
> 3. https://www.w3.org/TR/SVG2/text.html#InterfaceSVGTextContentElement
> 4. https://github.com/w3c/svgwg/issues/537#issuecomment-417823060
>
>


-- 
behdad
http://behdad.org/

Received on Wednesday, 26 September 2018 16:22:02 UTC