Skip to content

Store colors in TextLayoutInfo and extraction buffers per per glyph/slice #18849

Open
@ickshonpe

Description

@ickshonpe

What problem does this solve or what need does it fill?

With per section color storage:

  1. Text extraction has to query for the TextColor components seperately, adding extra complexity to the extraction function and degrading performance.
  2. A new extracted item has to be queued per color change. This will be very expensive if you have a lot of different coloured glyphs.

What solution would you like?

Store colors in TextLayoutInfo and the extraction buffers per per glyph/slice

Alternatives

We could store the colors in a separate list of (Color, Range<usize>) or something.
The synchronisation would add complexity though and for games it's common to have large numbers of small text labels where per glpyh storage should be more efficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenA-TextRendering and layout for charactersC-Code-QualityA section of code that is hard to understand or changeC-PerformanceA change motivated by improving speed, memory usage or compile times

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions