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

feat: Add pixelRatio override for Text rendering #2294

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

eonarheim
Copy link
Member

===:clipboard: PR Checklist :clipboard:===

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog entry added (or not needed)

==================

Closes #2291

This PR assists in pixelated Text rendering by increasing the number of internal pixels available on the canvas, to do this I added a pixelRatio that can be set at Engine constructor time.

Before antialiasing is off (pixel art mode), default pixelRatio

image

After antialiasing is off (pixel art mode) but pixelRatio is set to 4

image

Changes:

  • Added pixelRatio option to Engine constructor
  • Added/updated tests
  • Commented Font renderer

@eonarheim eonarheim merged commit ffc81e1 into main Apr 9, 2022
@eonarheim eonarheim deleted the bugfix/smooth-text-rendering branch April 9, 2022 20:02
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.

Text Graphics seem pixelated regardless of quality
1 participant