Skip to content

Text gets blurry when resizing the viewport with the canvas_items stretch mode #86563

Description

@Kyrio

Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Tested versions

  • Reproducible in: v4.2.1.stable.official [b09f793]
  • Also reproducible in: v4.1.3

System information

Godot v4.2.1.stable - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce GTX 950M (NVIDIA; 31.0.15.3118) - Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz (4 Threads)

Issue description

One of the main advantages of the canvas_items stretch mode (née 2d) is that it scales the UI automatically while keeping the shapes and fonts crisp at any window size. It's particularly useful when you want to keep the same size ratios in your UI regardless of resolution. This is illustrated by the attached project, which I've created for both Godot 3 and Godot 4.

Here are two screenshots taken on Godot 3 (view them at 100% size to get a better idea):

The text remains crisp in Godot 3 when the viewport size increases or decreases.

image

However, in Godot 4, the behavior is different and fonts get slightly blurry at any resolution other than the viewport size defined in the settings.

image

The same behavior can be observed when resizing to a smaller viewport size, with blur being particularly noticeable.

  • Godot 3.5.3: image
  • Godot 4.2.1: image

Steps to reproduce

  1. Load the Godot 4 MRP
  2. Run the project, the default viewport size is 1024x576
  3. Resize the window or expand it, or set the project to run fullscreen
  4. Notice that the text is crisp at the base resolution, but blurry at smaller/larger resolutions
  5. You can compare with the Godot 3 project where fonts remain crisp regardless

Minimal reproduction project (MRP)

Metadata

Metadata

Assignees

Type

No type

Projects

Status
For team assessment

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions