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
If an implementation follows the current algorithm, following two <text>s should show different results because "anchored chunk" flags for all characters are cleared in the second one though they are identical in major browsers.
Let's trace the algorithm with the second example. Assume that result[0] is for 'I', result[1] is for '❤', result[2] is for 'S'.
Procedure resolve character positioning for <text> sets the "anchored chunk" flags of result[0], result[1], and result[2] to true. ( 3.2.1.6.1.1 if i < new_check_count, then set the "anchored chunk" flag of result[index + j] to true. Else set the flag to false.)
Then we enter resolve character positioning for <tspan>.
It sets the "anchored chunk" flags of result[0], result[1], and result[2] to false because new_chunk_count is 0.
The current algorithm also overwrites "anchored chunk" flag set by '2.3. If the character at index i corresponds to a typographic character at the beginning of a line, then set the "anchored chunk" flag of result[i] to true.' and '3.2.2.2. Set the "anchored chunk" flag of result[index] to true.'
I think an easy fix would be
Do not set false at 3.2.1.6.1.1
At 3.2.2.2, set result[i] for all of descendant characters of <textPath> to false except for result[index].
The text was updated successfully, but these errors were encountered:
Specification: "3. Resolve character positioning" in https://svgwg.org/svg2-draft/text.html#TextLayoutAlgorithm
If an implementation follows the current algorithm, following two
<text>
s should show different results because "anchored chunk" flags for all characters are cleared in the second one though they are identical in major browsers.What's wrong
Let's trace the algorithm with the second example. Assume that result[0] is for 'I', result[1] is for '❤', result[2] is for 'S'.
<text>
sets the "anchored chunk" flags of result[0], result[1], and result[2] to true. ( 3.2.1.6.1.1 if i < new_check_count, then set the "anchored chunk" flag of result[index + j] to true. Else set the flag to false.)<tspan>
.The current algorithm also overwrites "anchored chunk" flag set by '2.3. If the character at index i corresponds to a typographic character at the beginning of a line, then set the "anchored chunk" flag of result[i] to true.' and '3.2.2.2. Set the "anchored chunk" flag of result[index] to true.'
I think an easy fix would be
<textPath>
to false except for result[index].The text was updated successfully, but these errors were encountered: