w3c / svgwg

SVG Working Group specifications
Other
705 stars 132 forks source link

SVG Text Layout algorithm adjusts dx and dy wrong #271

Open karip opened 8 years ago

karip commented 8 years ago

The step 4.2.2 “Adjust positions: dx, dy” in the text chapter uses wrong variables. It says:

“Let shift.x = shift.x + resolve_x[i] and shift.y = shift.y + resolve_y[i].”

I think it should be

“Let shift.x = shift.x + resolve_dx[i] and shift.y = shift.y + resolve_dy[i].”

Tavmjong commented 8 years ago

4.2.1 should probably be: Let shift be the cumulative x and y shifts due to ‘dx’ and ‘dy’ attributes, initialized to (0,0).

I will review this further.

karip commented 8 years ago

You are right. Also, the one below it should be:

  1. If resolve_dx[i] is unspecified, set it to 0. If resolve_dy[i] is unspecified, set it to 0.