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

Handle text overflow #2

Closed
grovesNL opened this issue May 10, 2022 · 0 comments · Fixed by #17
Closed

Handle text overflow #2

grovesNL opened this issue May 10, 2022 · 0 comments · Fixed by #17

Comments

@grovesNL
Copy link
Owner

grovesNL commented May 10, 2022

Handle text overflow outside of layouts through culling and clipping.

Culling:

  • We could cull on the CPU, e.g. if all or any glyph's vertex is outside the layout then we could skip it
    • We could also clip on the CPU at this point if we want, see note below

Clipping:

  • When one layout is used per render, clipping with scissor could be handled outside of glyphon or by glyphon setting the scissor
  • When multiple layouts are used, we'd probably need to handle clipping through shader discard or clip on the CPU (e.g. clip the vertices and sample the glyph from the remaining area)
grovesNL added a commit that referenced this issue Sep 13, 2022
Cull glyphs fully outside the bounds, and clip glyphs intersecting the
bounds. This is all done on the CPU for now.

Fixes #2
grovesNL added a commit that referenced this issue Sep 14, 2022
Cull glyphs fully outside the bounds, and clip glyphs intersecting the
bounds. This is all done on the CPU for now.

Fixes #2
grovesNL added a commit that referenced this issue Oct 18, 2022
Cull glyphs fully outside the bounds, and clip glyphs intersecting the
bounds. This is all done on the CPU for now.

Fixes #2
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 a pull request may close this issue.

1 participant