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

[IDEA] Support late-binding styles #44

Open
travisleithead opened this issue Feb 4, 2022 · 0 comments
Open

[IDEA] Support late-binding styles #44

travisleithead opened this issue Feb 4, 2022 · 0 comments

Comments

@travisleithead
Copy link
Member

As currently envisioned, the API operates on styles and text completely independently of any other context. As a common use case is to render the FormattedText to a canvas, and because the canvas context will have some drawing state already configured (in the form of the font, strokeStyle, etc.) it might be useful to "defer" some style values to whatever is configured on the current canvas. Such values would be specified as "placeholders" and then late-bound to actual canvas state at the time of rendering.

Possible scenarios:

  • animations of color/opacity without needing the formatted text content to be re-formatted with the different styles (display-only changes that don't really impact formatting).

Note there's a small subset of things that wouldn't impact layout of the content, and these would need to be clearly documented.

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