You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, SVG 2.0 spec right now says that text chunks should always have their own shaping and reordering, however, that means joined scripts might break, discussed in #631, which then suggests it's undefined. However, the SVG 2.0 text layout algorithm also says "For all other text (SVG 1.1 compatible text and SVG 1.1 like multi-line text), layout the text in a CSS content box that is unconstrained in width and height. " Which means that the following happens:
The top being the text as it rolls out of the CSS-based renderer, and the bottom being the SVG text layout algorithm adjusting the positions. Which means that spec-wise, technically the behaviour is defined and Firefox is implementing it correctly.
So, there's the following options:
Layout every text chunk as a separate paragraph. Confuses the idea of a text element being a paragraph, though, and that will affect paragraph-based CSS properties like text-indent.
Insert bidi-controls around each text chunk. I know too little of the bidi algorithm what kind of effect this has.
Recalculate the advances of each glyph so they'll sit snug together. In theory this could have odd results caused by shaping, but I don't know enough of the related algorithms to tell you whether this is a serious issue.
Somehow figure out a way to have each text chunk laid out as a wrapping-line.
Do nothing?
I mostly wanted to make sure people would know that this is what happens if you follow the spec precisely. I am glad SVG 2.0 has proper text-wrapping when as the basic positioning of SVG 1.1 leads to a lot of questions.
The text was updated successfully, but these errors were encountered:
I've been doing some tests, and found that if the following SVG gives different results in different browsers.
Chromium 106:
Firefox 105:
Now, SVG 2.0 spec right now says that text chunks should always have their own shaping and reordering, however, that means joined scripts might break, discussed in #631, which then suggests it's undefined. However, the SVG 2.0 text layout algorithm also says "For all other text (SVG 1.1 compatible text and SVG 1.1 like multi-line text), layout the text in a CSS content box that is unconstrained in width and height. " Which means that the following happens:
The top being the text as it rolls out of the CSS-based renderer, and the bottom being the SVG text layout algorithm adjusting the positions. Which means that spec-wise, technically the behaviour is defined and Firefox is implementing it correctly.
So, there's the following options:
I mostly wanted to make sure people would know that this is what happens if you follow the spec precisely. I am glad SVG 2.0 has proper text-wrapping when as the basic positioning of SVG 1.1 leads to a lot of questions.
The text was updated successfully, but these errors were encountered: