You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 28, 2025. It is now read-only.
Looks like we're somehow handling line-wrapping incorrectly, as the blurriness only occurs on certain lines (seems to be independent of line breaks, as "The original..." and "Eric..." both take place after \n\n. The bottom section is entirely individual lines)
Interesting that the blur is only vertical. Wonder if this means that we've got an incorrectly-calculated offset somewhere...
It looks like the issue is that we don't handle floating point offsets well. The line offsets are calculated in Canabalt itself, so they are not incorrect, but they are usually non-integral floats (14.0002, 42.50001).
Flooring the x- and y-offsets to make them integral gets rid of the blur.
However, setting x- and y-offsets to their floor() + 0.5 reproduces the blur in both vertical and horizontal directions!
I'm suspecting that this has to do with us using a bitmap for our render target ( Dustin L. Howett (MSFT) (@DHowett-MSFT) can you comment on this? ), causing this interpolation artifact when our offsets aren't integral. It's particularly noticeable in this case because of the pixelated style of font Canabalt uses.
Activity
[-]Canabalth - about screen text is blurry [/-][+]Canabalt - about screen text is blurry [/+]ms-jihua commentedon Dec 30, 2016
Looks like we're somehow handling line-wrapping incorrectly, as the blurriness only occurs on certain lines (seems to be independent of line breaks, as "The original..." and "Eric..." both take place after \n\n. The bottom section is entirely individual lines)
Interesting that the blur is only vertical. Wonder if this means that we've got an incorrectly-calculated offset somewhere...
ms-jihua commentedon Dec 30, 2016
It looks like the issue is that we don't handle floating point offsets well. The line offsets are calculated in Canabalt itself, so they are not incorrect, but they are usually non-integral floats (14.0002, 42.50001).
Flooring the x- and y-offsets to make them integral gets rid of the blur.

However, setting x- and y-offsets to their floor() + 0.5 reproduces the blur in both vertical and horizontal directions!

I'm suspecting that this has to do with us using a bitmap for our render target ( Dustin L. Howett (MSFT) (@DHowett-MSFT) can you comment on this? ), causing this interpolation artifact when our offsets aren't integral. It's particularly noticeable in this case because of the pixelated style of font Canabalt uses.
Change CT/CG text rendering to default on DWRITE_RENDERING/MEASURING_…
Enable vertical pixel-snapping when drawing glyph runs
Enable vertical pixel-snapping when drawing glyph runs (#1890)
Release 1702.1 (#1992)