Skip to content

Conversation

@davepagurek
Copy link
Contributor

Resolves #7787

Changes:

  • Caches WebGL font data based on the individual data textures rather than per glyph (since glyphs share some of the data textures)
  • Removes font IDs since we no longer need to create a custom cache key -- the cache can be based on unique ImageData object references now
  • Adds a visual test to prevent regressions

Screenshots of the change:

Before:
image

After:
image

Live: https://editor.p5js.org/davepagurek/sketches/HOCMo0I8F

PR Checklist

@davepagurek davepagurek merged commit c2467d0 into dev-2.0 May 6, 2025
2 checks passed
@davepagurek davepagurek deleted the fix/webgl-text-rendering branch May 6, 2025 12:46
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.

2 participants