Skip to content

Handle glyph widths up to the maximum device texture size#5278

Merged
Tyriar merged 5 commits intoxtermjs:masterfrom
Tyriar:liga_texture_limit
Jan 7, 2025
Merged

Handle glyph widths up to the maximum device texture size#5278
Tyriar merged 5 commits intoxtermjs:masterfrom
Tyriar:liga_texture_limit

Conversation

@Tyriar
Copy link
Copy Markdown
Member

@Tyriar Tyriar commented Jan 6, 2025

Fixes #5246

This adds a new special overflow atlas page of the maximum device texture size when large glyphs are needed. This is inherently slower to upload to the GPU, but it's a one time cost per glyph. This is how it looks after writing a series of - and =:

image

image

Notes:

  • There isn't any handling for when this overflows that texture as it will likely never happen in practice.
  • This should also avoid the merge logic as the texture size is already the largest supported by the GPU.
  • There are many ways we could improve this, like handling ligatures on a per cell level and then de-duplicating identical glyphs. This would need a fairly large refactor and we'd probably want to simplify the texture atlas merging if we went this route.

@Tyriar Tyriar added this to the 6.0.0 milestone Jan 6, 2025
@Tyriar Tyriar self-assigned this Jan 6, 2025
@Tyriar Tyriar changed the title Prototype of adding a large atlas page for overflow glyphs Handle glyph widths up to the maximum device texture size Jan 7, 2025
@Tyriar Tyriar marked this pull request as ready for review January 7, 2025 14:34
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

Successfully merging this pull request may close these issues.

Ligatures have a maximum width

1 participant