Skip to content

[IDEA] Support late-binding styles #44

@travisleithead

Description

@travisleithead

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions