Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG Text Layout algorithm adjusts dx and dy wrong #271

Open
karip opened this issue Sep 15, 2016 · 2 comments · May be fixed by #847
Open

SVG Text Layout algorithm adjusts dx and dy wrong #271

karip opened this issue Sep 15, 2016 · 2 comments · May be fixed by #847

Comments

@karip
Copy link

karip commented Sep 15, 2016

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
Copy link
Contributor

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
Copy link
Author

karip commented Sep 15, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment