Skip to content

Improve text circle-fitting. #2

Open
@nathanhammond

Description

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

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions