Skip to content

UiScale no longer scales text correctly in Bevy main branch #7476

@forbjok

Description

@forbjok

Bevy version

The Bevy main branch, currently commit: 1a18ab3

[Optional] Relevant system information

Rust: 1.67.0
OS: Windows 10 Pro version 10.0.19045 Build 19045

`AdapterInfo { name: "NVIDIA GeForce RTX 2070", vendor: 4318, device: 7943, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "528.24", backend: Vulkan }`

What you did

After updating an existing game project to work with the current Bevy main branch for testing purposes, I noticed that all UI text was extremely tiny and borderline unreadable.

What went wrong

This is because UiScale, which in 0.9.x works correctly and upscales all UI elements, doesn't seem to work on text anymore.

what were you expecting?

UiScale to work the same as before and scale the text up, so that it matches with the rest of the UI and looks correct at all pixel scale values.

what actually happened?

Text always stays the same size (as scale = 1.0), and there also seems to be something very odd going on with positioning, which I'm not entirely sure of the logic of. When pixel scale is increased, all text seems to move to the left, eventually completely off screen.

Additional information

Minimal reproduction repository:
https://github.com/forbjok/bevy_ui_repro
(Press X to increase pixel scale)

Code_nSB5bLfEUl

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorP-RegressionFunctionality that used to work but no longer does. Add a test for this!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions