Skip to content

Text layout caching by run #6300

@skyline75489

Description

@skyline75489

Description of the new feature/enhancement

From old ideas of reusing CustomTextLayout, it will be more efficient to cache the entire layout for further usage. A classic space-time tradeoff.

Proposed technical implementation details (optional)

It's a common practice to cache the glyph layout. On macOS, CoreText will internally keeps a cache about glyphs. Alacritty will prematurely set up a cache which contains the glyphs of common ANSI characters. However because Alacritty does this and rendering on character level, it fails to handle ligature correctly.

We've chosen to render run instead of single character. That gives us ligature. Could we also cache the layout by run? The cache hit rate will of course be worse than caching by character. But I feel it'll still be worth the effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-RenderingText rendering, emoji, complex glyph & font-fallback issuesIssue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions