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

Improve text circle-fitting. #2

Open
nathanhammond opened this issue Apr 27, 2014 · 0 comments
Open

Improve text circle-fitting. #2

nathanhammond opened this issue Apr 27, 2014 · 0 comments

Comments

@nathanhammond
Copy link
Owner

The algorithm for text circle-fitting is currently expensive in multiple ways:

  • Requires reviewing every permutation of possible line-breaks.
  • Permutations include duplication.
  • Lots of likely unnecessary intermediate values.
  • Interleaved DOM reads and writes triggering layout.
  • Not easy to understand what it's doing.
  • Tightly coupled with where it is used.

It works, but is worth refactoring into an easily-usable plugin or three:

  • circle-fitter
  • textblock-permutations
  • baseline-measure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant