Skip to content

The text getting randomly blurry when using "\n" with text #2964

Answered by eonarheim
huyhoang160593 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @huyhoang160593!

Thanks for the kind words! 🥰

The reason for this is subtle, Excalibur Font works by rendering text to an offscreen 2D canvas, then using that as a graphic. The problem is that when you have small font sizes there isn't a lot of pixels to work with.

This normally works just fine when you're pixel aligned, but the newline causes the next line of text to be positioned based on text length and if it doesn't fall on a pixel boundary it'll look blurry when sampled with antialiasing: false and low resolutions (less than 400x400 usually).

There are a couple of ways to work around this. For burry text in general you can try upping the quality which will give the Font rendering …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eonarheim
Comment options

Answer selected by huyhoang160593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants